I am trying to make an affordable water/methanol injection controller for me and a few friends(and whoever else wants to copy the design). For those that do not know what this is or understand, have a good read here: http://en.wikipedia.org/wiki/Water_injection_(engines) I have used several systems manufactured kits but mostly homebrew through out the years and have had very good success especially with turbocharged with ability to increase boost pressure and high compression engines equipped with knock sensor control or mechanical/electrical means to advance ignition timing and leaning of fuel mixtures. I have seen MPG and HP increases ranging from small to big, and lower EGT's depending on engine configuration and the ability to tune.
Most of out goals are to avoid using expensive premium gas(and controllers!) while achieving better economy and the extra power and reliability is nice too. I'm trying to start simple but would like to add more features as I develop the controller. Turbo cars are easy to setup a simple system, all is needed is a pressure switch set the desires psi/bar wired to a relay to run the pump. Non turbo/naturally aspirated engine get more complex when going mechanical activation. First you need a throttle switch to give minimum throttle activation, which can be a pain to install safely and reliably, next, wired in series you need a vacuum switch so the spray is activated when engine is under load(vacuum low, MAP high). Some cars use mass air flow signals which can make things a bit easier on NA cars to setup. An expensive but sort of necessary module needed is the RPM switch like the ones sold by MSD and others to prevent spraying during an engine off or stall condition, especially if no throttle switch is used. The RPM switch also prevents what I call "driveway missfire", I have had a few people complain and experienced myself when the throttle is blip-ed when climping a steep grade at low speed/rpm, causing a spray event and a chugging missfire. A temp switch is also a good Idea to conserve water when it is not needed on cold engine and to prevent it from delaying warm up times(it really pulls heat out of the engine).
All these parts can total over $100usd or more just to turn on a system, not including the rest of it(pump, nozzle, solenoid, tank, line/fittings, ect). Buying a pre-made controller will run you $200-$300 for bottom of the line. So I would like to tap the existing engine sensors to save money and ease installation. I'm using a $10 nano clone, it seems sufficient, please let me know if you think otherwise. TPS, MAP/MAF and ECT(coolant temp) are 0-5v signals on the vehicles I'm working with, I can easily tap off the ecu inside the car. From what I read the analog read pins do not use enough current to alter the signals to the ecu. RPM can be somewhat difficult for the arduino to read from what I've read and giving the varying types of ignition systems and there tach signals, I think I'll just start with powering the controller off the fuel pump circuit to ensure the engine is running when active, will have to just add a few seconds of delay before the loop begins to avoid spraying during the "prime" when ignition is first turned on and manifold vacuum is at 0.
So here's where I need help, while I have a great deal of knowledge and experience in automotive electronics, engine performance, and water injection, I am entering a steep learning curve of programming. Just like spanish, I can read C and kinda tell whats going on and whats gonna happen most of the time, but if I tried to read or speak it, I would sound like a fool as of now. But I'm learning it, and I find it very interesting, so here goes some pseudo code first:
Initialize the three analog sensor input pins: ECT, TPS, MAP, Initialize outputs of the "coolant temp ready" LED and Motor relay delay 2-3 seconds or more
Loop would look at ECT and if value was equal to or greater than the specified min temp, than the "ECT ready" led will illuminate to tell the driver the engine temp is high enough to begin using spray and the code will continue onto the next sensor.
If TPS value higher than X value, then MAP or MAF value is looked at and if greater than specified min, pump pin goes high.
I would like to also add a serial print to each analog read so I can view data on the serial monitor and then adjust code a little less blindly. Eventually I would like to add RPM, LCD display. I'm sure many more features can be added, but I have found complexity like fuel injected quantity % matching is optimal but most of the benefits on stock-ish engines can be realized with simply on/off of the pump at the right time. But for now the only thing I have done successfully with this thing is make a crazy high power rgb seizure inducing light blinker thing, other than copying someone elses code. This may seem simple to some that can program, but I really would like to at least know where to start as to what the best way to structure this code would be, thanks in advance.