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 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
                          • axillentA axillent

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

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

                            @axillent said:

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

                            as they are in HW, they operate independently. So you can have two channels receiving at the same time, and another transmitting. The CPU just needs to put the bytes into the tx buffers, and pick up from the RX buffers.

                            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

                            Yes, when I started looking at the GW, I had in mind using multiple SPI ports just for this. I know that we can use Soft SPI, but i would rather have it as HW implemented as it would offload the MCU for handling the SPI signals.

                            Anyway, the SPI fix is a single gate that is placed on the board. the cost is at 0.5$ as far as I remember (mouser prices).

                            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.

                            I had thought about the same, asking our HW partners in china for the price differences.

                            1 Reply Last reply
                            0
                            • RJ_MakeR Offline
                              RJ_MakeR Offline
                              RJ_Make
                              Hero Member
                              wrote on last edited by
                              #49

                              Looking Good!

                              RJ_Make

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                marcusvdt
                                wrote on last edited by
                                #50

                                Can't say much other, than I'm excited to see where this is going... The only thing that I would like to vote for, is that you keep the atsha chip on board (not optional).

                                Thanks for your hard work!

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

                                  I just ordered both ESP8266-01, and a W5100 breakout board, of the types that I think would be usable in this design (Both of them are available from iTeadstudio btw). Just to have some mechanical samples that I can measure dimensions, and connector placements.

                                  So will wait for them to arrive from China.. I will also try to fit everything on one side of the PCB, right now I have an FTDI chip, and a capacitor on the backside (besides a footprint for the RFM69 pcb, which is up to the end user to mount).

                                  ATSHA204 will be a mandatory part of the design anyways. We can just as well put in some security measures in our designs.

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

                                    @axillent

                                    Just tried to create a new stanza in the boards.txt file, defining a board with an atmega1284p MCU. Seems like arduino accepts it, as I am able to use Serial1.begin(); in my code. If I switch back to compile it for a standard atmega328p target, it fails on Serial1.begin(). Also Serial2.begin() fails on atemega1284p target, so this indicates to me that it knows about this CPU from the beginning.

                                    So from an arduino point of view, there is no problem in using atmega1284(p) as target device. (I haven't got one on hand, so can't do any specific testing besides trying to compile things).

                                    axillentA 1 Reply Last reply
                                    0
                                    • tbowmoT tbowmo

                                      @axillent

                                      Just tried to create a new stanza in the boards.txt file, defining a board with an atmega1284p MCU. Seems like arduino accepts it, as I am able to use Serial1.begin(); in my code. If I switch back to compile it for a standard atmega328p target, it fails on Serial1.begin(). Also Serial2.begin() fails on atemega1284p target, so this indicates to me that it knows about this CPU from the beginning.

                                      So from an arduino point of view, there is no problem in using atmega1284(p) as target device. (I haven't got one on hand, so can't do any specific testing besides trying to compile things).

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

                                      @tbowmo sure
                                      in general arduino can handle any AVR8 from atmel
                                      my comment was about "not a standard arduino MCU" means it is not described inside official board.txt

                                      if i'm not mistaken atmega644 (same family as atmega1284) is used in reprap and it is arduino too

                                      sense and drive

                                      1 Reply Last reply
                                      0
                                      • pliniosenioreP Offline
                                        pliniosenioreP Offline
                                        plinioseniore
                                        wrote on last edited by
                                        #54

                                        Hi,

                                        this is my first post and I've pointed here by @hek while discussing of MySensor and Souliss (that is a project similar and different at same time from MySensor).

                                        Just yesterday we got Souliss running on ESP8266 thanks to the porting of the Arduino cores on that MCU, this is an option that in my opinion you should take in account. The use of ESP8266 (and generally of all other) as WiFi to USART isn't impressive, I've never been in love with AT commands and I prefer binary communication compared to ASCII, but generally your AVR USART became your bottleneck.

                                        Compared to SPI, USART isn't a master/slave protocol and the communication is driven by the transceiver, this is a really mess. When you use SPI, your low-RAM AVR decide when read data and this allow you to use the RAM of the transceiver as an external buffer, the tranceiver has mostly more RAM than the AVR.
                                        While running over USART, the transceiver send data when want, so you should care on the AVR of buffering and process the frame only once is complete.

                                        More, the ESP8266 has multiple firmware release that doesn't provide a consistent behavior, so you end-up with a your own firmware to bridge data to USART. But once you need to program the ESP8266, you are just a step away to load on it the whole code.

                                        Hope that this can help.

                                        Regards,
                                        Dario.

                                        Souliss, Arduino and Android based SmartHome and IoT
                                        http://www.souliss.net
                                        @soulissteam

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

                                          @plinioseniore

                                          You got a couple of good points there.. So your advice is to find a SPI device for WiFi instead of the ESP8266 module?

                                          Been looking for it, and only found CC3000 module, which (if I remember right) have problems with stability. Is there anything else out there that is affordable for WiFi connection, and usable from Arduino?

                                          What I want in this device, is to have multiple connection methods, that is you can have nrf24l01+ for 2g4 sensor networks, rfm69 for sub 1Ghz sensor networks, and then choose between wired or wireless LAN connectivity to your controller (or serial, if that is wanted).

                                          At the same time, we need to have security in mind, and support the standard authentication methods that is available for mysensors by now (using ATSHA204 chips).

                                          I haven't looked that much at the ESP8266 as a platform thing, but it might be limited as a target platform, if we want to have all the different technologies connected.

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


                                          16

                                          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