Hello, i have a circuit below that uses an SR-04 ultrasonic distance sensor to measure the height of the water level and use a relay to turn on and off a pump to control the water level and an HLK-5M12 SMPS . I got the schematic from here.
According to the website/schematic the circuit runs on 220v.
Is this correct explanation? When the distance between the water and the sensor become greater( less water in the container) > 30 the motor turns on putting more water in the container and turning the water off when it is less than <6.
I believe it does this by when the distance is greater than >30 the Digispark microcontroller outputs a "HIGH" on T1(NPN transistor) which activates RL1(relay) putting it to N/O and this gives the other 110v plus the original power switch 110v = 220v required to turn on HLK-5M12 which gives the supply voltage that lets you turn on the pump, then the SR-04 turns off the control pin to stop overflow and this process repeats.
Is that correct? Thanks.
P.s ( I'm not going to get into code seeing as this is not the correct forum so i kept it minimal and the numbers 6 and 30 are just referring to centimeters).
According to the website/schematic the circuit runs on 220v.
Is this correct explanation? When the distance between the water and the sensor become greater( less water in the container) > 30 the motor turns on putting more water in the container and turning the water off when it is less than <6.
I believe it does this by when the distance is greater than >30 the Digispark microcontroller outputs a "HIGH" on T1(NPN transistor) which activates RL1(relay) putting it to N/O and this gives the other 110v plus the original power switch 110v = 220v required to turn on HLK-5M12 which gives the supply voltage that lets you turn on the pump, then the SR-04 turns off the control pin to stop overflow and this process repeats.
Is that correct? Thanks.
P.s ( I'm not going to get into code seeing as this is not the correct forum so i kept it minimal and the numbers 6 and 30 are just referring to centimeters).