I using an Arduino uno analog read function to read a voltage divider circuit for a voltage range from 0-70 VDC. On the voltage divider, I am using 2.7Kohm and 36kohm to reduce to voltage range from 0-70VDC to 0-5VDC for arduino analog input.
The circuit works fine with the USB power to the arduino, and as soon as the I disconnect the USB, and the arduino switches to the backup dual switching power supply (120 VAC to 12VDC and 5VDC), the analog values change.
The values are still steady and I dont see any garbage values, but there is a big offset between the original values and the values after disconnecting the USB power to arduino.
Can anyone comment with a solution to this? I checked multiple times and the ground is common through out the circuit.
Electronic – Arduino ADC values change after USB disconnect
adcarduinoswitch-mode-power-supplyvoltage divider
Related Topic
- Connect / disconnect USB while external power source remains connected
- Electronic – Arduino Pro Micro clone: connect USB and RAW power at the same time
- Electronic – arduino – the quickest way to read an analogue signal – Arduino / Raspberry Pi + ADC / Arduino + ADC
- Electronic – Arduino: read different voltage values in a range from -12 to +12V
- Electronic – arduino – How to read LM35 temperature values on nodemcu when sent by arduino by I2C communication
Best Answer
Read the Atmel Datasheet for the '328
Section 28.2 cover the A/D The inputs look like this:
By default on the Arduino Uno the ref voltage is taken from AVCC which is the 5 V VCC used by the MCU.
The Arduino schematic is here.
You can program the unit to not use AVCC/1.1ref and feed in a more stable reference ....or fix your supply voltage.
You could also switch to the 1.1 V reference and change your input divider.