Posts | Comments

Planet Arduino

Archive for the ‘voltage’ Category

[Trent M. Wyatt]’s CPUVolt library provides a fast way to measure voltage using no external components, and no I/O pin. It only applies to certain microcontrollers, but he provides example Arduino code showing how handy this can be for battery-powered projects.

The usual way to measure VCC is simple, but has shortcomings.

The classical way to measure a system’s voltage is to connect one of your MCU’s ADC pins to a voltage divider made from a couple resistors. A simple calculation yields a reading of the system’s voltage, but this approach has two disadvantages: one is that it constantly consumes power, and the other is that it ties up a pin that you might want to use for something else.

There are ways to mitigate these issues, but it would be best to avoid them entirely. Microchip application note 2447 describes a method of doing exactly that, and that’s precisely what [Trent]’s Arduino library implements.

What happens in this method is one selects Vbg (a fixed internal voltage reference that is temperature-independent) as Vin, and selects Vcc as the ADC’s voltage reference. This is essentially backwards from how the ADC is normally used, but it requires no external hookup and is only a bit of calculation away from determining Vcc in millivolts. There is some non-linearity in the results, but for the purposes of measuring battery power in a system or deciding when to send a “low battery” signal, it’s an attractive solution.

Being an Arduino library, CPUVolt makes this idea very easy to use, but the concept and method is actually something we have seen before. If you’re interested in the low-level details, then check out our earlier coverage which goes into some detail on exactly what is going on, using an ATtiny84.

While those of us stuck sailing desks might not be able to truly appreciate the problem, [Timo Birnschein] was tired of finding that some of the batteries aboard his boat had gone flat. He wanted some way to check the voltage on all of the the batteries in the system simultaneously and display the information in a central location, and not liking anything on the commercial market he decided to build it himself.

Even for those who don’t hear the call of the sea, this is a potentially useful project. Any system that has multiple batteries could benefit from a central monitor that can show you voltages at a glance, but [Timo] is actually going one better than that. With the addition of a nRF24 module, the battery monitor will also be able to wireless transmit the status of the batteries to…something. He actually hasn’t implemented that feature yet, but some way of getting the data into the computer so it can be graphed over time seems like a natural application.

The bill of materials is pretty short on this one. Beyond the aforementioned nRF24 module, the current version of the monitor features an Arduino Nano clone, a 128×160 SPI TFT display, and a handful of passives.

Knowing that a perfboard wouldn’t last long on the high seas, [Timo] even routed his own PCB for this project. We suspect there’s some kind of watertight enclosure in this board’s future, but it looks like things are still in the early phases. It will be interesting to follow along with this one and see how it eventually gets integrated in to the boat’s electrical system.

If you’re looking for a way to keep an eye on the voltages aboard your land ship, this battery monitor disguised as an automotive relay is still the high-water mark in our book.

encoder1Watch a Redditor share how he hacked a DC motor and hooked it up to an Arduino to use as an encoder.

Read more on MAKE

The post Hack an Old DC Motor to Provide Rotary Input appeared first on Make: DIY Projects, How-Tos, Electronics, Crafts and Ideas for Makers.

Jun
05

Arduino LCD Voltmeter with 4 Channels

arduino, arduino uno, LCD, voltage Comments Off on Arduino LCD Voltmeter with 4 Channels 

startingelectronics.com has a very clear tutotrial on how to read analog voltages using Arduino:

Analog channels A2 to A5 on an Arduino Uno are used to measure four different voltages. The measured voltages are displayed on a 16 character by 2 line LCD. The four channel Arduino multimeter can measure four independent DC voltages that can each be in the range of 0 to 50V. Voltages are displayed with one decimal place, e.g. 5.3V, 12.8V, etc.

Arduino LCD Voltmeter with 4 Channels - [Link]



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook