Getting Started

Last revision 2026/01/27

This article guides you through selecting and setting up Arduino boards for optimal low power consumption, focusing on FireBeetle BLE4.1 microcontrollers and efficient coding strategies.

Choose a suitable Arduino board

Considering low power consumption, we select Arduino Pro Mini @3.3V 8MHz as Bootloader for FireBeetle BLE4.1 microcontrollers.

Fig2: FireBeetle Board-328P with BLE4.1

Pro Mini uses 8MHz OCXO. Its processing speed is relatively slow for 115200-baud rate. The high baud rate may lead to unreadable code and packet loss etc. 9600-baud rate is recommended.

Low Power Consumption Mode

BLE 4.1 switch to low power consumption mode with AT command: AT+LOWPOWER=ON.

The Bluetooth can still broadcast and connect in the low power mode. When the Bluetooth received data, it will awake automatically and send an interrupt signal to the chip: 328p.

The interrupt pin here should be connected to D2 of 328p which is interrupt 0 in the code.

Sample Code

ATmega328P deep power-down sleep with external interrupt wakeup, disable peripherals for low power, wake on D2 pin level change.

void wakeup(){
  sleep_disable();
  delay(2000);
}
void lowpower(){
 ADCSRA &= ~(1<<ADEN);/*turn off ADC*/
 TWCR &= ~(1<<TWEN);/* turn off TWI*/
 delay(10);
 set_sleep_mode(SLEEP_MODE_PWR_DOWN);/*set sleep mode to power down mode*/
 sleep_enable();/*enable sleep mode */
 MCUCR |= (1<<BODS|1<<BODSE);
 MCUCR = MCUCR & (~(1<<BODSE)) | (1<<BODS);
 sleep_cpu();/*enter sleep mode */
}
void setup() {
 attachInterrupt(0, wakeup, CHANGE);
 /* set interrupt method to trigger D2 to voltage change, callback function is wakeup( ), which means awake functions of the chip 328p*/
 lowpower();
}

void loop() {
 lowpower();
 delay(2000);
}

Result

Enter deep sleep on power-up, wake on D2 level change with delay, then repeat sleep cycle for ultra-low power operation.

  1. In the low-power mode, the whole power consumption of the FireBeetle Board-328P with BLE4.1 board is about 70uA.
  2. Turn off the interrupt and other peripherals, the whole power consumption of the FireBeetle Board-328P with BLE4.1 board is about 25uA.

Was this article helpful?

ON THIS PAGE

TOP