Made this project as a automatic water plant system. to control the dc motor according to the signals we use the npn bc546 transistor as a switch. connection starts from first connecting the moisture sensor ground to ground of nodemcu and connect the vcc to 5v of nodemcu, and moisture sensor read the analog value so it should connect to the analog pin of Nodemcu where the esp8266 have only one analog pin which is A0.
To work the motor on the basis of the signal we connect it with transistor. emitter plate is connected with negative terminal of the battery, base -- with the digital signal pin from the Nodemcu taking that pin as D3 and also for grounding the nodemcu as a common ground collector plate connected with ground terminal. collector pin with one end of the motor. other end of the motor connected with the positive terminal of the motor.
then run the code and adjust the moisture value in the code according to the plant.
to display the value of the moisture level in the cloud have to connect with adafruit.io so also given those code given below
Comments
Please log in or sign up to comment.