Hello, I am working on making a remote for a project that uses an NRF24L01 with a few buttons. I hope to make this circuit as efficient as possible, and so far I have some circuitry in place to cut power to the board when off. What I am really looking for is optimizing the running state. So using a 3.3V MCU like the STM32L151C8T6 would be a start so everything would run on 3.3V. Also, I was thinking of using a DC-DC converter instead of a linear regulator that dissipates the power as heat. Any advice would be great because I don't really know how to use STM32, I just know that they can run quite low power.
I would recommend starting with the more common bluepill board with a STM32F103C8T6 controller. It is supported by Arduino ide and many other programming environments and on google you will find thousands code examples for it.
The L151 is supported by the STM Arduino core. No worries there.
https://github.com/stm32duino/Arduino_Core_STM32
You can run a Mega328 on 3.3V.
...and it has sleep modes, same as all STM32
Then stick with the ATmega328, and run it on 3.3V. It will do everything you need for the project described and be much easier to program.
The STM32 is not well supported by the Arduino IDE.
Would the ATMega328p running on 3.3V and 8MHz still work with the nRF24L01 module?
Yes, it would, as would any other 3.3V MCU.
In fact, you can consider an ATmega328p running on 3.3v to be a 3.3V MCU!
If you are worried about the 8 MHz clock speed, that is irrelevant to the NRF24 radio, but does limit the amount of data processing you can do in a given amount of time.
Ok, I'm not doing very much data processing at all. Also, how would I upload programs to it? I currently use SPI to bootload it and from there I used a 5 pin connector (5v, reset, rx, tx, gnd) to program it with an Arduino uno.
By "it" do you mean an ATmega328? Use USB serial adapter, with a bootloader on the chip, or an ISP programmer.
For someone "designing" a PCB, you seem to have done remarkably little research.
Yea, I've already build stand alone atmegas before, but they were always 5v.
Also, should I use the internal 8mhz clock or an external one?
Why do you think "5V" even matters?
Take a few moments to study the ATmega328 data sheet, and learn about voltage levels, clock options, memory programming, etc.
No, im just saying I don't have experience running the chips on 3.3v
See post #12.
Ok, so it seems that the 8MHz internal oscillator isn't that good, so 'll use an external one. Should I use the X49SM8MSD2SC or the X50328MSB2GI?
Or a crystal. Anything that meets your specifications.
Ok, for the X49SM8MSD2SC do I need to add the 20 pF load capacitors, or are they built in? It's not very clear.
The crystal spec sheet is very clear.
The reason I'm also asking is because the load capacitors are usually connected to GND. and there is no connection to ground on the crystal.
Clearly, you need to do some research on how to interface a crystal to a microprocessor. Don't forget to include the stray capacitance of the PCB design in your calculations.
Have fun!
