[...] I'm monitoring a 0-5 volt input from a car. Like say the TPS (throttle position sensor) or the MAF (mass air flow sensor) etc. It works great and puts no load on the car's sensors so as to not alter the signal the car's ECU is getting.[...]ThanksMalcolm
What you need to be looking at, is resistors in series with the inputs. If the resistors are large enough (say, 47k,) the internal input diodes in the Arduino will look after it just fine.
On the other hand, you are talking about analog inputs, and I am not sure what their internal impedance is in that mode (it is of course, tens or hundreds of megohms as digital inputs) - perhaps you should research that? I believe however that this is only of importance during the A-D conversion, so putting a capacitor on the input after the resistor would stabilise the voltage during that conversion - and in addition, filter noise.
The obvious alternative is to use something like an LM324 (quad) op- amp as both an impedance buffer and a scaling amplifier, operating from the Vcc of the Arduino.
(I am getting déjà vu here - I seem to recall giving the same answer - on another board - many years ago!)
I'm not sure how that would help me? The current flow is so tiny it's neglagent and I don't see there been a voltage drop across the resister to protect me against the 12 volts? Or am I misunderstanding? If there is indeed a voltage drop then isn't that going to affect my 0-5 monitoring in normal circumstances?
I'm not sure how that would help me? The current flow is so tiny it's neglagent and I don't see there been a voltage drop across the resister to protect me against the 12 volts?
I know of LM324 but not really how to use it. Impedance buffer sounds useful but not sure I'd need a scaling amplifier? The 0-5 volt output from the car is perfect for what I need. How does this address my over voltage situation at the input of the Arduino?
The point is that the microcontroller in the Arduino microcontroller already has 2 diodes connected to each pin, one to protect it against negative voltages, the other to protect it against voltages greater than Vcc (i.e. greater than +5V). The limitation is that these diodes are only good for about 2mA at most. By connecting a 47K resistor between your sensor and the input, you ensure that the sensor output would have to reach nearly 100V before that 2mA is exceeded.
OK so I drew out what I think we're talking about here. The diagram on the left is all you're saying I need to do? Simply place a 47K resistor in line of the input like that and I'm protected? And this does not affect the 0 - 5 volts I'm reading? The Arduino is still going to see the same voltage as before?
Now if I was to add the Zener (which it sounds like you guys are saying is not required at all) it would be added like the diagram on top right or bottom right? I'm thinking top right.
5.9 volts is 0.65V over 5.25V, 0.65V being the voltage drop of a silicon diode - which is what is, internal to the chip, limiting the voltage. That is precisely what you would expect.The point is that the current which is feeding that diode is negligible, It is not going to heat any part inside the chip, and 5.9 volts is not going to break down any insulation.
Given the cost of replacing an engine controller, shouldn't you be more concerned about protecting the other side from a wiring mistake?