I have a question for all arduino developers working with the pro mini boards:
---- Is it possible to power off the Power and the Status LEDs from the arduino pro mini board???
I'm using arduino in power-down mode during most of the operating time for achieving the lowest current usage, and powering off the two LEDs would make a big difference to my application. Arduino wakes up due to an interrupt caused by a sensor connected to its SPI interface.
I checked out the schematics and seems to be physically possible to remove them from the board, but I would rather turn them off by software commands.
I am aware of 2 LED's. The power led (red) which can not be controlled from software and the green led on Arduino pin 13. You can switch off the green led, but not the red power led.
The red power led uses either 0.5mA (5V version) or 0.33mA (3.3V version) so it may not amount to as much as you seem to think.
I have a sensor connected through its SPI interface to digital pins 10,11,12 and 13 from the Arduino Pro mini, therefore pin 13 is already used for the SCK. Any other way to get to the LED?...
As regards to the power consumption, when the system is asleep in the POWER_DOWN mode, it uses 5mA current (1mA used by the sensor and the rest by the Pro mini). I was expecting lesser amount, but this is the reading I get from the multimeter. Does it sound right to you?
I have a sensor connected through its SPI interface to digital pins 10,11,12 and 13 from the Arduino Pro mini, therefore pin 13 is already used for the SCK. Any other way to get to the LED?...
If your Mini Pro is used as SPI master, you should still be able to take control of pin 13 with digitalWrite(13,LOW) to turn off the LED before you power down. As for normal operation, cutting traces may be the only option.
Ben, I tried to get control of the LED on pin 13 and turn it off before putting pro mini to sleep, but wasn't successful. Here's my code:
void sleepNow()
{
set_sleep_mode(SLEEP_MODE_PWR_DOWN); // sleep mode is set here
sleep_enable(); // enables the sleep bit in the mcucr register
digitalWrite(13, LOW); // turn off LED13 status on-board LED
digitalWrite(LEDPIN, LOW); // turn off status LED8 (ON when pro mini-awake/OFF when pro mini-asleep)
attachInterrupt(1,wakeUpNow, LOW); // use interrupt 1 (pin 3) and run function
// wakeUpNow when pin 3 gets LOW
power_adc_disable();
power_spi_disable();
power_timer0_disable();
power_timer1_disable();
power_timer2_disable();
power_twi_disable();
sleep_mode(); // here the device is actually put to sleep!!
// THE PROGRAM CONTINUES FROM HERE AFTER WAKING UP
sleep_disable(); // first thing after waking from sleep:
// disable sleep...
detachInterrupt(1); // disables interrupt 1 on pin 3 so the
// wakeUpNow code will not be executed
// during normal running time.
power_all_enable();
}
Alec, it looks that de-soldering is the only way out. I was hopping for a more elegant solution ....