Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Increasing range of 8MHz ATMEGA328P with NRF24L01

Increasing range of 8MHz ATMEGA328P with NRF24L01

Scheduled Pinned Locked Moved Hardware
12 Posts 6 Posters 129 Views 6 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • electrikE Offline
    electrikE Offline
    electrik
    wrote on last edited by
    #2

    What kind of voltage regulator are you using?

    1 Reply Last reply
    0
    • Ethan ChuaE Offline
      Ethan ChuaE Offline
      Ethan Chua
      wrote on last edited by
      #3

      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.

      1 Reply Last reply
      0
      • monteM Offline
        monteM Offline
        monte
        wrote on last edited by
        #4

        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:
        Screenshot at 2022-01-21 12-07-28.png
        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?

        Ethan ChuaE 1 Reply Last reply
        0
        • Bogusz JagodaB Offline
          Bogusz JagodaB Offline
          Bogusz Jagoda
          wrote on last edited by
          #5

          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.

          monteM 1 Reply Last reply
          0
          • L Offline
            L Offline
            Larson
            wrote on last edited by
            #6

            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.

            Ethan ChuaE 1 Reply Last reply
            0
            • Bogusz JagodaB Bogusz Jagoda

              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.

              monteM Offline
              monteM Offline
              monte
              wrote on last edited by
              #7

              @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 JagodaB 1 Reply Last reply
              0
              • monteM monte

                @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 JagodaB Offline
                Bogusz JagodaB Offline
                Bogusz Jagoda
                wrote on last edited by
                #8

                @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.

                1 Reply Last reply
                0
                • monteM monte

                  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:
                  Screenshot at 2022-01-21 12-07-28.png
                  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?

                  Ethan ChuaE Offline
                  Ethan ChuaE Offline
                  Ethan Chua
                  wrote on last edited by
                  #9

                  @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:
                  PCB layout.PNG

                  1 Reply Last reply
                  0
                  • L Larson

                    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.

                    Ethan ChuaE Offline
                    Ethan ChuaE Offline
                    Ethan Chua
                    wrote on last edited by Ethan Chua
                    #10

                    @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.
                    Minicore

                    skywatchS 1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      Larson
                      wrote on last edited by
                      #11

                      @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.

                      1 Reply Last reply
                      0
                      • Ethan ChuaE Ethan Chua

                        @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.
                        Minicore

                        skywatchS Offline
                        skywatchS Offline
                        skywatch
                        wrote on last edited by skywatch
                        #12

                        @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.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        12

                        Online

                        11.7k

                        Users

                        11.2k

                        Topics

                        113.0k

                        Posts


                        Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • MySensors
                        • OpenHardware.io
                        • Categories
                        • Recent
                        • Tags
                        • Popular