MR2 Owners Club Forum banner

Controlling functions in the engine bay with Arduino and servo motor?

13K views 126 replies 11 participants last post by  Gandalf 
#1 ·
I have been thinking about this for a while, and I am going to try this out. The main motivation behind it is the fact that I am keeping my TVIS system and want to get the most out of it, and the oem ecu TVIS operation is far from performance-optimal. Hence, not only controlling its opening point but its opening rate. The reason being, it seems to me best to have it open based on RPM (which many have done), but not only that, to have it open progressively based on RPM.

From studying dyno charts of those that have dyno'd with the TVIS closed and then fully open, and then set their TVIS to open at a certain RPM, there is a bit to be gained, when all those dynos are overlayed. There always is a dip as the TVIS goes from fully closed to fully open rather quickly. This rate of opening is always the same regardless of the gear we are in.

Now what I am curious about, is whether the turbulence from a half-open TVIS will be too disruptive and negate the potential gains. It could be possible that this is the case. However, I am too curious not to try.

What some people have done to control things like throttle bodies on various motors is to use a suitable servo motor (originating from the RC hobby world). I want to control this servo motor using my Arduino (Freeduino actually) microcontroller, and then programming it with whatever parameters I want. Using correct resistors and circuitry, I get the tach signal (probably have to get it down from 12v to 5v (the Arduino needs 5v)... I think its all squarewave... and then write a small program that assigns servo motor positions based on those RPM numbers. So, I can start the motor's movement at 3700 RPM, and finish its movement at 4700 RPM (for example), if it is deemed to be most beneficial in that range. It also does not have to be a linear rate, it can be anything at all.

I am willing to bet that if we were able to dyno in every gear, we would find that one of our gears is closest to having the oem TVIS open at a rate that suits the RPM climb.This is probably first or second gear. The gears that this mod would benefit the most would be 3,4,5, since the TVIS normally opens at the same speed no matter the gear.

In addition, if I figure out that there are other conditions or scenerios in which to make exceptions to the RPM-based rate (such as boost for example), I can write another small program to perform that as well, and run input data from another source such as boost level (signal).

Has anybody done this, or something like it? Any thoughts welcome... Its going to take a bit of homework on my part to figure out the correct electronic parts... I already have the Arduino, and access to a great electro-acoustic lab at school tht is stuffed to the brim with resistors etc... I am studying what others have done to convert correctly from the tach signal to the Arduino so that it all works. Some things are less than 12v in our cars, so it may work to my advantage.

scarecrowX? :angel:
You usually have a way of simplifying over-complicated plans...

One thing I can see right away:
-moisture/heat protection for the servo motor. I can install the Arduino anywhere (like in the trunk for protection).
 
See less See more
#27 ·
I made a third video to show how nicely the itouch can display various readouts and gauges, and control programs (like max MSP and logic pro) actually on my laptop, using an application called TouchOSC. The wireless ad-hoc network works perfectly, and I can store my laptop in the trunk or frunk, or under the seat, and still control various functions on it from the itouch. I can mount the itouch anywhere around the dash console, and its resolution makes for very nice displays. The Touch OSC program lets me customize these itouch displays, and I can switch between several display pages such as my TVIS control, A2W IC temperature readings, and my entertainment system.

http://www.youtube.com/watch?v=EaJQCcwle6Y
 
#28 · (Edited)
Ok I am able to visualize what you are working with. This setup sounds like it's a programmable body ECU. I could see alot of uses for that.

Probably could use this to make your entire car touch screen controlled.
Think about the MR2 in Germany that had everything operated by touchscreen. the entire HVAC system was integrated into some kind of computer and had multiple displays installed in the car. I would love to do something like that. Possibly he was using the same components you are, and just designed a GUI with commands that were sent to MaxMSP controlling the Arduino.

Sounds like the sky (err wallet) is the limit with this kind of setup.


For my TVIS I chose to go with a MSD RPM Switch. But I have COP and couldn't figure out which switch I could use. I send Nodde a PM and he found me a RPM switch that get's it's inductive pickup from a 1cylinder 4stroke. So it will use only one of my coils for pickup, it has interchangeable pills to set the RPM. MSD 89501.
 
#30 ·
I haven't really thought about overall cost, because I already had all the stuff like: laptop, itouch, MaxMSP full version (the runtime version of max is free... you can run patches that are already built), bought the app TouchOSC from the itunes store for $5, arduino is probably $30 (fantastic considering a power window relay box for our MR2's is $50 used), servos range from $25 to $150 roughly, Maxuino is free.

Using the itouch is a bonus for me because its small and neat and has great resolution and the displays can be custom built using the touchOSC software... and it came free with my Macbook.

Max MSP + Jitter is expensive, but it is extremely comprehensive for live music/DJ performance... Max by itself without the midi-compatibility and much more (of MSP and Jitter) is listed at $250. But, like I mentioned, arduinos can be programmed without it.

This is a way of connecting the technology that we often have kicking around and making it do something really useful. In my case, thanks to school, I actually have programs that are useful and applicable to my work and MR2 hobbies. :)

Southwestspeed, I remember the car you are talking about...
Its here:
http://www.autoblog.com/photos/toyota-mr2-carputer

He is using different programming, but is utilizing a microcontroller to do the work, and at least one servo to move vents around etc... Its the best example of "to the extreme" as far as control is concerned. I understand the addiction... I want to use just enough of the technology to actually centralize and simplify specific user-definable controls/displays... and in my case it actually saves me money and adds functionality.
 
#32 ·
Arduino $30 or so
6 analog inputs
13 digital inputs/outputs (including pwm's)

it can be programmed from any computer with USB.... just need a USB to mini-USB cable. They can perform virtually any calculation, conversion, operation, samples, randomization, selection, organizing, routing of incoming numbers, including timed events (metronomic events, like samples every x.xx seconds), lists, any math you have the patience to write it can do.

programming software is generally free
takes time to learn the code, but its not a great deal of it... and it's not super aggravating, lots of forum support.
 
#33 ·
Wow, that is impressive for the price!

the digital inputs, those are what technically? how are they different from the analog?

For $30 that is really some amazing amount of versatility. Do they offer larger models with more input/outputs? Got to wounder, since a stand alone is basically doing the same stuff as that for the most part (it has a few things i am sure that can't do but still) why do they cost $1500 and that cost $30?

Either way, that is a very cool setup, i bet i can find a use for something like that at some point.
 
#34 ·
Texas_Ace said:
Wow, that is impressive for the price!
the digital inputs, those are what technically? how are they different from the analog?

They are digital. Like a crank sensor would output. So those digital in's will not accept varying voltage sensors, or varying resistance sensors but could read a crank sensor no problem.

Are there any of those arduino's that have more analog inputs?
 
#37 ·
Southwestspeed said:
They are digital. Like a crank sensor would output. So those digital in's will not accept varying voltage sensors, or varying resistance sensors but could read a crank sensor no problem.

Are there any of those arduino's that have more analog inputs?
I have seen threads on people ganging several arduinos together in order to control dozens of servos... there might also be larger versions of these microcontrollers, I haven't exhausted the googling on it...

The challenges come with writing the code correctly, and having lots of failsafes and much testing... I am not looking to control super critical stuff, just some peripherals that enhance beyond what we normally get, and some nice new displays.

On the digital side, several of the inputs are meant to also handle pulse-width modulation, like what servos use to get their range.

SnowRocker88 wrote:
Hmmm...I still have your manifold model, it wouldn't be hard to throw in some TVIS butterfiles and flow partial throttle positions...let me know flow rates and I'll get on that.
Thanks for that! When I think about it, the next step for me is to finalize the fitment in the engine bay of the manifold/TB, and then take it to get properly flow-tested, TVIS and all. The simulations confirmed the basic design/layout for me was working well, and allowed me to build the sucker, but now I need to see how the real thing does, and then I can probably tweak things a bit depending on results.
 
#38 ·
I have completed the iTouch multi-interface/display.
The TVIS section has multi-gauges to indicate exactly what the TVIS does in relation to RPM. I also added memory to the A2W IC display, so that both ambient and manifold temps will display current temps and the recent highest reached temps. The third display page has a wideband Air-fuel ratio gauge, and the fourth page is my stereo system complete with playlists, EQ presets, and multi-layered to include all the usual controls. It actually controls iTunes better and faster than iTunes can be controlled on the computer, lol. I also threw in voice confirmation for making TVIS selections. Check out the fourth video:

http://www.youtube.com/watch?v=ZzJ-1Il2tZ0
 
#40 ·
Thanks! Glad you like it.
I added voice warnings for A2W intake-air temps, in case I am on a different display and for whatever reason there's a failure in the A2W system, since temps will climb up eventually... at 150 *F and 160*F. I can't think of anything else to add at the moment...

...probably some security software protocols. :thumbup
 
#42 · (Edited)
few things that crossed my mind..

I have seen TVIS butterfly's get sucked into the engine. you may want to consider making them out of something stronger and finding a better way to secure them to the arm that opens and closes them.

The strength of the servo motor. you may want to consider getting a stronger one. I am working on a project myself to operate the climate control on my car PC and was told that that motor would not be strong enough to pull and push the climate control push rods and the TVIS i know for a fact will be harder to operate and especially hold the butterfly's at X position without over powering that motor.

too bad the TVIS wasnt made like a roller barrel throttle bodies on every other runner track.. :-(
http://www.youtube.com/watch?v=1aFd4LtS9LA&NR=1
 
#43 · (Edited)
Really? 280 oz of torque and titanium gears not enough? I don't think I could stop this motor with my bare hands. But, under lots of air flow and pressure it might have difficulty, who knows. You asked them about my actual model?

Wow, are your climate controls that hard to push? Its maybe more a problem of travel length, and then having to put on a larger arm or wheel, which decreases the torque of course.

What servos are they recommending for you? I actually tried to go overkill on the torque I would need, lol.

Rebuilding the TVIS out of stronger stuff, hey... I will certainly analyze it when I actually pull it out of the car and have it in front of my face. I have a feeling that TVIS failures occur due to play from wear that causes the TVIS to rattle around... Those videos of "rod knock" that is absolutely caused by the TVIS plate rattling, cannot be good for longevity of the part... If it came down to tack-welding them, or going with thicker materials, I am up for it. I'll play it by ear, depending on what shape my TVIS is actually in.

Thanks for the info, cool that you are doing some manipulations in this regard also... :thumbup Those roller-barrel TB's are sweeet.
 
#44 ·
didnt get much action in the thread.. it was a PM actually from someone who saw my thread.. ill try to reach back out to him and confirm the suggested model. I kinda gave up on the project when i had my MCS engine failure.. Once i get those things sorted back out ill jump pack into this cause i really need it done at this point.

not to clutter your thread.. but this is what my app will look like on a 7 inch touch screen.



and yes with an arm on it torque will need to be increased.

I was looking to use the HS-7950TH High Speed, Ultra Torque Digital Servo

SPECS:
Size: 1.57 x 0.79 x 1.50" (40 x 20 x 38mm)
Weight: 2.40oz (68g)
6.0V 7.4V
Speed: 0.15 sec 0.13 sec
Torque: 403 oz/in 486 oz/in
Drivetrain Type: Dual ball bearing

for the TVIS.. i think its brass, so you wont be able to well it unless you get the butterfly's made out of metal. also if i remember, there are two individual shafts per 4 runners, so you will have to find a way to make one full shaft or make them move at the exact same time with out any play. good luck and i cant wait to see..

The only real test for your servo will be to find out how it holds up.. but i would deff inspect the TVIS butterfly's and secure them better before you do anything else. shoot, you can find them on e-bay, rebuild one of the car and get it to work with your servo then install the finished product.
 
#45 ·
That looks really good, those climate controls... Its a bit of work replacing that oem climate setup, that's for sure. Not too much room back there either.

Yes, I had considered buying another TVIS to work on so that the car is still driveable while I muck around... I can then properly flow-test both TVIS and intake manifold without pulling the car apart. If anyone has a good clean one kicking around, PM me.

Where are the butterflies failing, these ones you have seen get sucked in? Right where they attach to the shaft? Or are they breaking off corners, etc? Don't want to use any thicker metal, or it will decrease flow when wide open. Lol, a titanium TVIS...
 
#46 ·
i think the rivets come loose and the whole thing gets sucked in.. i never seen one chip.. its usually the whole thing. im sure they loosen up to a point where they just get sucked right off the rivet. I think think you need thicker. but one made out of metal with the same specs will allow you to weld it.
 
#47 ·
If its possible to loctite a TB butterfly without it getting sucked in, its possible to loctite a TVIS butterfly and keep it tight. There has got to be an easy and serviceable solution. I hear complaints about the TVIS getting sucked in, and unless they are physically breaking, it means they are coming loose in those instances. This must be preventable! What are the other solutions people use for TB screws?
 
#49 ·
ahh good idea.. tack weld the screws once things are set in place.. that will keep it from going anywhere.. just make sure not to heat it too much in one spot.. and the loctight is a good idea..

the diff between a TB screw and TVIS in your case.. is that even if they get lose and the screw dosent come completely out. your butterfly for that runner will not open and close as the others and one of your runners will have a different flow. So im with T on this one and second the idea of a tack weld.
 
#50 ·
Gandalf,

I was wondering if you did anything on this lately? I've started my own Arduino project and it'd be nice to share back and forth what we find.

cheers,
Pitbull
 
#51 · (Edited)
I have been making the stand/mount/cage for my laptop, which will go between the seats against the rear firewall. It has a double-bolt electronic lock which has a combination code that has to be entered on my iTouch display unit. :smile: The 70-oz torque servo I threw in there is holding its own in this capacity.

The cage will be clad in soft high-density foam wrapped with soft black leatherette. All-in-all it will weigh about the same as my 10-disc CD changer did, which used to be in that same location.

So, been tied up with the welding and tweaking etc. Its now ready to bolt in, just working on the upholstery. I have also finished making the aluminum mount for the iTouch display unit, mated to an iPhone shell which I padded and covered with an iTouch cloth. It mounts perfectly to the existing mount for my narrow band A/F gauge, which I won't need anymore.

Here's a pic:


More details can also be found in my build thread here


Sure, would love to compare ideas/details. Tell me about your setup, or pm me if you prefer :).
 
#52 ·
Although we are not doing quite the same thing--(my project should it come to fruition, is going to be 100% Arduino based) we may very well encounter some of the same challenges with reading sensors and activating things on the engine.

My ambition is to have it collect many readings (boost pressure, WB and NB O2 sensors, throttle position, RPM, water temp, etc.), display them on a panel, and also activate certain things such as my water/alcohol injector, TVIS solenoid, and maybe even an electronic boost control to replace my MBC. This is my first post on my project: How to calculate RPM from the IGT signal (with an Arduino). I'll probably start a new post with more details on the full ambition of my project once I determine if it's feasible enough to persue :smile:
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top