A few questions about schematic

  • Thread starter maverick99
  • Start date
  • Tags
    Schematic
In summary: B+, Radiation Patterns (10/10), Stepper Motor (9/10), Counter (9/10), Ultrasonic Transmitter/Receiver (8/10).
  • #36
I'll just toss out some ideas as if I was in your design group and we were brain storming a bit.. I suspect you are using a microcontroller. How about programming it with a "lookup table" with each "binary input" equivalent to a "unit of angular displacement" (e.g. 1deg, 5deg.) Since you can count positive and negative numbers in binary, maybe you can use positive binary to translate 0 to +90deg and negative binary for -1 to -90 deg.

Berkeman had a suggestion of using limit switches at the ends of your 180 degrees of travel. I am guessing he means some sort of conductive pin to catch the rotor at the endpoints. With a conductive pin, it could trigger a switch (limit switch) to let your microcontroller know (closed circuit = voltage or logic level), that it has reached a boundary. If you used limit switches, all you would need is a counter to increment (step the motor), then when it reaches a limit switch, the counter could change to decrement, then when it reaches next switch, change to increment again, and so on..

I am wondering how you will mount your transducers & stepper motor (see my post #33 this thread). I am trying to get a 3-dimensional image of your setup..
 
Last edited:
Engineering news on Phys.org
  • #37
A couple days ago, I hooked up the stepper motor windings to a dip switch. After messing with it, I got it to turn clockwise by shifting to the left.
0001
0010
0100
1000...


...and counter-clockwise by shifting to the right.
1000
0100
0010
0001

Couldn't I make a program that would just shift so many times then shift counter-clockwise and put it on a microchip?
 
  • #38
Yes your program is a valid approach! Were you given a specification on how fast it should sweep from -90 to +90? Is your setup going to be stationary or mobile?

Whatever controls the motor, how will it know where a reference point is (example -90, 0, or 90 degrees)? For lab purposes, you could put it at a reference point. But wouldn't it be nice for your circuit to find the starting reference? That is another good reason to have at least one limit-switch.
 
  • #39
I hooked up the finalized circuit to the o-scope and I'm getting a good square wave from the transmitter circuit. Unfortunetly, my receiver circuit is still having problems. According to this site where I got the circuit from; http://www.leang.com/robotics/info/articles/minison/minison.html
It shows that I should have a square wave for my receiver circuit, but I'm getting a distorted sine wave. Any thoughts on what I should do?
 
Last edited by a moderator:
  • #40
Does it appear to be the return ping coming back? Like, does its time delay from the TX ping vary with the distance to the reflector? Does the amplitude of the distorted RX sine wave (before any final comparator stage) vary with reflector distance? I haven't looked at the circuit lately, but assuming there is an output comparator stage, are you saying that the output of the comparator is a distorted sine wave, or the input to the comparator?
 
  • #41
berkeman said:
Does it appear to be the return ping coming back? Like, does its time delay from the TX ping vary with the distance to the reflector? Does the amplitude of the distorted RX sine wave (before any final comparator stage) vary with reflector distance? I haven't looked at the circuit lately, but assuming there is an output comparator stage, are you saying that the output of the comparator is a distorted sine wave, or the input to the comparator?

Edit: Ok the sine wave that I had was screwed up because of the 2nd line in the oscope. I plugged it into another and its working ok now. Here is a picture of what my oscope is showing now with my crappy camera phone.
http://img184.imageshack.us/img184/6643/picture0132kd.jpg

The top square wave is my pulse from the transmitter.
The bottom square wave is the pulse from the receiver.
I'm still having trouble with it though. When I put my hand in front of the sensors, the bottom pulse doesn't do anything until I'm maybe 6 inches away from it. When I do get close enough, it just shows the same waveform but flicking in different positions. The transmitter wave also gets affected a little too for some reason.
 
Last edited by a moderator:
  • #42
I didn't read the theory of operation at the leang website that you list, but IMO, you should be seeing something like this:

-- A 40kHz drive signal across the TX transducer for the duration of the 200us PING signal. A 40kHz signal has a 25us period, so you should get about 8 cycles of drive at 40kHz into the TX transducer for each PING. The 555 frequency should be tuned to the resonant frequency of the TX transducer. You can hand-tune the frequency in the next step...

-- Put an RX transducer directly in front of the TX transducer, and only connect your oscilloscope across the RX transducer (nothing else yet). Maybe separate them by 1mm or so. As the PING signal pulses, do you see a small signal on the RX transducer? I don't know how big the signal will be with only the oscilloscope input amp to magnify it, but I would think that you should be able to see it with such a small TX-RX separation. Worst case, you can touch the TX and RX transducer faces, but that will make the fine tuning of the TX frequency less valid. Assuming you see a small RX signal at 1mm spacing, fine tune the 555 frequency to maximize the amplitude of the RX signal. That fine tuning will help to maximize your sonar range.

-- Next, reconnect the RX transducer in your Receiver circuit, and watch the output of the first opamp stage. It should be an amplified version of the 8-cycle sine wave signal that you were seeing on your oscilloscope when you watched the output of the RX transducer alone. If it is not, then there is something wrong in the first stage amplifier circuit. If it is working right, then your gain will be set to barely get a good tone through the first stage when the reflecting object is at max range. With the gain set like that, the output of the first stage amp will be saturating into the rails when the reflecting object is very close. You might want to look into putting a soft saturation clamp circuit on the first stage to be sure that it doesn't slow down too much to keep up with return echoes from close objects. I'll leave that part as an exercise for the reader. Also, verify that the return echo of about 8 cycles at 40kHz (it may take a couple cycles for the RX transducer to ring up to full amplitude) get smaller in amplitude and more time-delayed as you increase the spacing between the TX and RX transducers (or increase the distance to the reflecting object). Remember that the speed of sound is about 340m/s at sea level, so expect about a 3ms delay for each meter of separation (ignoring circuit delays and ringup time factors, which you will need to calibrate out of your final answer).

-- Assuming the first stage is working okay, trace the signal through the 567 tone decoder. The 567 should provide some noise immunity against other noises that the RX transducer picks up. You should tune the 567 to be most sensitive to the frequency that you found from the earlier tuning that you did to maximize TX-->RX throughput. I've never used a 567, but it looks from the circuit like it will output a pulse when it sees a tone that is the same one it is looking for. I don't know how many of the 8 cycles it will take before the 567 drives its output, but you can probably figure that out from its datasheet.

Have fun!
 
  • #43
I got a question on finding the range using the oscope; tell me if this is the wrong approach in calculating the distance.

I measure how long the lag time is between the transmitter pulse and the echo. I multiply that by the period(50us). Then I multiply that by the speed of sound, which is around 300m/s. Would this work?
 
  • #44
maverick99 said:
I got a question on finding the range using the oscope; tell me if this is the wrong approach in calculating the distance.
I measure how long the lag time is between the transmitter pulse and the echo. I multiply that by the period(50us). Then I multiply that by the speed of sound, which is around 300m/s. Would this work?

The speed of sound in air is about 300m/s at 0C! In your much warmer lab the speed will be closer to 345m/s.

An RF radar transmitts a short pulse, then listens for a period of time fixed by the desired range. The amount of time between the transmitted pulse and the return gives the range. Keep in mind that the return time is 2 twice the time required for the pulse to reach the target.
 
  • #45
maverick99 said:
I got a question on finding the range using the oscope; tell me if this is the wrong approach in calculating the distance.
I measure how long the lag time is between the transmitter pulse and the echo. I multiply that by the period(50us). Then I multiply that by the speed of sound, which is around 300m/s. Would this work?
The period of the pulse has nothing to do with the distance calc. the round trip time is just t=2*V/d. So d=2*V/t.

As Integral said, be more precise about V (and maybe include temperature and barometric pressure as inputs to your calculation, if appropriate). And you will need to calibrate out several other delay factors as well, if you want to increase your accuracy. You will need to measure what the RX delay through your input piezo and amp circuit is, since that will be an additional delay (which will likely change with distance, because it will change with gain and saturation effects in the input amp). There is also the ringup time of the TX piezo, potentially.

If you are using a microcontroller to operate the whole system, you can code up some calibration tables based on your oscilloscope measurements, and then fine tune them by working with test reflector objects. Remember, the 40kHz ultrasonic wavelet that you launch from your TX piezo will come back to your RX piezo as a much smaller 40kHz wavelet, and that's what you are picking up and amplifying. Part of the delay that you need to calibrate out is how the weaker the RX wavelet (farther distances), the farther into the wavelet your RX discriminator circuit will generally have to go before it trips to say that there is a valid echo.
 
  • #46
berkeman said:
The period of the pulse has nothing to do with the distance calc. the round trip time is just t=2*V/d. So d=2*V/t.

Is V the velocity or voltage?
What do I use for t?
 
  • #47
No, velocity of propagation of the sound wavelet. Sorry for the ambiguous notation.
 

Similar threads

  • Electrical Engineering
Replies
30
Views
3K
  • Electrical Engineering
Replies
4
Views
1K
  • Electrical Engineering
Replies
8
Views
17K
  • Electrical Engineering
Replies
5
Views
7K
  • Electrical Engineering
Replies
24
Views
8K
  • Electrical Engineering
Replies
2
Views
2K
  • Mechanical Engineering
Replies
5
Views
1K
Replies
22
Views
2K
  • Electrical Engineering
Replies
19
Views
2K
  • Electrical Engineering
2
Replies
60
Views
5K
Back
Top