Sensebender Gateway

created by tbowmo , updated

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

Technical Specifications

  • Board size 5x5cm
  • Atmel ATSAMD21 (Arm cortex m0+ cpu core) with
    • 256Kb flash
    • 32Kb RAM
    • 48Mhz clock
    • RTC module
  • Micro sd card reader
  • Socket for nRF24L01+ module (module not included)
  • Pads for RFM69 module (module not included)
  • Socket for W5100 ethernet module (module not included)
  • Native USB port
  • ATSHA204A for signing
  • Onboard i2c eeprom
  • 5 LED's (Red, Green, Yellow, Blue and Orange)
  • MYSx 2.6 with
    • Dedicated UART
    • Dedicated SPI
    • Dedicated Interrupts
    • I2C bus (shared with onboard eeprom)

Setup and use

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.

Windows drivers

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)

Default sketch

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

Other configurations

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.

ethernet module box header

The standard GatewayW5100 example under MySensors in the Arduino IDE, is compatible with the Sensebender Gateway, and can be run without problems.

Battery backup

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.

LED definitions

The LED's is programmable by using a set of defines, that we have added in the board support package:

  • LED_1 / LED_BLUE
  • LED_2 / LED_RED

Both defines are valid (LED_1 and LED_BLUE).

use it as

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


Design Files

Bill of Material

RefQntyValueDescriptionVendorVendor partSupplier1Supplier1 part
BT1, 0BatteryNM
C11, C2, C3, C4, C6, C13, C15, C1, C5, C21, C17, C10, C7, C24, 14100nFUnpolarized capacitor
C12, C16, C8, C9, C20, 510uFPolarised capacitormouser581-F381A106MMA
C18, C19, 24.7pFUnpolarized capacitorAVX06035U3R0BAT2AMouser581-06035U3R0B
C22, C14, 21nFUnpolarized capacitorVishayVJ0603Y102JXJPW1BCccccc½mouser77-VJ0603Y102JXJPBC
C23, 110nFUnpolarized capacitor
CON1, 1micro_SD_Card_SPISD Card ReaderLitkconn Technology Co. LTDMM027S020R
D1, 1LED_BLUEMouser
D2, 1LED_REDMouser
D3, 1LED_GREENMouser
D6, 1BAT54Dual schottky diode, common cathodeST MicroBAT54CWFILMYMouser511-BAT54CWFILMY
FB1, FB2, FB3, 3470R EMIMurataBLM18PG471SN1Dmouser81-BLM18PG471SN1D
P1, 0ANTConnector, single row, 01x02NM
P2, 0MYSX 2.6Mysensors expansion connector 2.6NM
P4, 0DebugCortex M debug connectorNMM50-3600542mouser855-M50-3600542
P5, 0USB_PWR_DISConnector, double row, 02x01NM
R1, R9, R10, 34k7Resistor
R3, 1100kResistor
R4, 191ResistorMouser
R5, R2, R6, R7, 4270Resistor
R8, 139RResistor
R11, 11MResistor
R12, 11KResistor
SW1, 1Resetxingda0577TS-021
U1, 1ATSHA204AATSHA204A, Secure Authentication and Validation Device, SOT-23, Vcc=3.3VAtmelATSHA204A-STUCZ-Tmouser566-ATSHA204ASTUCZ-T
U2, 1ATSAMD21JAtmel ATSAM D21JAtmelATSAMD21J18A-AUmouser556-ATSAMD21J18A-AU
U3, 1AT24CS32-STUM32Kb (4096x8) Serial EEPROM with Unique Serial Number, SOT-23-5AtmelAT24CS32-STUM-TMouser556-AT24CS32-STUM-T
U4, 0W5100Wiznet W5100NM
U7, 0RFM69HWRFM69HW, 868Mhz +20dBm HopeRF Wireless Transceiver, Vcc=3.3VNM
U8, 0NRF24L01NRF24L01+NM
U10, 1AMS1117-3.31A LDO Voltage RegulatorDiodes incorporatedZLDO1117G33TAmouser522-ZLDO1117G33TA
U11, 1MICRO-B_USBShenzhen Guanduan Electonics Technology co ltd.MICRO USB SP/F B
W1, 0SWDIOpointNM
W2, 0SWCLKpointNM
W3, 0RESETpointNM
W4, 0GNDpointNM
W5, 03v3 cpupointNM
X1, 132768hzAbraconABS07-120-32.768kHz-Tmouser815-ABS0712032.768KT

Shopping Guide

Sensebender Gateway
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.
In stock - $24   Buy
W5100 Ethernet Module
Ethernet module suitable for the gateway.
274 available - $4.74   Buy
In stock - $8.09   Buy

Related Content