I am working on a battery-powered project with an Arduino UNO.
I got external components (MP3 player board, MonoAmp Breakout, 8 ? Speaker:, ..) that get power from the 5V and 3.3V output of my Arduino UNO. I would like to be able to stop suppling power to these external components when I send the Arduino UNO to sleep.
Is there any function (like the digitalWrite(xx,LOW) function for the pins) to power down the 5V or 3.3V output of my Arduino board ?
The external components powered by these outputs keep sucking on it, consuming most of my battery when my Arduino board is on a sleeping mode
Thank you for your repliaes on that question or any other complementary solutions!
I got external components (MP3 player board, MonoAmp Breakout, 8 ? Speaker:, ..) that get power from the 5V and 3.3V output of my Arduino UNO. I would like to be able to stop suppling power to these external components when I send the Arduino UNO to sleep.
Stop using the Arduino 3.3 V output.
Use a small relay (or solid state switch) to control +5Volts to external devices... Derive the 3.3 Volt after the relay for +5.
The Arduino +5 must always be available (non-switched.)
Use a digital output with proper driver and flyback diode to control the relay coil. Turn off the relay before sleeping. Turn on the relay after waking.
You best understand issues associated with peripheral power-up: time to stabilize, buffer garbage, POR, etc.
I have made some researches to buy a relay but I've discovered that a relay have a typical power consumption around 70 mA which is still to much for my battery-powered project
While sleeping my arduino board has a power consumption around 35 mA.
The relay will consume twice as much as my arduino right ?
I have made some researches to buy a relay but I've discovered that a relay have a typical power consumption around 70 mA which is still to much for my battery-powered project
While sleeping my arduino board has a power consumption around 35 mA.
The relay will consume twice as much as my arduino right ?
SIGNAL RELAY, DPDT, 12VDC, 2A, THD; Coil Type:DC; Contact Configuration:DPDT; Contact Current Max:2A; Contact Voltage AC Nom:125V; Contact Voltage DC Nom:30V; Coil Voltage VDC Nom:12V; Coil Current:15mA; Coil Resistance:800ohm ;RoHS Compliant: Yes
The coil is 12 Volts but you can use a FET or transistor (with appropriate base resistor) to cycle the relay. The 12 Volts can easily be the V+ from which you derive +5 and +3.3 regulated. My experience is that a voltage of 9V will likely be fine for the coil but testing would need to confirm same.
Use a P-channel MOSFET for a high-side power switch.
Use next to no current to turn it on (pull it low).
Make sure to take any control signals low before removing power so the devices aren't powered via leakage current thru the control lines.
May I add that if the guy doesn't need to provide much current to his circuit he can tunr the 5V or 3.3V off by using a digital pin as GND?
I mean, the MOSFET or a transistor are a good way to turn something ON/OFF, but if you can stay within the current limits of the Atmega328 he can use one of the pins to sink the current and by turning such pin HIGH he can actually stop current flow.
I wouldn't use a relay if the circuit I need to drive operates at logic level voltages and I wouldn't add a transistor if I can use the internal Atmega328 transistors....
Make sure though you can stay within the pin limits (40mA) and you not exceed the total package current limit (200mA) for your board (those values are for a Uno R3 board).
doesn't need to provide much current to his circuit he can tunr the 5V or 3.3V off by using a digital pin as GND?
Op "could" sink from the 5V but not the 3.3V because when the CMOS output swung HI, the Adruino would attempt to source. A diode would prevent this but also limit the LO side to around 0.8 to 1.2 Volts because of the CMOS+ diode Voltage drops. Just a bad design.
I wouldn't use a relay if the circuit I need to drive operates at logic level voltages and I wouldn't add a transistor if I can use the internal Atmega328 transistors....
But, I would... Because in addition to the sink offset voltage I already talked about, peripheral modules often have as much as 10uF of bulk capacitance which creates a current spike in the uC. Again, poor design. Also, sinking or sourcing external modules from data pins is a great way to take out the uC if something shorts or pulls more current than rated. Many design guides even suggest 100-470 Ohm series resistors for CMOS data-data connections.
Bottom line, the uC is not a power switch: it is a binary data switch.
If power is a concern, stop using an Uno, that 30ma is almost exclusively used by the USB->serial circuitry. Get an Arduino Pro without all the USB stuff and use an FTDI to program and you'll get down to ua usage when asleep