measuring da distance!

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
Here's how the input amplifier should be if I understand correctly. I've recommended a couple of resistor changes to move the voltage at their centre point to 1.75V instead of 2.5V. This is because the LM358 isn't rail to rail, but 0-3.5V with a 5V supply.
Ohk! I don't have these resistor values at the moment with me but tomorrow morning I will get them and try them!! What should I expect from this change ??

Well you just mentioned above about the voltage change BUT on breadboard?? Should be the solution to the current problem??

Regards,
 

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
I'm not too good at this kind of circuit. Maybe it's a good idea to start a thread just for the circuit in the general electronics chat section to get a few more people to see it and comment. Make sure you mention the op amp substitution.
I will do that...unless it finally works as wanted!

If you want to post a good photo of the breadboard I can compare it to the schematic to see if there are any errors.
I can do that but I'm wondering if u'll be able to see clearly...maybe you will
I generally don't make mistakes when playing with breaboard plus my breadboard circuits is as clean as the PCB!!

Plus I had my circuit checked by someone else that know better than me when it comes to electronics....and said connection are correct...

Tomorrow I'll have it checked again with an oscillator...as we now getting the pulses......

Regards,
 

Markd77

Joined Sep 7, 2009
2,806
To be honest, I don't think it will make much difference but it is technically better. It will give a slightly higher voltage swing at the output of the op amp for the same small AC voltage at the input.
 

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
Can you please explain this phenomenon of post #151??
What does it mean?? How is that?

I was surprised to get the results that you expected...
 

Markd77

Joined Sep 7, 2009
2,806
The timer is started just before the pulse is sent. The pulse takes 125us, there is then a delay of 250us, total 375us = 0.000375 seconds
In that time sound travels 340 x 0.000375 = 0.1275 or 12.75cm
That is the round trip so the distance from object to sensor is about 6.4cm.
Of course no sound actually happened, but keeping the pin at 5V makes the PIC think that the pulse returned at that time because that's when it starts looking for it.
With the pin connected to 0V the PIC thinks no pulse has returned so it displays overrange.
 

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
The timer is started just before the pulse is sent. The pulse takes 125us, there is then a delay of 250us, total 375us = 0.000375 seconds
In that time sound travels 340 x 0.000375 = 0.1275 or 12.75cm
That is the round trip so the distance from object to sensor is about 6.4cm.
Of course no sound actually happened, but keeping the pin at 5V makes the PIC think that the pulse returned at that time because that's when it starts looking for it.
With the pin connected to 0V the PIC thinks no pulse has returned so it displays overrange.
Perfect!!! Then I can say that the receiver amplifier needs either changing or revising!! And this can be fixed so easily...

Thanks!
 
Top