Introduction: Control Your Air Conditioner(IOT) With ESP8266
Hi everyone, this is my first instructable, so if you have any suggestion to improve it or any question please ask me. Maybe it isn't correctly grammatically some phrases, because i'm an english student, but I hope to write correctly soon.
Let's get started.
Sometimes, when you're outside home and it's a really hot day, you don't have any way to control your AC to chill your house; here is the solution: connect your AC controller to internet , letting you control it from any part of the world easily.
This is an easy and cheap project to do if you have minimun knowledge of electronics soldering and general electronics, but if you don't have it, you could destroy your controller easily, so be careful!
Step 1: Part List
- ESP2866(V1): This version is better for this project because is cheaper and smaller than the others versions .
- FTDI to USB convertor (FT232RL).
- AC Remote Control
- 2N2222 (TO-92): Is a NPN transistor for general porpouse.
- 10K resistor.
- Wires of different colours.
- Predrilled PCB(around 1cm*1cm is enough)
Step 2: Programming ESP8266
Before start to program our ESP, is necessary to install NodeMCU firmware on our ESP and know to upload code.
You can find a good tutorial here(ESP8266 Without Arduino) when you finish it we can continue.
Then we must upload this code, like in the tutorial.
Once it's uploaded, program operation, has two buttons. First, push on and immediately after, push off. This simulates a push button, like the push button of the remote, because if you push "on" only , it's like if you had blocked the push button
(I tried to modify the code to simulate a push button with just one button, but there's a problem, if you program a delay between high state and low state, the chip reset himself. I found out that is a problem of the firmware, so meanwhile they fix it, there's no solution)
Step 3: Looking for the on Button.
First, is necessary to open your remote control to extract the PCB. Once you have the PCB, yo need to find the power button switch(In my case,the red square of the first image). When you find it, you should follow the tracks of the different parts of the button.
In this case, fortunately there are test points in the track that makes me easy to solder a wire in each one, but if you don't find it, you can scratch the paint carefully from the track, and solder in the cooper both wire as you can see in the picture.
The Operation of these buttons is that when you push it makes a short circuit between both tracks and send a signal to the microcontroller.
So in the next step, we'll try to simulate it with a transistor in switch mode.
Step 4: Control Circuit and Wiring.
Finally we build the control circuit. The wiring diagram is in the first picture, as you can see is a simple circuit.
ESP8266's pin is connected through a resistor to the base of transistor, letting you control the transistor as a switch that connects both tracks while is in saturation and short it when is in short.
The green and orange wire of the electric diagram, is the connection of the two wire that we have welded to pcb(purple and black wires)
For the supply, first we should find the supply pad of the PCB, that is usually easy to find because is a battery holder(In the 3rd photo you can see it on the top). It is important to be sure that the polarity is correct and the voltage too. Finally I add a pin, Which acts like a switch, to control the supply of the module.
When you are going to close the controller, I recommend to glue the module(2º photo) to the bottom part of pcb, because it's easier to close it.
Step 5: Testing
You must look for the local IP of the module in your router.
If everything is ok, when you type the IP of the module in your browser's adrees bar, It should appear a simple interface like in the photo.
By an error of the firmware of the ESP, it's not possible to program only 1 push button in the interface(the problem is if you program a delay, the module will reset), so to use correctly, you must push "on" button and them "off" button to turn on it , and the same to turn off it.
I hope you like this instructable and it has been good explained.