_Unfortunately I can't open my ebay shop right now. While I'm trying to open it, you can buy this board here: https://www.tindie.com/stores/easySensors/ _
Pin out:
Arduino Pins | Description |
---|---|
A0, A1, A4, A5, A7 | Available ARDUINO analog GPIO / DIGITAL GPIO |
A6 | Connected to Battery voltage sensor (via divider) |
A3 | Connected to ATSHA204A |
D3 | Connected to Hardware debouncer. Triggers Interrupt if any of the Switch Connectors change state |
D4, D5, D6, D7 | Connected to Switch Connectors JST type |
D8 | Connected to CS FLASH chip (OTA) M25P40 |
ANT | RFM69 antenna |
Gnd | Ground |
Arduino IDE Settings
switchNode.ino is the Arduino example sketch using MySensors API.
Burn the switchNode.ino sketch into it an it will became one of the MySensors home automation network Node. To create the network you need controller and at least two Nodes one as a Sensor, relay or switch Node and the other one as “Gateway Serial”. I personally love Domoticz as conroller. Please check this HowTo to install Domoticz.
However, for no-controller setup, as example, you can use 3 nodes - first node as “Gateway Serial”, second node as relay and last one as switch for that relay. No controller needed then, keep the switch and the relay on the same address and the switch will operate the relay.
Things worth mentioning about the MySensors Arduino sketch:
Arduino Pins | Description |
---|---|
#define MY_RADIO_RFM69 #define MY_RFM69_FREQUENCY RF69_433MHZ #define MY_IS_RFM69HW |
Define which radio we use – here is RFM 69 with frequency 433 MHZ and it is HW type – one of the most powerful RFM 69 radios. If your radio is RFM69CW - comment out line with // #define MY_IS_RFM69HW |
#define MY_NODE_ID 0xE0 | Define Node address (0xE0 here). I prefer to use static addresses and in Hexadecimal since it is easier to identify the node address in Domoticz devices list after it will be discovered by controller ( Domoticz). However, you can use AUTO instead of the hardcoded number (like 0xE0) though. Domoticz will automatically assign node ID then. |
#define MY_OTA_FIRMWARE_FEATURE #define MY_OTA_FLASH_JDECID 0x2020 |
Define OTA feature. OTA stands for “Over The Air firmware updates”. If your node does not utilize Sleep mode you can send new “firmware” (compiled sketch binary) by air. Here is the link on how to do it. For OTA we use JDEC Flash chip where the node stores new firmware and once it received and controlsum (CRC) is correct it reboots and flashes your new code into the node controller. So we define it is "erase type" as 0x2020 here. |
#define MY_SIGNING_ATSHA204 #define MY_SIGNING_REQUEST_SIGNATURES |
Define if you like to use Crypto Authentication to secure your nodes from intruders or interference. After that, you have to “personalize” all the nodes, which have those, defines enabled. How to “personalize” nodes with encryption key. You need both defines in the nodes you need to protect. The Gateway Serial could be with only one of those defines enabled - #define MY_SIGNING_ATSHA204 |
sleep(BUTTONS_INTERUPT_PIN - 2, RISING, 0); | Sends the Switch Controller into the sleep mode untill somebody press or release any of the 4 buttons. |
Connect the Node to FTDI USB adaptor, select Pro Mini 8MHz board in Arduino IDE and upload the switchNode.ino sketch.
Done
The board is created by Koresh
P.S. Always mind! if your Arduino code fails you need some backup plan. Put some candles and matches in your bathroom )))))... hope you understand. Start your automation wisely. Like auotomate your doghouse first. Then checkenshed and so on!!!
Qty | Value | Device | Package | Parts | Description | MF | MPN | Aliexpress or Ebay link |
---|---|---|---|---|---|---|---|---|
1 | M25P40-VMN6TPB | 4 Mb (x1) Serial NOR Flash Memory, 75 MHz, 2.3 to 3.6 V, 8-pin SO8 Narrow (MN), Tape & Reel | 8-Pin SO Narrow, 3.9 X 4.9 mm, Pitch 1.27 mm | U5 | ||||
1 | ATmega328P-AU | 8-bit AVR Microcontroller, 32KB Flash, 1KB EEPROM, 2KB SRAM, 32-pin TQFP, Industrial Grade (-40°C to 85°C) | 32-Lead, 7x7x1.0 mm Body, 0.8mm Lead Pitch, Thin Profile Plastic Quad Flat Package (TQFP) | U1 | ||||
10 | PicoBlade | Connector 2 Male, micro JST 1.25mm, Connector 2 Male, Connector 2 Male, Connector 2 Male | J1, J2, J3, J4 | |||||
1 | WJ-CR2450-1 SMT/SMD | CR2450 Battery Holder | bat1 | |||||
1 | ATSHA204A | CryptoAuthentication™ Host Security Chip, 3-Pin SOT | 3-Pin Plastic Thin Shrink Small Outline Package, 2.9 x 1.3 mm Body, 0.95 mm Pitch (Shrink SOT) | U4 | ||||
4 | 1N5819 | Diode | SOD-323 Diode; 1.775mm W X 1.30mm L X 1.15mm H Body, IPC Medium Density | D1, D2, D3, D4 | ||||
1 | 74HC14D | Hex Schmitt-Trigger Inverter | SOIC 14, Pitch 1.27mm - Body 4x8.75mm, IPC Medium Density | IC1 | ||||
4 | 47nF | Non-polarised capacitor | 0603 | C1, C3, C5, C7 | ||||
13 | 100nF | Non-polarised capacitor | 0603 | C2, C4, C6, C8, C9, C10, C11, C12, C13, C15, C16, C19, C20 | ||||
1 | 47uF | Polarised capacitor | 0603 | C14 | ||||
1 | 74HC86D | Quadruple 2-Input Exclusive-OR Gates | SOIC 14, Pitch 1.27mm - Body 4x8.75mm, IPC Medium Density | IC2 | ||||
9 | 1M | Resistor - 1% | 0603 | R1, R2, R4, R5, R7, R8, R10, R11, R14 | ||||
10 | 10k | Resistor - 1% | 0603 | R3, R6, R9, R12, R13, R16, R17, R18, R19, R21 | ||||
1 | 470k | Resistor - 1% | 0603 | R15 | ||||
1 | 100k | Resistor - 1% | 0603 | R20 | ||||
1 | rf69_rev_3.0 | RFM69 module, revision 3.0 | RFM69 | |||||
1 | 4x3x2_button | Tact Push Button Switch SMD SMT 3 x 4mm x 2mm | btn1 |
Name | Size | # Downloads |
---|---|---|
switchInsertableNode_sch.PDF | 357.8 kB | 700 |
main.SchDoc | 34.5 kB | 698 |
switch_peripherials.SchDoc | 47.5 kB | 689 |
buttons_controller.SchDoc | 386.5 kB | 702 |
mcu_radio.SchDoc | 123.5 kB | 723 |
switch_trojan1.gbl | 24.67 kB | 842 |
switch_trojan1.gbo | 85.44 kB | 957 |
switch_trojan1.gbs | 4.71 kB | 799 |
switch_trojan1.gm1 | 1.87 kB | 753 |
switch_trojan1.gtl | 45.43 kB | 1066 |
switch_trojan1.gto | 43.26 kB | 764 |
switch_trojan1.gts | 2.25 kB | 769 |
cam.rpt | 331 B | 741 |
cam.drl | 1.44 kB | 786 |