Thursday, December 16, 2010

How To Get Pokemon Games On Cydia

An ultrasonic sensor controller for universal

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.
Since we came to this line of PIC, the program reads cyclically to verify the presence of pulses due to the return of the reflected wave at 40 kHz, note that when the arrival of pulses has been detected, a "routine" prepare the relevant data by measuring the average value of line voltage by pulses. More precisely, the micro check the width and interval of pulses to determine the intensity of the reflected signal to the RX. The measure concerns the A / D converter internal to the PIC that we attribute to the line RA3 during the initialization phase, the converter has a resolution of ten bits and can be coupled to up to eight I / O (read multiplex), it also helps to define, with the potential applied to RA0, the reference voltage sampling. For us, with the trimmer RV1 we define the voltage range that the A / D conversion and we must choose the sensitivity of the conversion: when you turn the cursor to the positive 5 V, the circuit becomes less sensitive and vice versa . The amplitude of the reference scale of the converter is directly proportional to the sensitivity, that is to say at the distance of radar detection, and therefore with the trimmer RV1 we can define the distance covered by the sensor and choose between 0.2 m and 2.5 meters. The A / D converter determines the digital data that is read by the main program to assess the distance and control outputs based on the latter. Let's see, one after another, how these outputs are supported:
- RA2 line to begin with, is forced to logic level high when the detected object is between the minimum distance and maximum distance perceptible, in the Otherwise (object too distant or too close) RA2 goes to logic zero, the LED LD4 lights when the radar detects the proximity of an object between 0.2 m and a distance dependent sensitivity set with the trimmer RV1. As for the relays, it sticks shortly after ignition of LD4 and starts at rest with a slight delay compared to the extinction of the LED. Note that the software considers exceeded the minimum distance when it detects that the signal picked up by the capsule and amplified by RX IC2A IC2B and is just below the maximum, which it considers to be beyond the maximum distance when in Depending on the setting of RV1, the signal arrives on RA0 with an amplitude less than the minimum threshold. RA2 line, responsible for monitoring and LD4 T1 driver transistor as T4, NPN used as a "buffer" (buffer) to control the digital output: Dout line provides a logic level which follows the alternation or the logical zero when RA2 is at logic low and logic one (about 4 V ) when it is at high logic level.
- 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.
- A final release is scheduled for controlling the buzzer: it corresponds to the transistor Q2, a NPN whose base is controlled by the microcontroller through its online RC4, this buzzer is especially useful in reversing radar mode to help with parking cars (indeed, the buzzer sounds different depending on the distance where the obstacle). Here's how it works: If the radar detects nothing or if the object is located beyond the radius of -2.5 m-range, line RC4 goes to logical zero, the transistor is off and the buzzer is silent; However, when the distance between RX and obstacle is less than 2.5 m, the microphone launches first alarm signal by switching the logical condition of the line RC4 (typically 0.5 s to high logic level and 0 5 s at low logic level) and alternating conduction and saturation T2, which determines the emission of an intermittent sound from the buzzer connected points and BUZ-BUZ +. Finally, if the radar and the detected object is too close-less than 0.2 m-RC4 is set to logic 1, the transistor is always saturated and the buzzer sounds continuously. - The microcontroller can also order a wide LED which express in their own way (analog bar three, LD1, LD2, LD3) the distance between ray and object or obstacle. They are controlled by internal converters, each set has a different threshold. LD3 lights when the object is within walking distance (but at least 0.2 m), with LD2 LD3 lights when the object is farther (Typically in excess of a meter) and LD1 is in addition to two others (ie LD1, LD2 and LD3 are all three on) when the object is detectable at the maximum distance (2.5 m).
Below 0.2 m all three are extinct. During the operation it may happen that one or more LEDs do not light so stable it typically occurs when the object or obstacle is moving or is at a distance does not correspond to the thresholds set.
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. 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. ... coupled or in place of the relay output, which is modeled on virtually any change of status. 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. ... as signaling devices to understand that an object has entered the range of the radar sensor in use as a burglar, reports the status of the output. 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. microammeter ... to drive a needle whose scale can be graduated in decimetres, or a digital voltmeter or circuit capable of visualizing the tension, the goal is to provide a ultrasonic meter. 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. ... when the circuit is mounted on as a vehicle reversing radar (parking aid): the impulsive sound alerts the driver when the vehicle approaches a wall or another vehicle, the continuous sound means that the obstacle is very close and it takes stop. 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. ... as an indicator of distance gives a rough guide depending on the setting and in some cases it may be helpful: for example, you can use the circuit as reversing radar for parking (it allows a visual assessment of the distance is a barrier for use with or instead of the buzzer sound guidance). integrated circuits until all welds have been completed. 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). The 12-pin connector with 2.54 mm may be omitted and the son can be welded directly to the pellets.
... 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
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 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).
When all this is done, press the two integrated circuits in their sockets, though by directing their bearings polarizing U-R2 for the PIC to IC1 and IC2 to R22. The CIP is available already programmed at the factory.
Check at least twice systematically (identification of components, respect for values, polarity and weld quality), you will not regret it because the installation work the first time. power to the circuit (if used on a vehicle, feed it with the car battery) from a small power supply provides a voltage of 12 to 15 VDC at a current of 100 mA minimum . In all cases, mount a delayed 500 mA fuse. By car (parking sensor), take on 12 V after ignition of the fuse box Neimann, so that the device is switched off when not needed since the vehicle is not supposed to drive (this avoids draining the car battery!). When the power is on, put the cursor RV1 mid race and stand in front of the capsule: Verify that beyond 0.2 m and up to a few meters the sensor detects you (you'll know because you hear the relay stick and see the LEDs light up depending on the distance at which you are or have placed the obstacle).

0 comments:

Post a Comment