How to implement your own firmware on the Itead 4 Channel ESP8285 based Relay board ( 7V to 32V-4 Jog Switch)

 

Since I found no how to in the internet how to flash an own firmware into this nice and cheap Itead device I decided to wrote one. There are some specials to notice:

-       This module is based on the ESP8285 (NOT ESP8266 – Take care when selecting board in Arduino ide)

-       There are no plugs where you can easily attach your FTDI programmer. You will have to connect directly to the PSF-B85 board that holds the esp. (For more information about this board please refer to https://www.itead.cc/wiki/PSF-B85

-       Please note that the show pin reference is meant as a view from below the board which is some kind of confusing. So please follow the following picture how to connect your ftdi.

-       This how to does not include how to use the Arduino IDE and how to use a FTDI programmer. Please google this. There is much documentation.

-       Actually it can be ordered at bang good. Here: http://www.banggood.com/SONOFF-USB-5V-Or-DC-7V-32V-DIY-4-Channel-Jog-Inching-Self-locking-WIFI-Wireless-Smart-Home-Switch-p-1157460.html

 

Flash firmware

-       At first you will have to connect you FTDI programmer directly to the board. The following picture shows how to connect the 4 FTDI cables:

-       You will only need to connect GND, VCC, RX, TX and GPIO 0. Please keep in mind that you have to crossover RX and TX. So connect RX to TX and TX to RF. You can skip GPIO 15 and GPIO 2

-       To get the ESP into bootloader mode you have to connect GPIO0 to GND and the power up the device. Afterwards you can download the firmware with Arduino IDE or ESP tool. Afterwards you have to disconnect GPIO0 to let the device start firmware instead of bootloader

 

Using the board peripherals

-       Relay 1-4 is connected to PIN 12, 5, 4, 15                                  (example for relay 1 in Arduino sketch use: pinMode(12, OUTPUT);  digitalWrite(12, LOW);)

-       The LED is connected to PIN 13                                                 (example for relay 1 in Arduino sketch use: pinMode(13, OUTPUT);  digitalWrite(13, LOW);)

-       The button right next to the led is connected to PIN 14               (example for relay 1 in Arduino sketch use: pinMode(14, INPUT);  int value = digitalRead(14);)

-       The second button cannot be accessed directly

Hints

-       This PCBA comes with some kind of mode switch that can be selected with button2 (the one right next to the micro usb connector). If your relay does not react to your commands press this button to change the mode and afterwards do not change it again.

-       This PCBA need more current than most of the usb ports or FTDI programmers can offer. Therefore you might have to additionally connect the USB power supply.

 

Questions can be send to info@haus-bus.de