Weird analogRead problem

Hi all,

Can't solve this :frowning: I have custom 328p board with voltage reading circuit. Input voltage goes to R1 and series in that R2 to groung normally voltage divider. Both 10k ohm. Between those resistors to 328p analog input 1. If supply voltage goes under 6.5v led should blink. But it does not. Tricky part here is when i measeure voltage between gnd and A1 voltage, it is half of the input voltage. Thats normal. But when my multimeter is connected led starts to blink and when remove it stops. When measuring with oscilloscope i see half 1/2 voltage like with multimeter but now led does not blink?

Then when i power down 328p and measure voltage A1 pin it is about 1 volt??

Aref pin connected 0.1uF to gnd.

Anyone? Thank you.

You need to post your program code and details of how your led /resistor is connected ?

I suspect the meter itself is affecting the circuit. You could add code to monitor/ouput the actual a/d conversion result.

Is the voltage divider ground connected to the Arduino ground?

The 'scope & multimeter should be high impedance relative to the 10K resistance and should have no effect.

What does the ADC read? (See the Analog Read Serial Example.) Does the reading change when you connect the meter or 'scope?

When measuring with oscilloscope i see half 1/2 voltage like with multimeter but now led does not blink?

Is there any "wiggle room" in your code? i.e. What happens if the voltage is just-slightly above 3.25V? (NOTE - The same thing will happen if the reference voltage (5V) drops a little... You'll get a slightly higher ADC reading.)

Then when i power down 328p and measure voltage A1 pin it is about 1 volt??

That's normal. There are over-voltage (and negative-voltage) protection diodes inside the chip. If Vcc is below the input voltage, current flows through the diode "shorting out" the over-voltage. See Figure 22 (page 46) of the [u]ATmega Datasheet[/u].

Hi,

multimeter should be high impedance relative to the 10K resistance

The multimeter needs to have an input impedance of 10 Meg ohms or so to have 'little' effect when probing your circuit. The meter IS part of your circuit.

What are the specifications on the multimeter part of your circuit?

You could be injecting noise simply by holding the multimeter wires and probes, you may be picking up
some RF or other nearby mains noise.

The oscilloscope probe is in a grounded coax sleeve so it doesn't pick up noise.

Also you could be picking up noise from the wiring you use to sense the supply voltage.

The 1V on powering down is perfectly normal - CMOS circuits below their minimum voltage consist
of a bunch of FETs that are fully off, so not current flows and the decoupling capacitors / power supply
cannot drain any further unless there are other routes to ground.

wg0z:
I suspect the meter itself is affecting the circuit. You could add code to monitor/ouput the actual a/d conversion result.

This is kind of a critical thing to know. Is the meter causing a drastic change in reading? Is there an extremely low margin on the threshold? There's no point guessing until we actually get more data about what's going on during the fault.