It All Started With a Night Light…

VL53L1X Time of Flight Sensor

I’d been playing around with Arduinos and Raspberry Pis for quite awhile, never with much of a purpose. The closest I came to a purpose was when a few months ago I’d found what for a robot enthusiast must almost be a dream, something called “Time of Flight” sensor, basically the operating part of a LIDAR (Light Detection and Ranging), one of the main sensors used in driverless cars. This one is smaller than a postage stamp, weighs a few grams, and uses a tiny laser to measure distance up to 4m at an accuracy of 20-25mm (or about an inch accuracy at 13 feet). How much does this thing cost? About US$19. Amazing.

To the consternation of my partner I ended up building a night light. We actually have a night light already, one of those plastic Japanese 100 yen things that work just fine, but I was having none of that.

The Pi Zero W RESTful Nightlight with Pew Pew Laser

It turned out to be a Raspberry Pi Zero W based nightlight with a RESTful web interface, three Red-Green-Blue (RGB) potentiometer controls for the colour of the 5 x 5 LED matrix running into an ADS1015 analog-to-digital converter, with the number of LEDs lit as a function of the distance the ToF sensor measures to your hand.

Overkill, absolutely. My partner? Not impressed. She only barely accepts its presence in the bedroom.

Leave a Reply

Your email address will not be published. Required fields are marked *