if the above is correct, why just not use PWM feature with f_PWM = 40khz, duty cycle = 50% and count 5 timer2 overflows (or something i have to re-read i forgot a bit) for the 5 cycle burst???
regards,
if the above is correct, why just not use PWM feature with f_PWM = 40khz, duty cycle = 50% and count 5 timer2 overflows (or something i have to re-read i forgot a bit) for the 5 cycle burst???
regards,
ok, but I think 40cm as minimum measurable distance is too large...I would like, if possible, to be able to measure a range of around 5cm-200cm (or 300cm)...so how to determine the range? does the range depend on the type of ultrasonic sensors??If you want to wait for twice the duration of the 5 cycles that would be 250μs. That would make the minimum distance you can measure about 40cm. You can experiment with lower times later and see if it still works.
OK! so how many [us] would be suitable in order to measure the minimum possible distance and in the same time allow the vibration to die down?Basically the transmitter will make the whole structure of the box it is in, including the receiver, vibrate so you need to wait a bit for it to die down.
Since it's not the best, what (which module) would you suggest for the detection of the echo by the receiver??Using the ADC direct might work, it's probably not the best way.
I guess you would just keep checking it and if it rises above a value of 4 or 5, stop the timer.
ok!If you use too low a value then electrical noise will probably trigger it too early.The minimum time for an ADC sample is TAD (1.6μs minimum) X 12 = 19.2μs during which time sound will have travelled about 6cm so your best possible resolution would be 3cm.
It depends on a lot of things, probably the best thing to do is get everything working with a conservative value, then try reducing the time until you get the lowest reliable range.ok, but I think 40cm as minimum measurable distance is too large...I would like, if possible, to be able to measure a range of around 5cm-200cm (or 300cm)...so how to determine the range? does the range depend on the type of ultrasonic sensors??
OK! so how many [us] would be suitable in order to measure the minimum possible distance and in the same time allow the vibration to die down?
The CCP module in capture mode is probably a good choice but requires the additional circuitry to amplify the signal.Since it's not the best, what (which module) would you suggest for the detection of the echo by the receiver??
sound a bit complicated...You would need just some additional RAM to stuff the data into and then just go through the wave with some algorithm.
sounds reasonnable...so which value [us] can i use for stater?It depends on a lot of things, probably the best thing to do is get everything working with a conservative value, then try reducing the time until you get the lowest reliable range.
additional circuitry for the transmitter again...#crying# lolThe CCP module in capture mode is probably a good choice but requires the additional circuitry to amplify the signal.
You are confusing me a bit...the amplifier schematic that you just shown above! Is it for the transmitter or receiver? I'm asking coz you saying if I'm going to use the other one I should ignore this oneIt was an idea for the input amplifier, but if you are going to use the other one, just ignore it.
OK!I only used 25kHz because it's the highest that simulator goes, it doesn't make much difference to get the general idea.
If you have noticed I have NEVER drawn a schematic because I don't have the software to draw circuit diagram and schematics...I was even about to ask which software I can download in order to draw schematics and including all the PICs mcu range...Have a go at drawing the new schematic and then we will have a look.
I think that capturing the wave with an ADC an then finding the five-pulse pattern would be the most accurate way of doing it. You would need just some additional RAM to stuff the data into and then just go through the wave with some algorithm.
Well, you need to set the ADC to sample the input at 100khz or so and store it in some place. IIRC you were talking about 3 meter max, so lets say you need to store 5 meters of data.would you please explain how you would use ADC to capture/listen to the echo??
regards
by Aaron Carman
by Jake Hertz
by Duane Benson
by Aaron Carman