Arduino, LEDs that blinks to the Music!

3

Category : Arduino, Electronics

I always wanted to make something out of the microphone sensor I got, it’s just been laying in a compartment-box until recently when I got the idea of a music beat blinker.

Basically it just reads the analog value from the mic and converts it to a 0-1023 value, but since the microphone sensor I got is meant for 12 volts, it only ranges from 0 – 5-600 on 5 volts. But it works just as good, only it’s not as sensitive as it should be. When playing music that is never a problem hehe.

The microphone sensor I use is one I found on eBay some time ago, just search for “Arduino Sound Sensor Module” they cost around 5$. And are very easy to use, only ground it and feed it with 5 volts and stick the output to a analog input on the Arduino. I’ll also post the program code for the Arduino, it’s the same thats used in the video below. If you want to make something like this yourself using my example, you only need 5 LEDs or more. And just wire them to the digital pins 2-5, and of course the mic to analog 0. Code example can be found in the bottom of this article.

Here is a video showing the LEDs blinking to the music.

Program code example:

 

Ultrasonic HC-SR04 Sensor

Category : Arduino, Electronics

I’ve stumbled by this neat little sonar sensor on eBay a few days ago, I’ve had some bad experiences with other similiar ultrasonic sensors so I was kind of skeptic to this one. But for the low price I couldn’t resist. Anyhow, it turned out to be a great sensor. It’s accurate down to 1 cm, which is perfect and in most cases more than enough. You get it for around 5$ on eBay.

 

Only problem I ran into when using it with arduino was the library, got some nasty compiling errors. So I changed a few lines in the library and made it work with Arduino 1.0 and older arduino IDEs.

Download HC-SR04 Library for Arduino 1.0

Also wrote a little example for using it with a serial display:

 

My Arduino Robots

Category : Arduino, Electronics

Thought I write some about my two robot projects! They both use a Modified Pico, since it’s the smallest Arduino I’ve found. And it also fits on a small breadboard!

Botty 2:

This is the most advanced robot I’ve built, but it’s not nearly finished.

It’s current task is to drive straight forward until it senses a object with it’s IR-sensor, then drive away from it until it’s cleared, and continue in that direction. Really simple 😛

It uses a Sharp-IR sensor, mounted ontop of a servo, so it scans the horizon while driving forward. The sonar in the picture isn’t in use, since I actually like the IR sensor better.

[youtube=http://www.youtube.com/watch?v=pscYXg-Rkp0;ap=%2526fmt%3D18&w=425&h=344]

BewBit:

Simple and yet fun to make arduino bot. Just follows the strongest light source. Using two LDRs, a modified pico and 1xAA and 2xAA battery packs, to give out 4,5 volts. Just enough to power theSN754410 and motors. But it gets around. It also includes a low-voltage alarm, which beeps when the voltage goes low.

Had a little accident, it drove over a carpet, or it came about 30cm into it and some funny gear-whining noise came 😛 A lot of hair in the gearbox, had to take it apart and clean it.

Future plans:

* Crash sensor, a small micro switch in front.
* Speaker, plays sound according to light source 😛
* Better code

[youtube=http://www.youtube.com/watch?v=kRqkj8t63pA;ap=%2526fmt%3D18&w=425&h=344]