Coincell powered Switch Controller. Atmega328p + RFM69HW 433 MHz radio on-board. Hardware debouncer. Arduino IDE compatible. IS4B2450
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pdf
pics
pics_install
pics_install2
.gitattributes
.gitignore
README.md
switchNode.ino

README.md

enter image description here enter image description here enter image description here

The Switch Node (IS4B2450) is a low cost wireless Arduino IDE compatible (the Atmel ATMega328P) microcontroller with HopeRF RFM69-CW 433 MHz radio on board and build in hardware debouncer. Best sutable for Home Automation, IOT. Could be used as switch board for radio controlling any DIY project. You may think of it as Arduino Pro Mini plus all the items in the picture below:

Specification:

  • Dimensions 32x50mm
  • Sleep current consumption 5uA
  • Hardware switches controller with hardware debouncer. No need to do
    any debouncer code in the sketch plus it saves some battery as no processor
    time involved in the debouncing process
  • 4 external switch connectors
  • Authentication security - Atmel ATSHA204A Crypto Authentication Chip
  • External JDEC EPROM
  • Dualoptiboot bootloader. Implements over the air (OTA) firmware update ability
  • RFM69-CW (low power consumption version) 433 MHz Radio transceiver
  • Footprint available for replacing RFM69-CW with NRF24L01+ 2.4 GHz radio
  • Battery voltage sensor (via divider)
  • Externall battery connector JST 1.25 мм
  • FTDI header for programming
  • Battery connector CR2450
  • Reverse polarity protection
  • Supports both ON/OFF and momentary switches

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

Arduino IDE Settings

programming FTDI adapter connection

FTDI Power

3.3V power option should be used.

How to use it as home automation (IOT) node controller

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:

Code 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 0x0
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

enter image description here enter image description here enter image description here

The board schematics Pdf link

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