How to improve the design of a linear ramp generator ?

Thread Starter

Philexium

Joined Oct 15, 2017
85
I have designed a linear ramp generator with a NE 555 in a monostable mode and a transistor loading a capacitor with a constant current source.

The purpose of the circuit is to control a level crossing for a model train with a servomotor :

  • First pulse : the servomotor opens the barrier during about 10 seconds
  • The barrier remains open
  • Second pulse : the servomotor closes the barrier during about 10 seconds
I have applied the ramp signal to the Control Voltage pin of the NE555.

The problem is the following :
At the end of the ramp, as it gets back to 0 V, the servomotor returns abruptly to its initial position !

So how to modify the circuit (Is the NE555 the right solution ?) :

  • to maintain the position after the first pulse
  • and allow at the second pulse to get back to the initial position ?
Thank you for your ideas !
 

Attachments

Thread Starter

Philexium

Joined Oct 15, 2017
85
Hi Philippe,
Please post the latest version of your circuit.
E
Hi Eric,

Well this is actually the latest version.

This ciruit works for opening the barrier with the servomotor but
at the end of the ramp, as it gets back to 0 V, the servomotor returns abruptly to its initial position !

I was thinking about an additional circuit using an opamp to reverse the ramp to close the barrier but the above problem remains ...

Again best wishes for the new year for you and your family

Philippe
 

ericgibbs

Joined Jan 29, 2010
18,867
Hi Phil,
As you may know, a Servo has to be powered by a pulse at all times for it to hold its last position.
If you cut off the pulses, then any gravitational load on the servo system will move the servo to a resting position.

E
 

PaulEE

Joined Dec 23, 2011
474
Bonjour Philexium,

I can only briefly look at this right now (at work) but am I correct in saying that you are controlling the duty cycle of the output signal by using the ramp?

If the motor is to stay in either position "A" or "B", and these two positions are the min and max positions possible for the motor, pour example, then the ramp must either remain at zero, or it must remain at V, to furnish the correct duty-cycle square wave to keep the motor in position.

Is that approximately what you are aiming to do?

If so, when you reset the ramp, the duty cycle therefore changes, which would mean your motor will indeed jump back to the original position.

Now how to solve...j'une question...is the motor only ever in either "A" position or "B" position, or do you sometimes stop it in between? And are the other observations corret as far as how it is supposed to work and overall circuit theory?

Paul
KI5VNH
 

Thread Starter

Philexium

Joined Oct 15, 2017
85
Bonjour Philexium,

I can only briefly look at this right now (at work) but am I correct in saying that you are controlling the duty cycle of the output signal by using the ramp?

If the motor is to stay in either position "A" or "B", and these two positions are the min and max positions possible for the motor, pour example, then the ramp must either remain at zero, or it must remain at V, to furnish the correct duty-cycle square wave to keep the motor in position.

Is that approximately what you are aiming to do?

If so, when you reset the ramp, the duty cycle therefore changes, which would mean your motor will indeed jump back to the original position.

Now how to solve...j'une question...is the motor only ever in either "A" position or "B" position, or do you sometimes stop it in between? And are the other observations corret as far as how it is supposed to work and overall circuit theory?

Paul
KI5VNH
Hi Paul,

Nice to read you again !
Hope you have had a nice new year .

The purpose is to reproduce the operation of a level crossing for a model train.

Here are more explanations for the specifications :
Step 1 : the servomotor closes automatically the barrier of the level crossing during 10 seconds, to add a more realistic effect
Step 2 : the barrier remains closed during the model train is running
Step 3 : the servomotor opens the barrier during 10 seconds
Step 4 : the barrier remains open

What I have tested :
Yes the constant current source with the NE555 and the transistor loading a capacitor automatically resets at 0 V at the end of the ramp.
So I am wondering whether the choice of a NE555 is a good choice indeed !

Another point further to what Eric said above : my servomotor keeps its position when the supply is cut.

Look at the small drawing encosed : a picture is worth a thousand words :)
Thank you again for your time
Philippe
 

Attachments

crutschow

Joined Mar 14, 2008
34,464
You could do an equal linear ramp up and down, plus hold, with an op amp integrator.

Ltspice simulation of example circuit below:
The output ramps up from 0V to the maximum in about 10 seconds when the input goes from 5V to 0V, and stays at about 3.6V (for the op amp shown) until the input goes back to 5V, where the output ramps back down.
D1 and D2 minimize integrator saturation windup which otherwise significantly delays the start of the ramp.

Would that work for you?

1672947415692.png
 
Last edited:

Thread Starter

Philexium

Joined Oct 15, 2017
85
hi Phil,
Using your full circuit, I do not get the desired Pout, please check my circuit for any errors.
E
View attachment 284575
Eric

I have started to check again as I didn't see any error until now
I am preparing a document with the signals I get at every stage

But it's time for dinner now so talk to you tomorrow morning and thanks again for your help.
Have a nice evening
 

Thread Starter

Philexium

Joined Oct 15, 2017
85
hi Phil,
Using your full circuit, I do not get the desired Pout, please check my circuit for any errors.
E
View attachment 284575
Good morning Eric !

I have double checked again this morning your LTSpice schematic and didn't see any error ...
Two remarks :
- The servomotor is turning 90 ° when R2 which is in fact a 22 k pot. is at mid course
- The C8 47 nF capa. is not always connected to 5V. I just give a quick contact to generate the pulse
So I have enclosed a new document including the signals at the output of each signal.
I really hope it will help you to identify where the problem is coming from.

Another point : have you seen the circuit to generate a linear ramp with the opamp from @crutschow ?
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,867
hi Phil,
The problem I have is that the Ramp is only 0.1Sec in duration.?
Using the component values in post #8
I am working on the problem.
E

Edit Ramp is now 1.8Sec
 

Thread Starter

Philexium

Joined Oct 15, 2017
85
hi Phil,
The problem I have is that the Ramp is only 0.1Sec in duration.?
Using the component values in post #8
I am working on the problem.
E

Edit Ramp is now 1.8Sec
Yes with Re 10 k here on my breadboard the duration is 2 s so very close !
With Re 100 k I get 8,5 sec

I think the linear ramp with the NE 555 is a bad design
 

ericgibbs

Joined Jan 29, 2010
18,867
Hi Phil,
I did not make my query clear.
As the ramp rises, the Pulse ON period Pout should change, from what........... to what ...........
E

Added timing at 2sec shows the pulse width , when 22k is at 50%
EG57_ 432.png
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,332
I don't know the size or gauge of your model railway, but 6 -10 seconds for the barrier rise/fall is the normal range for a full-size railway (in the UK at least) according to this article. Wouldn't a ramp time scaled down somewhat be more realistic?
 
Last edited:

Thread Starter

Philexium

Joined Oct 15, 2017
85
Hi Phil,
I did not make my query clear.
As the ramp rises, the Pulse ON period Pout should change, from what........... to what ...........
E

Added timing at 2sec shows the pulse width , when 22k is at 50%
View attachment 284638
OK sorry !

For opening the barrier 0,8 ms to 1,2
For closing 1,2 to 0,8 ms

It is approximate values as I have an old Tektro scope and it's difficult to measure better it as it has no memory !
 
Top