Posts with «ultrasonic distance sensor» label

2023 Halloween Hackfest: Treat Trough of Terror Is Actually Pretty Cute

Even though it seems the worst of COVID has passed, October generally kicks off cold and flu season, so why not continue to pass out Halloween treats in a socially-distanced fashion?

That is, of course the idea behind [Gord Payne]’s Halloween Treat Trough of Terror. Lay a treat at the top of the trough and it will activate the LED strips that follow the treat down to the end, as well as some spooky sounds. The treat in question is detected by an SR-04 ultrasonic distance sensor connected to an Arduino Nano.

All in all this was a highly successful build as far as neighborhood entertainment value goes. Toddlers stared in awe at the blinkenlights, teenagers proclaimed it ‘sick’, and we can only assume that the adults were likely happy to see something aimed at kids that’s not scary.

[Gord] has a nice how-to if you want to build your own, and of course, the Arduino sketch is available. Be sure to check it out in action after the break.

Don’t have room to build a treat slide? Here’s a socially-distanced dispenser that lets them stomp a giant button.

 

Ultrasonic Sensor Helps You Enforce Social Distancing

If you’re going outside (only for essential grocery runs, we hope) and you’re having trouble measuring the whole six feet apart from other people deal by eye, then [Guido Bonelli] has a solution for you. With a standard old HC-SR04 ultrasonic sensor, an audio module and a servo to drive a custom gauge needle he’s made a device which can warn people around you if they’re too close for comfort.

As simple as this project may sound like for anyone who has a bunch of these little Arduino-compatible modules lying around and has probably made something similar to this in their spare time, there’s one key component that gives it an extra bit of polish. [Guido] found out how intermittent the reliability of the ultrasonic sensor was and came up with a clever way to smooth out its output in order to get more accurate readings from it, using a bubble sort algorithm with a twist. Thirteen data points are collected from the sensor, then they are sorted in order to find a temporal middle point, and the three data points at the center of that sort get averaged into the final output. Maybe not necessarily something with scientific accuracy, but exactly the kind of workaround we expect around these parts!

Projects like these to help us enforce measures to slow the spread of the virus are probably a good bet to keep ourselves busy tinkering in our labs, like these sunglasses which help you remember not to touch your face. Make sure to check out this one in action after the break!

Minimalist Mate Maker Keeps You Caffeinated

Americans love their coffee. The Brits adore their tea. In South America, the number one way to get through the day is with yerba mate, a tea made from the yerba plant. It is typically shared in a social setting, with one person preparing the beverage for everyone to enjoy. Although caffeine certainly deserves a ceremony, it never needs one. Hit the streets and you’ll see people everywhere with a thermos under one arm, keeping water hot and ready to refill the cup of mate in their hand.

The Stanley vacuum thermos is quite a popular choice for drinkers on the go, but the Argentinian government recently placed new restrictions foreign imports. [Roni Bandini] decided to build a minimum viable mate machine so he always has perfectly hot water on tap.

An Arduino Nano heats the water and displays the rising temperature on an LCD screen. When the temperature is just right, the display asks for your cup. An ultrasonic sensor detects the cup and dispenses a certain amount of water determined in the sketch. Yerba leaves can be used a few times before losing their flavor, so the machine keeps track and lets him know when it’s time to replace them. You can sip on a brief demo after the break.

Let’s say you don’t have perfectly-prepared mate, and it always comes out too hot. That’s better than too cold, but still not ideal. Why not make a temperature-sensing coaster that alerts you when it has cooled to perfection?

HC-SR04 Isn’t the Same as Parallax PING))) But It Can Pretend to Be!

“It’s only software!” A sentence that strikes terror in the heart of an embedded systems software developer. That sentence is often uttered when the software person finds a bug in the hardware and others assume it’s going to be easier for fix in software rather than spin a new hardware revision. No wonder software is always late.

[Clint Stevenson] is his own hardware and software guy, as are most of us. He wanted to use the less expensive HC-SR04 ultrasonic rangefinder in a prototype. Longer term he wanted to have the choice of either a Parallax PING or MaxBotix ultrasonic sensor for their better performance outdoors. His hardware hack of the SR04 made this a software problem which he also managed to solve!

[Clint] was working with the Arduino library, based on the Parallax PING, which uses a single pin for trigger and echo. The HC-SR04 uses separate pins. Originally he modified the Arduino library to accept the two pin approach. But with his long term goal in mind, he also modified the HC-SR04 sensor by removing the on-board pull-up resistor and adding a new one on the connector side to combine the signals. That gave him an SR04 that worked with the single-pin based library.

We’ve seen Parallax PING projects for sensing water depth and to generate music. These could be hacked to use the HC-SR04 using [Clint’s] techniques.

[Arduino and HC-SR04 photo from http://www.blaxlab.com/%5D


Filed under: Arduino Hacks, Holiday Hacks, software hacks