This device is able to detect the presence of people and objects up a distance of about two meters. It can be used on a vehicle, reversing radar, or to achieve industrial automation devices, small robots, etc.. It features an LED bar indicating the distance as an analog to a buzzer alarm.
Specifications:
- Operating at 40 kHz ultrasound.
- Measure the distance. - Detection of objects between 0.2 and 2.5 m.
- Bar LED for visual indication of the distance.
- Buzzer for audible indication distance. The ultrasonic sensor is a kind of radar comprising a ceramic capsule TX emits a vibration at 40 kHz (beyond the range of sounds audible to the human ear) and a transducer RX tuned to this frequency and receiving sound reflected from an object located in front of the TX and RX. This system is used for different applications because it can detect the presence of an object or a person in a defined field (radius range): the signal received by the receptor undergoes, upon detecting a sudden change level. One can also measure the distance between the TX / RX Item reflecting the ultrasonic signal as the amplitude of the signal received by the RX is proportional to the distance it has passed.
Our achievement
This article proposes to produce a device based on this principle and to use several functions: it may serve you to install the sensor on the rear bumper of your car to help you when you park (especially in a narrow underground parking ...) or to make an ultrasonic meter (yes, that's it: a real meter) stand-alone or connected to a measuring circuit A / D converter, or as detector proximity to allow a robot around obstacles. The circuit is an ultrasonic radar assisted by a microcontroller: it has inputs and outputs for achieving the functions described above, particularly when it detects the proximity of a fixed or moving its relay glue, an open collector transistor mounted and driven by a rectangular signal can sound a buzzer without electronics or a small speaker and LED lights. In addition, there is provided a TTL compatible digital output and analog output: the first presents a DC voltage when the radar detects the proximity of someone or something, the second provides a potential strictly correlated to the distance between the TX / RX and body detected. A bar of three LEDs indicates the estimated distance. But delve a little that.
How does it work?
The method used in this assembly is to spread through the air vibration (ultrasonic wave) to 40 kHz using a ceramic capsule tuned to this frequency, then capture the waves reflected by the object close; the reception is performed by a second transducer which, when the first act in a way, speaker, plays the role of money in a microphone. Indeed, the ceramic membrane is subjected to pressure (acoustic, but at 40 kHz it is far from the sounds audible) in the air caused by reflected ultrasound: the intensity of that pressure is inversely proportional to the distance traveled by that produce ultrasound by compressing the air (the material and surface condition of the reflecting object characteristic porosity which absorbs more or less the ultrasound received and forwarded to the TX RX). In any case, the terminals of the transducer RX, it retrieves a variable electric voltage generated from the ultrasonic pressure on the ceramic membrane (the famous piezoelectric phenomenon: the voltage is proportional to the pressure deforming the membrane, as with a microphone, which is also a model piezoelectric, precisely), more precisely , the amplitude and frequency of this voltage depends on the amount, intensity and time of transporting the various reflected components. At rest, that is to say when the radar is not in motion (the vehicle is stopped, for example) and is in a stable air (no wind or fan no object or person moving), tension remains constant, that is to say that its amplitude and frequency remain unchanged. But when an object enters the field of radar range ultrasound (0.2 m to 2.5 m), the voltage varies. You can read this tension and its variations straightening in order to obtain the DC component and is easy to discriminate the condition of rest of the intrusion of an object in the field: indeed, across the rectifier is notes a change in voltage obtained.
As for exits, they behave as we have explained above, and each has a characteristic that the table of Figure 4 describes in detail. Rather see how the detection system by analyzing the electrical diagram and the program resident in the PIC16F630 microcontroller programmed EV125 including the "routine" (sub-program) on the ultrasonic radar itself.
The wiring diagram
The wiring diagram of Figure 1 shows the place that the PIC micro capsules to manage the TX and RX with the help of a few operational amplifiers. After initialization lines I / O, the resident program launches ICP "routine" operation simulating Ultrasonic radar: using an internal timer, PIC produces a component at 40 kHz it sends through its online RC5 (initialized as output) to the transistor T3, NPN, which amplifies the current to drive the capsule Piezo transmitter.
Meanwhile he prepares for the RA3 controls cyclic (configured as input) which reads the voltage changes, note that the RX receiver can not directly interfaced with the microphone but the signal has to pass through a network whose function is to amplify the analog voltage obtained from the reflected waves, the filter and the right to draw a continuous component. Specifically, the electrical signal produced by the RX is applied (through C5 and R11) to pin 2 of IC2A an operational amplifier mounted inverter whose voltage gain G is: G =
R24: R11
amplified component is again inverted and amplified by IC2B whose gain G depends on the time of the report:
G = R25: R12
The resulting voltage is compared with a constant reference located in IC2c A third operation mounted this time as a comparator non-inverting: whenever potential from the received signal exceeds a threshold determined by the potential applied to pin 9, 8 passes from zero to about 12 V.
Give a shot zoom on the bias network of operational IC2A, IC2B, IC2c: it was designed to provide each with a specific reference, the two have their first non-inverting input biased with just under 6 V (obtained R19/R20 by the bridge, fed downstream of the filter R1/C13) and this makes sense because when amplifying analog signals, there must be (at rest) leaving at half the supply voltage of to ensure equal tour of the half wave positive and negative. Of 6 V and used to IC2A IC2B the bridge R5/R6 makes the potential for reference to the comparator, it is a slightly lower voltage (about 5.8 V) than the one standing at the exit of IC2B, which provides that the comparator switches when the peak of the signal from the dish receiver exceeds 200 mV positive.
Whenever the signal in question exceeds the threshold, the comparator provides a positive pulse and when it drops below zero shadow formed by the 6 V and polarizing IC2A IC2B, comparator maintains its own output low (about 0 V ). One can infer from this user Operating IC2c that is essentially a single-wave rectifier, or if you prefer, a detector: its role is to make unidirectional voltage variable from the capsule RX and draw rectangular pulses that the PIC can read. Since the amplitude of these pulses is about 12 V and the input lines of the PIC will not accept more than 5.5 V, it was necessary to insert the zener ZD1 which, together with the current limiting resistor R26, limited to 5.1 V potential applied to RA3.
- The software also provides an analog output that provides a potential whose amplitude is directly proportional to the distance at which the object is detected (but of course within 0.2 m to 2.5 m); August (the name of the analog output) determines a voltage obtained by means of a "routine" (subroutine) generating a PWM waveform whose duty cycle is directly proportional to the distance detected or, if you prefer, inversely proportional to the amplitude of the component read by the A / D converter of the microphone. The pulses are filtered out of RC3 by low-pass cell composed of R22 and C11, the ends of the cell so we find a well smoothed dc voltage whose amplitude follows the duty cycle of the PWM waveform and therefore this amplitude is more important than the intensity of the signal read by the capsule RX is low (and the distance is large) and vice versa.
The potential is applied to the input an operational (IC2d) mounted in "buffer" non-reversing the return with the same amplitude on its pin 13 from which, through R13, it reached in August and is read by the RA1. The role of "buffer" is to allow to fly with the Aug. devices consuming tens of mA without loading RC3 line that could not supply a current greater than these few mA.
Well, well, since you now know in detail the operation of all outputs, you'll build on them based on the application you intend for the device.
If you want to use the interaction of three types of signs, know for example that with the slider half way RV1 August provides only 0.8 V when LD3 is on, that is to say if the radar detects an object at a distance just less than 0.5 m. Conclude this analysis of the circuit diagram indicating that the entire assembly operates at a supply voltage between 12 and 15 V applied to V and GND points 12 (a car battery, reversing radar mode is ideal) ; D3 protects the circuit against accidental reversal polarity and prevents the flow of current as the input power to the rest of the circuit. The regulator VR1 is giving 78L05 5 V stabilized needed to operate the microphone, the trimmer and the sensitivity of the transistor acting as a "buffer" for digital output.
Figure 1: Diagram of the ultrasound transducer.
Figure 2: Diagram of component layout on the deck of the ultrasound transducer.
Figure 2b: Drawing scale 1, the circuit printed from the plate of the ultrasonic sensor.
Figure 3: Photograph of a prototype of the sensor board to ultrasound.
Iist R1 ...... 47 R2 ...... 47
R3 ...... 47
R4 ...... 220 R5 ...... R6 10 k ...... R7 270 k ...... R8 1 k ...... R9 1 k ...... 1 k
R10 ..... 1 k
R11 ..... 1 k R12 ..... 1 k R13 ..... 1 k
R14 ..... 1 k
R15 ..... 1 k
R16 ..... 1 k
R17 ..... 1 k
R18 ..... 1 k
R19 ..... 15 k
R20 ..... 15 k
R21 ..... 15 k
R22 ..... 15 k
R23 ..... 15 k
R24 ..... 22 k
R25 ..... 22 k
R26 ..... 22 k
RV1 ..... 10 k trimmer MO
C1 ...... 100 nF multicouche
C2 ...... 100 nF multicouche
C3 ...... 100 nF multicouche
C4 ...... 100 nF multicouche
C5 ...... 10 nF céramique
C6 ...... 10 nF céramique
C7 ...... 18 pF céramique
C8 ...... 18 pF céramique
C9 ...... 10 μF 35 V électrolytique
C10 ..... 10 μF 35 V électrolytique
C11 ..... 10 μF 35 V électrolytique
C12 ..... 100 μF 25 V électrolytique
C13 ..... 100 μF 25 V électrolytique
C14 ..... 470 μF 25 V électrolytique
LD1 ..... LED 3 mm rouge
LD2 ..... LED 3 mm rouge
LD3 ..... LED 3 mm red
LD4 ..... LED 3 mm red
ZD1 ..... 5.1 V 400 mW Zener D1
...... D2 1N4148
...... D3 1N4148
...... 1N4007
X1 ...... 8 MHz quartz
IC1 ..... PIC16F630-EV125 already programmed in the factory
IC2 ..... TLV274
VR1 ..... 78L05
T1 ...... T2 BC547
...... BC547
T3 ...... BC547
Q4 ...... BC547
RY1 ..... 12 VDC relay contact 10 A 1 TX
...... capsule emitting ultrasonic
RX ...... capsule receiving ultrasonic
Miscellaneous:
2 supports 2 x 7 1
horizontal bar 12 pin male
a plastic housing
Both ultrasonic capsules can be mounted on the printed circuit board vertically or horizontally (in the latter case, they must be on pins or solder tails vertical components) and can also put them at a distance (in this case we will link them to the plate by means of shielded cables) . Do not forget the three "jumpers" wired J1, J2 and J3.
OUTPUT FUNCTION
USABLE ...
Relay Normally conduction between COM and NC, closes between COM and NO each time starts at Dout logic high and back to rest with a slight delay compared return to zero volts in doubt. | ... coupled to or instead of Dout as contact-intrusion alarm systems or to start playing a message or open a turnstile or gate when a person or vehicle approaches. | Dout | normally at logic low, makes the logic high level (4 V) where the presence of a body at a distance of 0.2 to 2.5 m is detected.
LD4 | Suit states doubt on when the radar detects a body at a distance of 0.2 to 2.5 m off when there is nothing detected or if the object is closer than 0, 2 m or further than 2.5 m. | |
August | Provides a voltage directly proportional to the distance of the object detected, ranging from 0 V (when the object is not to over 0.2 m) at 4 V when it is 2.5 m and more. | |
buzzer (BUZ + / -) | Order a buzzer sounding in the way of impulse if an object is detected within 2.5 m and continuously if the detected object is less than 0, 2 m if the distance exceeds 2.5 m the buzzer remains silent. | |
LD1, LD2, LD3 | Form a bar indicating the distance: the distance for which they light up depends on the setting of the trimmer, LD3 indicates the shortest distance, LD2 (lit with LD3) and the intermediate distance when LD1, LD2 and LD3 are on all three is that the obstacle is the maximum distance, all three are off if an obstacle is less than 0.2 m. | |
Figure 4: The output functions. | ||
The practical | Once we realized the single-sided printed circuit (Figure 2b gives a scale drawing of the deck) or that HE is provided, you climb the first three "jumpers" J1, J2 and J3, the four pins for both capsules and the two piezoelectric materials integrated circuit and then verifies the quality of these first welds (or short circuit between tracks or pads or cold solder joints). It inserts | integrated circuits until all welds have been completed.Then mount all the components in a certain order, looking frequently 2a and 3, and the list of components. Insertion and welding pose no particular problems, they require only a little care, but take everything The same good care of the polarity (as defined in assembly) polarized components (diodes, zener, LED if you deport, use the pair rouge/noir-, electrolytic capacitors, transistors and regulator in plastic packages and many half moon sure at the end integrated circuits). | note, some resistors are mounted vertically. Climb a second time the bulkier components such as trimmer, quartz, connector, relays and two capsules piezo. About the latter: first mount the capsule TX (it is marked with an S or T) and the RX (it is marked with a R). In case of doubt the TX is not shielded at the rear, while the RX is screened out on the side where the solder tabs (ie to avoid interference), you can deport them away from the plate but in this case connect them with shielded cable, the hot spot up to + and the braid to ground (for RX mass is of course the shield).
0 comments:
Post a Comment