Control motor via TPS and/or Drive By Wire signal???

SQCTS

Member
Ok question for all you smart and/or in the now guys. I have been thinking of a why to control the ESC with Throttle Position from the car.

Have more that few ideas, one idea was to use an e-bike thumb throttle control wire into an ESC servo tester and mount at the accelerator pedal and as the pedal is pressed it would start the blower motor. Position it kind of like a WOT switch but better as you can position it to start at about 70% of WOT. This is honestly really an easy mod to do. So that is one way i've been think about thing it.

So question is:

So do you guys think using the same Servo Tester wired to Throttle position would do the same thing. My thinking is that just like the E-Bike thumb throttle, the TPS changes the voltage from 0-5V and the modified servo tester should be able control the speed of the motor by the car's TPS via the ESC unit just the E-Bike thumb throttle does and/or can.

Now if the ESC unit used has an analog to Digital convert it should we should be to tap directly into the TPS and control the speed of the motor be our throttle position.

However I noticed that Troqamp has a control box that does this exact thing by Connection to the TPS


On natural aspirated cars you simply tap into the TPS signal and it allows you to control the ESC/motor speed by throttle position. The unit is open source so you can program the unit with Arduino. So basically you can program the unit to say at 70% of full throttle give me 70% boost or motor speed and at WOT give me 100%.This also should allow us to boost in that sweet spot of the rpm range. Moreso make the system operate... for lack of better words like a normal force induction setup.

The Troqamp control units is $159 shipped to the U.S. would it be worth it buying one to see if it would work with other ESC units. I don't see way it wouldn't. However A nice little servo tester is only about 10 bux for about 3 of them. and it is honestly a mod that can be done in about 20 mins. You can even get ones that have adjustable pulse width. Or get an ESC that can convert the analog signal to Digital.

I might be simplifying this a bit to much.

Thoughts and ideas?
 
Last edited:
Modern EFI vehicles often provide both TPS (taken at the Throttle Body and after ECU applying DBW mapping tables and more smart heuristics. This is considered OUTPUT of the ECU!)
AND PedalOut (taken as INPUT from the pedal in your cabin) on a "bus".

So ... TPS as trigger reflects more the real state but is "delayed".
PedalOut is kind of "load request" ... "go now!".

I intend to tap into the CAN bus (OBD2 port) protocol and have (hopefully) both signals (and more, like RPM and MAP, I have MAF as well and LOD) to play with on my own custom ESC controller board (TBD).
Tapping into the OBD2 protocol does have some latency, yes, but allows for cool experiments for your control strategy with just some lines of software code changes.

My plan is to have a kind of "closed loop" variable boost control (and safe limit!) 🤪

Not sure about the TorqueAmp box, if they actually sniff on CAN bus/OBD2 or if they try to do some hard wired sensor tapping.

An upgraded design of the "eBoostController" box could implement inputs for wide band O2 sensors, boost1 (pre intercooler), boost2 (at throttle body/intake manifold), some battery status (maybe even adapting to the BMS bluetooth output) and some nice display (maybe even a redirect to a Android Auto or Apple Car Play headunit) showing the OBD2 gauges and the added wideband AFRs, boost sensors and BMS stats ... ALL IN ONE!

Ambituous, I know, but keewwwl (and possible) !
 
Last edited:
Cmoalem what ESC are using that allows for MAF?


The Troqamp video and and in the reading says they hard tap directly into the TPS signal or if on force induction car you can also us boost. I would imagine with being able to program the unit with Arduino it gives you more control of what the signal does.

Now please correct me if I am wrong here. Scanning over the APD HV-Pro ESC manual briefly it show a min 3v and max of 10v on the input signal. It also goes on to state that if the voltage is lower than 2.7v the unit will not respond to the signal. Now if this is correct it could a blessing and a road block.

If it activates at 2.7v and above this allows the unit to activate at a higher % of the Throttle position which is good as you will only see boost when you are pushing the car a bit hard. Good! Now if you want a boost at a lower throttle position this is Bad. Now with such a wide range of 3 to 10v would you ever see full speed from your motor or the speed you desire. Now if this range is user adjustable in the Software it becomes a none issues.

Screenshot_20210909-084214.pngScreenshot_20210909-084230.png

Screenshot_20210909-084327.png
 
Last edited:
The eBoostController I am thinking off will sit BETWEEN CAN data/additional sensors (Input) AND (PWM output) APD ESC!

I have looked at the OpenESC project where they have lots of functionality on the ESC board itself ... but their motor side is not as powerful as the APD!
 
Ok i really need to set down and read the rest of the manual of the APD ESC mine had not arrived yet. I was also looking at the MGM TMM 40063-3 for my other project car, a 1999 DSM Eclipse. Which will becoming my daily driver.
 
Here you can find lots of "inspiration":

unfortunately the VESC/openESC boards while partially having some processing power and cool input and software features are not as strong on the motor side ... max 300 Amps continuously only.

And to be honest : I would rather split additional vehicle CAN and sensoric control plus display redirection from reliable/ high end ESC capabilities.
the eBoostControl box is going to be VERY automotive oriented/integrative on one side ... and delivering a PWM output (generic) on the other side!
 
Last edited:
Wow the VESC is a impressive unit. If want more than 300amp continuously in a quality unit you are nearly limited to to manufacturers APD and MGM
 
Some of this stuff is above my pay grade, but how about just taking the TPS 0-5v signal from the car, feeding into the analog input on an arduino, and using the sketch MakingStuffAwesome wrote and modifying the pulse width based on the 0-5v TPS input signal? That seems to be the easiest (and most universal) thing to do. You also might want to add a low rpm cutoff, depending on your application. In my case, my car runs a Megasquirt MS3x, so I have the luxury of multiple outputs and the additional luxury of have a fairly large engine that would keep the compressor out of surge, regardless of rpm.

Just throwing another (what I believe is simpler, cheaper and easier to implement) idea out there. Feel free to criticize it; but that's probably the route I would take.
 
Actually, I just looked at the control box - if we can get specs for it (like what the output signal is - we want a 1-2ms pulse width signal on a 50 Hz carrier).
 
Some of this stuff is above my pay grade, but how about just taking the TPS 0-5v signal from the car, feeding into the analog input on an arduino, and using the sketch MakingStuffAwesome wrote and modifying the pulse width based on the 0-5v TPS input signal? That seems to be the easiest (and most universal) thing to do. You also might want to add a low rpm cutoff, depending on your application. In my case, my car runs a Megasquirt MS3x, so I have the luxury of multiple outputs and the additional luxury of have a fairly large engine that would keep the compressor out of surge, regardless of rpm.

Just throwing another (what I believe is simpler, cheaper and easier to implement) idea out there. Feel free to criticize it; but that's probably the route I would take.

welll ... thats the minimalistic way!
There is a guy on Youtube who built a eCharger with MGM components who does exactly that in a small box with Arduino ... let me dig that out again. ... ahh, here:


My "vision" goes a bit beyond 😛

Btw ... if you look at the VESC 300 hardware you can get and at the software you will find all your requirements already integrated ...
(but as I said earlier: seperating automotive specifics from the ESC features makes more sense)
 
1)Personally i wouldn't bother with the Torque amp box.. it's very expensive for what it is... and man is it huge.

2) My car (2007) dose not talk to the throttle position sensor or the pedal position over can bus .. it uses two analogy signals for both. it uses two to check for faults.

3)A ESC like the APD does not take an analogy signal in to adjust ESC/ motor out put speed. you'll need something like a Nano to read the pedal position and convert that to SERVO out .. this is very very simple to do.. and will only cost a few dollars.

4)Since you'll need a nano (small computer) anyway.. you might as well connect up EVERYTING to it.. and get it to control everything. (this is what im doing). I'll be connecting up my own decent sized colour screen, but you could connect to other devises if you wanted.
 
Last edited:
Yes In have done the analog conversion with a cheap slightly modified servo tester. And it works well.

If there is another and easier way to do this please sir share.
 
Lol - I remember watching that video. I applaud his effort, but I think his title isn't terribly accurate...

BTW, finishing up the bathroom - putting together the control box is next. Racing weather is here!
 
Actually, I just looked at the control box - if we can get specs for it (like what the output signal is - we want a 1-2ms pulse width signal on a 50 Hz carrier).

if you search in youtube on how to control an ESC via PWM e.g. with a Rasberry Pi (or Arduino):

Rasberry Pi (and derivatives) single board computers come light and cheap up to "nearly desktop power" (still tiny and cheap)!
With the 40 pin I/O (GPIO, ADCs and I2c and SPI all there!) you will get the job done!
(There are several display options as well ... whole ecosystem around that! My thinggy will eventually run "headless" and use the in-car infotainment system as head unit...)

Ok ok ... ordered a small but bad ass Odroid N2+ today for 80USD plus shipping plus some gadgets around it... (who needs a TorqAmp box? Not me!)
(One of the gadgets : a OBDLink SX OBD2 to USB cable which talks nicely ELM327 protocol and has been run with Linux in several other projects to capture ECU/Engine sensor data successfully :cool: )
 
Last edited:
Right now I'm controlling my ESC with an Arduino (the MakingStuffAwesome wrote the code for) - it does work quite nicely. We use Raspberry Pi computers to generate graphics for TV studios (we use the HDMI outputs to feed on-set monitors usually). I'll be the first to admit that while I'm pretty good mechanically and with electronics, I'm definitely not a coder/programmer - I usually struggle with that a little. On the bright side between you, SQCTS (whom I recently spoke with on the phone) has a computer science degree and MakingStuffAwesome, hopefully we've got the software side covered :)

I'm usually a big proponent of keeping things simple and universal - and that looks like the direction you're going in. I often forget not everyone has an easy way to program their ECUs.

Now off to finish installing the bathroom sink between guests (directing remotely definitely has its perks!)...
 
Right now I'm controlling my ESC with an Arduino (the MakingStuffAwesome wrote the code for) - it does work quite nicely. We use Raspberry Pi computers to generate graphics for TV studios (we use the HDMI outputs to feed on-set monitors usually). I'll be the first to admit that while I'm pretty good mechanically and with electronics, I'm definitely not a coder/programmer - I usually struggle with that a little. On the bright side between you, SQCTS (whom I recently spoke with on the phone) has a computer science degree and MakingStuffAwesome, hopefully we've got the software side covered :)

I'm usually a big proponent of keeping things simple and universal - and that looks like the direction you're going in. I often forget not everyone has an easy way to program their ECUs.

Now off to finish installing the bathroom sink between guests (directing remotely definitely has its perks!)...

The reason I am a bit "enthusiastic" right now is slowly I am starting to understand certain bits and pieces a bit more. And yes, my ambition is not just to solve "my specific" challenges (my car, my setup, my mounting/fixtures, gauges/switches/cables, etc ...) but to go towards a "kit" which I can use equally well in my Wrangler TJ LS1 V8 conversion as well as in my more modern Chevy Colorado 3.6 LFX cousin with a tidy interior and a infotainment system.
I really find pleasure in this "closed loop variable boost" idea ... and in the smart and balanced recharge idea on eBoost off similar to the torqueAmp.

The torqueAmp guys found just one eMotor / charger combo for the small displacement european market. They packaged and simplified the battery and control topic nicely, but somehow they stopped at a certain point. I think we can go further (we are not bound by startup and investment restrictions like them ... sell the simple version first an then get money for the "cool version" later)
Maybe I am too ambitious ... but a variable boost system with tight coupling to the EFI control of modern cars and some cool and informative onboard information screen or projection to a existing headunit wih battery status, boost gauge and AFR gauge in addition to some monitoring of eMotor stats "All In One" just seems so "sexy" to me ... and doable!
because we have no commercial peressure and because we are a larger team I think...


You see I am bored just waiting for ordered parts ... 🤣

And no worries, once you have finished the bathroom and you start rolling out more videos you will put us and your race track competition in the dust again... lol!
 
Last edited:
There is a app called Torque to can do some these features already in a simple be works very well on any Android head unit. It is on the Android head that i am installing my my car. I sure this app can be modified to monitor other info. It takes all it info via Bluetooth from the OBDII port. It very accurate also. So taking any app like Torque as baseline should help make it a bit easier.
 
Top