Thingiverse
Light with ultrasonic sensor
by akosboda
3
Downloads
1
Likes
0
Makes
Sensor using the HCSR04 ultrasonic module. The sensor will turn the light on in a specified area. The light source could be a LED strip (12V) or a 230V normal bulb.
The Arduino stores the average of 1000 distance samples. If the measured distance falls below 30% of the average, meaning somebody crosses the active area, it reacts and turns on the light. For instance, in a kitchen the sensor's distance is 3m from the reflecting wall, so the reference distance is 3m, the distance to trigger the light is approx. 0.9 meter, 30% of the 3 m. If a person comes to the table, which is near the sensor, this will activate the light above the table but if the person moves in the remaining 2.1m, nothing will happen.
If the light source is a LED strip, the output is PWM controlled and turns the light on and off gradually in a soft manner. Depending on the load, consider an external 12V supply.
The 230V bulb uses a relay.
Take good care of isolating the modules, if the thing uses mains volta
The Arduino stores the average of 1000 distance samples. If the measured distance falls below 30% of the average, meaning somebody crosses the active area, it reacts and turns on the light. For instance, in a kitchen the sensor's distance is 3m from the reflecting wall, so the reference distance is 3m, the distance to trigger the light is approx. 0.9 meter, 30% of the 3 m. If a person comes to the table, which is near the sensor, this will activate the light above the table but if the person moves in the remaining 2.1m, nothing will happen.
If the light source is a LED strip, the output is PWM controlled and turns the light on and off gradually in a soft manner. Depending on the load, consider an external 12V supply.
The 230V bulb uses a relay.
Take good care of isolating the modules, if the thing uses mains volta
Did you print this model? Sign in and share your make!
Sign in to leave a comment
Sign inNo comments yet – be the first!