Posts | Comments

Planet Arduino

Archive for the ‘noise’ Category

Your job is to create a random number generator.

Your device starts with a speaker and a membrane. On this membrane will sit a handful of small, marble-size copper balls. An audio source feeds the speaker and causes the balls to bounce to and fro. If a ball bounces high enough, it will gain the opportunity to travel down one of seven copper tubes. Optical sensors in each of the tubes detect the ball and feed data to an Ardunio Mega. When the ball reaches the end of the tube, a robotic hand will take the ball and put it back on the speaker membrane. The magic happens when we write an algorithm such that the audio output for the speaker is a function of how many balls fall down the pipes.

The above is a rough description of [::vtol::]’s art piece: kinetic random number generator. We’re pretty sure that there are easier ways to get some non-determinstic bits, but there may be none more fun to watch.

[::vtol::] is a frequent flyer here on Hackaday Airlines. Where else would you showcase your 8-bit Game Boy Photo Gun or your brainwave-activated ferrofluid monster bath? Would it shock you to find out that we’ve even covered another kinetic random number generator of his?  Fun stuff!


Filed under: Arduino Hacks

DIY Optoisolator

Sometimes the best way to learn about a technology is to just build something yourself. That’s what [Dan] did with his DIY optoisolator. The purpose of an optoisolator is to allow two electrical systems to communicate with each other without being electrically connected. Many times this is done to prevent noise from one circuit from bleeding over into another.

[Dan] built his incredibly simple optoisolator using just a toilet paper tube, some aluminum foil, an LED, and a photo cell. The electrical components are mounted inside of the tube and the ends of the tube are sealed with foil. That’s all there is to it. To test the circuit, he configured an Arduino to send PWM signals to the LED inside the tube at various pulse widths. He then measured the resistance on the other side and graphed the resulting data. The result is a curve that shows the LED affects the sensor pretty drastically at first, but then gets less and less effective as the frequency of the signal increases.

[Dan] then had some more fun with his project by testing it on a simple temperature controller circuit. An Arduino reads a temperature sensor and if the temperature rises above a certain value, it turns on a fan to cool the sensor off again. [Dan] first graphed the sensor data with no fan hooked up. He only used ambient air to cool things down. The resulting graph is a pretty smooth curve. Next he hooked the fan up and tried again. This time the graph went all kinds of crazy. Every time the fan turned on, it created a bunch of electrical noise that prevented the Arduino from getting an accurate analog reading of the temperature sensor.

The third test was to remove the motor circuit and move it to its own bread board. The only thing connecting the Arduino circuit to the fan was a wire for the PWM signal and also a common ground. This smoothed out the graph but it was still a bit… lumpy. The final test was to isolate the fan circuit from the temperature sensor and see if it helped the situation. [Dan] hooked up his optoisolator and tried again. This time the graph was nice and smooth, just like the original graph.

While this technology is certainly not new or exciting, it’s always great to see someone learning by doing. What’s more is [Dan] has made all of his schematics and code readily available so others can try the same experiment and learn it for themselves.


Filed under: Arduino Hacks


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook