Ultrasonic range finder

Hello all!

This is my first topic and post here.
Sorry for my poor english:)

Im trying to build a car with ultrasonich range finder. I have found a schema here: (due to forum rules i will paste the link in next post)

I've just bought the parts for it but i have no idea how to operate it with arduino. I have realised to late that the program below schema is in 'pure C'. Can anyone help me and tell how can i use this sensor with my arduino (i have UNO version but i think it doesnt make any difference)?

Thanks in advance for answers.

Here's the link:

That's not "pure C", that's PIC C - you're in the wrong forum

Strip out the LCD code, use the tone library for the pulse generation and ditch the timer handling for a simpler 'micros()'-based timeout.
The ADC handling could be streamlined a little so that you don't switch the input mux every time.

Don't know how well it would work though - I don't imagine the range or resolution would be that great.
Maybe experiment with something like a MAX232 to put a bit more oomph into the tx pulse.

Hello again, thank you for the answers.
At first post I have forgot to tell you I am absolutely newbie in electronics..

@AWOL
Its correct forum because im going to translate it to- lets call it 'arduino language'

@Groove
Tone library? You mean this: http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation ?
I am not expecting very good resolution and range of it. I just want to get it work.. But now i see it can be really hard...

But now i see it can be really hard...

It is not the simplest of tasks converting one code to another when you know nether. Take time to learn arduino code, do some of the tutorials and write some stuff of your own before tackling this. Then you will have the tools to do it.

Thanks for good idea- now i see thats the best way to solve my problem.

I was programming in VBA, C++, C# and smth in other languages and though i can get fast arduino...
But now i think i was wrong;)

Last question then: arduino is enough good(hardware,software) to run this range finder, right? The problem is just to write program for it?

Last question then: arduino is enough good(hardware,software) to run this range finder, right? The problem is just to write program for it?

yes for sure for sure. I have a little car on the floor in front of me that uses an ultrasonic sensor similar to that.

how is your car going to work? steering etc?

oops, i take that back. That's a home-made ultrasonic rangefinded based on the PIC. I bought mine for $15. I have enough trouble coding for the carbot.

The AVR processor is more than capable of running the sounder, but I wouldn't set out on this unless you have access to, and know how to use, an oscilloscope.

@bill2009
yeah, i have realised i can buy completed sensor to late...

@Groove
Hmm i think its a bit more than 'making sounds'- there are timings, pulses etc..
Yes I was working on oscilloscope and know how to use it but unfortunately i have not any access to it..

'there are timings, pulses etc'
And you thought sounds were ...what, exactly?

The transmitter isn't your problem (you could easily do that with a 555 or software), it is the receiver, and milli or microvolt strength of the return, without amplification.

Hehe yeah, right:)
And about receiver- you are right also.. as they writed on this site- receiver gives me signal "few dozens of millivolt"..

Firs i will try to write code for generating 40kHz signal and then I will try with my Voltage meter to measure voltage on transmitter.

I haven't done much with home-brew ultrasonics for many years, but I do remember that both the transmitter and receiver transducers resonate very strongly, so make sure that your transmit code is capable of minor tweaks of frequency, even at the expense of a symmetrical waveform.

This is where a scope comes in very useful.