Infared Remote Control rev 2.0

Couple of days ago I decided to create new one IR controller for my air-conditioner and make it more professional, smaller and reliable.

I used schematics from my previous project but simplified it by removing DH22 temperature sensor and decided to improve schematics by using my base circuit with additional pull-up and pull-down resistors and capacitors for ESP chip stability.

Continue reading “Infared Remote Control rev 2.0”

Relay switch based on Sonoff

As a many others enthusiasts I’ve started my game from existing hardware solution and I bought couple of Sonoff modules from China.

When I received my modules I even didn’t want to use their solution and immediately flashed them to NodeMCU and then uploaded my Lua code. They worked stable and switched my floor lamps in the house, but using NodeMCU I wasn’t able to use reliable Over The Air (OTA) updates and also was hard to bring easy way to initial setup of the device. Finally I decided to switch to native C and Android Studio, it was simple for me as I have huge experience in different programming languages.

Now those devices works on my own firmware, have initial mode to setup them and connect to MQTT server. The button on device allows manually switch light if you are not able to use application. The same button is using to clear settings of device and make initial setup again in cases when you changed your MQTT server or WiFi credentials.

Here is an Arduino code

8-relays switch

This is working IoT project that allows me manage 8 relays and each relay can switch my outside lights in the garden.

First of all I started to use NodeMCU framework and Lua as programming language but after some period of time I’m stuck with some restrictions of the framework and I decided to switch to native C code using Arduino Studio. Native C code allows you do more magic things instead of NodeMCU, also you can control memory consumption more efficiently.

So, current implementation has initial mode when ESP8266 chip works as Wi-Fi access point and you able to configure module to connect to your home Wi-Fi network and MQTT server. After configuration will be set this module will be rebooted and it starts listening messages from your MQTT server. This solution uses all possible GPIO outputs in ESP8266.

Please remember that ESP8266 works at 3.3V but relays have to use 5V. I put there also transistors and LEDs to see when relay is switched ON or OFF.

Here is a full code of solution.