# Throttle control using an op amp



## Patriotic Motors (Jun 20, 2011)

Has anyone heard of or knows how to control the voltage into a potbox using an op amp like a 741 from an external 0-5V input, like from the DCL output of an Orion BMS?

I think the Sevcon Gen4's have 0-10V input through a potbox. I think Curtis is 0-10V too. Can anyone confirm or deny this?

What does a Zilla use, non hall effect?

Alltrax?

I think this would be handy for the DIY EV community.


----------



## madderscience (Jun 28, 2008)

All the throttle controls I know of are 0-5v, but I am sure you can download the manuals for a variety of controllers off of the interweb and do research that way.

In many cases the precise range is configurable in software, e.g. set zero throttle to 0.5v and max throttle to 4.5v, or whatever. You want a bit of room for error when working in real life.

Generally speaking owing to the reliabilty and safety concerns inherent with a throttle control circuit, less is more. A single hall effect device with a 5V supply and 0-5V output is good (think gen2 prius throttle pedal) or a simple mechanical curtis potbox (supplied with 5v from the controller) is the way to go IMO, unless there is a really good reason to do something else.

I believe most of the more sophisticated controllers do have additional inputs for throttle limiting. They could be discrete signals and/or canbus. This is what you would send the DCL signal from your BMS into as opposed to trying to mix it with the analog throttle signal. I'm doing that, using optical isolation and some other stuff. Its not fully linear because I'm a terrible EE but its stupid simple and gives a couple stages of throttle limiting before complete cutoff occurs.

I'm running the gen2 prius pedal. I did need to come up with a 5V supply from a source other than my motor inverter. The throttle signal goes straight into the inverter, but I do have an external fault detection circuit which also reads this signal and triggers if one of several fault scenarios is detected.

Good luck.


----------



## dcb (Dec 5, 2009)

LMC6081 is suggested here
http://forum.allaboutcircuits.com/t...onverting-0-5v-signal-to-0-10v-signal.102643/

you will probably need a 10 volt source (up to 15v) and set the gain to 2 and go.

i.e. replace the 6v battery in this diagram with your 0-5v signal on the positive input and you will get a 0-10v signal out (even if you use 12v supply).








from here: http://www.allaboutcircuits.com/textbook/semiconductors/chpt-8/divided-feedback/


----------



## Patriotic Motors (Jun 20, 2011)

Thanks dcb! This looks promising! I'll try it out ASAP and let you know!


----------



## jwiger (Oct 18, 2014)

I'm interested in this topic for a smart box. mix and match HEPA pedals with controllers, split the pedal signal to two dissimilar controllers, and add a cruise control & speed limiter to it. 

I know that would be a bit more advanced though. Could you prototype this with an arduino?


----------



## Duncan (Dec 8, 2008)

I hope you guys keep working on this - I would like to be able to use something like this to set up a "launch control" - for my Device


----------



## jwiger (Oct 18, 2014)

Duncan: what inputs and outputs would you be looking for? Clutch, multi-step (how man), if-than statements, etc.

I don't know much about building electronics, but I'm making this a personal goal. EVTV has the GEVCU which might be able to do some of this, but not all. I don't think it has a cruise controll or speed limiting ability like I want.


----------



## Duncan (Dec 8, 2008)

Hi jwiger

My Device is extremely simple - 11 inch DC motor with direct drive to a Subaru limited slip diff
No clutch no gearbox

My intention would be to measure the rear wheel rpm (both) - measure the front wheel rpm (both)
Reduce the throttle input until the rear wheel rpm was about 115% of the front wheel rpm 

May need to trim the 115% for best results

I would also be interested in a max speed limitation I don't know what the max rpm my motor will take but the experts guess that somewhere between 120Kph and 160kph my motor will blow up


----------



## dcb (Dec 5, 2009)

you will need to define what you mean by measure them "both".

I would think you could just use motor rpm for the rear, and the max of the front wheel sensors for the front, but hadn't really thought it through. Do you have existing sensors for the front wheels?

I like the idea though, just set the wheel slip, though is it really a percentage or is it a fixed value (i.e. add 3mph or something), I know most things on the web talk about a percentage slip, but that seems unintuitive to me, I don't know why the absolute optimal slip would change at 1mph vs 30mph.


----------



## Duncan (Dec 8, 2008)

Hi dcb - 
Currently I don't have rpm sensors on either end - 
I took them off when I built it!! 
As in CUT them off - seemed like a good idea at the time!

But I do have the mortal remains of another Subaru so I intend trying to re-fit the sensors at some stage 

I have a sensor with a single magnet on the front of the motor - I feed that into my CA - and it has been the most annoying and unreliable thing on the car!
Currently it works fine - unless I give full power when it goes completely loopy and stays loopy after I have backed off again
I have messed with that sensor - changed the pick-up unit and had two different Cycle Analyst units - still a pain 

I think a percentage would work best - when tires slip maximum grip is when they are just slipping
If you have ever driven around a race track you will be aware that you corner with a degree of slip - almost never do that on the road - which is where you are getting the maximum grip
I suspect the amount of slip for maximum grip will vary depending on the specific tires and on their temperature or age

I think it will be a percentage because it will physically be a certain amount of distance per tire revolution


----------



## dcb (Dec 5, 2009)

Duncan said:


> I think it will be a percentage because it will physically be a certain amount of distance per tire revolution


Ah yes of course, thank you.


----------



## jwiger (Oct 18, 2014)

Pretty good feedback. Again, I'm not building this now, it's just something I want to figure out. My personal goal is driving two different types of motor, and blending the throttle to attempt to get the most from each. I suppose with your wheel sensor idea, that could lend to separate front and rear motors for example. 

Sent from my STV100-1 using Tapatalk


----------



## dcb (Dec 5, 2009)

fwiw, it sounds trivial enough so far that and arduino could handle it. an ABS sensor might be challenging though as it sends a lot of pulses so probably want an ARM dev board or something (liking the nucleo these days).


----------



## jwiger (Oct 18, 2014)

If nothing else it would be a hardware foundation for building the code, if nothing else a shield would need to be built with a wheel speed sub-processor. 

Sent from my STV100-1 using Tapatalk


----------



## jwiger (Oct 18, 2014)

jwiger said:


> If nothing else it would be a hardware foundation for building the code, if nothing else a shield would need to be built with a wheel speed sub-processor.
> 
> Sent from my STV100-1 using Tapatalk


That's a lot of nothing else, sorry about that. 

Sent from my STV100-1 using Tapatalk


----------

