The MySensors Sensebender Gateway is a compact Arduino Zero compatible board that is purpose-built by the MySensors team to serve as a fully-functional, high-performance MySensors gateway.
The MySensors gateway is the first device you will need for your MySensors network and this one is designed from the ground up for both novices and experts. The gateway supports the nRF24L01+ or RFM69 radios and can interface with a wide array of HA controllers via USB or Ethernet.
If you want to get up and running quickly with a no-compromise and flexible gateway designed and supported by the MySensors Team, then this is the gateway for you.
High Performance MCU
At it’s core, the Gateway is equipped with a high-performance Atmel SAMD21 MCU running at 48MHz offering plenty of headroom for advanced gateway-specific features as the MySensors ecosystem expands. The SAMD21 MCU product line is Atmel’s ARM Cortex offering equipped with 32Kb of RAM and 256Kb for flash providing ample working and persistent storage for current and future gateway tasks.
Broad Home Automation Controller Support
The Gateway is compatible with more than 20 of the most common home automation controllers on the market using either USB or Ethernet. Literally all requested automation controllers are currently supported and the list continues to expand… Don’t see yours, it is easy to write an adapter and we are here to help you.
Secure IoT Radio Network
The Gateway includes footprints/pads for two very common radios supported by MySensors; the Nordic nRF24L01+ radio or the Hope RF RFM69HCW radio offering users different options for their locale/home construction and IoT projects. Each Gateway includes an ATSHA204 CryptoAuthentication chip that can be used for hardware-based message signing for secure radio communications, after personalisation.
Expandability The Gateway also includes an MYSX 2.6 connector that breaks out plenty of IO pins for DIY shields that can be used to add sensors and actuators to the gateway or to use the gateway board as a compact, high-performance node for more demanding IoT projects and applications. In addition, the Gateway includes a micro-sd card reader for IoT applications where additional local non-volatile storage is required (e.g. configuration files, storing time-series sensor readings for offline analysis, etc.).
You need to add your own radio, either NRF24L01+ or RFM69(H)W radio modules, which you can find in our shop under the radio section, Also if you want to use it as an ethernet gateway, you need to purchase a W5100 ethernet module, the small breakout edition is the one to choose.
If your windows version requires you to install a driver, before using a new USB gadget (everything older than Windows 10 does this) then you can use this file mysensors-samd.inf. It is also included in the board support files from version 1.0.4 (see Other configurations below for install instructions)
The factory default sketch is a serial gateway using NRF24L01 radio and no signing. If you want to use it in this configuration, then it's just adding the box header for the NRF24L01 module, plug the radio in, and connect the gateway with a USB cable to your computer. The default sketch can be found in the Mysensors examples collection, as "SensebenderGatewaySerial".
If you want to use any other configuration, like RFM69(H)W radio, ethernet, or hardware signing with ATSHA204, then you need to reprogram the board with your own firmware. This is easily done with the Arduino software suite, where you can add our board definitions that matches the gateway board. For details on how to add these board definitions, you should go here, in addition you need to install Arduino SAMD board files, be aware that Mysensors board files 1.0.4, is only compatible up to Arduino SAMD 1.6.11. After installing the board definitions, choose Sensebender Gateway as your target platform, this will probably be the last board in the list shown by arduino IDE.
Please note that if you want to use the ethernet module, you need to raise the socket as much as possible above the board while soldering it, as the ethernet jack on board the ethernet module is slightly higher than the pinheaders on the board.
The standard GatewayW5100 example under MySensors in the Arduino IDE, is compatible with the Sensebender Gateway, and can be run without problems.
The Gateway hardware supports a backup battery, which can be connected to the 2 terminals right next to the SD card reader. The absolute maximum battery voltage is 3.6V, anything above this level might damage your board! Currently we do not have any example source code to show you, if you want to add the battery, but there is a couple of pins that can be used to check if battery and/or external supply, is attached, MY_BATT_DETECT and MY_SUPPLY_DETECT, both are analog inputs, and can be used with analogRead() function in Arduino like
int battVolt = analogRead(MY_BAT_DETECT); int supplyVolt = analogRead(MY_SUPPLY_DETECT);
This can then be used to determine if the software should put the gateway into special powerdown modes etc. if external supply is removed.
The LED's is programmable by using a set of defines, that we have added in the board support package:
Both defines are valid (LED_1 and LED_BLUE).
use it as
pinMode(LED_BLUE, OUTPUT); digitalWrite(LED_BLUE, HIGH);
Please note that some of the LED's are used in the mysensors core.
You can use the MysX expansion port to add new hardware functionality to your gateway, like receiver / transmitters for 433Mhz remote controls etc. The connector is documented in detail here. We have made it easier to use the MysX connector in your sketches, by adding a set of MYSX defines, if you use our board definitions in arduino:
#define MYSX_D1_DFM (00ul) #define MYSX_D2_DTM (01ul) #define MYSX_D3_INT (02ul) #define MYSX_D4_INT (03ul) #define MYSX_D5_PWM (04ul) #define MYSX_D6_PWM (05ul) #define MYSX_D7_SCL (06ul) #define MYSX_D8_SDA (07ul) #define MYSX_D9_A3 (08ul) #define MYSX_D10_A4 (09ul) #define MYSX_D11_MOSI (10ul) #define MYSX_D12_MISO (11ul) #define MYSX_D13_SCK (12ul) #define MYSX_D14_CS (13ul) #define MYSX_A1 (14ul) #define MYSX_A2 (15ul) #define MYSX_SPI SPI2
To use the serial port in the mysx connector, you should use Serial1 in your sketches, as the default Serial is connected to the USB serial device:
Serial1.begin(9600); Serial1.println("this is a test using serial port in MysX connector"); Serial.begin(9600); // Dummy baudrate, as it's not used by the usb driver Serial.println("this is a test using the usb serial device");
On board self diagnosis
The default sketch includes a simple self diagnosis option, that test the onboard peripherals, to invoke this, you need to short SWC1 (solder pads on bottom side) during power on. This will run self diagnosis as stand alone mode, blinking the LED's while testing. If you short SWC2 the board will wait for a serial terminal program to open a connection to the USB device, and then print a self diagnosis report on the terminal.
Scalz on the forum has made a series of enclosures that can be printed on a 3d printer, we have added them in the file list below, choose the one that fits your configuration.
|Ref||Qnty||Value||Description||Vendor||Vendor part||Supplier1||Supplier1 part|
|C11, C2, C3, C4, C6, C13, C15, C1, C5, C21, C17, C10, C7, C24,||14||100nF||Unpolarized capacitor|
|C12, C16, C8, C9, C20,||5||10uF||Polarised capacitor||mouser||581-F381A106MMA|
|C18, C19,||2||4.7pF||Unpolarized capacitor||AVX||06035U3R0BAT2A||Mouser||581-06035U3R0B|
|C22, C14,||2||1nF||Unpolarized capacitor||Vishay||VJ0603Y102JXJPW1BCccccc½||mouser||77-VJ0603Y102JXJPBC|
|CON1,||1||micro_SD_Card_SPI||SD Card Reader||Litkconn Technology Co. LTD||MM027S020R|
|D6,||1||BAT54||Dual schottky diode, common cathode||ST Micro||BAT54CWFILMY||Mouser||511-BAT54CWFILMY|
|FB1, FB2, FB3,||3||470R EMI||Murata||BLM18PG471SN1D||mouser||81-BLM18PG471SN1D|
|P1,||0||ANT||Connector, single row, 01x02||NM|
|P2,||0||MYSX 2.6||Mysensors expansion connector 2.6||NM|
|P4,||0||Debug||Cortex M debug connector||NM||M50-3600542||mouser||855-M50-3600542|
|P5,||0||USB_PWR_DIS||Connector, double row, 02x01||NM|
|R1, R9, R10,||3||4k7||Resistor|
|R5, R2, R6, R7,||4||270||Resistor|
|U1,||1||ATSHA204A||ATSHA204A, Secure Authentication and Validation Device, SOT-23, Vcc=3.3V||Atmel||ATSHA204A-STUCZ-T||mouser||566-ATSHA204ASTUCZ-T|
|U2,||1||ATSAMD21J||Atmel ATSAM D21J||Atmel||ATSAMD21J18A-AU||mouser||556-ATSAMD21J18A-AU|
|U3,||1||AT24CS32-STUM||32Kb (4096x8) Serial EEPROM with Unique Serial Number, SOT-23-5||Atmel||AT24CS32-STUM-T||Mouser||556-AT24CS32-STUM-T|
|U7,||0||RFM69HW||RFM69HW, 868Mhz +20dBm HopeRF Wireless Transceiver, Vcc=3.3V||NM|
|U10,||1||AMS1117-3.3||1A LDO Voltage Regulator||Diodes incorporated||ZLDO1117G33TA||mouser||522-ZLDO1117G33TA|
|U11,||1||MICRO-B_USB||Shenzhen Guanduan Electonics Technology co ltd.||MICRO USB SP/F B|