Increasing range of 8MHz ATMEGA328P with NRF24L01
-
Hi, I tested the setup with both a lab bench power supply as well as a BL8530 boost converter IC to boost two AA batteries to 3.3V.
-
Frequency and voltage of an Atmega does not effect radio quality of a NFR24 in any way (if it is stable and well decoupled voltage).
@Ethan-Chua said in Increasing range of 8MHz ATMEGA328P with NRF24L01:
Defined #define MY_RF24_PA_LEVEL RF24_PA_LOW
That's the opposite of what you want to achieve.
It either problem with cheap nrf modules, or your pcb design. By the way you have big problems with the latter:

Your PCB doesn't have separated ground plane, and even that thin piece of ground track that tries to get to the point isn't connected. And what even worse it almost touching 3.3V out pin of BL8530. You need pay more attention to track clearance and consistency. How are you powering this board? -
You know what I did? Switched to RFM69. You know why? Because I couldn’t get the shit done with nRF24s. You don’t even know if you have real nRF or some counterfeits - that’s the real problem. You can buy HackRF One to sniff on 2.4GHz band, but that won’t tell you if your module is receiving anything.
Really, to spare you some time - give up on these. -
One error I make repeatedly when programming the 8MHz 328, is that I forget to select "Processor: Atmega328P (3.3V, 8MHz)" from the tool bar before programming. The 8MHz 328 will accept programs using the 5 V version of that processor selection, but the baud rate will be half of what you think it is. Maybe that will help you.
-
You know what I did? Switched to RFM69. You know why? Because I couldn’t get the shit done with nRF24s. You don’t even know if you have real nRF or some counterfeits - that’s the real problem. You can buy HackRF One to sniff on 2.4GHz band, but that won’t tell you if your module is receiving anything.
Really, to spare you some time - give up on these.@Bogusz-Jagoda well, if you buy modules for 50c including shipping, you can be sure they are counterfeit. If you buy slightly more expensive Ebyte modules, they always work. You get what you pay for.
-
@Bogusz-Jagoda well, if you buy modules for 50c including shipping, you can be sure they are counterfeit. If you buy slightly more expensive Ebyte modules, they always work. You get what you pay for.
@monte True, eByte’s are legit, afaik. But still you’re encountering some problems. 2.4Ghz band is pretty messy. 315/433/868 are still better solution (more obsolete now)… requiring larger antenna, though.
-
Frequency and voltage of an Atmega does not effect radio quality of a NFR24 in any way (if it is stable and well decoupled voltage).
@Ethan-Chua said in Increasing range of 8MHz ATMEGA328P with NRF24L01:
Defined #define MY_RF24_PA_LEVEL RF24_PA_LOW
That's the opposite of what you want to achieve.
It either problem with cheap nrf modules, or your pcb design. By the way you have big problems with the latter:

Your PCB doesn't have separated ground plane, and even that thin piece of ground track that tries to get to the point isn't connected. And what even worse it almost touching 3.3V out pin of BL8530. You need pay more attention to track clearance and consistency. How are you powering this board?@monte Hi there thanks for pointing this out. I went back to have a look at the PCB files and it turns out I messed up the .brd file while probing around which resulted in the GND wire stub.
The actual board has a GND plane on the bottom layer like so:

-
One error I make repeatedly when programming the 8MHz 328, is that I forget to select "Processor: Atmega328P (3.3V, 8MHz)" from the tool bar before programming. The 8MHz 328 will accept programs using the 5 V version of that processor selection, but the baud rate will be half of what you think it is. Maybe that will help you.
@Larson
Hi may I know what Board setup you are using? I am using the MiniCore Board "Library" and apart from the BOD fuse setting I don't see any other voltage option.
Could you share the board library you are using, worth giving it a shot to see if that helps. Thanks.
-
@Ethan-Chua The boards I'm using are cheap Pro-minis. Google for "Pro Mini 328 3V arduino" and you will find many selections. I buy mine by the 10-pack from China, but it is quicker to go to someone like SparkFun or Adafruit.
The voltage options are visible on the IDE tool bar after first selecting "Board: Arduino Pro or Pro Mini". Only then will the option "Atmege 328P (3.3V, 8MHz)" be visible for selecting. These selections drop down from the menu available after clicking on TOOL in the IDE. You might have to first go to Boards Manager to download files for these boards, though I think these files came on my IDE.
My IDE is Arduino 1.8.12. The libraries I am using are:
#include <LowPower.h>
#include <SBWire.h> //Wire.h was giving me some problems so I switched,
#include <MechaQMC5883_SBWire.h> //for a magnetometer
#include <Arduino.h>
#include <avr/io.h>
#include <avr/interrupt.h>The Pro Mini drives an ESP8266 to send water meter data to the web. I use a magnetometer wired to the Pro Mini to sense the spinning magnet in the meter. I know I've got redundant CPU's but the power-hungry ESP sleeps most of the time while the low-power Pro Mini quietly collects the data.
Hope it helps.
-
@Larson
Hi may I know what Board setup you are using? I am using the MiniCore Board "Library" and apart from the BOD fuse setting I don't see any other voltage option.
Could you share the board library you are using, worth giving it a shot to see if that helps. Thanks.
@Ethan-Chua In Arduino IDE, go to "Tools" -> "minicore" and select the board you are using from the drop down menu. Then underneath 'Tools' menu you will see all options for the bootloader. You should select these values to match your requirements.