Building an ultrasonic rangefinder from scratch?

'lo all,

I'm embarking on my first Arduino project; a number of light sources controlled by a number of rangefinders. I've built a relay switching part to control the lights, but the rangefinding part is causing me trouble.

I don't really want to shell out for a bunch of the Ping sensors, 'cos they're quite pricey, and it seems to me that you should be able to the difficult bit in software. Plus, I found a bunch of transducers on ebay for cheaps, and I reckon I'll learn more doing it this way: I've got a knowledge of the basics in electronics, but semiconductors and loads of resistors and stuff start to confuse me :wink:

Looking around the internet, I found this diagram for building such a thing with a different breed of PIC:

My questions then: could I build something like this with my Arduino instead of whatever PIC they've used? What, if anything, will I need to alter? Will I need to add any amplification to the receiver? If so, can I do that with transistors?

Any help gratefully recieved :wink:

Yes, pretty easily
But, I'm a little confused, are you planning on using those exact components in that link? Or are you trying to build a circuit around the ones you already have? If so, post what u want to use.

Based on the schematic in the link, it looks like the main req for the MC are:

  • PWM ability
  • 1 ADC with 10bit (4mv) resolution
  • 5v supply

I'm only familiar with the arduino diecimila, but it well exceeds the requirements.
It looks like the only thing that needs to be modified is the code, which is pretty basic..most of the code he posted was LCD code.

Seems to me like the circuit will work as designed. Build one and test it out with the code for the Arduino.