Story
The project represents the electronic part including the motor for use in automatic chicken coop or other door opener. With its use the door can be open remotely through Internet. The project is based on the Blynk IoT platform.
The mechanical part of the project depends on the door construction. More powerful motor can be used also.
The whole electronic part is embedded inside a plastic box.
I will not provide a drawn circuit, but describe the all connections done.
For the supply of the system I used and AC/DC 12V 3A module. On its input is placed a fuse. At the output is connected:
- The supply of the L298 Motor control board (12V & GND. All jumper left on the board)
- 5V Linear regulator board used to supply the NODEMCU ESP8266 board (5V input of NOMCU board and GND)
- A red LED in series with 1kOhm resitor (power indicator)
To allow higher driving currents provided by the motor control board its Out4 was shorted with Out1, Out2 with Out3. They are directly driving the DC motor. The corresponding inputs In1 was also shorted with In4 and In2 with In3.
The input pair In1&In4 is driven by the D3 NODEMCU IO pad.
The input pair In2&In3 is driven by the D4 NODEMCU IO pad.
A RGB LED (I used common anode connected to 3v3 pin of NODEMCU through 510 Ohm resistor) is used to show the current status of the system.
- its BLUE LED indicates the door opening (NODEMCU pin D5)
- its RED LED indicates the door closing (NODEMCU pin D7)
- its GREEN LED indicates the end of both processes (NODEMCU pin D6)
Two push hermetic microbuttons were used to sense when the door is fully open or closed.
They have common terminal connected to GND and the second one is:
- Sensing the open state : D1
- Sensing the closed state : D2
The Arduino code is attached - updated according your settings : Yor Token, Your SSID name, your WiFi Password. You need to have installed the ESP8266 boards in your Arduino IDE. How to do this you can find in Internet. You will need also the Blynk libraries installed. Please check in internet for the last versions. In the blynk site, there are lot of videos explaining how it works.
Good luck and success.