How to improve the design of a linear ramp generator ?

Thread Starter

Philexium

Joined Oct 15, 2017
85
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?

View attachment 284588
Hi Crutschow !

Thank you very much for the schematic and LTSpice simulation.
I was waiting to test it on my breadboard this morning to give you a feedback.

Yes it works fine !
Since one week I was racking my brain to find a solution.
I have now to see how to connect it to Control Voltage of the monostable.

One question : is it possible to have the ramp starting at about 0,8/1 V and back at the same voltage ?
How to adjust it ?

Philippe
 

Thread Starter

Philexium

Joined Oct 15, 2017
85
Hi Crutschow !

Thank you very much for the schematic and LTSpice simulation.
I was waiting to test it on my breadboard this morning to give you a feedback.

Yes it works fine !
Since one week I was racking my brain to find a solution.
I have now to see how to connect it to Control Voltage of the monostable.

One question : is it possible to have the ramp starting at about 0,8/1 V and back at the same voltage ?
How to adjust it ?

Philippe
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?

View attachment 284588
Hi again

I don't know if there is a bug but I have just teceived an e-mail alert 30 min. ago saying that you have answered to my post.

But I don't see anything ...
 

crutschow

Joined Mar 14, 2008
34,432
One question : is it possible to have the ramp starting at about 0,8/1 V and back at the same voltage ?
If you are using the LM324 or LM358 op amp, then the simulation shows just a pullup resistor at the output will raise the minimum output voltage about a volt (below).
The load from the 555 input may also act to raise the minimum voltage. Have you tried connecting it to the 555?

Since I don't know how accurate the sim model is, you may have to experiment with the resistor value to get the offset you want.
If you are using a different op amp, then a diode or two in series with the output (cathodes towards the op amp) along with the pullup resistor should work.

1673018879323.png
 

crutschow

Joined Mar 14, 2008
34,432
I don't know if there is a bug but I have just teceived an e-mail alert 30 min. ago saying that you have answered to my post.

But I don't see anything ...
Yes, I made a reply before seeing your last post, so I deleted it to generate a new one.
You apparently got the e-mail between the time I posted and the time I deleted it.
 

Thread Starter

Philexium

Joined Oct 15, 2017
85
hi Phil.
OK,
So Carl's voltage Ramp will be to the CV pin on the final 555.?
Changing the pulse width.?
E
For my understanding, is Carl the name of Crutshow ?
Yes to connect on CV on the final NE555 to change automatically the pulse width for the servomotor
 

crutschow

Joined Mar 14, 2008
34,432
Here's the sim with the op amp connected to the CV 555 input without the pullup resistor:
As you can see, it raises the minimum voltage to about 1.1V.
Don't know how close that is to the real circuit but it's worth a try.

1673025410686.png
 

MisterBill2

Joined Jan 23, 2018
18,504
After reading many of the posts I see that the device controlled is not a servo motor, it is a remote control servo. It also seems that the motion portion of the scheme is working well, but that the problem arises at the ends of the moves. The solution seems clear: when the servo is not intended to be moving switch off the power. Switching off will be simple to make work, switching back on will be the challenge because the position command is a duty cycle value.
 

crutschow

Joined Mar 14, 2008
34,432
the problem arises at the ends of the moves
My understanding is, that was because the ramp generated by 555 reset to zero at the end of the ramp, which caused the servo to return to its original position.
That's why I suggested using an integrator to generator the ramp when could be held at either end of the ramp to hold the servo in position.
 

MisterBill2

Joined Jan 23, 2018
18,504
My suggestion is to simply switch off the servo actuator when the move is complete. And how about using the complement of the variable duty cycle waveform to control the move in the opposite direction. That would be the easy way, I think, possibly, to ramp the position in the other direction.
Really, though, using a RC servo package is not the best choice. Way overkill for a crossing gate motion. A simple gear-motor can do it with just a resistor speed control.
 

Thread Starter

Philexium

Joined Oct 15, 2017
85
Here's the sim with the op amp connected to the CV 555 input without the pullup resistor:
As you can see, it raises the minimum voltage to about 1.1V.
Don't know how close that is to the real circuit but it's worth a try.

View attachment 284677
Hi @crutschow

Thank you for the simulation.
So I have connected the output of the ramp generator to the Control Voltage of the monostable.
I have the same values on my breadboard.

However I have made some tests and remarked that the operation of the servo is sometimes not stable.
I have to make more tests and will keep you posted with a document showing the different positions.
Philippe

P/S Is Carl your name ? (Eric Gibbs used it in a post ...)
Mod: Yes. ;)
 

MisterBill2

Joined Jan 23, 2018
18,504
This project does seem to be a very large amount of effort to adapt an RC servo device to an application where an alternative scheme could perform the repetitive move much more easily. One simple scheme would be to use that same packaged RC servo assembly but with a different circuit to drive the motor directly, without the PWM control signal. A constant speed drive circuit has been used for cassette transport motors for at least 30 years, and so a number of good control circuits should be available in the public domain. Then use the existing position sense resistor to control the endpoints of the motion. A simple comparator circuit could achieve that using a control scheme that has been around for at least 60 years, and is very well understood.
 

crutschow

Joined Mar 14, 2008
34,432
I have made some tests and remarked that the operation of the servo is sometimes not stable.
Remove C3 on the U2 CV node.
Op amp amps don't like capacitive loads, which can cause them to oscillate.

Alternately put a 100Ω resistor in series with the op amp output output to isolate the capacitance.
 
Last edited:

Thread Starter

Philexium

Joined Oct 15, 2017
85
Remove C3 on the U2 CV node.
Op amp amps don't like capacitive loads, which can cause them to oscillate.

Alternately put a 100Ω resistor in series with the op amp output output to isolate the capacitance.
Good morning Carl

OK thank you for the suggestion.
I have removed C3 on CV and changed the 1 M to 680 k and 6,8 µF to 4,7 to have a shorter motion (about 4 s.).
The results of the tests :
- The servomotor is moving smoothly
- There is a last problem. When I switch on the ramp generator and the circuit astable+monostable together, the servo is moving and gets back to its initial position as below.

1673349292117.png

So the only possibility I have found is :
- to have the ramp generator input connected to 5 V before switching on
- to switch on the ramp generator first and the astable+monostable after about 3 to 4 s.
- then when connecting the input to 0 V and after to 5 V the servomotor works fine

Well it works that way but it is not very satisfying ...
Any idea ?
 

MisterBill2

Joined Jan 23, 2018
18,504
Given that the servo module responds to whatever position command signal is present when it is switched on, it seems that to provide the desired motion at module power-up, you must have the correct command present at that time. That implies that not only must the astable-monostable must be powered and stable, but also the ramp generator must be delivering the correct output. That general requirement applies to most servo systems as well, it is not unique to your system.
 

crutschow

Joined Mar 14, 2008
34,432
to have the ramp generator input connected to 5 V before switching on
- to switch on the ramp generator first and the astable+monostable after about 3 to 4 s.
- then when connecting the input to 0 V and after to 5 V the servomotor works fine
Can't you just leave the power on all the time?
 

MisterBill2

Joined Jan 23, 2018
18,504
Like almost all closed loop servo systems, all of the system elements must be active, stable, and initialized prior to enabling the controlled variable. Nothing new there, it has been that way since feedback servo systems were invented.
Modifying the RC servo section to be a motor driven actuator with a resistor feedback sensor, and then using a very simple dual set point servo would remove the requirement for a ramp generator and greatly simplify the system, making it much easier to control, and eliminating the need to step through the initialization sequence.
 
Top