I want to use Atmega328p controller to handle some very simple signals. I'm using the chip and not the whole arduino board because it is a lot cheaper. The problem is that chip itself doesn't have voltage regulator so I need to think of a rechargeable power source. My idea is to use 3 rechargeable AA batteries (~4.5V). I read that it can handle somewhere from 1.5V to 5.5V but I also read that clock speed is then reduced and a lot other complications. So, finally, the question, If I were to use described power source, what challenges should I be ready to face and how will it impact the performance and is it even possible to pull it off.


2 Answers 2


From the ATmega328P datasheet:

Maximum Frequency vs. Vcc

Within the range 2.7 V – 4.5 V, the maximum frequency is a linear function of Vcc. From this graph, you can compute the minimum value of Vcc required to run the microcontroller at 16 MHz: it's 3.78 V.

If you do want to run at 16 MHz, in order to emulate an Arduino Uno, it may become unreliable once the supply voltage drops below 3.78 V, i.e. 1.26 V per cell. Whether this is a serious issue or not depends on the cell chemistry. For reference, alkalines reach about 1 V at the end of their useful life, and NiCd has about 1.2 V when fully charged. You will have to find the relevant voltage for the chemistry you plan to use.

If you can afford running the microcontroller at 8 MHz, then you will most certainly be safe.

Edit: If you want to run the microcontroller at 8 MHz, and you are programming it with the Arduino IDE, you have to select a board/processor combination that runs at 8 MHz. For example, “Arduino Pro or Pro Mini” / “ATmega328P (3.3V 8MHz)”. This will ensure that the time-related functions (millis(), delay(), etc.) and the baudrates of Serial.begin() provide the correct timings. Other than that, the drawback of running at a lower clock speed is that the CPU-bound functions (computations) take twice as long.

  • +1, but I got 3.6 V.
    – tim
    Sep 10, 2021 at 20:45
  • @tim: The linear interpolation formula is Vcc = 2.7 + (f-10)/(20-10)*(4.5-2.7). Sep 10, 2021 at 20:58
  • Ah, thanks, I see where I went wrong. There are two different gradients which I didn't initially spot and was using the gradient between 1.8 V to 2.7 V to calculate for 16 MHz which is on the second gradient between 2.7 V and 4.5 V.
    – tim
    Sep 10, 2021 at 21:18
  • What are side effects of running your board at lower clock speeds? I can see that it would be slower but is that really it?
    – Mirakul
    Sep 10, 2021 at 22:51
  • 1
    @Mirakul It also affects your choice of PWM frequencies and UART speeds. But mostly just... everything takes twice as long :)
    – hobbs
    Sep 11, 2021 at 4:36

They make SEPIC converters that will hold the voltage at 5V for you. The reason for the SEPIC is during charge what happens to the battery voltage and especially if the battery open circuits. If there is no chance for the battery voltage to go to high a boost converter will work just fine. This solution will allow it to run at full speed without degrading performance etc. The new converters are not very expensive and are generally greater than 95% efficient depending on the unit. If you can up the battery voltage things will get a lot more efficient but you would then need to change the boost to a buck, the SEPIC would be fine. I tend to use the China Nanos, they are inexpensive, probably less then your parts and readily available. I have not had problems with them. I like to supply them with about 8 volts via Vin, that gives me the additional filtering of the onboard power supply.

  • 1
    I am surprised that you claim an efficiency of 95%. The figures I have seen tend to be in the 70 to 90% range, and that is with currents of 500mA, An ATMEGA typically takes a few mA, and with consumption that low, the overheads of the switcher are likely to exceed the throughput (ie efficiency less than 50%).
    – JavaLatte
    Sep 11, 2021 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.