Go Down

Topic: Weird analogRead problem (Read 490 times) previous topic - next topic

Wils0n

Hi all,

Can't solve this :( 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.

ricky101

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

wg0z

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

DVDdoug

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?

Quote
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.)  

Quote
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 ATmega Datasheet.




terryking228

Hi,
Quote
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?
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

MarkT

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.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Jiggy-Ninja

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.
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

Go Up