Determining Kibble Level Via Time-of-Flight

[WTH] is building an IoT kitty food dispenser. There are a few of these projects floating around that measure out portions very sensibly — some use screws to dispense a set amount of food at a time, some measure the weight of the remaining stockpile. This build is definitely not that. This kitty food monitor uses a time of flight sensor to determine the remaining level of food in a hopper. [WTH]’s feeder lets the cat eat all the grub it wants, then alerts the hooman when kibble levels drop below a certain level.

The project starts with one of those pet food dispensers that consist of a hopper that gravity feeds into the food bowl. As the animal eats that food, more dispenses into the bowl. Attached to the lid is an ESP8266 connected to an Adafruit time of flight sensor. This reports the kibble level in centimeters, which is good enough for [WTH]’s purposes. Sensor data is logged to a Google Drive spreadsheet, published as a graph through M2X (AT&T’s IOT service), and texted to [WTH]’s smart watch via IFTTT.

Look for a plethora of Tweeting, Instagramming, and otherwise automated feeding of the cat overlords right here on Hackaday. Check out automatic cat feeder dispenses noms, wants cheezburger, and a cat feeder made with laminator parts.

Testing Distance Sensors

I’m working on a project involving the need to precisely move a tool based on the measured distance to an object. Okay, yeah, it’s a CNC mill. Anyway, I’d heard of time of fight sensors and decided to get one to test out, but also to be thorough I wanted to include other distance sensors as well: a Sharp digital distance sensor as well as a more sophisticated proximity/light sensor. I plugged them all into a breadboard and ran them through their paces, using a frame built from aluminum beams as a way of holding the target materials at a specific height.

Continue reading “Testing Distance Sensors”

Tiniest Control Board Fits Inside an N-Gauge Model Train

[kodera2t] discovered the VL53L0X Time of Flight sensor and thought it would make a great way to control the operation of a model train without touching it. He explains it in his own words in the demo video.

The sensor was small enough for an N-gauge train, which translates to 1:148 scale or about 9mm from rail to rail. His idea was to build a tiny control board that could fit inside the locomotive: 10mm by 40mm. His board consists of the ToF sensor, an ATMega328P-MMH, USB-serial, and a Texas Instruments DRV8830 motor driver. he powers the board via the 6V running through the track.

Right now [kodera2t]’s using the ToF as sort of a gestural controller to get the train to start rolling, but one could imagine the sensor could be incorporated into more advanced programming, like having the train speed up on straightaways and slow down on a curve, based on the height of the bridge over it.

We’ve published a bunch of [kodera2t]’s tiny circuit board projects here on Hackaday, including the smallest basic computer, his minimal frequency counter, and his VFD amplifier.

Continue reading “Tiniest Control Board Fits Inside an N-Gauge Model Train”

New Part Day: Time Of Flight Sensors

Every robotics project out there, it seems, needs a way to detect if it’s smashing into a wall repeatedly, acting like the brainless automaton it actually is. The Roomba has wall sensors, just about every robot kit has some way of detecting obstacles its running into, and for ‘wall-following robots’, detecting objects is all they do.

While the earliest of these robots used a piece of wire and a metal contact to act like a switch for these object detectors, ultrasonic sensors – the kind you can buy on eBay for a few bucks – have replaced this clever wire spring switch. Now there’s a new sensor for the same job – the VL6180 – and it measures the speed of light.

The sensors that are used for object and collision detection now use either ultrasonic or infrared light. They’re susceptible to noise, and if you’re doing anything automated, you really don’t want rogue measurements. A time of flight sensor clocks out photons and records how long it takes them to return at 299,792,458 meters per second. It’s less sensitive to noise, and if you can believe this SparkFun demo of this sensor, extremely accurate

This is not the first Time of Flight distance sensor on the market; earlier this week we saw a project use a sensor called the TeraRanger One. This sensor costs €150.00. The VL6180 sensor costs about $6 in quantity one from the usual suspects, and breakout boards with the proper level converters and regulators can be found for about $25. More expensive sensors have a greater range, naturally; the VL6180 is limited to somewhere between 10cm (on paper) and 25cm (in practice). But this is cheap, and it measures the time of flight of pulses of light. That’s just cool.

Ball Balancing Robot Uses New TOF Sensor

By now, you’ve most likely have seen or even played with an ultrasonic distance sensor. They work by emitting a sound, and then listening for the “ping” to return. The sensor can then tell how far an object is away by calculating the time in between. With sound waves traveling at 343.2 meters per second (768 mph), it’s no small task to measure the short time it takes for the sound to be emitted, then hit something a few feet away, and return. Now, imagine trying to do that with light.

Light in comparison moves at a whopping 299,792,458 meters per second (or about 671 million miles per hour). You’re going to have to have a pretty fast finger on a stopwatch to measure the time it takes for light to bounce back from an object a few inches away.

[Paul Bristow] is doing just that with the use of a new Time of Flight (ToF) sensor called the TeraRanger One. Developed in cooperation with CERN, this sensor uses a very narrow beam of light (listed as +/- 2 degrees) to accurately measure the position of an object to a resolution of 5mm, with distances up to 14 meters away. It boasts an impressive update rate of >1000 samples a second, and is very micro-controller friendly with UART, I2C, SPI, and PWM output.

[Paul] and his fellow hackers at the Post Tenebras Lab Hackerspace in Geneva got their hands on this sensor, and in a short time had a ball balancing robot up and running. The crude program is not running a PID controller, so the results seen in the video after the break aren’t that impressive. Also, the sensor isn’t exactly cheap at about $180 USD. Despite that, it will be interesting to see what applications these sensors will be used for. If you have any ideas, leave them in the comments below.

Continue reading “Ball Balancing Robot Uses New TOF Sensor”