6ea 1k resistors connected in series to +3.3v and Gnd. Q how can arduino UNO A to D be programmed to measure the analog voltages of 6 resistor ladder network without using switches ?
2 Answers
Yes, it can. You can connect the 3.3V as the external ADC reference and use 5 of the 6 available ADC input pins to measure the voltages at each node.
The AREF pin has relatively low impedance and you need to make sure that the 3.3V is not applied when the 5VDC supply to the Arduino is less than 3V. A Schottky diode from AREF to the 5V supply may be necessary.
Alternatively, you could use the default 5V reference and measure the 3.3V as well, which requires 6 analog inputs. That's perhaps easier but less accurate.
In either case you need to ensure that voltages applied to the analog input pins does not exceed the supply voltage to the ATMega chip (even if the 5V supply is off) or if it does, that there is sufficient resistance in series (such as a few K ohms) to limit the current.
As to the code required, that's up to you.
simulate this circuit – Schematic created using CircuitLab
Figure 1. Connection setup.
All of these microcontrollers have one internal analog to digital converter and you multiplex (switch each analog pin in turn) to the ADC (analog to digital converter).
The exercise seems pointless as the values will always be the same.
From the comments:
Did you mean that a physical multiplexer is used?
Yes. It's built into the microcontroller and your code has to select which input pin to read. You can't do simultaneous reads on analog inputs; they have to be sequential.
Figure 2. From How does ADC work (at the end of the page).
-
\$\begingroup\$ Did you mean that a physical multiplexer is used ? \$\endgroup\$ Commented Mar 31, 2019 at 4:55
-
\$\begingroup\$ Yes. See the update and the link. \$\endgroup\$ Commented Mar 31, 2019 at 9:01