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]