Posts with «accelerometer» label

LED Hourglass Moves Like the Real Thing

If you want to waste time in a meaningful way, get yourself an hourglass. It’s simultaneously mesmerizing and terrifying to sit there and watch the seconds slip through the threshold that separates possibility from missed opportunity.

[Ty and Gig]’s LED hourglass is equally beautiful to watch. It doesn’t actually tell time, but that’s perfectly fine by us. What it does do is animate the LEDs to approximate grains of sand in gravity, no matter how the hourglass is tilted.

In either vertical orientation, the sand falls as long as there is some in the top. When the hourglass is horizontal, the LEDs settle just like real sand does. [Ty and Gig] achieved this with a whole lot of code that breaks the animation frames into structure arrays.

By contrast, the hardware part of this build is fairly simple: all that’s needed to replicate this build is some RGB LEDs a beefy power supply to drive them, an accelerometer, and a microcontroller.

[Ty and Gig] were planning to use an ESP8266, but misplaced it and went with an Arduino Mega instead. (You know what they say — buy a replacement and the one you lost will turn up almost immediately.) The beautiful frame is made from leftover purpleheart, a hardwood that turns purple with exposure to air. Check out the build video after the break.

Too lazy to reset your hourglass every hour? Here’s one that flips itself.

Dad Scores Big with DIY Indoor Hockey Game

We suppose it’s a bit early to call it just yet, but we definitely have a solid contender for Father of the Year. [DIY_Maxwell] made a light-up hockey game for his young son that looks like fun for all ages. Whenever the puck is hit with the accompanying DIY hockey stick (or anything else), it lights up and produces different sounds based on its acceleration.

Inside the printed puck is an Arduino Nano running an MPU6050 accelerometer, a 12-NeoPixel ring, and a piezo buzzer. [DIY_Maxell] reused a power bank charging circuit to charge up the small LiPo battery.

The original circuit used a pair of coin cells, but the Arduino was randomly freezing up, probably because of the LEDs’ current draw. Be sure to check out the video after the break, which begins with a little stop motion and features a solder stand in the shape of a 3D printer.

Got a house full of carpet or breakables? You could always build an air hockey table instead.

Arduband Gives Your Eyes a Hand

Let’s face it, we probably all sit at our computers for way too long without getting up. Yes, there’s work to be done, games to be played, and the internet abounds with people who are wrong and must be down-voted and/or corrected. We totally get and respect all that. However, if you want to maintain your middle- and long-range vision, you should really get up regularly and gaze out the window for a bit.

In fact, the Arduband does you one better. Its Arduino Nano and accelerometer check your position every ten minutes. If you haven’t changed your Z by the third check, then it’s time for a break. The combination of an RGB LED, buzzer, and vibrating disc motor working together should be enough to pull you out of any computerized stupor, and they won’t give up and go back to sleep until you have stood up and remained upright for one minute.

We like that [ardutronics123] spun up a board and made it small enough to be wrist-mounted using a watch strap. It would work just as well worn around your neck, and would probably even fit in your pocket. Blink a few times before you check out the build video after the break.

Arduband would be great on the go, but who does that anymore? If you spend every day at the same desk, you could point a time-of-flight sensor at your chair and start a timer.

Offline Dinosaur-Jumping Becomes a Real Workout

It’s great to see people are out there trying to find fun ways to exercise amid the current crisis. Although jumping up and down isn’t great for the knees, it does give decent cardio. But if you don’t have a rope or a puddle, we admit that jumping can lose its bounce pretty fast.

Quarantine has been a game-filled time for [fridaay]. Somewhere between a handful of FPS games, he decided to try to play Google’s offline dinosaur-based side scroller game by making the dinosaur spring over the saguaros whenever he physically jumps in the air. (Video, embedded below.)

Here’s how it works: [fridaay] holds a transmit circuit that consists of an Arduino UNO, an accelerometer module, and an nRF24L01 transceiver, all running on a 9 V battery. Whenever [fridaay] jumps, the accelerometer reads the change in Z and sends it to the receiving circuit, which is just another UNO and nRF. The receiving UNO is connected to a laptop and configured to press the space bar so the dinosaur canters over the cacti.

We’ve never been able to stay alive long enough in the game to see this happen, but apparently you need to crouch at some point in the game. [fridaay] has yet to implement a control for that, but we’re sure he’ll think of something. Jump past the break to see the video, and hit him up if you need the code.

If you have a lot of parts at your disposal, why not make a physical version?

Via r/duino

Active Suspension R/C Car Really Rocks

When you’re a kid, remote control cars are totally awesome. Even if you can’t go anywhere by yourself, it’s much easier to imagine a nice getaway from the daily grind of elementary school if you have some wheels. And yeah, R/C cars are still awesome once you’re an adult, but actual car-driving experience will probably make you yearn for more realism.

What could be more realistic and fun than an active suspension? Plenty of adults will never get the chance to hit the switches in real car, but after a year of hard work, [snoopybg] is ready to go front and back, side to side, and even drift in this super scale ’63 Oldsmobile Dynamic 88 wagon. We think you’ll agree that [snoopybg] didn’t miss a detail — this thing makes engine noises, and there are LEDs in the dual exhaust pipes to simulate flames.

An Arduino reads data from a triple-axis accelerometer in real time, and adjusts a servo on each wheel accordingly, also in real time, to mimic a real car throwing its weight around on a real suspension system. If that weren’t cool enough, most of the car is printed, including the tires. [snoopybg] started with a drift car chassis, but even that has been hacked and drilled out as needed.

There are a ton of nice pictures on [snoopybg]’s site if you want to see what’s under the hood. We don’t see the code anywhere, but [snoopybg] seems quite open to publishing more details if there is interest out there. Strap yourself in and hold on tight, because we’re gonna take this baby for a spin after the break.

If this is all seems a bit much for you, but you’ve got that R/C itch again, there’s a lot to be said for upgrading the electronics in a stock R/C car.

Via r/duino

Arduino Pedometer Counts Your Steps

There’s a trend in corporate America that has employees wear a step counter — technically a pedometer — and compete in teams to see who can get the most number of steps. We wonder how many people attach the device to an electric drill and win the competition easily. However if you want to do your own measurements, [Ashish Choudhary] has plans for making a pedometer with an Arduino. The device isn’t tiny, but as you can see in the video below it seems to work.

For the extra size, you do get some features. For one, there is a 16×2 LCD display and an ADXL335 accelerometer, and you can probably imagine some other cool features for such a device.

The Arduino computes the magnitude of the acceleration, and if it exceeds a certain threshold it adds a step to the step count. Honestly, this is a fun project but it cries out for a more compact form factor. An ESP8266 for example could ditch the display and connect via WiFi to your phone. Then again, your phone can probably do the same job, as could not to mention many smartwatches. But those don’t have nearly as much geek cred as this project.

This is a little large for a hamster. On the other hand, there’s plenty you can do with the accelerometer after you’ve had enough fun counting steps.

Cheating At Bowling, The Hacker Way

Anyone who has ever gone to a bowling alley will know the preferred (but ineffective) technique to telepathically control a bowling ball. [Mark Rober] and [James Bruton] decided to change that and hacked a bowling ball that can be steered remotely (and discreetly), simply by leaning your body.

They started with a standard bowling ball, that was cut in half and hollowed out on a lathe. A beam sits on the centre line of the ball, mounted on a bearing in each half to allow the ball to spin around it. Steering done by shifting the centre of mass, by moving a steel pendulum that hangs below the beam side to side with heavy-duty servo. The servo is controlled with an Arduino, and an IMU to detects the balls orientation. Power is provided by and RC Lipo battery. The wireless controller is a sneaky little device that is taped to [Mark]’s back and covered with clothing, and steers the ball by detecting how far he leans with an IMU module. The brain is an Arduino Mini and an NRF24L01 provides the RF link.

While it’s not an easy build, it’s a fairly simple system electronically, with off the shelf electronics modules and perfboard. The genius is in the implementation and its entertainment value. The look on the kids faces when [Mark] “telepathically” controls the ball, after showing off the fact that he has zero natural ability, is absolutely priceless. [Mark Rober], a former NASA engineer, has made a name for himself with viral Youtube videos on cool projects like a glitter booby trap for package thieves and a liquid sand hot tub. [James Bruton], a former toy designer is known for his robotics prowess that he has put on display with OpenDog and functional Star Wars robots.

For us this hack is a perfect example of one that entertains and inspires, a powerful combination for young and old alike. Check out the awesome video after the break.

Hack a Day 24 Nov 15:00

Arduino, Accelerometer, and TensorFlow Make You a Real-World Street Fighter

A question: if you’re controlling the classic video game Street Fighter with gestures, aren’t you just, you know, street fighting?

That’s a question [Charlie Gerard] is going to have to tackle should her AI gesture-recognition controller experiments take off. [Charlie] put together the game controller to learn more about the dark arts of machine learning in a fun and engaging way.

The controller consists of a battery-powered Arduino MKR1000 with WiFi and an MPU6050 accelerometer. Held in the hand, the controller streams accelerometer data to an external PC, capturing the characteristics of the motion. [Charlie] trained three different moves – a punch, an uppercut, and the dreaded Hadouken – and captured hundreds of examples of each. The raw data was massaged, converted to Tensors, and used to train a model for the three moves. Initial tests seem to work well. [Charlie] also made an online version that captures motion from your smartphone. The demo is explained in the video below; sadly, we couldn’t get more than three Hadoukens in before crashing it.

With most machine learning project seeming to concentrate on telling cats from dogs, this is a refreshing change. We’re seeing lots of offbeat machine learning projects these days, from cryptocurrency wallet attacks to a semi-creepy workout-monitoring gym camera.

Building an Electric Scooter That’s Street Legal, Even in Germany

Sometimes a successful project isn’t only about making sure all the electrons are in the right place at the right time, or building something that won’t collapse under its own weight. A lot of projects involve a fair amount of social engineering to be counted as a success, especially those that might result in arrest and incarceration if built as originally planned. Such projects are often referred to as “the fun ones.”

For the past few months, we’ve been following [Bitluni]’s DIY electric scooter build, which had been following the usual trajectory for these things – take a stock unpowered scooter, replace the rear wheel with a 250 W hub motor, add an ESC, battery, and throttle, and away you go. Things took a very interesting turn, however, when his street testing ran afoul of German law, which limits small electric vehicles to a yawn-inducing 6 kph. Unwilling to bore himself to death thus, [Bitluni] found a workaround: vehicles that are only assisted by an electric motor have a much more reasonable speed limit of 25 kph. So he added an Arduino with a gyro and accelerometer module and wrote a program to only power the wheel after the rider has kicked the scooter along a few times – no throttle needed. The motor stops after a bit, needing another push or two to kick it back on. A brake lever kills the motor, as does laying the scooter on its side. It’s quite a clever design, and while it might not keep the Polizei at bay, you can’t say he didn’t try.

[Bitluni] has quite a range of builds, from software-defined television to bad 3D-scanners to precision wine glass whacking. You should check out his stuff.

Thanks for the tip, [Baldpower].

A New Tilt on RC Car Controllers

If you are a lover of all-things remote-conteolled, it’s likely that you know a thing or two about controllers. You’ll have one or two of the things, both the familiar two-joystick type and the pistol-grip variety. But had you ever considered that there m ight be another means to do it? [Andrei] over at ELECTRONOOBS has posted a guide to a tilt-controlled RC car. It is a good example of how simple parts can be linked together to make something novel and entertaining, and a great starter project for an aspiring hacker.

An Arduino Nano reads from an accelerometer over an I2C bus, and sends commands over a wireless link, courtesy of a pair of HC-12 wireless modules.  Another Nano mounted to the car decodes the commands, and uses a pair of H-bridges, which we’ve covered in detail, to control the motors.

The tutorial is well done, and includes details on the hardware and all the code you need to get rolling.  Check out the build and demo video after the break.

We’d love to see this idea turned up to 11 by using a more capable base vehicle, and finer controls on the steering– A Honda Civic perhaps?

[Thanks to Baldpower for the tip!]

Hack a Day 03 Oct 06:00