Posts with «voltage» label

Arduino Measures Remaining Battery Power With Zero Components, No I/O Pin

[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.

Hack an Old DC Motor to Provide Rotary Input

Watch 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.

QRD1114 Resistor Values

Hi all,

I'm using a QRD1114 sensor for a line-follower. Datasheet: http://www.fairchildsemi.com/ds/QR/QRD1114.pdf

Im hooking it up with this schematic:

However, I'm unsure how the value for the 10K resistor was calculated? It's acting as a potential divider, right?

For the LED im guessing that the value of 220 was taken from doing:

R=(Input Voltage - Max Forward Voltage)/(Optimum forward current)

read more