Posts with «arduino hacks» label

Do You Have Any Idea How Fast Your Blender Was Going?

Some people really love their smoothies. We mean really, really, love smoothies and everything about making them, especially the blenders. [Adam] is a big fan of blenders, and wanted to verify that his Vitamix blenders ran as fast as the manufacturer claimed. So he built not one, but two speed measuring setups. Scientific blender measurement method requires one to cross check their results to be sure, right?

Measuring the speed of a blender is all about the RPM. Appropriately, [Adam's] first measurement tool was an LED based stroboscope. Stroboscopes have been around for hundreds of years, and are a great way to measure how fast an object is rotating. Just adjust the speed of a flashing light until the rotating object appears frozen. The number of blinks per second is then equal to the Rotations Per Second (RPS) of the object being measured.Multiply by 60 seconds, and you’ve got RPM. [Adam] used an Arduino as the brains behind his stroboscope. He wired a dial up on his breadboard, and used it to adjust the flash rate of an LED. Since this was a quick hack, [Adam] skipped the display and just used the Arduino’s USB output to display speed measurements on his laptop.

There are possibilities for error with stroboscopes. [Adam] discovered that if the stroboscope was flashing at a multiple of the blade’s rotation speed, the blades would appear frozen, and he’d get an erroneous RPM value. Thankfully, [Adam's] Vitamix had asymmetric blades, which made the test a bit easier. He calculated his blades to be spinning at 380 RPS, or 23,000 RPM. Not satisfied with his results, [Adam] brought out Audacity, and ran a spectral analysis of the blender in operation. He found a peak at 378Hz, which was pretty darn close to his previous measurement. Since the blender has a 4 inch blade this all works out to a blade tip speed right around the claimed value of 270 MPH. We’re glad [Adam] found an answer to his blender questions, but our personal favorite blender hack still has to be the V8 blender created by the Top Gear crew.   [via HackerNews]


Filed under: Arduino Hacks, home hacks

640×480 VGA On An Arduino

There are dozens, if not hundreds of examples around the Intertubes of an Arduino generating a VGA video output. The Arduino isn’t the fastest chip by far, and so far, all of these VGA generation techniques have peaked out at lower resolutions if you want to control individual pixels.[PK] has an interesting technique to generate 640×480 VGA at 60 frames per second without overclocking. It’s hacky, it’s ugly, but surprisingly, it actually works.

The VGA standard of 640×480 @ 60 fps requires pixels to be clocked out at 25.175 MHz, and the ATMega chips found in Arduinos top out at 20 MHz. [PK] wanted to generate VGA signals without overclocking, He did this by doubling the clock frequency with digital logic. The ATMega generates a clock, an inverter delays that clock so it is 90 degrees out of phase, and the two clocks are XORed, doubling clock output of the micro. It produces a very ugly square wave at 32 MHz – an error of 27% compared to the VGA spec. Somehow it still works.

With a hilariously out of spec clock, the rest of the project was pulled together from [Nick Gammon]‘s VGA library, a 16×16 font set, and a project from [lft]. Video below.


Filed under: Arduino Hacks

Beating Simon

Virtually everyone has played Simon, that electronic memory game from the 70s, but who among us has actually beaten it? That was the goal of [Ben] and his 7-year-old daughter, and after a year of work, an Arduino, some servos, and a few Lego bricks, they’ve finally done it.

Instead of the large original Simon, [Ben] is using a key chain version of the game: much smaller, and much easier to build a device to sense the lights and push the buttons. The arms are made from Lego bricks, held up with rubber bands and actuated with two servos mounted on a polycarbonate cutting board.

To detect Simon’s lights, [Ben] connected four phototransistors to an Arduino. The Arduino records the pattern of lights on the Simon, and activates the Lego arms in response to that pattern. [Ben]‘s version of Simon has only a maximum of 32 steps in the final sequence, but that still means each game takes 528 button presses – and a lot of annoying beeps – to complete.

Videos below.


Filed under: Arduino Hacks
Hack a Day 09 Jun 12:00

A Tweeting Litter Box

How can you not be interested in a project that uses load cells, Bluetooth, a Raspberry Pi, and Twitter. Even for those of our readers without a cat, [Scott's] tweeting litter box is worth the read.

Each aspect of this project can be re-purposed for almost any application. The inexpensive load cells, which available from eBay and other retailers, is used to sense when a cat is inside the litter box. Typically sensors like the load cell (that contain a strain gauge) this use a Wheatstone bridge, which is very important for maximizing the sensitivity of resistive sensor. The output then goes to a HX711, which is an ADC specifically built for load cells. A simple alternative would be using an instrumentation amplifier and the built-in ADC of the Arduino. Now, the magic happens. The weight reading is transmitted via an HC-06 Bluetooth module to a Raspberry Pi. Using a simple Perl script, the excreted weight, duration, and the cat’s resulting body weight is then tweeted!

Very nice work! This is a well thought out project that we could see being expanded to recognize the difference between multiple cats (or any other animal that goes inside).


Filed under: Arduino Hacks, Raspberry Pi, wireless hacks

Bare Bones Arduino IR Receiver

Old infrared remote controls can be a great way to interface with your projects. One of [AnalysIR's] latest blog posts goes over the simplest way to create an Arduino based IR receiver, making it easier than ever to put that old remote to good use.

Due to the popularity of their first IR receiver post, the silver bullet IR receiver, [AnalysIR] decided to write a quick post about using IR on the Arduino. The part list consists of one Arduino, two resistors, and one IR emitter. That’s right, an emitter. When an LED (IR or otherwise) is reverse biased it can act as a light sensor. The main difference when using this method is that the IR signal is not inverted as it would normally be when using a more common modulated IR receiver module. All of the Arduino code you need to get up and running is also provided. The main limitation when using this configuration, is that the remote control needs to be very close to the IR emitter in order for it to receive the signal.

What will you control with your old TV remote? It would be interesting to see this circuit hooked up so that a single IR emitter can act both as a transmitter and a receiver. Go ahead and give it a try, then let us know how it went!


Filed under: Arduino Hacks

Art-O-Matic Is Spirograph’s Young Hip Offspring

Some of our more senior experienced readers may remember a toy called the Spirograph. In case you don’t, it’s a geometric shape drawing toy. The way it works is a plastic disc with gear teeth around the perimeter and various holes on its face is spun around a plastic ring with gear teeth on the inside. A pencil is inserted in one of the holes in the disc and, when spun around the inside of the ring, draws different complex shapes called hypotrochoids.

This was fun enough to keep a kid entertained for a few minutes. It took a while to make a complete shape and sometimes it was easy to mess up (especially if the hole chosen for the pencil was near the outside of the disc). [Darcy] thought it would be neat to combine the Spirograph’s drawing style with modern technology. The result is called the Art-O-Matic and it draws some pretty wild art, you guessed it, automatically.

Click past the break for more!

[Darcy] started the project by drawing all the gears and linkages in Sketchup. A CNC Router was used to cut out the parts, after that just a few bolts and nuts got the mechanics together. In the video below there are 2 geared discs that move the linkage arms. Both arms move independently, one quickly and the other slowly. Each disc is controlled by its own stepper motor. The speed of each stepper motor is controlled by an Arduino. Different patterns are drawn depending on the speeds of the two motors. Switching pen colors along the way adds to the coolness.

 


Filed under: Arduino Hacks

The Lightgame Project: A Multiplayer Arduino Game

Summer is upon us. The Lightgame Project is a multiplayer reaction time based game built around the Arduino. It’s a perfect rainy day project for those restless kids (and adults!). Designed by two undergraduate students [Efstathios] and [Thodoris] for a semester long project, all the hard work has already been done for you.

There are tons of reasons we love games that you can build yourself. For one, it’s an amazing way to get children interested in hobby electronics, making, and hacking. Especially when they can play the game with (and show off to) their friends. Another reason is that it is a perfect way to share your project with friends and family, showcasing what you have been learning. The game is based on your reaction time and whether or not you press your button when another players color is shown. The project is built around two Arduinos connected via I2C. The master handles the mechanics of the game, while the slave handles the TFT LCD and playing music through a buzzer.

I2C is a great communication protocol to be familiar with and this is a great project to give it a try. [Efstathios] and [Thodoris] did a great job writing up their post, plus they included all the code and schematics needed to build your own. It would be great to see more university professors foster open source hardware and software with their students. A special thanks goes out to [Dr. Dasygenis] for submitting his student’s work to us!


Filed under: Arduino Hacks
Hack a Day 29 May 03:00

Using State Machines In Your Projects

 

[Tony] has developed a method of using a state machine to validate keypad inputs. His method checks the commands character by character as they are entered in by a 16 button keypad. State machines are often used to break down complex problems into sequential tasks, making code development easier. While [Tony's] example uses the keypad, Arduino Uno, and a character LCD, the theory can be applied to numerous projects, such as this Dahlander motor switch.

As you see, state machines can be very versatile. Stick around after the break as we take a look at [Tony's] state machine and provide a brief explanation of how it all works. 

The goal is to ensure a command is entered in to a system correctly – in this case it is being validated character by character with each key press. A state machine is used to achieve this goal. The command is:

 

XX@HH:MM#
Where:
XX = 1-99
HH = 0-24
MM = 00-59
# = Execute

 

Each value is considered a state. When the value is entered, it moves to the next state. So:

 

 

Be sure to check out [Tony's] project for more details and learn how he implements the above state machine in code.

 


Filed under: Arduino Hacks
Hack a Day 27 May 21:00

Arduino Garage Door Opener is Security Minded

Do it yourself garage door openers must be all the rage nowadays. We just got word of another take on this popular idea. [Giles] was commissioned by his friend to find a way to control the friend’s garage door using a smart phone. The request was understandable, considering the costly garage door remote and the fact that the buttons on the expensive remote tended to fail after a while. The inspiration for this project came from some YouTube videos of other similar projects. Those projects all paired an Arduino with a Bluetooth headset in order to control the door from a mobile phone. [Giles] understood that while this would get the job done, it wouldn’t be very secure. Bluetooth headsets typically connect to mobile phones using a four digit PIN. Many of them have known default PINs and even if the default is changed, it wouldn’t take very long to guess a four digit PIN. [Giles] knew he had to find a more secure way.

While WiFi was an option, [Giles] decided that having the garage door hooked up to the internet would likely be a security risk, even if it did offer some potential interesting use cases.  He therefore opted to stick with Bluetooth, but decided to use the Seedstudio Bluetooth shield instead of a basic headset. The electronics are relatively simple. [Giles] simply plugged the Bluetooth shield into an Arduino Uno. [Giles] did have one problem with the Bluetooth shield though. The Bluetooth module did not accept many standard AT commands. He needed a way to force a disconnect of a mobile device if it failed authentication. After digging around, he discovered that the module had some extra exposed pads that he could likely use to accomplish that goal. The only problem was that they were expecting a 3.3V signal, and the Arduino works at 5V. The solution was simple. He setup a basic voltage divider using two resistors. This lowered the 5V signal from the Arduino to the required 3.3V. This provides the communication functionality to the mobile phone. He then realized that he could use a simple 12V automotive relay to control the garage door. To control the relay, he used the Freetronics relay control shield. The end result is a relatively simple stack of shields hooked up to a relay.

For the smart phone interface, [Giles] started out by trying to write a native Android application. Having little experience in Android development, he soon realized that it was going to take him longer than anticipated to get anything usable this way. He then decided to use SL4A. SL4A provides a scripting environment for Android and supports several different scripting languages. [Giles] was then able to write a Python script that can be executed on the smart phone. Many people would be tempted to write a really simple script that would just open the door and connect without any real thought about security. After all, this is a one-off obscure garage door opener. Security through obscurity! [Giles] is smarter than that.

He instead implemented a challenge handshake authentication mechanism between the Python script and the Arduino. This would ensure that users are authenticated before permitting commands to be executed, and also help prevent replay attacks. The process works like this. First the smart phone connects to the Arduino. The Arduino then generates a pseudo-random string and calculates the expected response, based on a pre-shared key. The phone then receives the string and sends back the appropriate response. If it doesn’t match, the Arduino disconnects the phone. If it does match, the phone then sends back a request for a different pseudo-random command challenge string. Once the phone receives this new string, it is able to use that string in conjunction with a second pre-shared key to generate a one-time use command. Assuming it was calculated correctly, the Arduino will then run the command to open or close the door. If it doesn’t match the phone gets disconnected. All of this is to help prevent replay attacks. Any attacker watching the airwaves would not be able to simply record the signals or commands and play them back. This is because every time the authentication and commands are transmitted, they must be different based on the pseudo-random seed.

While everything seems to work mostly fine, the Arduino tends to crash after about six door cycles. [Giles] believes this may be caused by the MD5 library he is using but has so far been unsuccessful in trying to fix this bug. He also thinks his Python script is messy and somewhat unstable. He’s decided to publish his programs to the internet in hopes that someone else may have the time and drive to figure out what’s going on.


Filed under: Arduino Hacks

This Sassy Art Installation is Like The Stanley Parable for the Telephone

Imagine this. A phone on a nearby desk starts ringing. No one is around to pick it up, so you decide that you will be a good Samaritan and answer the phone. You are greeted by a slightly creepy robotic female voice asking you to complete a simple survey. Having nothing else to do, you go ahead and run through the telephone survey. As you start answering the questions, things start to get a bit… weird. The robot voice doesn’t like your answers. She actually disagrees with you, and she does NOT like being interrupted. Now she’s getting sassy with you! What is going on here?

Most likely you are the latest victim of Insert Customer Feedback Here, [Charles'] art installation. You see, that is no ordinary telephone. [Charles] actually removed the guts of an old telephone and replaced them with an Arduino. The Arduino periodically rings the phone, waiting for someone to answer. Once the phone is off the hook, the Arduino uses a Wave shield to start playing back the scripted audio files. All of the text-to-speech files and the various hold music files are played back with the wave shield. The Arduino is also hooked up to the 1, 2, 3, and # keys of the telephone keypad in order to read back the user’s responses.

From here on out the program acts as a sort of “choose your own adventure” game. The program takes different paths and responds in different ways depending on how the user answers the questions. Generally speaking, it will get more “irritated” towards the user if it doesn’t “like” your answers, otherwise it will get less irritated. The hold music will even change to become more or less aggressive.

It’s easy to draw comparisons to Portal’s GLaDOS due to the robotic female voice and to the narrator from The Stanley Parable for the “choose your own adventure” feeling. In fact, if GLaDOS and The Stanley Parable had offspring, this would surely be it. This project brings that same type of silly sarcastic humor to a different medium and it does it well. Be sure to watch the video of the system in action below. It really starts to get interesting around the 1:15 mark.


Filed under: Arduino Hacks