Arduino voltage measurement tricks

We think it’s a great learning experience to tear back the veil of abstraction and learn a bit more about the hardware found on an Arduino board. This project is a great example. [Scott Daniels] takes a look at the other voltage measurement options available to AVR chips used by Arduino.

If you’ve used the analogRead() function then you’ve already measured a voltage using the Arduino. But do you know what is going on behind the scenes to make this happen? The Analog to Digital converter on the AVR chip is being used to measure an incoming voltage by comparing it to a known voltage reference. That reference is by default the supply voltage line for the chip. This should be 5V but will only be as accurate as the regulator supplying it. [Scott] looks at the other voltage references that may be used. An external reference can be used by adding hardware, but that’s not the focus of his article. Instead he looks at using the 1.1V internal reference. He’s written some short example code that let’s you measure the incoming line voltage based on that internal reference. This is a very handy trick that can let you detect when the chips is running from a battery and how much juice is left in the cell.

Designing and building a bench supply

[Scott’s] been digging around the back issues of the Internet to find this project. He blew the dust off and sent us a link to an article that traverses the design and build process of a bench power supply.

[Guido Socher] does an excellent job of presenting his bench supply project. So many others show of the final product, but he has gone out of his way to make sure we understand the design principles that went into it. He starts off by talking about the simplest possible supply design: a transistor and Zener diode which generates a reference voltage. He goes on to discuss the problems with this simplified circuit and how to address them, covering the gotchas that pop up at each step in the process.

Once he designed the circuit and laid out some boards he began building an enclosure. We love his tip about using a stick pin and an unpopulated through-hole PCB to mark button locations on the front bezel of the case. The final design is shown above, and includes a laptop brick to translate mains power into a 24V 3A DC feed for his custom circuitry.