Here are the diesel common rail pressure regulator controller that I developed ( it is the strip board on the left, inside the black box). It is based on simple PID control. The output is a pulsed voltage to the regulator.
On the right is the injector driver, with 2 potentiometers to adjust the injector pulsewidth and the rpm. Both are driven from a PC power supply. Refer to earlier post on how to make use of PC power supply units. Note the large capacitor, it is used to store enough charge for the initial opening of the injector. The injector needs 50V to initiate. The other picture shows the voltage trace for the injector operation.
It seems that this topic on the injector driver may be of interest to many people, I am posting the schematics and the source codes. Again I am using the PicBasicPro compiler.
Note that I do not guarantee that this will work for any other applications. In my case, it works but not very reliable. Use at own risks. Modify the circuit as seems fit (e.g. increase the voltage to 80V, isolate the microcontroller better (use optoisolator?), adjust the capacitance, etc). If anyone has managed to make it work better, please let me know by putting some comments below.
The schematic above I got from the internet.I think this is from Freescale. An article here may be useful
http://www.eetimes.com/design/automotive-design/4019437/Trading-Fuel-for-Silicon--151-How-Electronics-Drive-Fuel-Efficiency
Below is my own circuit. This is for one single injector operation only. There is a mistake in the schematics. The crystal should be 4MHz and not 20MHz. Thanks Juan Antonio who had pointed this out.
I just found out there is another mistake. The code uses portc.2 as output to drive the high side driver (denoted as IC2 in the circuit). So the connection should be to portc.2. The schematic erroneously show connection to portc.3.Thanks Mustafa Aydin for pointing this out to me....
The previous hex and PBP file also has some mistake. It will not adjust the injection duration. Here are the new files.(thanks also to Juan for reporting this to me)
HERE is the hex file.
HERE is the picBasicPro file.
There is LCD display showing the pulsewidth and also the delay in between the pulses.
There are also 2 potentiometers to adjust the pulsewidth and the delay between pulses.
Make sure you have strong 12 or 14volt supply (maybe from a car battery)
Also make sure you don't short out the high voltage circuits. This could be damaging to the circuits as well as give quite a nasty bang (you don't want to touch it). Put adequate insulation (maybe you want to put some tapes/silicon/hot glue underneath the board, if you are using stripboard/vero board)
the idea is to charge the capacitor by switching the injector on/off from12V repeatedly at certain frequency (I cannot remember what frequency that I used). This is done from the low side driver (i.e. repeatedly connect and disconnect the injector to ground) This charges the capacitor up to 50V (you may want to increase the capacitor to make it 80V).
Then switch on the injector (low side driver) and send voltage from the capacitor for a short time ( this also I cannot remember) by using high side driver. After that, switch off the high side driver and switch on 2nd high side driver to give 12 (or 14 Volt,depending on your supply).
Repeat the process.
Schematics and source codes for the pressure regulator control will be later.