EmbeddedRelated.com
Forums

Ultrasonic Sensor

Started by Dibyendu July 23, 2007
Hi,

I am trying to build an ultrasonic sensor module to detect and measure
the distance of an object, and got some problem :-)

Problem:
1. Not sure whether the transmitter send sound or not.
2. Not sure, Receiver work properly or not.
3. Circuit and code was not tested.

The configuration of my board is:

a) AT89C52. Microcontroller.
b) XTL freq. 11.0592 mhz.
b) 40 KHz ultrasonic transmitter and receiver.
c) +5V  to 0 (ground) power supply.
(I am trying to follow the book of mazidi)

Please suggest me on that on that issue.
(I am thankful on this group because I am getting so much help from
this group to as the problem of serial communication, As a newcomer in
embedded it was a really hard problem).

On Jul 23, 7:34 pm, Dibyendu <dib....@gmail.com> wrote:
> Hi, > > I am trying to build an ultrasonic sensor module to detect and measure > the distance of an object, and got some problem :-) > > Problem: > 1. Not sure whether the transmitter send sound or not. > 2. Not sure, Receiver work properly or not. > 3. Circuit and code was not tested. > > The configuration of my board is: > > a) AT89C52. Microcontroller. > b) XTL freq. 11.0592 mhz. > b) 40 KHz ultrasonic transmitter and receiver. > c) +5V to 0 (ground) power supply. > (I am trying to follow the book of mazidi) > > Please suggest me on that on that issue. > (I am thankful on this group because I am getting so much help from > this group to as the problem of serial communication, As a newcomer in > embedded it was a really hard problem).
Please advice me some chapter, and some link that i can read and build the correct circuit and correct code for Ultrasonic compatible with the AT89C52 Microcontroller.
Dibyendu wrote:

> Hi, > > I am trying to build an ultrasonic sensor module to detect and measure > the distance of an object, and got some problem :-) > > Problem: > 1. Not sure whether the transmitter send sound or not. > 2. Not sure, Receiver work properly or not. > 3. Circuit and code was not tested. > > The configuration of my board is: > > a) AT89C52. Microcontroller. > b) XTL freq. 11.0592 mhz. > b) 40 KHz ultrasonic transmitter and receiver.
Is the transmitter and receiver a pair of devices or just a single TX/RX unit? If they are a pair you may need to check that you are using the transmitter for transmitting and the receiver for receiving. You should also try and do one bit at a time. This link:- http://www.eetasia.com/ARTICLES/2002MAR/2002MAR08_RFD_DA_AN.PDF may help you. If you build just the interface portions you should be able to see if they are working by scoping around the pins. Once you have working TX and RX circuits you can then add the micro and software and work on what ails those. -- ******************************************************************** Paul E. Bennett ....................<email://peb@amleth.demon.co.uk> Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/> Mob: +44 (0)7811-639972 Tel: +44 (0)1235-811095 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************
On Jul 23, 4:34 pm, Dibyendu <dib....@gmail.com> wrote:
> Hi, > > I am trying to build an ultrasonic sensor module to detect and measure > the distance of an object, and got some problem :-) > > Problem: > 1. Not sure whether the transmitter send sound or not. > 2. Not sure, Receiver work properly or not. > 3. Circuit and code was not tested. > > The configuration of my board is: > > a) AT89C52. Microcontroller. > b) XTL freq. 11.0592 mhz. > b) 40 KHz ultrasonic transmitter and receiver. > c) +5V to 0 (ground) power supply. > (I am trying to follow the book of mazidi) > > Please suggest me on that on that issue. > (I am thankful on this group because I am getting so much help from > this group to as the problem of serial communication, As a newcomer in > embedded it was a really hard problem).
Not being acquainted with the teachings of mazidi (although, if he's anything like Ly Tin Wheedle, I'm sure you're on the right track following his book)and based on the information you've given here, I can positively state the following: a) Choice of microcontroller is not the cause of your problems. I have used this controller myself and can vouch for it. b) the frequency of 11.0592MHz is also not the cause of your problems. It's a tried and tested frequency and a lot of people are using it. c) 5V is a great voltage! Don't let anyone try to convince you otherwise.
> 3. Circuit and code was not tested.
You might be spot on here, though. Why don't you try testing the circuit? Hopefully there's no "Thou shalt not use a scope" in the book of mazidi.
"Dibyendu" <dib.mon@gmail.com> wrote in message
news:1185201243.584134.141310@e16g2000pri.googlegroups.com...
> Hi, > > I am trying to build an ultrasonic sensor module to detect and measure > the distance of an object, and got some problem :-) > > Problem: > 1. Not sure whether the transmitter send sound or not. > 2. Not sure, Receiver work properly or not. > 3. Circuit and code was not tested. > > The configuration of my board is: > > a) AT89C52. Microcontroller. > b) XTL freq. 11.0592 mhz. > b) 40 KHz ultrasonic transmitter and receiver. > c) +5V to 0 (ground) power supply. > (I am trying to follow the book of mazidi) > > Please suggest me on that on that issue. > (I am thankful on this group because I am getting so much help from > this group to as the problem of serial communication, As a newcomer in > embedded it was a really hard problem). >
Such modules exist. Even if you want to build build one you can develop your software with the already tested ones. Later on, you can use the tested software to build a module on your own. http://www.robot-electronics.co.uk/shop/Ultrasonic_Rangers1999.htm
On Jul 23, 8:45 pm, "Paul E. Bennett" <p...@amleth.demon.co.uk> wrote:
> Dibyendu wrote: > > Hi, > > > I am trying to build an ultrasonic sensor module to detect and measure > > the distance of an object, and got some problem :-) > > > Problem: > > 1. Not sure whether the transmitter send sound or not. > > 2. Not sure, Receiver work properly or not. > > 3. Circuit and code was not tested. > > > The configuration of my board is: > > > a) AT89C52. Microcontroller. > > b) XTL freq. 11.0592 mhz. > > b) 40 KHz ultrasonic transmitter and receiver. > > Is the transmitter and receiver a pair of devices or just a single TX/RX > unit? > > If they are a pair you may need to check that you are using the transmitter > for transmitting and the receiver for receiving. > > You should also try and do one bit at a time. This link:- > > http://www.eetasia.com/ARTICLES/2002MAR/2002MAR08_RFD_DA_AN.PDF > > may help you. If you build just the interface portions you should be able to > see if they are working by scoping around the pins. > > Once you have working TX and RX circuits you can then add the micro and > software and work on what ails those. > > -- > ******************************************************************** > Paul E. Bennett ....................<email://...@amleth.demon.co.uk> > Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/> > Mob: +44 (0)7811-639972 > Tel: +44 (0)1235-811095 > Going Forth Safely ..... EBA.www.electric-boat-association.org.uk.. > ********************************************************************
Hi Bennett I am starting to the PDF file from your given link. keep in tuch
On Jul 23, 9:20 pm, Viktor <vkes...@gmail.com> wrote:
> On Jul 23, 4:34 pm, Dibyendu <dib....@gmail.com> wrote: > > > > > Hi, > > > I am trying to build an ultrasonic sensor module to detect and measure > > the distance of an object, and got some problem :-) > > > Problem: > > 1. Not sure whether the transmitter send sound or not. > > 2. Not sure, Receiver work properly or not. > > 3. Circuit and code was not tested. > > > The configuration of my board is: > > > a) AT89C52. Microcontroller. > > b) XTL freq. 11.0592 mhz. > > b) 40 KHz ultrasonic transmitter and receiver. > > c) +5V to 0 (ground) power supply. > > (I am trying to follow the book of mazidi) > > > Please suggest me on that on that issue. > > (I am thankful on this group because I am getting so much help from > > this group to as the problem of serial communication, As a newcomer in > > embedded it was a really hard problem). > > Not being acquainted with the teachings of mazidi (although, if he's > anything like Ly Tin Wheedle, I'm sure you're on the right track > following his book)and based on the information you've given here, I > can positively state the following: > > a) Choice of microcontroller is not the cause of your problems. I have > used this controller myself and can vouch for it. > b) the frequency of 11.0592MHz is also not the cause of your problems. > It's a tried and tested frequency and a lot of people are using it. > c) 5V is a great voltage! Don't let anyone try to convince you > otherwise. > > > 3. Circuit and code was not tested. > > You might be spot on here, though. Why don't you try testing the > circuit? > Hopefully there's no "Thou shalt not use a scope" in the book of > mazidi.
Hello Victor, I also find that there is nothing about Ultrasonic in the books of mazidi. But I know very little about External hardware interfacing. I think Understanding of this chapter vary important to understand and build Ultrasonic Sensor interface with microcontroler. plz send me your comment.
On Jul 23, 10:52 pm, "runner" <emb@dded> wrote:
> "Dibyendu" <dib....@gmail.com> wrote in message > > news:1185201243.584134.141310@e16g2000pri.googlegroups.com... > > > > > Hi, > > > I am trying to build an ultrasonic sensor module to detect and measure > > the distance of an object, and got some problem :-) > > > Problem: > > 1. Not sure whether the transmitter send sound or not. > > 2. Not sure, Receiver work properly or not. > > 3. Circuit and code was not tested. > > > The configuration of my board is: > > > a) AT89C52. Microcontroller. > > b) XTL freq. 11.0592 mhz. > > b) 40 KHz ultrasonic transmitter and receiver. > > c) +5V to 0 (ground) power supply. > > (I am trying to follow the book of mazidi) > > > Please suggest me on that on that issue. > > (I am thankful on this group because I am getting so much help from > > this group to as the problem of serial communication, As a newcomer in > > embedded it was a really hard problem). > > Such modules exist. Even if you want to build build one > you can develop your software with the already tested > ones. Later on, you can use the tested software to > build a module on your own. > > http://www.robot-electronics.co.uk/shop/Ultrasonic_Rangers1999.htm
Hi Runner, I had find the link. and seen that there are some great product on Ultrasonic. But is not it possible to build one by my own? please help.
On Jul 23, 8:45 pm, "Paul E. Bennett" <p...@amleth.demon.co.uk> wrote:
> Dibyendu wrote: > > Hi, > > > I am trying to build an ultrasonic sensor module to detect and measure > > the distance of an object, and got some problem :-) > > > Problem: > > 1. Not sure whether the transmitter send sound or not. > > 2. Not sure, Receiver work properly or not. > > 3. Circuit and code was not tested. > > > The configuration of my board is: > > > a) AT89C52. Microcontroller. > > b) XTL freq. 11.0592 mhz. > > b) 40 KHz ultrasonic transmitter and receiver. > > Is the transmitter and receiver a pair of devices or just a single TX/RX > unit? > > If they are a pair you may need to check that you are using the transmitter > for transmitting and the receiver for receiving. > > You should also try and do one bit at a time. This link:- > > http://www.eetasia.com/ARTICLES/2002MAR/2002MAR08_RFD_DA_AN.PDF > > may help you. If you build just the interface portions you should be able to > see if they are working by scoping around the pins. > > Once you have working TX and RX circuits you can then add the micro and > software and work on what ails those. > > -- > ******************************************************************** > Paul E. Bennett ....................<email://...@amleth.demon.co.uk> > Forth based HIDECS Consultancy .....<http://www.amleth.demon.co.uk/> > Mob: +44 (0)7811-639972 > Tel: +44 (0)1235-811095 > Going Forth Safely ..... EBA.www.electric-boat-association.org.uk.. > ********************************************************************
Hello I just had a rough look on the document. It is understandable, and going to implement it soon (at the time of implementation i must read this document again) :-)
"Dibyendu" <dib.mon@gmail.com> wrote in message
news:1185257221.210974.74760@j4g2000prf.googlegroups.com...
> On Jul 23, 10:52 pm, "runner" <emb@dded> wrote: > > "Dibyendu" <dib....@gmail.com> wrote in message > > > > news:1185201243.584134.141310@e16g2000pri.googlegroups.com... > > > > > > > > > Hi, > > > > > I am trying to build an ultrasonic sensor module to detect and measure > > > the distance of an object, and got some problem :-) > > > > > Problem: > > > 1. Not sure whether the transmitter send sound or not. > > > 2. Not sure, Receiver work properly or not. > > > 3. Circuit and code was not tested. > > > > > The configuration of my board is: > > > > > a) AT89C52. Microcontroller. > > > b) XTL freq. 11.0592 mhz. > > > b) 40 KHz ultrasonic transmitter and receiver. > > > c) +5V to 0 (ground) power supply. > > > (I am trying to follow the book of mazidi) > > > > > Please suggest me on that on that issue. > > > (I am thankful on this group because I am getting so much help from > > > this group to as the problem of serial communication, As a newcomer in > > > embedded it was a really hard problem). > > > > Such modules exist. Even if you want to build build one > > you can develop your software with the already tested > > ones. Later on, you can use the tested software to > > build a module on your own. > > > > http://www.robot-electronics.co.uk/shop/Ultrasonic_Rangers1999.htm > > Hi Runner, > I had find the link. and seen that there are some great product on > Ultrasonic. But is not it possible to build one by my own? please > help.
Here's a DIY example: http://www.interq.or.jp/japan/se-inoue/e_pic6_6.htm i guess it takes some experience to make those system work as expected.