A few questions about schematic

  • Thread starter Thread starter maverick99
  • Start date Start date
  • Tags Tags
    Schematic
AI Thread Summary
The discussion revolves around building an ultrasonic radar circuit, with specific questions about connecting a NAND gate and understanding the role of various components, including a Darlington transistor. Participants clarify that pins 7 and 14 of the NAND gate are for power supply connections, and suggest connecting pin 14 to Vcc and pin 7 to ground. Concerns are raised about the circuit's design, particularly the close placement of the transmitter and receiver, which could hinder sensitivity. Suggestions for alternative designs and resources for ultrasonic rangefinding are provided, emphasizing the importance of experimenting with components and understanding the functionality of piezoelectric transducers. The conversation concludes with a focus on the need for proper power supply management in the final assembly.
maverick99
Messages
74
Reaction score
0
In one of my design classes, I'm building an ultrasonic radar. I looked online and found a decent schematic for it and I have a question about it. In the schematic I circled two things that I have no clue why they are there. I'm not sure how to connect the Vcc and ground to that part of the nand gate. I have no clue where or how to connect them in my circuit. Can someone explain to me why they are there and how to hook them up?

http://i27.photobucket.com/albums/c180/maverick9900/22.gif

Here is the original site

http://www.electronics-lab.com/projects/sensors/007/
 
Engineering news on Phys.org
i think your getting the symbol of the nand gate confused. pins 7 & 14 don't belong to the input of any of the nand gate but is the power supply for all the gates. just hook pin 14 up Vcc show as the circled 1 and hook pin 7 to ground shown as circle 2.

it's weird that you would have a problem with the nand chip but don't ask about the op-amps. also what does the darlington npn collector connect to circled pin 9. :confused:
 
mugsby said:
i think your getting the symbol of the nand gate confused. pins 7 & 14 don't belong to the input of any of the nand gate but is the power supply for all the gates. just hook pin 14 up Vcc show as the circled 1 and hook pin 7 to ground shown as circle 2.
it's weird that you would have a problem with the nand chip but don't ask about the op-amps. also what does the darlington npn collector connect to circled pin 9. :confused:

I am wondering about that npn transistor pin too. Anyone know? Or could someone supply me with a better schematic?
 
Last edited:
maverick99 said:
I am wondering about that npn transistor pin too. Anyone know? Or could someone supply me with a better schematic?
That's not a very good ultrasonic radar circuit. The Darlington output stage looks like you would hook up some output indicator to it, like an LED or buzzer or something. The output collector of the Darlington probably pulls low when the received US signal varies too much.

But having the transmitter piezo and the receiver piezo so close together on the same PCB will severely limit the sensitivity of the "radar". A better design would separate the TX and RX parts of the device, at least by a meter or two. And it seems like it would be better to have two RX units, and compare their outputs to determine if there was movement going on...
 
berkeman said:
That's not a very good ultrasonic radar circuit. The Darlington output stage looks like you would hook up some output indicator to it, like an LED or buzzer or something. The output collector of the Darlington probably pulls low when the received US signal varies too much.
But having the transmitter piezo and the receiver piezo so close together on the same PCB will severely limit the sensitivity of the "radar". A better design would separate the TX and RX parts of the device, at least by a meter or two. And it seems like it would be better to have two RX units, and compare their outputs to determine if there was movement going on...

Do you have or know of any other designs I could use? Anything at all would be helpful :smile:
 
maverick99 said:
Do you have or know of any other designs I could use? Anything at all would be helpful :smile:
Depends on what you want the "ultrasonic radar" to do. Do you want it for rangefinding, or for motion detection like for an alarm system?
 
Rangefinding
 
maverick99 said:
Rangefinding
Wow. Then the original circuit definitely isn't what you want. I googled the following:

ultrasound rangefinding circuit design

and got lots of hits. This first one looks like a great place to start:

http://www.stanford.edu/class/ee122/Final_Projects/Bens_Ultrasound_Dossier.pdf

Have fun!
 
Last edited by a moderator:
Is this what I want?

http://www.technobots.co.uk/index.html?lang=en-uk&target=d695.html

or maybe this site?

http://www.interq.or.jp/japan/se-inoue/e_pic6_6.htm

Edit: Here is the info from my worksheet about this project:

For this project you will create a radar set using an ultrasonic transmitter/receiver received from the instructor. Radar operates on the principle of sending out a pulse and then timing how long it takes before the echo is received. The longer the time, the further the distance. The initial pulse needs to be fairly fast. The counter also needs to be fast.
The ultrasonic transmitter/receiver will be mounted on a shaft attached to a stepper motor. The stepper motor needs to be able to sweep across 180 degrees as the radar is transmitting.

Grade based on, Distance Ranging (25ft), Stepper Sweep (0 to 180deg), Display on Oscope.
 
Last edited by a moderator:
  • #10
Yeah, those both look like good learning kits. I especially like how the first one made it a point to improve on the Polaroid rangefinder.

Since your prof is going to be providing the transducers, will you be allowed to use a canned kit, or do you need to build it from scratch, using the kit as a learning tool to guide your own design? What uC are you supposed to use? Do you have the stepper motor part figured out already?
 
  • #11
berkeman said:
Yeah, those both look like good learning kits. I especially like how the first one made it a point to improve on the Polaroid rangefinder.
Since your prof is going to be providing the transducers, will you be allowed to use a canned kit, or do you need to build it from scratch, using the kit as a learning tool to guide your own design? What uC are you supposed to use? Do you have the stepper motor part figured out already?

I'm supposed to basically build it from scratch. My professor gave me the transducers, the stepper motor, and two chips for it. The first chip is the L298 Dual Full-Bridge Driver.
http://tinyurl.com/e42un

The other is the L297 Stepper Motor Controller.
http://tinyurl.com/bzokxEdit:
Another person showed me this schematic.
http://www.leang.com/robotics/info/articles/minison/minison.html

It's supposed to be for a robot but he said it should work and it looks easier then the previous schematics. Your thoughts?
 
Last edited by a moderator:
  • #12
I like the LM567 in the MiniBot schematic. The piezos are probably pretty narrowband, though, so I don't know how much more noise rejection the 567 will give you overall.

What is the output of the range supposed to be? Are you supposed to use a microcontroller to do the stepper motor control and calculate range versus bearing? How are you supposed to present the information? Do you need a USB connection to a PC to display the data, or are you supposed to drive a small display? Sounds like a fun project. How long do you have to get it done?
 
  • #13
berkeman said:
I like the LM567 in the MiniBot schematic. The piezos are probably pretty narrowband, though, so I don't know how much more noise rejection the 567 will give you overall.
What is the output of the range supposed to be? Are you supposed to use a microcontroller to do the stepper motor control and calculate range versus bearing? How are you supposed to present the information? Do you need a USB connection to a PC to display the data, or are you supposed to drive a small display? Sounds like a fun project. How long do you have to get it done?

What is the output of the range supposed to be?[/e]
I'm not sure about that.

Are you supposed to use a microcontroller to do the stepper motor control and calculate range versus bearing?
I wasn't given any info on that. All I know is that the stepper motor has to sweep 180 degs back and forth.

How are you supposed to present the information?
I'm guessing that I'm just supposed to make it sweep the 180 deg and while it is doing that, It should detect objects within it's path.

Do you need a USB connection to a PC to display the data, or are you supposed to drive a small display?
My professor never said anything about a USB connection, so most likely the small display, such as a led or a few 7 segment dispays.

How long do you have to get it done?
Until the end of the semester, which is around a month and a half.
 
  • #14
maverick99 said:
How long do you have to get it done?
Until the end of the semester, which is around a month and a half.
Well in that case, you should start experimenting with driving the TX piezo, and see what the best way is to get a short loud wavelet pulse out of it, and start experimenting with input preamp and filtering stages to see what kind of RX sensitivity you can get. Do all this experimenting with an oscilloscope and simple components, and then use those results to guide what you do for the rest. And ask your prof the questions I was asking -- it may be that he's leaving out that part of the assignment to see how creative people get. Like, you might get extra credit if you did use a microcontroller like a PIC that also has a USB port, and you graphed the data real-time with a Tcl or C program on your laptop or something. Maybe even make it look like a real radar display, with the line sweeping through bearing, and blips staying persistent where you are getting echos. Maybe even designate them as targets, with little airplane symbols and friend/foe and ... oops, sorry about that. Sometimes I get carried away :-)
 
  • #15
First of all, what are piezos? :)

Second, how should I go about putting a 9V and 5V High in the circuit? Do I just use two separate power supplies?
 
  • #16
maverick99 said:
First of all, what are piezos? :)
Second, how should I go about putting a 9V and 5V High in the circuit? Do I just use two separate power supplies?
I can't tell by the smiley if you're kidding or not, so I'll answer about the piezos. Piezoelectric transducers are what is used for the ultrasonic TX and RX elements. A piezoelectric crystal (or sometimes polymer) changes size with an applied voltage. Piezoelectric crystals are used for clock generation (like the 32kHz crystal in your watch, or the 10MHz crystal on many microcontroller boards), and when made big enough, they can be fairly efficient at coupling ultrasonic sound waves into the air. I don't know if your ultrasonic transducers have built-in oscillators or if you need to drive them at their resonant frequency, but it the prof gave you the datasheets, it will talk about how to use them. Come to think of it, start with the part datasheets and see if they have application information on them. Or go to the manufacturer's website and look for application information. They will show you the optimum TX and RX interface circuits.

And on the power supply question -- initially just use two outputs from a bench supply. Eventually you will need to include a power source and voltage regulators on your final project assembly.

Also, look around some for application info on whether it's worthwhile to have a directional antenna structure for the RX piezo. Like, even just a few inches of plastic tubing. That will give you better resolution on the bearing of echos.
 
  • #17
berkeman said:
And on the power supply question -- initially just use two outputs from a bench supply. Eventually you will need to include a power source and voltage regulators on your final project assembly.

Why would I have to include a power source and voltage regulators on the final project assembly? Wouldn't it work fine if I just used the 5 Volt line from my power supply and used the other output for 9V?
 
  • #18
Sure, whatever. Real world verusus the lab.
 
  • #19
berkeman said:
Sure, whatever. Real world verusus the lab.

Alright, cool. Thx for all the help. I will be sure to post results and pics once I finish it here within a month. That is, if I don't have anymore questions during that time :smile:
 
  • #20
Well I'm back again. Since I have to order parts online, I have to wait a few days to work on the reciever/transmitter circuits. I figure I might as well make the stepper motor circuit while I have this free time. Could anyone supply me with a circuit in which I could do this?

The stepper motor is supposed to sweep 180 deg, back and forth. The first my professor gave me was the L298 Dual Full-Bridge Driver.
http://tinyurl.com/e42un

The other is the L297 Stepper Motor Controller.
http://tinyurl.com/bzokx

Edit: Here is the data sheet for the stepper motor
http://www.jameco.com/wcsstore/Jameco/Products/ProdDS/213321.pdf
 
Last edited by a moderator:
  • #21
You're going to need at least a CPLD or a microcontroller to drive the stepper motor circuit & process the sonar returns. What is your strategy for that part of the circuit?
 
  • #22
berkeman said:
You're going to need at least a CPLD or a microcontroller to drive the stepper motor circuit & process the sonar returns. What is your strategy for that part of the circuit?

I plan on separating the two circuits. The stepper motor circuit will turn back and forth 180 degrees. Thats all it will do. I will have the transducers hooked up with long wires and mount them to something fairly sturdy to put on the motor to turn.
 
  • #23
Could anyone supply me with a schematic for the stepper motor with the chips that I was given?
 
  • #24
maverick99 said:
Could anyone supply me with a schematic for the stepper motor with the chips that I was given?

The link you supplied for the L297 has an Application Note link underneath it. It looks to be a pretty complete tutorial. Just click through your link and look for the Application Note link:

The other is the L297 Stepper Motor Controller.
http://tinyurl.com/bzokx
 
  • #25
berkeman said:
The link you supplied for the L297 has an Application Note link underneath it. It looks to be a pretty complete tutorial. Just click through your link and look for the Application Note link:

In that pdf files, what is the MCU?
 
  • #26
Any general purpose microcontroller could be used. That's why I asked earlier in the thread what CPLD or uC you planned on using. You will need at least some logic to provide those control signals to the stepper driver. It would be a good idea to also have limit switches at the ends of your 180 degree travel, to help your uC do some sort of initialization routine after power up or other reset.

You can start off playing with the motor by just using switches to provide the input signals...
 
  • #27
When testing the motor, do i need any current limiting components?
 
  • #28
On the schematic that was given, what is the purpose of the 8 diodes? Would rectifier diodes work for the schematic?
 
  • #29
maverick99 said:
On the schematic that was given, what is the purpose of the 8 diodes? Would rectifier diodes work for the schematic?
Look at the currents in figures 15 and 17 for your answer. Any diodes should work as long as they have adequate current and power ratings.
 
  • #30
Alright cool, sounds good. I tested out the motor and got it working right with just a dip switch. I will need to program a chip to count the way i need it to, too. My question is, do i even need the l297 and l298 in the circuit? Couldn't I just simulate the dip switch counting with the programmable chip and have that going to the motor? If not, then what are the l297 and 298 doing in the circuit?
 
  • #31
You could probably drive the correct waveforms from your uC into the power transistors that drive the motors -- might even get you extra credit in the project. You need to make the correct waveforms for the stepping and holding currents, but yeah, the uC could do that if you program it right.
 
  • #32
maverick99 said:
Why would I have to include a power source and voltage regulators on the final project assembly? Wouldn't it work fine if I just used the 5 Volt line from my power supply and used the other output for 9V?
If you did want to make a real world design as berkeman suggested, using a voltage regulator to step down a 9v supply to 5v is not hard. On the bench, you could determine how much current is drawn by your design and then decide if a 9v battery could work for the high supply..
 
  • #33
maverick99 said:
I plan on separating the two circuits. The stepper motor circuit will turn back and forth 180 degrees. Thats all it will do. I will have the transducers hooked up with long wires and mount them to something fairly sturdy to put on the motor to turn.
How will you mount the transducers so they will be turned by the stepper motor? Will transducers be on the same board as the rest of your circuit? I am trying to get a 3-dimensional idea of your final setup. Are you going to go with a circuit like the minibot one you posted at the http://www.leang.com/robotics/info/articles/minison/minison.html of this thread?
 
Last edited by a moderator:
  • #34
How about the range of your Ultrasonic Design. The spec for the project is 25feet. Only one of the circuits referenced on this thread are rated for that distance.

SRF04 Ultra Sonic Ranger
max range is 3m (x 3.28 ft/meter) = 9.84 ft
http://www.interq.or.jp/japan/se-inoue/e_pic6_6.htm
max range 3.6m (x 3.28 ft/meter) = 11.8ft
http://www.leang.com/robotics/info/articles/minison/minison.html
max range 5-6ft
http://www.ottawarobotics.org/articles/ultrasonic/ultrasonic.html
max range 10.7m (x 3.28) = 35 ft

If you did go with one of the other designs, is there a way to improve gain of the circuit?
Perhaps use more sensitive transducers?? (see below)
http://www.globalspec.com/FeaturedProducts/Detail/ScientificTechnologies/New_Ultrasonic_Sensors_for_Carwash_Applications/3542/0
Sensors with range 25ft
http://www.ssitechnologies.com/dislev6.htm
Sensors 8m (25ft)
 
Last edited by a moderator:
  • #35
I will most likely use the circuit that has a max range of 5-6 feet basically because I already ordered the parts for it. I will be building it tommorow so I will test it out to see how far I can get it to go. On a side note, I got my stepper motor working from the 2 chips that I was given. The question I have is how to get it to stop at 180 deg, because it just keeps going 360 deg over and over. I noticed that there is a clockwise/counterclockwise pin on it but it does absolutely nothing when I put it to Vcc or ground. Any thoughts?
 
  • #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:
  • #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

Replies
30
Views
4K
Replies
8
Views
18K
Replies
24
Views
9K
Replies
2
Views
3K
Replies
19
Views
3K
Replies
5
Views
2K
Replies
60
Views
6K
Back
Top