Powering Atmega328 AND a 3.3v NRF24L01

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I built a circuit that works, but I'd like some advice about powering it because I don't want to start any fires and I don't want any brown-outs either.  My issue specifically is related to how the Atmega328p chip asks for a higher voltage than the NRF24L01 component that is part of the circuit.  As I stated, it's working fine but I'm asking for insight if I went about the circuit correctly.  The Atmega328p's VCC and AVCC pin are connected to 3 x 3 AA batteries for a voltage of 4.5 volts.  I've also connected the NRF24L01 radio transmitter/receiver to the same power source, but it supposedly gets fried easily with voltages over 3.3v.  This wasn't an issue on the first prototype because I built it on the Arduino board, which has a 3.3v VCC pin.  Is there a better way to set this up?  I appreciate all the help I can get with this issue, guys and gals.  So big thanks to all who respond!        Jon

 

 

Jonathan Seale

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One alternative is to power the AVR also from 3.3 Volts. The maximum clock frequency will be lower though..

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply.  When you say power the AVR on 3.3 volts, how do I do that when my batteries add up to 4.5?  Do I use a voltage regulator?

Jonathan Seale

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was thinking to power everything at 3 Volts. Two batteries instead of three.

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One option is to use a low drop lineair regulator to power everything from 3V3.

In battery operated circuits lineair regulators are often used because they draw little current themselves.

There are 3 important factors to look out for.

As an example I will take the ams1117.

AMS1117 has a current through the adjust pin of typ. 55uA max. 120uA.

AMS1117 has a minimum current draw of typ. 5mA max 10mA

This is important because when the output current drops below the last value the regulator may loose regulation and the output voltage can and will go up.

The 3rd factor is the minimum voltage between the input and the output of the regulator.

Something like the good old LM317 is not suitable because it needs a minimum of 2V between the input and output to work properly.

 

There are however lots of small SMPS circuits / IC's which also have a low power draw themselves.

 

But if you are using 1.5V batteries then indeed just use 2 batteries without a voltage regulator.

jeseale wrote:
are connected to 3 x 3 AA batte

Ah, indeed. Just use 2 AA batteries.

m328p and nRF24... both can run from voltages lower than 2V so you can drain the batteries pretty far before your remote control stops working.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My other components don't work when using just two.  I tried that already in other words.

Jonathan Seale

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I mentioned this in a different response, but I also have a piezo buzzer that rarely needs to be active.  I originally had an LED instead of the buzzer, but the LED wouldn't work with just two AA batteries.

Jonathan Seale

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jeseale wrote:
My other components don't work when using just two.  I tried that already in other words.

OK, voltage regulator is the solution then..

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:
OK, voltage regulator is the solution then..

Not so fast.

If all the other ciruitry is just a led or a buzzer (guessing here) there are other solutions available.

For example, by connecting a scottky diode and a capacitor to an AVR pin you can build a charge pump to almost double the voltage to a led or buzzer.

There are also small capacitive regulators (maxim) or inductive ones to step up the voltage.

You can turn such a device on/off from your AVR to save current, or run the whole thing from even a single AA battery.

 

The one below has a fixed 3V3 output, but there are many others.

https://www.aliexpress.com/item/...

 

To OP:

Is the only "other" circuitry just leds / buzzers, or more? What is it?

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jeseale wrote:

I mentioned this in a different response, but I also have a piezo buzzer that rarely needs to be active.  I originally had an LED instead of the buzzer, but the LED wouldn't work with just two AA batteries.


Just separate your vcc source.
3 battery in series take 3v from 2 batt for MCU and RF and the 3rd 4.5v for leds and piezo.
Do you know what I mean right?
.
MG

I don't know why I'm still doing this hobby

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JohanEkdahl wrote:

OK, voltage regulator is the solution then..

Not so fast.

 I know, Paul. My dry OK was because the OP has really decided that the split Voltage supply is the only solution. If he does not want to investigate other, potentially better, solutions to the whole situation then who are we to meddle?

Happy 75th anniversary to one of the best movies ever made! Rick Blane [Bogart]: "Of all the gin joints, in all the towns, in all the world, she walks into mine."

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ JohanEkdahl

I'm not so sure whether OP wants to learn as much about electronics as he can, or just wants to get the hardware going so he can work on the software.

Trying to learn everything at the same time can be pretty confusing, so you're probably right. Use a regulator and mabye revise later to extend battery life if it is needed.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, if you're using 3 1.5v batteries, you could tap power form two of them to get 3v, if that's ok with the 3.3v parts. The batteries lose voltage as they discharge, however, so take a look for the minimum voltage, as that could mean that your circuit stops working when the batteries still have a reasonable charge left.

 

Something like this:

 

   _________________ 4.5v positive
  |
  |
-----
  -
  |_________________ 3v positive
  |
-----
  -
  |
  |
-----
  -
  |
  |
  |
 --- GND