> I have no EE background so apologies for any incorrect terminology I may > use. My project involves using a PIC to read pulses from a high voltage > source, a car's injector pulse signal. I'm not happy at all with the way I'm > currently reducing the pulses to 5V, using a zener diode and a potential > divider. > > I know there must be a much better way to do this and would be eternally > grateful if someone could offer me a better solution, it would be fantastic > if I could come up with something capable of handling a wide range of > voltages for the pulse. e.g.. 2V to 60V. Keep it simple though or I'll never > understand! Since you need to see 2V pulses, you will have to include some gain. Unfortunately that will reduce your noise immunity. What is the source impedence of the pulses? I'm not familiar with fuel injector requirements, but I'm going to assume the pulse has a fairly low source impedence. I will further assume the pulses are short and the average duty cycle is small, like 10% or less. Again, I could be wrong on these assumptions, but I need to start somewhere. The biggest problem in a car is noise. There is no such thing as a clean signal or clean power supply unless you go to some trouble to make them. So here goes shooting from the hip because there is too little information to do this right. Make a resistor divider chain with three resistors. The top end is connected to the pulse signal and the bottom end to ground. The top two (R1 and R2) resistors are 500ohm 1/2W and the bottom one (R3) is 1Kohm 1/4W. Put a diode from ground to the top tap. This will clip negative spikes (yes, there will be negative spikes). I would also add a cap accross the diode, but the value depends on the minimum pulse width and height which we don't know. I'm thinking about 1nF, but that could be way off. The purpose of the cap is to filter out some of the high frequency crap, like pulse bounces and the like, but to not filter out whole pulses. Next connect the base of a small signal NPN transistor to the lower divider tap, the emitter to ground, and the collector to +5V thru a 1Kohm resistor. Almost any small signal NPN will do fine. I would use a 2N4401, but that's only because I have a few 100 of them in stock. The collector of the transistor is the output and is suitable for connecting directly to a PIC input. It will normally be high and pulse low when a pulse is detected. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads