Using A 555 Timer And ADC As A Random Seed

Most toolchains for embedded system include support for random number generation. But if you’ve read the manual you’ll know that this is really just pseudo random number generation (PRNG). When calling this function the same numbers will always return in the same order unless a different random number seed is supplied in advance. [Gardner] put together a simple and cheap solution for deriving better random number seeds. He reads a voltage from a 555 timer using the ADC on the microcontroller. At first glance it may not seem like a great source of randomness, but he performed some testing and the results look quite promising.

The project is aimed at Arduino-based circuits, but any chip with an ADC will work. The 555 timer is used as a free running oscillator. We know that this not be very stable when compared to even the worst of crystal oscillators, but that’s what makes it work so well as a random seed source. Add to this the low parts count and small size of the additional circuitry and you’ve got a winning combination. So keep this in mind when you need a random number but don’t necessarily need rock solid entropy.

[via Reddit and Freetronics]

Fantastic Programming Makes This Arduino Gaming Device Something Special

The hardware that went into this Arduino gaming console is just fine. But the coding that produced this game called Twisted SNAKE is beyond compare. [Rodot] has programmed several games for the hardware, which uses an Arduino, 160×168 TFT screen, a 3 axis accelerometer, and two input buttons. If you’re interested, there is a forum thread in which he talks a bit more about the hardware design. But you’re not going to want to pass up either of the two videos embedded after the break.

The first clip shows off a bouncing-ball platforming game. The accelerometer moves the ball back and forth, and the top scrolling level brings more ledges into play. This in itself is a great game. But the Twisted SNAKE game shown off in the second video makes our own ARM-based Snake game look like a 3-year-old programmed it. [Rodot] filled up all of the program memory of the ATmega328 chip to  make this happen. There’s a menu system which allows for color themes and difficulty selection. The game play itself lets the snake travel anywhere it wishes with the tail following behind in graceful curves. Wow!

Continue reading “Fantastic Programming Makes This Arduino Gaming Device Something Special”

Janus: The Gatekeeper

janus-001

[Piet] wrote in to tell us about his hack that allows for his front gate to be opened without a key. Unlike this hack that we featured in August, you don’t need a subway pass, just a good memory. As explained in his article (and the video after the break) if the proper sequence of doorbell rings is input, the gate unlocks itself.

For hardware a [mehduino] is used to take the doorbell input and decide whether or not the “secret knock” has been achieved. The door can be unlocked remotely via a button on the processor. Reprogramming the code is achieved by simply holding the program button while the code is entered on the “remote ringer” button.

Be sure to check out the video after the break to see this lock in action. The housing application may not be exactly what you expect. Also of interest, is that in true hacker fashion, the bare processor is hanging by a hook on his wall! Continue reading “Janus: The Gatekeeper”

Zelda Engagement Ring Box Seals The Deal

Congratulations to [John Scancella] and his wife to be. Their recent engagement was aided by one of [John’s] projects. Since [Betsy] is a big fan of Zelda, he thought it would be fun to present the ring with the Zelda music playing in the background. He and a friend combined forces to build what you seen in this image.

The music is played by an Arduino with the help of a wave shield. This is pretty much a one-use item so battery life was never a concern. A magnetic switch was used to detect when the box was opened and start the music playing.

You can see the full-sized images after the break, but we can tell that [John] went with a traditional engagement ring. We’re still waiting to see if 3D printed rings are going to catch on in the geek scene. If you just can’t give her anything but precious metal there’s always the idea of encoding messages on the band itself.

Continue reading “Zelda Engagement Ring Box Seals The Deal”

Crystal Doorbell Helps Class Up The Joint

Even if you live in a dump this quick build will make your doorbell sound high-class. The new rig uses a crystal goblet to alert you of guests at the door. We suppose the room-silencing sound of flatware on a wine glass does make a great attention getter.

For [Tobias] the hardest part of the build was getting his wife to sign off on it. But he says the 1970’s era original was looking pretty shabby, which kind of made his argument for him. It took just two hours to develop and install the replacement. It uses a servo motor with an articulated striker to ping the glass which is hanging inverted between two pegs. The original AC transformer (which are most often 16V) was used to power the Arduino. He built a simple rectifier along with a big smoothing capacitor to make sure the Arduino doesn’t reset when voltage dips. Although it’s not mentioned in his comments, we’d bet the doorbell wire has been rerouted to connect directly to the Arduino, rather than remain patched into the power loop.

Don’t miss the clip after the break to hear how great this thing really does sound.

Continue reading “Crystal Doorbell Helps Class Up The Joint”

Personal Energy Orb Prevents Your Life From Being Swallowed By The Internets

We love the Internet, but we are definitely guilty of losing track of the time we spend traipsing around our virtual haunts. This project will not only remind you to get out and exercise, it will cripple your digital experience if you don’t heed its colorful warning.

[Janko Hofmann] calls it the Personal Energy Orb. It’s really just an Arduino and an RGB LED. But as with most creations, the idea is what makes it great. The orb has a dock next to your computer. It tracks how much time you spend online, changing colors as you rack up the hours. If you don’t heed the warning signs of overuse it will even start to slow down your mouse cursor. But never fear. Full functionality can be restored by topping off your personal energy. As you can see above, there’s also a docking station on [Janko’s] bicycle. The orb monitors your mileage, moving out of the red zone so that your computer will be unencumbered the next time you sit down for a long session of flash games. Don’t miss his video presentation embedded after the break.

Continue reading “Personal Energy Orb Prevents Your Life From Being Swallowed By The Internets”

Tutorial Explains The Concepts Behind An IMU

[Anilm3] wrote in to share the IMU tutorial series he is working on. An Inertial Measurement Unit is most often found in self-balancing robots and quadcopters, providing enough high-speed sensor data to keep up with the effects of gravity.  He previously used some all-in-one IMU devices in school which did most of the work for him. But he wanted to grind down and look at what each sensor spits out and how those measurements are used. The first installment deals with the accelerometer, using its data to calculate pitch and roll. For these demonstrations [Anilm3] is using this ADXL345 sensor board, an Arduino, and some processing sketches for testing.

Whenever working with sensors you need to take noise into consideration. The post shows how to implement a low-pass filter in the code which will help smooth out the readings. The filtered data is then fed to a couple of mostly-painless formulas which calculate the movement of the accelerometer in degrees. The demonstration sketch is mapped to a 3D cube to give you an idea of how accurate the accelerometer is. There’s a little bit of lag which would let a self-balancing robot have a nasty fall. The solution to this issue will be discussed in upcoming parts of the series. The next installment tackles the gyroscope sensor.