0

I am new to Arduino and physical computing When I measure the wire coming from any UNSET Arduino uno pin, the result is approximately 2 volts even the "ANALOG IN" pins. Considering that the pins which been set to HIGH and LOW are giving 5 and 0 volts "which is cool". Is that the nature of Arduino or is that a failure caused by short or anything else?

  • 1
    Unconnected pins float near a certain voltage. If the voltage bothers you somehow just attach a pull-down resistor to them. – Avamander Feb 25 '16 at 17:57
  • @Avamander I am trying to measure a small voltage from some kind of sensors which is between 0.2 - 0.6 volts to the analog in pin A0. I get my hands shocked when I do that because of the 2 volts getting out of the A0. I am worried about the sensor, I think the 2 volts is not good for it. – Ahmed Al-sabsab Feb 25 '16 at 18:03
  • If your getting your hands shocked when touching the Arduino pins, maybe you need to ground your power supply... You can get badly hurt or even dead in some conditions! – fabrosell Feb 25 '16 at 18:18
  • @fabrosell my power supply is my laptop's USB – Ahmed Al-sabsab Feb 25 '16 at 18:21
  • I think this is a simple question for expert users. – Ahmed Al-sabsab Feb 25 '16 at 18:23
0

After a microcontroller reset, AVR IO pins default to input. In this state they have high impedance. For example, according to the Atmel ATmega328 spec sheet doc8271 Table 29-15, analog input impedance typically can be taken as 100 MΩ for design purposes. (Input pin impedance may in fact be orders of magnitude more, effectively an open circuit except for leakage currents of a few nanoamps.) Each pin has a few pF (5-10?) of capacitance [1,2,3,4] which in general is small compared to stray capacitances of attached wiring.

When stray electromagnetic fields charge the pin and stray capacitances, a small voltage develops on the pin. You could connect a 1 to 10 MΩ resistor between the pin and ground, to avoid the 2 V you are seeing.

  • Does that mean that it is natural fact to have the 2V and that the solution is to connect a resistor with the input wire to solve that problem? – Ahmed Al-sabsab Feb 25 '16 at 19:05
  • 1
    It's natural for arbitrary voltages to appear when you have an antenna (the wiring) attached to a capacitor (the wiring and pin). BTW, how did you measure the voltage? Many cheap DVMs have fairly low input impedance (about 1 MΩ) so you might see a voltage upon first connecting, but it should soon drop to near zero unless you are using long leads or have high EM fields in the area. Getting a shock suggests hundreds of volts, not 2 V. – James Waldby - jwpat7 Feb 25 '16 at 19:14
  • @AhmedAl-sabsab with the sensor connected to the Arduino there should no longer be 2 volts on the input pin that it is connected to; if there is then there must be an error in the way you have connected everything. You might need to provide more information on what you're actually doing - by editing the question. – CharlieHanson Feb 25 '16 at 19:31
  • I have used an expensive multi-matter to measure the voltage. I also used Serial.println(volt); to print the result to the PC screen and I get the same result. the shock stills a mastery. it is a tiny shock not a killing one of course. – Ahmed Al-sabsab Feb 25 '16 at 19:32
  • 1
    Attach one end of a 10K resistor to ground, and the other end to a wire. Look very closely (for tiny sparks) as you move the probe end of the wire towards the input. If no sparks, probably the shocks you've seen are from static electricity in your body. You can also hold the probe end of the wire between thumb and ring finger, then touch the input with forefinger. (Generally, don't let shocks go across your body.) Having no shock in this case (where the probe is grounding your hand) would be consistent with static-electricity-in-your-body theory. – James Waldby - jwpat7 Feb 25 '16 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.