
Light with ultrasonic sensor
prusaprinters
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 voltage. Safer to use an external supply with 5.5mm plug / socket in case of a LED strip.To drive the LED or the relay, any similar NMOS FET can be used.Category: Electronics
With this file you will be able to print Light with ultrasonic sensor with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Light with ultrasonic sensor.