Using the propeller with automotive voltages
Painless
Posts: 69
I've just been reading through the sticky thread reference using 5v inputs / outputs with the propeller, but really wanted to run this past everyone before moving forward with my own project.
I'm currently working on a piggy-back system for a vehicle's engine management computer using the propeller, the majority of the input and output will be handled by ADC's and DAC's, however, one part of the project requires me to sample the signal being sent to the engines fuel injectors. In more detail, I want to measure the length of the pulse each time the cylinder 1 fuel injector is switched on and off by the fuel injection system. This will mean reading a signal which could be anywhere between 12 and 14 volts (with the vehicles alternator running).
One idea I had was to use a 3.3v zener diode and two 2k resistors to drain out excess voltage:
Input Pin
/\/\/\/\---|--/\/\/\/\
12+v signal
...................................|
...................................~
...................................^ (3.3v zener diode)
................................... |
................................Ground
Another alternative idea was to use an n-channel MOSFET with the injector signal connected to the gate and the propellers Vdd and I/O pin connected across drain and source. If this won't work as required, perhaps a SPST analog switch IC with a sufficiently fast switching time?
Post Edited (Painless) : 5/28/2009 9:57:27 PM GMT
I'm currently working on a piggy-back system for a vehicle's engine management computer using the propeller, the majority of the input and output will be handled by ADC's and DAC's, however, one part of the project requires me to sample the signal being sent to the engines fuel injectors. In more detail, I want to measure the length of the pulse each time the cylinder 1 fuel injector is switched on and off by the fuel injection system. This will mean reading a signal which could be anywhere between 12 and 14 volts (with the vehicles alternator running).
One idea I had was to use a 3.3v zener diode and two 2k resistors to drain out excess voltage:
Input Pin
/\/\/\/\---|--/\/\/\/\
12+v signal
...................................|
...................................~
...................................^ (3.3v zener diode)
................................... |
................................Ground
Another alternative idea was to use an n-channel MOSFET with the injector signal connected to the gate and the propellers Vdd and I/O pin connected across drain and source. If this won't work as required, perhaps a SPST analog switch IC with a sufficiently fast switching time?
Post Edited (Painless) : 5/28/2009 9:57:27 PM GMT
Comments
Over at the Picaxe forum interfacing with cars has been discussed a lot. Certainly you need to build a regulator and think about interference and voltage spikes. But I have a picaxe that senses the water temperature with a temp sensor taped to the side of the rubber hose going to the radiator, and a relay that turns on the radiator fan. It replaces the standard temp sensor (which failed, cooking the engine. Twice). This circuit has been working reliably for 3 years now (as is the third engine), and soon I am thinking it may actually be more reliable than the standard temp sensor arrangement which is exposed to coolant (and hence corrodes).
If I were sensing an on/off 12V signal that had come from the engine bay of a car, I'd look at an optocoupler. On the led side, a 1k resistor in series with an external led (so you can see it going on and off) and then that goes to the led inside the optocoupler. On the other side, 3V=>4k7=>the internal phototransistor=>gnd. Sample at the 4k7. Put the optocoupler in a socket, and if it gets zapped it is a 50c component instead of an expensive propeller. I can draw a schematic if the above is confusing.
If you use a voltage divider, be sure to include a zener in there or you can still fry the inputs.
Post Edited (Erik Friesen) : 5/29/2009 1:43:19 AM GMT
Thanks.
I was using a reg that was rated to only 20 volts on an application on a chevy pickup and it kept frying, probably because of some transient, so I had to find a better reg and add the TVS.
I recommend an LC filter, maybe even varistors, some fast circuit that blocks any remaining spikes, (an emitter follower with zener reference and a fast transistor?) and finally a linear regulator. Maybe this would even be nuclear-EMP-resistant, but who cares...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
Years ago I had to use a whole bank of isolators between two halves of a·hilltop building, every time it got blasted by lightning, about twice a week, the fault reporter (TTL mostly) didn't want to play anymore. All the earths were bonded, all the inputs were filtered and protected but TTL verses Thor always ended one way. The opto bit was exagerated for reliablity later on by 2 metres of fibre.
Optics sounds like an interesting approach to be considered for this, how would it affect the responsiveness of the prop to the signal? At 6,000 rpm, the injectors will be firing 50 times a second and I will need to accurately measure the width of each of these pulses. Will this still be feasible with the optical solution?
Thanks for the input, it is appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jim Fouch
FOUCH SOFTWARE
and have had good luck with them, they are very inexpensive and robust parts.
I have used small switching pwr supplies to power AVR chips from car power. I buy them from Thailand
for 2.65 they are 5v pieces but I suppose you could use a few dropping diodes to power the propeller.
These supplies are good for about 1amp.
The 78xx type parts do a good job and are very inexpensive....not as efficient as a switcher but still
a good choice.
http://www.ereshop.com/index.php?main_page=product_info&cPath=75&products_id=188
As for power, I'm going to need both 5v and 3.3v in my system, so I'm going to run the automobile voltage to a 7805 and then power an LM2937 3.3v regulator from the 7805. This should at least provide two levels of protection. Some further spike protection before the 7805 probably wouldn't be a bad idea though.
James