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. OpenHardware.io
  3. 💬 RFM69 Serial GW (ATMEGA328P)

💬 RFM69 Serial GW (ATMEGA328P)

Scheduled Pinned Locked Moved OpenHardware.io
mysensors gatewayserial
24 Posts 7 Posters 6.9k 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.
  • mtiutiuM Offline
    mtiutiuM Offline
    mtiutiu
    Hardware Contributor
    wrote on last edited by
    #5

    I chosed CP2102 mainly for the low component count which is needed to create a simple usb to serial converter. The baudrate is sufficient enough for the most of the projects imho.

    kalinaK 1 Reply Last reply
    0
    • mtiutiuM mtiutiu

      I chosed CP2102 mainly for the low component count which is needed to create a simple usb to serial converter. The baudrate is sufficient enough for the most of the projects imho.

      kalinaK Offline
      kalinaK Offline
      kalina
      Hardware Contributor
      wrote on last edited by
      #6

      @mtiutiu said in 💬 MySensors RFM69W serial GW:

      I chosed CP2102 mainly for the low component count which is needed to create a simple usb to serial converter

      As for me, i chose CP2102 because he has On-chip voltage regulator 3.3V.

      1 Reply Last reply
      0
      • mtiutiuM Offline
        mtiutiuM Offline
        mtiutiu
        Hardware Contributor
        wrote on last edited by
        #7

        I won't rely on the integrated voltage regulator because usually it's not capable to supply high currents. As I've seen on other USB to serial converter chips the current capability of the integrated voltage regulator is about 50mA or so(maybe some can provide up to 100mA). Anyway if using NRF24l01 radios and small current LEDs then maybe it won't be an issue but I wouldn't count on it on the long term. Radio module + microcontroller + LEDs + other components can reach the 50mA limit especially when using RFM69W or HW variant. Now I know that the TX period may be short and only the average drawn current matters in the end but still I won't take it to the near limits. Just my 2 cents here.

        NeverDieN 1 Reply Last reply
        1
        • mtiutiuM mtiutiu

          I won't rely on the integrated voltage regulator because usually it's not capable to supply high currents. As I've seen on other USB to serial converter chips the current capability of the integrated voltage regulator is about 50mA or so(maybe some can provide up to 100mA). Anyway if using NRF24l01 radios and small current LEDs then maybe it won't be an issue but I wouldn't count on it on the long term. Radio module + microcontroller + LEDs + other components can reach the 50mA limit especially when using RFM69W or HW variant. Now I know that the TX period may be short and only the average drawn current matters in the end but still I won't take it to the near limits. Just my 2 cents here.

          NeverDieN Offline
          NeverDieN Offline
          NeverDie
          Hero Member
          wrote on last edited by NeverDie
          #8

          @mtiutiu
          I agree. According to the schematic, you do use the MCP1703A-3302 as a voltage regulator, which is rated to 250ma. It seems that many problems are easily avoided when there's a more than ample power source.

          Also, for whatever reason, the Arduino IDE doesn't seem to support the highest baud rate that's apparently possible with the FTDI. It does though with the CP2101.

          1 Reply Last reply
          0
          • mtiutiuM Offline
            mtiutiuM Offline
            mtiutiu
            Hardware Contributor
            wrote on last edited by mtiutiu
            #9

            Hi,

            Today I managed to finish this project: hardware assembly and initial serial gw sketch upload and I get I_GATEWAY_READY from serial console so everything seems to be in order. I need to perform some more tests though with some nodes attached and see the messages coming in and out but so far it seems very promising. I didnt' soldered the LEDs yet but that's not so important for now :simple_smile: .

            CP2102 usb to serial converter chip working(first line from usb devices listing):

            mtiutiu@mtiutiu-H67MA-USB3-B3 ~/Work/AVR_Playground/sensors_network/project/SerialGateway $ lsusb 
            Bus 002 Device 015: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
            Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
            Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
            Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            Bus 001 Device 005: ID 045e:0779 Microsoft Corp. LifeCam HD-3000
            Bus 001 Device 004: ID 1bcf:0005 Sunplus Innovation Technology Inc. Optical Mouse
            Bus 001 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120
            Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
            Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
            

            Code uploading using arduino serial bootloader POC:

            mtiutiu@mtiutiu-H67MA-USB3-B3 ~/Work/AVR_Playground/sensors_network/project/SerialGateway $ platformio run --target upload
            [Tue Feb 14 17:48:38 2017] Processing pro16MHzatmega328 (upload_protocol: arduino, build_flags: -I./lib/MySensors, lib_ignore: MySensors, board_f_cpu: 16000000UL, platform: atmelavr, board: pro16MHzatmega328, framework: arduino)
            ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
            Verbose mode can be enabled via `-v, --verbose` option
            Collected 69 compatible libraries
            Looking for dependencies...
            Library Dependency Graph
            |-- <SPI> v1.0
            Looking for upload port...
            Auto-detected: /dev/ttyUSB0
            Uploading .pioenvs/pro16MHzatmega328/firmware.hex
            
            avrdude: AVR device initialized and ready to accept instructions
            
            Reading | ################################################## | 100% 0.00s
            
            avrdude: Device signature = 0x1e950f (probably m328p)
            avrdude: reading input file ".pioenvs/pro16MHzatmega328/firmware.hex"
            avrdude: writing flash (13122 bytes):
            
            Writing | ################################################## | 100% 3.96s
            
            avrdude: 13122 bytes of flash written
            avrdude: verifying flash memory against .pioenvs/pro16MHzatmega328/firmware.hex:
            avrdude: load data flash data from input file .pioenvs/pro16MHzatmega328/firmware.hex:
            avrdude: input file .pioenvs/pro16MHzatmega328/firmware.hex contains 13122 bytes
            avrdude: reading on-chip flash data:
            
            Reading | ################################################## | 100% 3.00s
            
            avrdude: verifying ...
            avrdude: 13122 bytes of flash verified
            
            avrdude: safemode: Fuses OK (E:00, H:00, L:00)
            
            avrdude done.  Thank you
            

            MySController serial gw connection and startup ok message:

            0_1487087715787_MYSController_serial_gw.png

            1 Reply Last reply
            1
            • mtiutiuM Offline
              mtiutiuM Offline
              mtiutiu
              Hardware Contributor
              wrote on last edited by
              #10

              Serial gw is working. Tested with real MySensors nodes and it's working properly. Now regarding stability and such - well...that only time will tell us.

              1 Reply Last reply
              0
              • tonnerre33T Offline
                tonnerre33T Offline
                tonnerre33
                Hardware Contributor
                wrote on last edited by
                #11

                Hello, what is the goal of the TXB0104, it's the first time that i see him in a project ?

                mtiutiuM 1 Reply Last reply
                0
                • tonnerre33T tonnerre33

                  Hello, what is the goal of the TXB0104, it's the first time that i see him in a project ?

                  mtiutiuM Offline
                  mtiutiuM Offline
                  mtiutiu
                  Hardware Contributor
                  wrote on last edited by
                  #12

                  @tonnerre33

                  It's a logic level voltage converter. The MCU runs at 5V so the logic level voltage that it uses on the SPI port which connects to the RFM69W use 5V too. But the RFM69W module runs at 3.3V and it's not 5V tolerant on its SPI port pins.

                  The purpose of that IC is to convert voltage levels on the SPI lines forward and backward (from 5V to 3.3V and vice versa) in order to not damage the RFM69W chip.

                  tonnerre33T 1 Reply Last reply
                  1
                  • mtiutiuM mtiutiu

                    @tonnerre33

                    It's a logic level voltage converter. The MCU runs at 5V so the logic level voltage that it uses on the SPI port which connects to the RFM69W use 5V too. But the RFM69W module runs at 3.3V and it's not 5V tolerant on its SPI port pins.

                    The purpose of that IC is to convert voltage levels on the SPI lines forward and backward (from 5V to 3.3V and vice versa) in order to not damage the RFM69W chip.

                    tonnerre33T Offline
                    tonnerre33T Offline
                    tonnerre33
                    Hardware Contributor
                    wrote on last edited by tonnerre33
                    #13

                    @mtiutiu said in 💬 MySensors RFM69W serial GW(ATMEGA328P):

                    Oh ok, and just for know, why we don't power the atmega with 3.3V ?

                    mtiutiuM 1 Reply Last reply
                    0
                    • tonnerre33T tonnerre33

                      @mtiutiu said in 💬 MySensors RFM69W serial GW(ATMEGA328P):

                      Oh ok, and just for know, why we don't power the atmega with 3.3V ?

                      mtiutiuM Offline
                      mtiutiuM Offline
                      mtiutiu
                      Hardware Contributor
                      wrote on last edited by mtiutiu
                      #14

                      @tonnerre33
                      Because at 3.3V the atmega328p mcu can run at max 8MHz as per datasheet. So I wanted it to run at double the speed and for that it needs 5V as per datasheet again. Why at 16MHz? Well because I want the gateway to be more faster in general and to quickly process the incoming messages from the entire radio network.

                      1 Reply Last reply
                      1
                      • tonnerre33T Offline
                        tonnerre33T Offline
                        tonnerre33
                        Hardware Contributor
                        wrote on last edited by
                        #15

                        Thanks a lot, now i know why ;)

                        mtiutiuM 1 Reply Last reply
                        0
                        • tonnerre33T tonnerre33

                          Thanks a lot, now i know why ;)

                          mtiutiuM Offline
                          mtiutiuM Offline
                          mtiutiu
                          Hardware Contributor
                          wrote on last edited by
                          #16

                          @tonnerre33

                          And to use higher baudrates for the serial port on the mcu also. To achieve higher baudrates you need a higher mcu clock frequency too.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            shabba
                            wrote on last edited by
                            #17

                            Does anyone have a BOM for this?

                            mtiutiuM 1 Reply Last reply
                            0
                            • S shabba

                              Does anyone have a BOM for this?

                              mtiutiuM Offline
                              mtiutiuM Offline
                              mtiutiu
                              Hardware Contributor
                              wrote on last edited by mtiutiu
                              #18

                              @shabba
                              Sorry but I don't have one now. When I have time I will generate it. For now I'm busy with the Livolo stuff.

                              1 Reply Last reply
                              0
                              • tonnerre33T Offline
                                tonnerre33T Offline
                                tonnerre33
                                Hardware Contributor
                                wrote on last edited by
                                #19

                                0_1494000655324_upload-1cfecb9c-1343-4411-a8c4-b4546cd9a63e

                                A fast extraction without traitment if that can help ;)

                                1 Reply Last reply
                                2
                                • S Offline
                                  S Offline
                                  shabba
                                  wrote on last edited by
                                  #20

                                  I see C5 on the board has polarity. My ceramic caps seem to have no polarity (no markings on it - https://www.digikey.com/product-detail/en/murata-electronics-north-america/ZRB18AR61E106ME01L/490-10991-1-ND/5321192).
                                  I assume that this is ok and this does not need to be a tantalum cap?

                                  Thanks.

                                  mtiutiuM 1 Reply Last reply
                                  0
                                  • S shabba

                                    I see C5 on the board has polarity. My ceramic caps seem to have no polarity (no markings on it - https://www.digikey.com/product-detail/en/murata-electronics-north-america/ZRB18AR61E106ME01L/490-10991-1-ND/5321192).
                                    I assume that this is ok and this does not need to be a tantalum cap?

                                    Thanks.

                                    mtiutiuM Offline
                                    mtiutiuM Offline
                                    mtiutiu
                                    Hardware Contributor
                                    wrote on last edited by mtiutiu
                                    #21

                                    @shabba

                                    Yes it's ok. Just make sure that you have 10V rated capacitors(this board runs at 5V so it's best to stay above that). On the radio side you can use 6V capacitors as it's powered at 3.3V but anyway...it's easier to use just 10V types instead of remembering what goes where imho.

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      shabba
                                      wrote on last edited by
                                      #22

                                      Hi @mtiutiu - Did you ever get a chance to make a BOM? Most of the one @tonnerre33 one makes sense but I only bought two boards so being a little cautious :-)

                                      Thanks!

                                      1 Reply Last reply
                                      1
                                      • S Offline
                                        S Offline
                                        shabba
                                        wrote on last edited by
                                        #23

                                        Any BOM? :-)
                                        I still have these PCBs and want to finish em. Can't source a crystal/resonator of about 5x4 mm.

                                        mtiutiuM 1 Reply Last reply
                                        1
                                        • S shabba

                                          Any BOM? :-)
                                          I still have these PCBs and want to finish em. Can't source a crystal/resonator of about 5x4 mm.

                                          mtiutiuM Offline
                                          mtiutiuM Offline
                                          mtiutiu
                                          Hardware Contributor
                                          wrote on last edited by
                                          #24

                                          @shabba

                                          The majority of the components are 0603 SMD package type (except 2 smd resistors on the usb lines which are not really mandatory and can be replaced with a solder bridge).

                                          There you go (extracted from schematic - I can't do better than this because it involves more work and I don't have time for it, sorry):

                                          a) 9 x 100nF 0603 SMD MLCC capacitors, X5R/X7R (voltage can be 10V and above)
                                          b) 3 x 1uF 0603 SMD MLCC capacitors, X5R/X7R (voltage can be 10V and above)
                                          c) 1 x 10uF 0603 SMD MLCC capacitor, X5R/X7R (voltage can be 10V and above)
                                          d) 1 x 22uF 0603 SMD MLCC capacitor, X5R/X7R (voltage can be 10V and above)
                                          e) 1 x 10nF 0603 SMD MLCC capacitor, X5R/X7R (voltage can be 10V and above)
                                          f) 1 x ferrite bead 0603 SMD blm18he152sn1d
                                          g) 3 x 330 ohm 0603 SMD resistor
                                          h) 1 x 1Kohm 0603 SMD resistor
                                          i) 1 x 10Kohm 0603 SMD resistor
                                          j) 1 x 56Kohm 0603 SMD resistor
                                          k) 1 x MCP1703A-3302 3.3V/0.25A voltage regulator
                                          l) 1 x TXB0104 voltage level converter
                                          m) 1 x ATMEGA328P-MU AVR MCU (QFN32 package)
                                          n) 1 x CP2102 USB to serial (QFN28 package)
                                          o) 3 x 0603 SMD LEDs (your pick here)
                                          p) 1 x ATSHA204A (SOT-23 package)
                                          q) 1 x RFM69W module (your pick regarding working frequency)
                                          r) 1 x ZTTCS16.00MX ceramic resonator
                                          s) 1 x USB A type male connector for PCB and 1 SMD reset switch (I have no exact links for this, sorry)

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


                                          10

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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