Voltage Latch for Cruise Control

yopappamon

10 kW
Joined
Mar 31, 2010
Messages
829
Location
Most dangerous city in the USA, Flint, MI
I'm trying to build a cruise control circuit with an op amp. My op amp classes were over 30 years ago so they are foggy at best.

My analysis of this circuit is the output from the hall throttle (0-5v) is fed into the + of the op amp. The op amp output would track the throttle voltage. The feedback to the negative op amp input is for stability and keeping the op amp from saturating? ( that one of the things I'm not totally clear on). The resistor feeding back to the positive op amp input would have no effect when the cruise switch is closed. When the cruise switch is opened, the feedback resistor would supply the positive input with the last throttle position and the op amp would latch and hold the last input voltage.

Is any of this correct? If it is, man what a cheap cruise control circuit.

View attachment Cruise.JPG
 
The configuration (outout to negative) you have there is a buffer - a high impedence input voltage follower with a Gain of 1.

I'd breadboard it to see if it works (the 5K resistor could be a lot larger without affecting the results due to the very high input impedence) - It shouldn't oscillate (but you know the old saying, oscillators often don't and amplifiers do) - since you don't have any gain.
 
Let me guess - half Vcc - rail dropout? To get full range with your cruise control setup you should be using rail-to-rail opamps anyway.

Have you considered removing the 5K resistor, and putting a reasonable size (say 10-47uf) low leakage (Polypropylene dielectric!) capacitor after the switch between the opamp input and ground, and a 1K resistor between the throttle and ground prior to the switch? This is a classic 'peak hold' circuit.

The only problem I see with this is that the cap will eventually discharge, even with a very high input impedence, it still isn't infinite. A couple of hours, but I suppose this is fine when you only have batteries that last an hour or so...

BUT IF you would like to go digital rather than analogue...

It would be easy to use a microcontroller with a hardware/software PWM and an ADC. A PIC12F675 would do it in a snap! Runs from 2-5.5V (so runs off your hall throttle supply). Cmos, so only uses bugger-all current, if you use the internal oscillator the only external parts you would need would be a decoupling cap for the pic power supply pins, and probably a resistor or two.

Here is an example of a Brushed Motor Controller using a PIC12F675 - they even have a PWM .inc file already writted (the 12F675 doesn't have a hardware PWM) - http://www.designsoft.com.au/ahome/rc/PIC-ESC/ESC.html

Someone no doubt will chime up with an 8 pin PIC that has a hardware PWM, I mainly use the 16/18 series so I don't know one off-hand.
 
I thought about using a small micro controller and a joystick board to replace the throttle. Up down for throttle, push the throttle switch for cruise, left right for increase speed, decrease speed. But then got the op amp idea.

New idea. Push button to fire a small scr to short +5v throttle supply to the speed output. I would run the cruise at max speed 99% of the time anyway. does the brake cutout switch turn off the power to the throttle? If so that would reset the scr.
 
No it doesn't. The peak hold circuit with a capacitor on the input of the OPAMP buffer should work fine, even if you use an electrolytic you should still see some cruise.
 
Correct. If it wasn't there, then the throttle would be a peak hold affair all the time!
 
THere are also single chip solutions out there for this, generally called sample-and-hold amplifiers, like this one:
http://www.analog.com/static/imported-files/data_sheets/AD585.pdf
It has more than you need on there if you want a really simple version, but since it's all separately pinned out, you can just leave the parts you don't use unconnected. No external parts needed. :) This particular one is probably not suitable because it requires + and - 12V power supply plus a ground (unless you can center-tap a 24V section of your pack), but there are others out there that are single-supply 5V operation; I just saw this one first.

Maybe this one:
http://www.national.com/ds/LF/LF198.pdf
 
Oh yeah I forgot about these. Cap and Opamp work just as well though, its the same basic principle.
 
Back
Top