Skip to main content

Posts

Showing posts with the label ESP8266

A simple ESP-01 USB adapter with toggle switch for reprogramming

ESP-01 is a simple ESP8266 module which can be purchased cheaply from Aliexpress. At one of promotion, I purchased an ESP-01 for just S$1.97. That's very cheap for a wifi enabled microcontroller. An ESP-01 can be a WIFI bridge for non-connected microcontroller such as Arduino UNO, Mega, Nano etc. Communication between the microcontroller can be done using the serial link between them. I have written a post on this using ESP-Link to connect to an Arduino Pro Mini. Together with the client library provided, the Pro Mini can easily transfer sensor data via MQTT. http://iotdiary.blogspot.sg/2017/09/using-esp-link-transparent-bridge.html For the most part, once the firmware is in place, normally I will use OTA to update. Sometimes, I wanted to reuse the same controller for another firmware and I have rewired up the controller for reflashing. This makes it very inconvenient to use. Recently, I bought a USB ESP-01 adapter thinking that my problem is solved. When I received it and r...

Using ESP-Link transparent bridge (ATmega2560+ESP8266 board)

I have found this interesting board selling on Aliexpress website. It is an Arduino Mega 2650 with a built-in ESP8266 which allows the Mega to connect to wifi. This board has cut down a lot of wiring and bring out interesting possibilities. One of this is to connect up both the microcontrollers using ESP-link firmware. I have an earlier blog post  that described how to wire up an ESP-01 and Arduino Pro Mini. One of the tricky parts in this setup is the sequence of flashing the ESP firmware. Flashing the onboard ESP8266 requires some setting changes to the dip switches. The following are the sequences which I get both the microcontrollers to talk to each other. Set the jumper 5,6,7 to ON and the rest OFF. This will set the ESP to update mode. I am using version 3.0.14  and flashed the ESP using the following parameters: esptool --port com26 --baud 230400 write_flash -fm dio -fs 4MB -ff 80m 0x0 boot_v1.6.bin 0x1000 user1.bin 0x3fc000 esp_init_data_defa...

ESP Easy

ESP Easy is an interesting piece of firmware, it really makes interfacing to an ESP 8266 a breeze. It has a very comprehensive user interface to configure practically everything: MQTT setup All the GPIO pins behaviour. Configure the supported sensors setting. Configure the OLED to display the value of the sensors. and more... In this setup, I used my custom Wemos D1 Mini shield extender to connect to additional I2C devices. I have connected to a BMP280 temperature/pressure sensor and a TSL2561 luminosity sensor. For fun, I have also connected the DHT11 temperature/humidity sensor. All this setup is done without writing a single line of code. Amazing. Kudos to ESP Easy. One interesting observation, the temperature reading from DHT11 and BMP280 differs by abt 1.5 to 2 C. I wonder which sensor is accurate?

DIY Sonoff RF Bridge

Tasmota recently supported the RF bridge by iTead which allowed for RF 433 remote devices to be controlled/controlling using Sonoff products. e.g A handphone can be used to control a remote RF device or an RF remote control can use to control a WIFI enabled device. By using Tasmota, I can control the device using MQTT. This idea fits exactly to my smart home plan. Here is the schematic: I cheated a bit by having ESP01 mounted on a breakout board. This breakout board converts all the external pins to 5v which simplified the wiring and I do not need to use a voltage level shifter. Moreover, the Arduino 3.3v power does not have enough current to power the ESP reliably and I have to power it via the 5V from Arduino Uno. Next, I used an Arduino Uno prototype shield with a tiny breadboard to hold all the components together. For the RF 433 transmitter/receiver, I am using the development kits when I purchased the all-in-one Arduino development kits. An antenna is added for m...

The Edge Devices - Sonoff, ESP8266 and Tasmota

Sonoff, ESP8266 and Tasmota, how are these 3 components related? This can be viewed as a computer where Sonoff is the computer, ESP8266 is the CPU and Tasmota is the Operating System. Sonoff  is one of many companies in China which manufactures smart home WIFI connected devices such as switches, plugs and lights. Their devices are very popular among DIY smart home builders because they make it convenient to flash custom firmware. I have bought a few of such devices,  Basic Switch ,  RF-Wifi Switch ,  Wall socket  and  Light Switch . This can be easily found on Aliexpress, Taobao and Banggood, Videos and articles on how to modify to custom firmware can be found on Youtube. ESP8266 is one of the amazing makers modules that come out after Arduino. Espressif has make the ESP Microcontroller programmable using the Arduino IDE. The library has the entire TCP stack built in making it possible to be programmed as a mini web server, tcp/udp server/client. There ...

Smart Home Components

Next, I need a Micro P rocessing Unit (MPU), Micro-controller (MCU) and the software. After some design considerations, I have decided the brain of my system shall be a Raspberry PI. Raspberry is easily available. I have purchased mine at Taobao for less than S$70. It comes with a casing, power supply, 3xheat sinks, fan and a 16GB micro SD. This is the cheapest I can find. There are so many documentations, videos and websites on Raspberry Pi.  I watched a youtube clip showing Google Home assistant can be easily installed on a Pi. That sealed my decision to choose Raspberry Pi.  The next piece shall be the automation software, Currently, the most popular Home Automation control software are Openhab and HomeAssistant. I do not have time to evaluate both and settled for Openhab as I am more of a Java programmer. In case anything that needs debugging, it will be easier for me (but it turned out that I do not really need to look at the code). I like the Arduino ...