July 14, 2014 at 2:16 pm #3150snutiParticipant
i need a program to interface the ultrasonic sensor with 8051 microcontroller whose output is given by led for the distance range of 2-3cm,buzzer for the range of 1.5-2cm and the plugger whish is work as a switch for the range below 1.5cm.plz provide me the steps and the programming for my project.July 14, 2014 at 3:43 pm #11898SHAH DISHANT H.Participant
Regarding your application , divide the program in steps.
1. Make a program to interface ADC0804 & LCD
2. Give output of ultrasonic distance to analog input of ADC0804 and displayed digital value on LCD
3. Note down digital values for ur required benchmarks like 3 cm= Value A, 5 cm= Value B etc.
4. In program compare the obtaine ddigital value and drive ur devices accordingly
All the best.
For any queries further, write us back hereJuly 15, 2014 at 6:55 am #11907
First of it depend on the sensor which type you used..
mean there are two types one without analog output and one with inlcude
and most imp thing is that ultrasonice is work on timing sequence mean timing frame and delay is very much imp in sensor to activate it, start to take data conversation and get output all for these dealy must be imp.
so please can you tell me which type of sensor you used ??
then I get some idea and we can move forward..
1.HC-SR04 (point 3 is imp for us)
1. Working Voltage : 5V(DC)
2. Static current: Less than 2mA.
3. Output signal: Electric frequency signal, high level 5V, low level 0V.
4. Sensor angle: Not more than 15 degrees.
5. Detection distance: 2cm-450cm.
6. High precision: Up to 0.3cm
7. Input trigger signal: 10us TTL impulse
8. Echo signal : output TTL PWL signal
I write below its working if you have this kind of sensor then,
1.Adopt IO trigger through supplying at least 10us sequence of high level signal.
2.The module automatically send eight 40khz square wave and automatically detect whether receive the returning pulse signal.
3.If there is signals returning, through outputting high level and the time of high level continuing is the time of that from the ultrasonic transmitting to receiving. Test distance = (high level time * sound velocity (340M/S) / 2.
2.HC-SR05 (generally not use)
1) Voltage : DC5V
2) Static current : less than 2mA
3) level output: high-5V
4) level output: the end of 0V
5) Sensor angle: not more than 15 degrees
6) Detection distance: 2cm-450cm
7) High precision: up to 0.3cm
so please provide me some detail that I can help you.
Also you buy any components at very low cost from me..I made project only for students at very very low cost..
HC-SR04 – 340 Rs
HC-SR05 – 400 Rs
If any kind of h/w or s/w related problem of 8051 u can ask me..
email : project[dot]student123[at]gmail[dot]com
just google about “DABHI ELECTRONICS”
and go to electronicsproject website..
-dabhi electronicsJuly 15, 2014 at 5:31 pm #11910Ashutosh BhattParticipant
Use ultrasonic sensor with serial output. That gives distance output in cm.July 16, 2014 at 3:39 am #11911
Ya its ok but we can get o/p in cm, mm, and inch by change the timer and delay setting.
So its not a perticuler type that this is for cm and this is for mm
We get o/p in form of cm, mm from any type of ultrasonics sensors…
Jaymin DJuly 21, 2014 at 3:24 pm #11917snutiParticipant
can plz forward me program.July 22, 2014 at 8:16 am #11919
but first you should define the H/W because code is always made according to H/W.
which pin you connect sensor ??
Which type of M/C you used ??
all these tings matter so , please request to you that define some basic block diagram and then consider it.
Hope you get my point.
email : project [dot] student123 [at] gmail [dot] com
- You must be logged in to reply to this topic.