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. Gateway device

Gateway device

Scheduled Pinned Locked Moved Hardware
151 Posts 19 Posters 115.3k Views 21 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.
  • tbowmoT tbowmo

    well the reason to shift to 3.3v was that it would make things a whole lot easier, when interfacing with the different peripherals. It is not for hunting mA's.

    But I'll dump some simple level shifting in there then.

    axillentA Offline
    axillentA Offline
    axillent
    Mod
    wrote on last edited by axillent
    #28

    @tbowmo ethernet/wifi/nordic at least are tolerant mostly to 5V
    the only complication is to have two supplies
    taking into account many different required things two supplies is not a major complication
    while keeping arduino & atmel....

    but if shift to something else (stm32 for example) 3.3V are sufficient even for 72MHz

    sense and drive

    1 Reply Last reply
    0
    • tbowmoT tbowmo

      well the reason to shift to 3.3v was that it would make things a whole lot easier, when interfacing with the different peripherals. It is not for hunting mA's.

      But I'll dump some simple level shifting in there then.

      AnticimexA Offline
      AnticimexA Offline
      Anticimex
      Contest Winner
      wrote on last edited by
      #29

      @tbowmo I see. But a simple stab to get 3.3V should be fairly cheap. And also "safe". I found that I could not get reliable RF on my Ethernet GW, so I threw in a LE33 just to power the radio (I use the PA-pimped one which is a bit more nitpicky on the supply). Have not had power issues since. So it could be that regulating the RF will be required anyway since I assume that PA-pimped radios will be part of the "offering".

      Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

      1 Reply Last reply
      0
      • tbowmoT Offline
        tbowmoT Offline
        tbowmo
        Admin
        wrote on last edited by
        #30

        @axillent

        It's more the external SPI flash, I haven't been able to find any that works above 3.6V, where they specify abolute maximum voltage on any pin to be 4.1V. I haven't looked at the datasheet for ethernet / wifi modules yet, so there also might be some problems there with maximum ratings on input signals.

        @Anticimex
        I have already thrown in a 3.3V supply for the radio, and what else is needing 3.3V to operate.

        Anyways, I have thrown in a resistor / diode "matrix", to do level shifting on SPI signals now..

        1 Reply Last reply
        0
        • Vladut GrecuV Offline
          Vladut GrecuV Offline
          Vladut Grecu
          wrote on last edited by Vladut Grecu
          #31

          @tbowmo Did you consider using a ESP8266 WIFI Module?
          You can easily program it and get the atmega off the part's list.

          How to directly program an inexpensive ESP8266 WIFI Module @ Hackaday.com

          1 Reply Last reply
          0
          • tbowmoT Offline
            tbowmoT Offline
            tbowmo
            Admin
            wrote on last edited by
            #32

            @Vladut-Grecu

            I fear that it will take too much time, if we have to port the library to the esp8266 cpu core. But you are more than welcome to dig in to it, if you feel for it :)

            Currently the focus is (more or less) on arduino compatible platforms.

            1 Reply Last reply
            0
            • Vladut GrecuV Offline
              Vladut GrecuV Offline
              Vladut Grecu
              wrote on last edited by
              #33

              After finish my rpi gateway i think i will focus on the esp. I just wait for some local sellers to drop their prices(Easter, etc)

              1 Reply Last reply
              0
              • tbowmoT Offline
                tbowmoT Offline
                tbowmo
                Admin
                wrote on last edited by
                #34

                I've started using KiCad for this project.. Still it's far from completed (things are progressing more slowly with this one, than the last, as it's a bit more complex and I don't have that much time at hand now..

                Anyway, I have created a github repository of it, if anyone wants to have a look, https://github.com/tbowmo/MySensorGW

                Current schematics are here (PDF file)
                MySensorsGW-schematic.pdf

                It's still a Work In Progress.. A lot of stuff needs to be ironed out..

                AnticimexA 1 Reply Last reply
                0
                • tbowmoT tbowmo

                  I've started using KiCad for this project.. Still it's far from completed (things are progressing more slowly with this one, than the last, as it's a bit more complex and I don't have that much time at hand now..

                  Anyway, I have created a github repository of it, if anyone wants to have a look, https://github.com/tbowmo/MySensorGW

                  Current schematics are here (PDF file)
                  MySensorsGW-schematic.pdf

                  It's still a Work In Progress.. A lot of stuff needs to be ironed out..

                  AnticimexA Offline
                  AnticimexA Offline
                  Anticimex
                  Contest Winner
                  wrote on last edited by
                  #35

                  @tbowmo
                  Looks good. Perhaps add some header to break out a few I/O:s for future feature expansion? Like the SPI bus or i2c for a WiFi module or similar.

                  Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                  1 Reply Last reply
                  0
                  • tbowmoT Offline
                    tbowmoT Offline
                    tbowmo
                    Admin
                    wrote on last edited by
                    #36

                    @Anticimex

                    There will eventually be footprints on there for wifi / ethernet modules.. And Yes I2C should go to a pinheader. SPI is already at a pinheader (kindof). As it's connected to the ISP header :)

                    I'm trying to get a grip on my thoughts, and create some parts for wifi/ethernet modules.. :)

                    1 Reply Last reply
                    1
                    • tbowmoT Offline
                      tbowmoT Offline
                      tbowmo
                      Admin
                      wrote on last edited by
                      #37

                      So decision time..

                      For wired ethernet, it seems that we have 2 options:

                      • w5100
                      • enc28j60

                      I haven't got that much experience with theese devices, so which one should we go ahead with?

                      Wireless, I think that I am settled with esp8266, but if there are anything else out there, that might be better, then please let me know..

                      At the moment I can't really decide which one is better :) So need some help from the community.

                      1 Reply Last reply
                      0
                      • AnticimexA Offline
                        AnticimexA Offline
                        Anticimex
                        Contest Winner
                        wrote on last edited by
                        #38

                        I use the W5100 on my current gateway, and I have not had any significant issues with it (apart from the infamous SPI issue, which is resolved by controlling the SPI_EN signal to the W5100. Apart from that I am happy with it, and it is intelligent enough to allow the necessary software to fit an Arduino Nano. Unfortunately not with DHCP enabled (and signing support enabled). But if the enc28j60 does not require more software, and handles SPI(?) "properly" perhaps it would be the better alternative?

                        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                        1 Reply Last reply
                        0
                        • tbowmoT Offline
                          tbowmoT Offline
                          tbowmo
                          Admin
                          wrote on last edited by
                          #39

                          Hmm.. seems that W5100 has a complete TCP/IP stack on board, where as the enc82j60 only has MAC hardware, so the tcp/ip stack needs to reside in the host controller.

                          So W5100 it is..

                          And ESP8266 for the wifi (so far)

                          1 Reply Last reply
                          0
                          • tbowmoT Offline
                            tbowmoT Offline
                            tbowmo
                            Admin
                            wrote on last edited by tbowmo
                            #40

                            been playing around some more with things..

                            MySensorsGW-schematic.pdf

                            MysensorsGW-3d.jpg

                            currently the PCB is 5x5cm.

                            axillentA 1 Reply Last reply
                            1
                            • tbowmoT tbowmo

                              been playing around some more with things..

                              MySensorsGW-schematic.pdf

                              MysensorsGW-3d.jpg

                              currently the PCB is 5x5cm.

                              axillentA Offline
                              axillentA Offline
                              axillent
                              Mod
                              wrote on last edited by
                              #41

                              @tbowmo thank! it is a good job done!
                              some questions/comments

                              • w5100 SPI fix is already inside modern arduino ethernet shield http://www.arduino.cc/en/uploads/Main/arduino-ethernet-shield-06-schematic.pdf
                                do you think it is needed? what kind of the shield your are looking for?
                              • why not to put 20MHz crystal to give some more performance to the gateway?
                              • USB is normally can supply not more than 500mA, are you sure it will be sufficient? DC-jack probably will be also good to have. ESP+wisnet could be hungry for the supply
                              • why atmega1284? it is not a standard arduino choice but could costs on a level of 1280. atmega128 is the lowest cost 128k AVR. If we are sure 128k will be sufficient in the future I will select atmega128 because of cost or atmega1280 because it is standard for arduino
                                And also I will consider atmega2560 to have a maximum possible resources (not only flash but also RAM)

                              sense and drive

                              tbowmoT 1 Reply Last reply
                              0
                              • axillentA axillent

                                @tbowmo thank! it is a good job done!
                                some questions/comments

                                • w5100 SPI fix is already inside modern arduino ethernet shield http://www.arduino.cc/en/uploads/Main/arduino-ethernet-shield-06-schematic.pdf
                                  do you think it is needed? what kind of the shield your are looking for?
                                • why not to put 20MHz crystal to give some more performance to the gateway?
                                • USB is normally can supply not more than 500mA, are you sure it will be sufficient? DC-jack probably will be also good to have. ESP+wisnet could be hungry for the supply
                                • why atmega1284? it is not a standard arduino choice but could costs on a level of 1280. atmega128 is the lowest cost 128k AVR. If we are sure 128k will be sufficient in the future I will select atmega128 because of cost or atmega1280 because it is standard for arduino
                                  And also I will consider atmega2560 to have a maximum possible resources (not only flash but also RAM)
                                tbowmoT Offline
                                tbowmoT Offline
                                tbowmo
                                Admin
                                wrote on last edited by
                                #42

                                @axillent said:

                                @tbowmo thank! it is a good job done!
                                some questions/comments

                                • w5100 SPI fix is already inside modern arduino ethernet shield http://www.arduino.cc/en/uploads/Main/arduino-ethernet-shield-06-schematic.pdf
                                  do you think it is needed? what kind of the shield your are looking for?

                                I was looking at the cheap Chinese breakout boards with W5100 chip on, not all of them have the SPI fix onboard, so that's why I implemented it.

                                • why not to put 20MHz crystal to give some more performance to the gateway?

                                Hmmm.. think it was a price thing.. 16Mhz was more common than 20Mhz. But can't remember it right now (it's been a couple of weeks since I put in the 16Mhz xtal)

                                • USB is normally can supply not more than 500mA, are you sure it will be sufficient? DC-jack probably will be also good to have. ESP+wisnet could be hungry for the supply

                                In my thoughts, it should be either W5100 or ESP8266 mounted, not both at the same time (since both is for "internet" access. Also, most phone chargers are delivering 1A and up. Also, if you connect the thing to a computer via USB, you might not want to use W5100 / ESP8266 to communicate with it, so those power eaters could be left out in that case, leaving only NRF and/or RFM69 as radios.

                                • why atmega1284? it is not a standard arduino choice but could costs on a level of 1280. atmega128 is the lowest cost 128k AVR. If we are sure 128k will be sufficient in the future I will select atmega128 because of cost or atmega1280 because it is standard for arduino

                                There are some people that are using atmega1284 with arduino IDE, so it can be used. Solderability is the first reason: atmega1280 is 100pins, while atmega1284 is 44 pins, price: atmega1280 is 15.96$, while atmega1284 is 8-9$. Of course I can see the point in putting in 1280, as it could be swapped for a 2560 if more flash/ram is needed.

                                And also I will consider atmega2560 to have a maximum possible resources (not only flash but also RAM)

                                Atmega1280 is pincompatible with atmega2560, so they are interchangeable.

                                Anyways, this is mainly playing around with KiCAD, and creating something that might be usefull along the road :). Design is not locked yet, so I'll take a couple of iterations on it (just like I did on the sensebender micro, with selecting powersource, and sensor types).

                                axillentA 1 Reply Last reply
                                0
                                • tbowmoT tbowmo

                                  @axillent said:

                                  @tbowmo thank! it is a good job done!
                                  some questions/comments

                                  • w5100 SPI fix is already inside modern arduino ethernet shield http://www.arduino.cc/en/uploads/Main/arduino-ethernet-shield-06-schematic.pdf
                                    do you think it is needed? what kind of the shield your are looking for?

                                  I was looking at the cheap Chinese breakout boards with W5100 chip on, not all of them have the SPI fix onboard, so that's why I implemented it.

                                  • why not to put 20MHz crystal to give some more performance to the gateway?

                                  Hmmm.. think it was a price thing.. 16Mhz was more common than 20Mhz. But can't remember it right now (it's been a couple of weeks since I put in the 16Mhz xtal)

                                  • USB is normally can supply not more than 500mA, are you sure it will be sufficient? DC-jack probably will be also good to have. ESP+wisnet could be hungry for the supply

                                  In my thoughts, it should be either W5100 or ESP8266 mounted, not both at the same time (since both is for "internet" access. Also, most phone chargers are delivering 1A and up. Also, if you connect the thing to a computer via USB, you might not want to use W5100 / ESP8266 to communicate with it, so those power eaters could be left out in that case, leaving only NRF and/or RFM69 as radios.

                                  • why atmega1284? it is not a standard arduino choice but could costs on a level of 1280. atmega128 is the lowest cost 128k AVR. If we are sure 128k will be sufficient in the future I will select atmega128 because of cost or atmega1280 because it is standard for arduino

                                  There are some people that are using atmega1284 with arduino IDE, so it can be used. Solderability is the first reason: atmega1280 is 100pins, while atmega1284 is 44 pins, price: atmega1280 is 15.96$, while atmega1284 is 8-9$. Of course I can see the point in putting in 1280, as it could be swapped for a 2560 if more flash/ram is needed.

                                  And also I will consider atmega2560 to have a maximum possible resources (not only flash but also RAM)

                                  Atmega1280 is pincompatible with atmega2560, so they are interchangeable.

                                  Anyways, this is mainly playing around with KiCAD, and creating something that might be usefull along the road :). Design is not locked yet, so I'll take a couple of iterations on it (just like I did on the sensebender micro, with selecting powersource, and sensor types).

                                  axillentA Offline
                                  axillentA Offline
                                  axillent
                                  Mod
                                  wrote on last edited by
                                  #43

                                  @tbowmo 20mhz should cost very similar to 16mhz, price is not an issue in this choice. Frequency is one of the parameter you will need to put inside boards.txt, it could be no issue to replace 16 by 20

                                  ok I see. if soldering is an issue there is also atmega1281/atmega2561 pin compatible having TQFP64 package while been fully compatible with atmega1280/2560 (they do have single datasheet). Their maximum xtal is 16mhz

                                  sense and drive

                                  tbowmoT 1 Reply Last reply
                                  0
                                  • axillentA axillent

                                    @tbowmo 20mhz should cost very similar to 16mhz, price is not an issue in this choice. Frequency is one of the parameter you will need to put inside boards.txt, it could be no issue to replace 16 by 20

                                    ok I see. if soldering is an issue there is also atmega1281/atmega2561 pin compatible having TQFP64 package while been fully compatible with atmega1280/2560 (they do have single datasheet). Their maximum xtal is 16mhz

                                    tbowmoT Offline
                                    tbowmoT Offline
                                    tbowmo
                                    Admin
                                    wrote on last edited by
                                    #44

                                    @axillent

                                    As I said, I can't remember why I decided on the 16MHz crystal... it could have been a decision based on baudrate accuracy. But I'm not sure now.

                                    one thought, is the arduino spi library capable of using the extra spi ports on the atmega1280? (The 4 uarts can be reconfigured as spi ports)

                                    Started debating with myself, the benefits of changing cpu :) I'll look further at the data sheets.

                                    axillentA 1 Reply Last reply
                                    0
                                    • tbowmoT tbowmo

                                      @axillent

                                      As I said, I can't remember why I decided on the 16MHz crystal... it could have been a decision based on baudrate accuracy. But I'm not sure now.

                                      one thought, is the arduino spi library capable of using the extra spi ports on the atmega1280? (The 4 uarts can be reconfigured as spi ports)

                                      Started debating with myself, the benefits of changing cpu :) I'll look further at the data sheets.

                                      axillentA Offline
                                      axillentA Offline
                                      axillent
                                      Mod
                                      wrote on last edited by
                                      #45

                                      @tbowmo I'm not sure that arduino SPI library can deal with USART as SPI at all
                                      but it could be no problem to write down a peace of a new code to use USART as SPI

                                      why you need 5 SPI's?)

                                      sense and drive

                                      1 Reply Last reply
                                      0
                                      • tbowmoT Offline
                                        tbowmoT Offline
                                        tbowmo
                                        Admin
                                        wrote on last edited by
                                        #46

                                        @axillent

                                        why you need 5 SPI's?)

                                        Just a thought on versatility, that's all :) you could have ethernet hanging on one SPI channel, and NRF / RFM on another, giving higher throughput (Ok, I know that it might not be necessary in this project at the moment..)

                                        Btw. just had a look at the datasheets for atmegas. 1280 / 2560 / 1281/2561 has 8Kb ram, while 1284 has 16Kb. Also operating frequency, 1284 is specified up to 20Mhz, while 1280/2560 etc. is only 16Mhz.

                                        So many parameters to choose from :)

                                        axillentA 1 Reply Last reply
                                        0
                                        • tbowmoT tbowmo

                                          @axillent

                                          why you need 5 SPI's?)

                                          Just a thought on versatility, that's all :) you could have ethernet hanging on one SPI channel, and NRF / RFM on another, giving higher throughput (Ok, I know that it might not be necessary in this project at the moment..)

                                          Btw. just had a look at the datasheets for atmegas. 1280 / 2560 / 1281/2561 has 8Kb ram, while 1284 has 16Kb. Also operating frequency, 1284 is specified up to 20Mhz, while 1280/2560 etc. is only 16Mhz.

                                          So many parameters to choose from :)

                                          axillentA Offline
                                          axillentA Offline
                                          axillent
                                          Mod
                                          wrote on last edited by axillent
                                          #47

                                          @tbowmo said:

                                          giving higher throughput

                                          ohh) the logic coming from PC world not working here. regardless how many SPIs you will initiate MCU will handle them in a sequence.
                                          but any way it could be a benefit
                                          for example you can avoid SPI fix if there will be exclusive SPI port used for wiznet

                                          So many parameters to choose from :)

                                          on other hand it is good. atmega644/1284 are from later generation having more features. 16k RAM is a very good thing, gateway potentially could be hungry on RAM usage. The disadvantage is missing 256k version

                                          for last resort I will ask @hek to request quotes from partners to understand better the price difference.

                                          sense and drive

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


                                          17

                                          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