I have a project that is powered by 2x 18650 battery and feeds it to a step down switching voltage regulator that is configured to give a steady output of 3.78V to both esp8266 and atmega328p.

The esp8266 only sends an HTTP post request to an API every 30 mins and on standby mode whenever it does not do anything. I have tested it for 1 hour and the esp8266 seems to work fine and does not warm. I intend to use the esp8266 in an airconditioned office 24/7 or until the battery runs out. I know it is not safe to give 3.78V because its supposed to have only a maximum of 3.6V but I am asking if anyone has ever had the same application and did not experience any problems?

  • 1
    Whether or not it works reliably over time is a gamble. The 3.78V output of your regulator will vary by 10's (or 100's) of millivolts as loads change. Why not simply use a 5V step down DC-DC buck converter for the 328P and a cheap 5V to 3.3V linear regulator for the ESP8266? – Jeff Wahaus Nov 5 '18 at 15:11
  • 1
    connect VCC with a big diode instead of a wire; it should drop about half a volt, and while the "transconductance" will vary with load, it should keep the voltage around 3.2v, give or take a few 100mv, which is within spec. A 470u cap would help keep it stable if you run into issues, and isn't a bad move even without the added "jank" of a rectifier diode – dandavis Nov 5 '18 at 20:26
  • @JeffWahaus Yes, it is the original plan but the 3.3v linear regulator is unavailable in our area. – Brian Jacob Sanchez Nov 6 '18 at 10:20
  • @dandavis Thanks for the suggestion. The circuit is already on PCB so I do not think this would be an option now. – Brian Jacob Sanchez Nov 6 '18 at 10:20

Other possibilities include:

  • Running the Atmega328p at 8MHz and powering at 3.3v. Both devices would be operating within spec.

  • Running the whole system at 3.3v but without changing the clock on the '328. The advantage here is you'll get the full throughput from the '328, assuming you need it. The disadvantage (assuming a 16MHz Atmega328p) is that it will be running out of spec (overclocked) but they seem to be conservatively enough speced that most chips do fine. I have built two boards this way for the same reason: to put both a 328p and an ESP8226-01 on one board. I ran some rather rudimentary tests on the Atmega chips I put on those boards to find out if they would work at that voltage. I didn't see any issues and I haven't discovered any since.


Would it be possible to run the ATmega at 8 MHz using a 16 MHz external oscillator by simply uploading a new sketch?

It may be possible to use its internal resonator and ignore the connected crystal; I haven't tried this. Could you clip off the external crystal if you needed to?

This article talks about setting the fuses that control the clock frequency. One thing to keep in mind is you'll need to replace the bootloader with one appropriate for the new clock frequency. You may find an 8Mz bootloader ready to upload, or recompile it yourself from source. Optiboot is a good choice: open source, has a small footprint, and you can set its upload baud-rate. You can upload a new bootloader using another Arduino as an ISP programmer - there are lots of articles about doing this and the code for the Arduino-as-programmer is one of the Arduino IDE example-programs.

  • There appears to be quite a few reports of people successfully running a 328p at 3.3V running at 16MHz. If you split the difference between the two chips at about 3.6v you should have a good chance at success. – Jeff Wahaus Nov 5 '18 at 20:52
  • Would it be possible to run the ATmega at 8 MHz using a 16 MHz external oscillator by simply uploading a new sketch? I have tried running at 3.3V with the 16 MHz and it does not work properly. So, I might switch at 8 MHz but my problem is the 16 MHz external osc is already soldered. – Brian Jacob Sanchez Nov 6 '18 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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