Pages: [1]   Go Down
Author Topic: 3.3V low-power Arduino questions  (Read 1434 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
after completing my first Arduino project, I decided to something more complicated and learn a bit about electronics.
I would like to design a "as-low-power-as-possible" system with a TLC5940 or two MAX6966 (will try both^^) which controls up to 6 20mA RGB LEDs.
What I am trying to decide now is, whether I should use the 3.3V or the 5V version of the Arduino Pro Mini. My questions are:
1. Could I solder in a 4 MHz quartz to lower power consumption even more? What would be the lowest possible and sensible frequency?
2. Does the Arduino SPI library work with 8MHz (or lower) Arduinos?
3. I have some 5V digital signals I would like to monitor. What's the easiest way to input these into a 3.3V Arduino?
4. Blue and white LEDs often have a forward voltage of 3.2V or similar. Will the 3.3V in combination with the ICs be enough to light the LEDs?
5. The board will be powered via USB and the FT232RL. Will this chip provide enough current for 3.3V (up to 400mA for all LEDs) or will I have to add my own voltage regulator?
6. Is it a good choice to use 3.3V if the power supply is 5V anyway?
and lastly, something rather unrelated:
7. As the ICs are doing all the interesting things, the µC might sleep most of the time. Is it possible to wake the µC up when data is sent to the UART or when digital inputs change?

Best regards,
Flyser

P.S.: I know that the µC is consuming very little power compared to the 20 LEDs, but please note that only two or three of them will be lit 99% of the time.
Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

1. Could I solder in a 4 MHz quartz to lower power consumption even more? What would be the lowest possible and sensible frequency?

External crystals with frequencies 0.4-20MHz or 32.768kHz can be used.  There are also internal oscillators of 8MHz and 128kHz, or you can generate your own clock signal with no lower frequency limit.  All these clock sources can be divided by 1-256x to lower the CPU speed even further.

However at low frequencies you'll run into problems with serial communication and uploading sketches.  A better approach to saving power would be to put the cpu into one of the low-power modes whenever the LEDs are not being used.

Quote
3. I have some 5V digital signals I would like to monitor. What's the easiest way to input these into a 3.3V Arduino?

Only with a voltage divider (2 resistors, for example).

Quote
4. Blue and white LEDs often have a forward voltage of 3.2V or similar. Will the 3.3V in combination with the ICs be enough to light the LEDs?

I have run blue leds at 3.3V, but even with no series resistor the brightness was substantially reduced.  LEDs vary, so you'll need to try it.

Quote
5. The board will be powered via USB and the FT232RL. Will this chip provide enough current for 3.3V (up to 400mA for all LEDs)

Nope.  http://www.ftdichip.com/Products/ICs/FT232R.htm

Quote
6. Is it a good choice to use 3.3V if the power supply is 5V anyway?

Ah, no.  With a linear regulator you don't save any power by reducing the voltage.  You only save power by reducing the current.  Since the current is dominated by the LEDs, you adjust power usage by changing the LEDs' series resistor.  No need for a voltage regulator.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

External crystals with frequencies 0.4-20MHz or 32.768kHz can be used.  There are also internal oscillators of 8MHz and 128kHz, or you can generate your own clock signal with no lower frequency limit.  All these clock sources can be divided by 1-256x to lower the CPU speed even further.
However at low frequencies you'll run into problems with serial communication and uploading sketches.
Is there a rule of thumb which frequencies are sane choices to allow serial communication?

A better approach to saving power would be to put the cpu into one of the low-power modes whenever the LEDs are not being used.
Unfortunately at least one LED will always be powered on, so that will never happen. But the µC can go to low power states while the states of the LEDs are not changing, right? The ICs will do the job of keeping the LED lit?

Ah, no.  With a linear regulator you don't save any power by reducing the voltage.  You only save power by reducing the current.  Since the current is dominated by the LEDs, you adjust power usage by changing the LEDs' series resistor.  No need for a voltage regulator.
Okay, too bad ... So I will use a 5V Arduino instead.
Uhm, series resistor? I thought I would not need one, as the MAX6966 and the TLC5940 are constant current drivers?
With that in mind, it should reduce the power usage to buy the brightest 20mA LEDs around and use the ICs to limit the current to 5-10mA?

Thanks for your quick reply,
Flyser smiley
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12782
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there a rule of thumb which frequencies are sane choices to allow serial communication?

Baud rates?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there a rule of thumb which frequencies are sane choices to allow serial communication?

Baud rates?

I doubt that an atmega328p can communicate with 9600 baud, if it uses an oscillator with 9,6 kHz?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12782
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Are you saying that you'd like your application to communicate at 9600 baud?
Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a rule of thumb which frequencies are sane choices to allow serial communication?

See Wormfood's baud-rate calculator here: http://www.wormfood.net/avrbaudcalc.php
I find that 57600 baud is the maximum at 8MHz, and 115200 at 16MHz.  If you're using the sleep modes then there's little value in reducing the clock frequency, as the clock is stopped anyway.

Quote
Unfortunately at least one LED will always be powered on, so that will never happen. But the µC can go to low power states while the states of the LEDs are not changing, right? The ICs will do the job of keeping the LED lit?

Indeed.  The Arduino's own digital outputs also keep their states whilst the CPU is in sleep mode.

Since I'm working on a battery-powered project I measured the effectiveness of the sleep modes on a 16MHz Arduino Uno and on a 8MHz Pro-Mini:

ModeUno [mA]Pro-Mini [mA]
Active443.5
Idle381.5
Power-down320.3

Running the timers adds about 0.4mA to these numbers.

So it looks like the USB interface on the Uno continuously draws about 30mA.  The 0.3mA used by the Pro-Mini during power-down is due to the power LED - this could easily be disabled by cutting the PCB track.

The Uno's voltage regulator is very efficient, and the current used hardly depends on whether the regulator is used or bypassed.
The Pro-Mini's voltage regulator is less efficient (perhaps due to the low currents being used), and the current needed rises by 20-50% if provided via the regulator.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A uno also has a power on LED wired to the +5v bus.

Lefty

Logged

Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 174
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you thought about just using an ATTiny or ATMega directly on a simpler board without all of the additional Arduino circuitry?  I actually started out with an Uno but rarely use it any more, having moved on to simpler circuits with ATTiny85, 2313, and the occasional ATMega328.  The main benefit here is that you only add what you need for your project; you can even use the Arduino dev environment if you're so inclined.  I'm rather fond of the runtime board from nkc electronics (http://www.nkcelectronics.com/arduino-runtime-board-rev-b.html: $1.99 for the PCB) for the '328 and the tiny dev boards from evilmadscientist.com (http://evilmadscience.com/productsmenu/tinykitlist/112-tiny2313; $2.30 ea in quantities of 5).  Or skip the pre-made boards and just protoboard.  Or solder directly to the chip <g>.  I buy ATTinys in bulk from Mouser ('85s are $1.30 ea in quantities of 25, '2313s $1.53 in same qty) so I always have some on hand.  You can make some really neat devices for a couple of bucks and learn quite a bit about the AVR in the process. 

For me the Uno was a gateway device - I'm now hooked on the AVR <g>.  For the price of a single Uno I can build quite a few devices...  My biggest challenge is finishing one project before jumping into the next.  This forum is excellent for generating new ideas!
Logged

Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The UNO's power LED consumes 6mA, and the LM358 about 0.5mA. So the 8U2 interface accounts for ~25mA, of which 5mA goes through the newly added 1k resistor on the R2 auto-reset signal. smiley-grin
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11730
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Ah, no.  With a linear regulator you don't save any power by reducing the voltage.  You only save power by reducing the current.  Since the current is dominated by the LEDs, you adjust power usage by changing the LEDs' series resistor.  No need for a voltage regulator.

Well CMOS switching losses are usually proportional to clock frequency and supply voltage.  A cpu at 3V3 should use about 2/3 the power of it run at 5V, assuming the same clock frequency and that the dominant losses are charging and discharging signal capacitances.  I would expect this to be roughly true of the 328.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

See Wormfood's baud-rate calculator here: http://www.wormfood.net/avrbaudcalc.php
I find that 57600 baud is the maximum at 8MHz, and 115200 at 16MHz.  If you're using the sleep modes then there's little value in reducing the clock frequency, as the clock is stopped anyway.
Thanks! That's what I was looking for smiley

Since I'm working on a battery-powered project I measured the effectiveness of the sleep modes on a 16MHz Arduino Uno and on a 8MHz Pro-Mini:

ModeUno [mA]Pro-Mini [mA]
Active443.5
Idle381.5
Power-down320.3

Running the timers adds about 0.4mA to these numbers.

So it looks like the USB interface on the Uno continuously draws about 30mA.  The 0.3mA used by the Pro-Mini during power-down is due to the power LED - this could easily be disabled by cutting the PCB track.
Ouch! My application is powered and sometimes controlled through USB, I was planning to use the Arduino Nano for prototyping and create my own PCB based on that later. I guess I can except the 32mA on the Nano too? Or is the FT232 less power hungry?


The Uno's voltage regulator is very efficient, and the current used hardly depends on whether the regulator is used or bypassed.
The Pro-Mini's voltage regulator is less efficient (perhaps due to the low currents being used), and the current needed rises by 20-50% if provided via the regulator.
The voltage regulators shouldn't matter, if my project is powered through USB, right?


Have you thought about just using an ATTiny or ATMega directly on a simpler board without all of the additional Arduino circuitry?
My plan is to prototype with Arduino and produce a PCB if all works out

I actually started out with an Uno but rarely use it any more, having moved on to simpler circuits with ATTiny85, 2313, and the occasional ATMega328.  The main benefit here is that you only add what you need for your project; you can even use the Arduino dev environment if you're so inclined.  I'm rather fond of the runtime board from nkc electronics (http://www.nkcelectronics.com/arduino-runtime-board-rev-b.html: $1.99 for the PCB) for the '328 and the tiny dev boards from evilmadscientist.com (http://evilmadscience.com/productsmenu/tinykitlist/112-tiny2313; $2.30 ea in quantities of 5).  Or skip the pre-made boards and just protoboard.  Or solder directly to the chip <g>.  I buy ATTinys in bulk from Mouser ('85s are $1.30 ea in quantities of 25, '2313s $1.53 in same qty) so I always have some on hand.  You can make some really neat devices for a couple of bucks and learn quite a bit about the AVR in the process. 
Well I think I am in the process of doing that smiley-wink, but it's rather a steep learning curve because of my rather limited electronics knowledge.

For me the Uno was a gateway device - I'm now hooked on the AVR <g>.  For the price of a single Uno I can build quite a few devices...  My biggest challenge is finishing one project before jumping into the next.  This forum is excellent for generating new ideas!
Tell me about it! I started with a simple LED mod and now I have 3 different project ideas constantly floating through my mind smiley-wink It's like hydra heads smiley-grin

Thanks to everyone for the input,
Flyser smiley
Logged

Pages: [1]   Go Up
Jump to: