Warning! Lots of incessant typing ahead..
So been meaning to sign up here for quite some time, always watched Dave's videos and enjoy watching them and many other electronics related stuff online. I currently work in the High Performance Computing sector - I'm an integration engineer - so I'm usually trying to make a few hundred computers all play ball together and then provide a bit of support after (read: tea boy) - always been interested in electronics, namely their integration in the automotive sector, namely diesel powered stuff.
I've played about a lot with older Indirect, mechanical injection engines which require spanners only to extract more power from, but recently gotten into the foray of Commonrail Direct Injection engine management systems - I mostly play with/tune Peugeot/Citroen (I think some of the Aus guys might have heard of Peugeot at least!) HDi (High-pressure Direct Injection) engines which were some of the first to use Commonrail and therefore some of the more simple engine management systems going!
EDIT: Forgot to say, for those who are interested - the ECU uses a Siemens/Infineon C167CR-4RM MCU which has 32Kbyte ROM, 2Kbyte XRAM and 1 CAN interface - I do intend at some point to grab the IROM from it and have a look in IDA... It also has a 29F400BT flash hanging off it for it's calibration data.
http://www.keil.com/dd/docs/datashts/infineon/c167cr_ds.pdfI've started into the foray of reflashing ECUs, which has gone reasonably well so far, but there's always an issue:
The ProblemI need to be able to work on the engine ECU away from the car and be able to simulate what it's going to do, however - they're incredibly complex beasts, even though they're early 2000s technology. Vast quantities of calibration data and all sorts going on inside - there's also a lot of software limitation, so all of the testing needs to be confirmed to see whether it's actually doing what you think you're telling it to!
I can't always pop an ECU on a car and test how it performs and see whether what I've changed is actually working how I expected it to, not only because driving a car up the public road and trying to see whether the injection quantity and injection timing is correct is, well, dangerous - not to mention, if it's not quite right, you'll possibly end damaging the engine.
A friend of mine from home has built a dynamometer into his shed and put on some computerised control (if you're interested, he has a YT channel:
https://www.youtube.com/user/darrenjlobb) - which is an amazing tuning tool, however, I live about 300 miles from "home" due to my work, so often it's not very practical.
The Solution?Build myself something, so I can reliably test and monitor the ECU with on a bench - there are a few tools available for the monitoring side, but are usually Chinese one-hung-low knock offs or are absolutely extortionate for the good ones! The Bosch KTS tool which is often used is well over £1000 ($2000 AUD) which is out of the realms of what I'm willing to spend. There's "sanity checks" and "diagnostic limits" which means the diagnostic tool will quite happily tell you that the ECU is performing in a certain way, but in reality there's another system in place, making it do something you're not expecting.
What does it need to do- Be able to simulate ALL inputs required for normal running of the engine.
Unfortunately these engines are a bit more complex in terms of sensors than a standard SI petrol - since they require precise crank and sync cam timing. I've found a nice open source project that uses an Arduino to chuck out various cam/crank signal combinations, just need to work out the layout of both and possibly scope the output of a running engine to see what it *should* look like!
These engines also have high pressure fuel control which is very closely monitored - since the pump is capable of 1500+bar - it monitors the pressure in the fuel rail closely vs what it expects, if it's below this, it assumes a leak and abruptly shuts the engine down - naturally a leak with 1500bar behind it means the fuel goes pretty much everywhere in a very fine mist and therefore is insanely flammable. This will be one of the main things to get right - probably require a spot of code on with an MCU to simulate this, thankfully most of the sensors are all 0-5v with calibration within it's calibration, which, thankfully, I can adjust as required.
Then just a few simple bits and bobs like the throttle position sensor, which is two inverse pots, which again, I'm sure a small MCU along with the high pressure fuel control simulator, I could rig up - worst case scenario, I'm sure I could just get the original throttle sensor and chuck it on the table and twist by hand.
- Be able to somehow simulate the injectors
This is the problematic part, I'm still not 100% on how this works, I've read varying different reports of how the electronics work - the injectors operate at ~50V and require about 30A peak to open them, and probably 10A or so to hold them open - this high voltage/current is mostly for speed as they work on differential pressure internally for opening/closing.
I've heard and read that they somehow use the coils of another injector that isn't firing to somehow bump the voltage up and store the charge in capacitors internal to the ECU - I'll post some pictures of the inside of the unit later, if anyone has any ideas as to exactly how it works.
The ECU is intelligent enough to know when there is an injector fault - so I probably need some way of sinking the output of the injectors and making it look to the ECU like they're really there - I also need to be able to watch these outputs to monitor the pulse width of the injections it makes. Of course, it's never easy, there's up to 4 injections per cycle for emissions and NVH control.
- Be able to monitor the other outputs of the ECU.
I've got access to a few old analog scopes, although I've been looking for an excuse to get my own - the Rigol DS1054Z is looking like a prime contender. Also combined with a Saleae logic analyser - everything else is pretty simple PWM outputs, nothing too complex at all, which the logic analyser should be more than happy looking at.
Sorry for the large essay - nice to be able to go somewhere and talk a lot and possibly have someone listen to my inane ramblings and give their thoughts and maybe possibly tell me "here's a real simple way of doing this" or "that'll never work" - I'm not the best educated in electronics, my background is mostly IT, but I understand enough to make me a little dangerous and allow me to let the magic smoke out more than expected...
It's all bit of a pipe dream at the moment, but I think this is my best option, unfortunately I'm cheap as hell, if I can do something for half the money, but double the time, I'll probably take the double the time option! Anyone with any ideas, I'd love to hear them!