A basic project to get Ultrasonic Sensor readings from the ESP8266 and write them to a channel on ThingSpeak. You can also user other sensors too. For this project, the user will need to set up an account on ThingSpeak, create a new channel, set the field names, get the Channel ID as and the Write API Key.
Currenly reading are taken at interval of 15 min, you can change it by replacing 15 at line 5 with your requrired value. After reading sensor data and sending it to thingspeak it will go back to deep sleep mode
Software Requirements : Arduino IDE
Librarie required for this project are : NewPingESP8266
Parts used :
-
Wemos D1 mini
-
TP4056
-
18650 cell
-
Solar panel (optional)
-
Ultra sonic sensor(HC-SR04)
-
180k resistor
-
10k resistor
-
IN5819 Schottky Diode
-
BC557B transistor
Ps - You can also power it using any 5V mobile charger too , skip solar panel
Diagram -
Demo -