0

For every 15 minutes once ultrasonic sensor data will be send to the receiver using nRF24L01. I'm using atmega328P with battery power using AAA*3 battery and it should operate at least 15 days. Can someone please suggest me how to reduce power consumption, except the time of reading data from sensor. I referred number of blog, they using deep sleep mode, but I need to wake up it for every 15 minutes. I can't use watchdog timer since its has only 8 seconds. If I use external RTC for interrupt it added cost in product.

Thank you in advance :)

winny
  • 13,064
  • 6
  • 46
  • 63
  • Possibly related: [What is the best way to estimate the power consumption of an Atmega328p microcontroller?](https://electronics.stackexchange.com/q/247456/93348) – marcelm Feb 18 '21 at 12:36

2 Answers2

2

Have you considered another microcontroller? The AVR is not exactly the most low power on the market. There are XLP PICs and MSP430 too (the MSP430 is 16 bit, too).

Also you should check the power budget of your sensor; make sure you actually turn off everything you don't need while not sleeping (the ultrasound analog circuitry sucks quite a lot of milliamps in standby if not powered off); check power consumption of the radio too, maybe you forgot some standby command (I do forget, constantly!)

You power conversion setup is also quite important. What are you using to regulate power from you batteries?

Lorenzo Marcantonio
  • 8,231
  • 7
  • 28
  • since atmega328p has tolerance between 1.8v to 5.5v i not prefer any regulator where battery voltage is 4.5v(AAA * 3). – Manu Devappa Feb 18 '21 at 09:42
  • 1
    MSP430 can implement its own RTC with a 32.768kHz crystal and an internal timer, waking up as rarely as you like. My watch wakes up once a minute, and runs about 0.8 uA (a bit better than 70uA!) with the display off. I'd expect you could do something similar with the AVR and a watch crystal and get down to a few uA, but I haven't tried. –  Feb 18 '21 at 14:12
1

You could use the watchdog timer to sleep for 15 minutes by going into deep sleep mode right after waking up as many times as needed to reach 15 minutes. You can keep track of how many 8 seconds cycles you have slept with a variable. Contents of the chip's sram are preserved during sleep.

  • Thank you sir. I did try that and i reduced current to 70 Micro Amps !!!!!!!!!!!. I used one of the library, doing same things you said. – Manu Devappa Feb 18 '21 at 09:43
  • Something else that could help reduce power consumption even further is (if you're not doing it already) to do the following before sleeping your avr: - Disable analog comparator: ACSR = (1 << ACD); - Disable ADC: ADCSRA &= ~(1 << ADEN); - Disable a bunch of peripherals: power_all_disable(); (see https://www.nongnu.org/avr-libc/user-manual/group__avr__power.html for more details) remember to enable what you may need after waking up (and disabling it again before going to sleep). This doc has been very informative for me: http://www.gammon.com.au/power – Sebastian Pueblas Feb 18 '21 at 19:28