Home
Here - Kitsrus
Contents
1. Constructional Project WIND SPEED METER JOHN BECKER Using ultrasonic techniques this solid state design has no moving parts and does not need calibrating is intended for use in a variety of Sports type activities such as track events sailing hang gliding kite and model aircraft flying to name but a few It can even be used to monitor the conditions in your garden A probe is pointed in the direction from which the wind is blowing and a screen displays the rate at which the wind is mov ing between two ultrasonic sensors The readout is shown on an alphanumeric liq uid crystal display l c d with readings in metres per second feet per second kilo metres per hour and miles per hour The resolution is to the nearest tenth of a metre per second from zero up to around SOmph and possibly higher The design is one of two spin offs from the author s wish to design a totally solid state no moving parts Weather Centre in which several environmental criteria are monitored and logged wind speed and direction humidity barometric pressure temperature rainfall light and UV intensi ties air humidity and soil moisture con tent The design will be published in a few months time LET THE WIND BLOW FREE Having designed the Weather Centre it became necessary to prove that the ultra sonic wind speed sensing technique more on this presently was indeed viable The obvio
2. voltages in excess of 50V were generated when just minor finger pressure was applied much to author s astonish ment having expected just a few milli volts Bi morphs though proved to be too uncontrollable for a wind speed sensing application They are also fragile which would have made their mounting difficult ULTRASONIC SENSING For some years the author has been determined to find a way in which a solid state wind speed sensor could be designed Having eliminated the techniques just dis cussed either because they are mechani cal too insensitive or too fragile his atten tion turned to the use of sound You are probably aware that sound travels through dry air at a speed of 750 miles per hour 331 4 metres per second at standard tem perature and pressure STP effectively 15 C at sea level with an atmospheric pressure of 1013 2 millibars If the air is moving the rate at which sound reaches a listener from its source varies with the direction in which the air mass is flowing faster if the wind is com ing from the same direction as the sound slower in the opposite direction The time it takes for a sound to travel between a source and a receiver can be easily measured Knowing the basic speed of sound under specified conditions the rate at which the air mass is moving can be calculated from the measured timing When using a single source and receiver for the answer to be meaningful of course the wind m
3. it felt comfortable in the hand It also allowed the transducers to be secured using cable ties and holt melt glue see photo below delivered from an inexpensive gun avail centres A handle could be fitted if preferred The distance between the transducer in the prototype was set to about ins 18 Sems but the distance is not critical and a fraction either way does not matter The transducers used in the prototype were the standard front facing open mesh type available from many component sup pliers Fully enclosed waterproof types were tried but it was found that they were not satisfactory in this application Transducer secured to probe mount using a cable tie and hot melt glue 47 Investigation showed that their transmis sion reception surfaces can cause signifi cant ringing in the response disrupting the pulse shaping No attempt was made to waterproof the open mesh transducers It might be possible though to cover them using the end section of a finger from a thin latex glove or similar Perhaps even cling film might be usable Tt does not matter in which order the trans ducers are mounted and connected Although supplied as a pair comprising one transmitter and one receiver as explained earlier they are used interchangeably in both capacities COMPONENTS Resistors R1 R11 See R2 1S xuan TALK 100k 2 off 1M page 71 4k7 Potentiometers VRI 10k min preset round VR2
4. mission pulses are generated by a PIC microcontroller which is described presently in relation to Fig 2 The route that the pulses take through IC3 is selected by the logic level applied to its pin 10 also controlled by the PIC When pin 10 is held low the pulses are routed from IC3 pin 3 to pin 1 and out to 46 transducer X3 This transducer transmits the pulses across a gap of several centime tres to the second transducer X4 which receives the pulses and routes them to IC3 pin 12 The pulses which are much attenu ated by their journey pass through IC3 to pin 13 and to the analogue amplification circuit formed around op amps IC4a and IC4b A MAX412 op amp was used in the final circuit but an LM358 was also found to be satisfactory When IC3 pin 10 is held high the pulses are routed from IC3 pin 3 to pin 5 and this time out to transducer X4 Now transducer X3 receives them and they pass via pin 14 to pin 13 and so out to the amplifier From IC3 pin 13 the received pulses are a c coupled via capacitor CS to the first amplifier IC4a A gain of about 100 is pro vided by this stage as set by the values of resistors R3 and R6 The signal is then a c coupled by C7 to the stage around IC4b Here the gain can be varied between about x0 5 and x10 as controlled by preset VR2 The potential divider formed by R4 and RS applies mid rail bias to the non inverting inputs of the two op amps pins 5 and 3 respectively The fina
5. not recommend the use of tobacco products to create tunnel smoke THANKS The author wishes to thank the following for their help during the development of this PIC Wind Speed Meter Andy Flind for the loan of his thermal anemometer Mike Tooley for arranging access to the wind tunnel at Brooklands College Surrey Barry Baker for demonstrating the Brooklands College wind tunnel Peter Hemsley for his excellent multi ply divide and binary to decimal conver sion routines used extensively in this design s software Malcolm Wiles for his informative arti cle on using PIC interrupts EPE BINDERS 2 KEEP YOUR MAGAZINES SAFE RING US NOW This ring binder uses a special system to allow the issues to be easily removed and re inserted without any damage A nylon strip slips over each issue and this passes over the four rings in the binder thus holding the magazine in place The binders are finished in hard wearing royal blue p v c with the magazine logo in gold on the spine They will keep your issues neat and tidy but allow you to remove them for use easily The price is 6 95 plus 3 50 post and packing If you order more than one binder add 1 postage for each binder after the initial 3 50 postage charge overseas readers the postage is 6 00 each to everywhere except Australia and Papua New Guinea which costs 10 50 each Send your payment in s sterling cheque or PO Overseas readers send ster
6. of about 2V peak to peak depending on the setting of preset VR2 The masking delay allows this pulse to be ignored before the PIC starts waiting for the true received pulse This pulse s occur rence will be seen a little to the right of the first pulse following a quiet gap Note how the received pulse is considerably lengthened compared to the length of the transmission pulse This clearly illustrates the ringing of the receiving transducer in response to it being hit by the transmission pulse If you expand the scope trace you will probably see that the ringing is at 40kHz the frequency to which the trans ducer is most responsive Monitoring TP6 with Channel 2 shows how the op amp output pulse train triggers the transistor into full saturation pulses It is the first of these to which the PIC s RBO interrupt responds Adjust YR4 back and forth and see how the gain set for IC4b affects the transistor s reaction VRE EXPERIMENTING If you want to experiment with the val ues for the transmission pulses and mask ing the trick is to ensure that the masking period does not end too early or too late Secondly the transmission pulses must cause an adequately strong response of both transmission and reception transduc ers yet not cause either to ring for too long Everyday Practical Electronics January 2003 It is just possible although unlikely that a single transmission pulse will be ade quate P
7. of the isobar ridges You no doubt know that the tighter the iso bar spacings the stronger the winds that pre vail It is also worth appreciating that wind speeds vary with height Wind near to ground level will flow at a slower rate than wind higher above the ground Measurements taken at heights differing by only a few metres can be different Although an averaging mechanism has been built into the software always observe the meter for several seconds mentally noting the range of values between which the readings change NEXT MONTH In next month s issue the construction of a simple wind tunnel will be described This uses the same basic wind sensing cir cuit and software but additionally includes a circuit which controls the rate at which an electrical fan rotates so allowing the rate smoke which is nor of air flow through the tunnel to be changed The system is ideal for demonstrating how air flows around differently shaped structures placed within the tunnel From this it is possible to see how winds can damage buildings cause wings to lift aircraft and how important streamlining can be for any vehicle airborne or road based The airflow pattern can be enhanced by using an equivalent to beekeepers mally created by burning various traditional substances particular types of wood and card board and used to pacify bees More mod ern options will be dis cussed We do
8. running back inside the wing to a pressure sensor mounted in the fuselage A second sensor compares the air flow pres sure with atmospheric pressure monitored in a wind tight enclosure This arrangement provides data about the aircraft s speed through the air but not in relation to the ground for which other tech niques are required such as radar and GPS Global Positioning Satellite systems PROPELLOR UNITS There are neat little but quite expen sive handheld units in which a propellor is rotated by the wind The rate at which the propellor rotates is metered to display the equivalent wind speed The propellor is mounted on precision low friction bear ings to allow very slow wind speeds to be sensed Typically internal blades mounted as extensions to the propellor shaft break a light beam aimed at an optical sensor and the number of pulses generated is counted across fixed periods of time Some small d c motors can have pro pellors mounted on them and the wind activated rotations cause an output voltage to be generated The voltage peaks are BI MORPHS It did look for a while as though bi morph elements might be usable These are a type of strain gauge made from thin piezo electric rod which generates a volt age across two output wires when subject ed to bending The voltage generated dur ing the bending depends on the rate at which the stress of bending changes Attaching a scope probe to one in the workshop
9. setting first for one polarity i e 5 and if that makes matters worse use 5 The object is get the difference value as consistently close to zero as possible There will always be a bit of value changing seen due to the simple nature of the transducers and the amplifier Remember that it is an analogue system being used for pulse transmission and reception amplification The digital aspect as shaped by transistor TRI and read by the PIC through its interrupt func tion may not necessarily respond each time to precisely the same analogue volt age level of the waveform output from op amp IC4b ADVANCED SETTING As said previously it is highly improba ble the Mask and Pulse values will need changing However readers who have a dual trace oscilloscope might be interested to experiment with these two values Several test points have been included on the p c b as follows TP1 Connected to PIC pin RAO which goes high following the masking period and the PIC starting to listen TP2 Connected to PIC pin RAI and multiplexer IC3 pin 10 the pin that con trols the signal routing to and from the transducers TP3 Connected to PIC pin RA2 and IC3 pin 3 carrying the 40kHz output signal pulses TP4 Connected to PIC pin RA3 which goes high on receipt of signal capture by the interrupt routine TPS Connected to the output pin 1 of op amp IC4b allowing the fully amplified signal to be monitored prior to being
10. 100k min preset round Capacitors 1 C2 C6 C8 100n ceramic 5mm pitch 4 off C3 C4 C9 10p ceramic 5mm pitch 3 off c5 100p ceramic 5mm pitch c7 in ceramic 5mm pitch Semiconductors D1 1N4148 signal diode IC1 PIC16F628 20 microcontroller pre programmed see text 2OMHz c2 78L05 5V 100mA voltage regulator Ic3 4052 2 pole 4 way analogue multiplexer Ic4 MAX412 or LM358 dual op amp see text TRI BC549 or similar npn transistor Miscellaneous min s p s t or s p d t toggle switch min s p push to make switch 2 off x1 20MHz crystal x2 2 line 16 character per line alphanumeric l c d module 40kHz ultrasonic transducer 2 off matched transmitter receiver pair S2 3 X3 X4 Printed circuit board available from the EPE PCB Service it socket 16 pin d socket 1mm terminal pins or pin header strip 9V PP3 battery and clip p c b supports 4 off plastic case 150mm x 80mm x 50mm metal support for transducers about 260mm see text cable ties nuts and bolts to suit I c d module connecting wire solder etc 30 excl batt Approx Cost Guidance Only TO BATTERY BI o Fig 4 Printed circuit board component layout and full size copper foil master track pattern for the Wind Speed Meter Screened stereo cable was used for the transducer connections back to the board simply because it was to hand It is thought that
11. USE To use the Wind Speed Meter point the transducer assembly in the direction from which the wind is blowing To avoid the possibility that your body may disrupt the wind flow hold the probe somewhat away from your body To observe peak wind speeds the Av message on line 2 should be absent To obtain average wind speeds press switch S3 so that Av is shown The speeds shown are the average taken over 16 transmission cycles but updated on each cycle Be aware as you will soon find that wind is not just the uniform flow of a mass of air past a given point It is full of turbu lence and the eddies within it swirl at dif ferent rates Turbulence is even more prevalent near to fences buildings trees and even other people Where possible take readings while well out in the open Even then turbulence will still be there The transducers themselves will actually cause a bit of turbulence but not enough to radically affect the validity of the readings The best you can hope for with any wind speed sensor is to show the speed that exists at a given moment in time The wind speed indications given on the weather forecasts for example represent an aver age in relation to several hours of observa tion or calculation The calculations that relate to long term forecasts will probably be based on baro metric pressure readings taken at strategic points across the countryside and provid ing information on the tightness and depth
12. agram for the control and display functions Everyday Practical Electronics January 2003 programming by Toolkit TK3 Note how ever the comment later about program ming brand new PICI6F628 devices POWER SUPPLY It is intended that a 9V PP3 battery should be used to power this design although any d c supply between 7V and about 15V could be used The input volt age is regulated down to SV by regulator IC2 Capacitors C1 and C2 encourage stabili ty in the power lines Current consumption in the prototype is about 14 5mA TRANSMISSION In the transmission routine SONICTX the PIC sends a quantity of pulses whose cycle period is the equivalent to a 40kHz pulse train The quantity to be sent is stored in the PIC s data EEPROM and can be adjusted by the user see later The proto type requires just two pulses to activate the transmission transducer Immediately prior to transmission mul tiplexer IC3 is set to route the transducers to become transmitter and receiver in the order required The PIC s Timer 1 is then stopped reset and restarted The pulses are then sent There follows a brief masking pause before the PIC starts expecting the return signal This allows the amplifier circuit to stabilise in the event of any capacitively induced ringing which can be triggered during the transmission The masking peri od value is stored in the PIC s data EEP ROM and is set at 80 loop cycles in the proto
13. at the transducers are in line with the wind direction the wind s speed can be readily calculated from the timing value However the answer only holds true if the air conditions are those specified at STP The answers will differ if the condi tions differ There is very simple technique that essentially allows the changes in air condi tion to be nullified A signal is shot from transducer 1 to transducer 2 and a timing measured Immediately the roles of the transducers are reversed now transducer 2 shoots the signal and transducer 1 receives it and again a timing is recorded Two methods can then be used to estab lish the wind speed In the first an average is taken between the two timings This pro vides the current speed of sound existing in that location under those conditions Knowing the current speed of sound and the distance between the transducers 45 Fig 1 Ultrasonic transmission and reception circuit diagram for the Wind Speed Meter either of the two individual timings can be used to calculate the rate of air flow between the transducers At a stroke tem perature density and pressure as specific values become irrelevant It is worth noting that temperature is the main factor that causes a change in the speed of sound One source states that if the speed of sound is 332m s at 0 C it will be 344m s at 20 C and 386m s at 100 C Thus there is a change of only 3 5 per cent across a temp
14. d speed Generally speaking such systems have too much friction to respond to slow wind speeds The author has not experimented with thermal sensing but he has previously tried various pressure sensing techniques to monitor wind speed Regrettably the pres sure sensing transduc ers inexpensively available on the hob byist market proved to be too insensitive to slow wind speeds Commercial thermal anemometer lent to the author by Andy Flind last time it was demonstrated thanks to Tan Bell and Dave Chesmore S shaped rotational mechanisms are frequently seen as well rotating at speeds relative to wind movement They are typi cally used in an advertising capacity out side petrol filling stations The author used the technique in his Met Office design of about eight years ago In the thermal technique just mentioned a component typically a thin wire is heat ed and the amount of heat loss caused by air moving across it is sensed and com pared with the heat generated by an enclosed reference source Andy s meter appeared to use a tiny and delicate ther mistor arrangement in its directional probe see photo Such sensors are likely to be priced well above the pockets of most readers Pressure sensing techniques are used in high speed air flow applications such as in aircraft With the Provost jet trainer in the Brooklands College workshops a rigid tube is mounted in the leading edge of one wing
15. ed Having assembled the board and thor oughly checked the correctness of the com ponent positions their orientation where Dren D7 14 13006 08 613 Ds 12 1004 D5 12 D310 9902 Diet Dies 700 D3810 Ees serw 0299 AS 4 3 Cx pies 5ve2 190v D087 ASe4 cxes tve we Fig 5 The two standard l c pinout arrangements module Everyday Practical Electronics January 2003 p c b appropriate and the quality of your solder ing switch on the battery Immediately check that 5V within a few percent is present at the output of voltage regulator IC2 If not immediately switch off and correct any assembly error Always switch off the power before making any changes on the board Then insert the remaining i c s ensuring that they are the correct way round and connect the l c d module The Lc d ICL and IC3 are CMOS devices and the usual handling precautions should be observed touching a grounded item of equipment before handling them to discharge static electricity from your body The PIC microcontroller IC1 should have been preprogrammed either purchased as such or via a suitable programmer Although PIC programming connections have been provided on the p c b it was found that any previously unused brand Prototype p c b assembly The changes visible have been incorporated on the final new PICI6F628 device could not be programmed in situ due to it being c
16. erature range of 20 C The effects of humidity and barometric pressure are insignificantly small by comparison The other technique which for most practical situations is just as good is to simply take the difference between the two timings and from this the equivalent wind speed can be calculated each unit of dif ference representing a given value of speed change Both techniques are easy to implement with an accurately controlled ultrasonic pulse source and timer It is also facilitated by the fact that even low cost ultrasonic transducers can be interchangeably used as transmitters and receivers Although they are specifically designated as being a trans mitter or a receiver under pulsed condi tions and using a suitable circuit they can be used as either Indeed in some echo sounding applica tions where the time between the trans mission and reception is comparatively long only one transducer is needed acting as both transmitter and receiver It is ultrasonics and the second calcula tion technique that are used in this design ULTRASONIC CIRCUIT The circuit diagram for the ultrasonic transmission and reception functions is shown in Fig l The two transducers are shown as X3 and X4 As just said they are both used interchangeably as transmitter and receiver Analogue multiplexer IC3 selects the mode in which the transducers are used The transducers operate at the usual ultrasonic frequency of 40kHz The trans
17. he previous value received This helps to damp the effect of any extraneous sounds within the 40kHz range that might be picked up by the receiving transducer The answer is stored into one of 16 double byte memory locations accessed cyclically and from which an average value is calculated from all 16 values stored This result is then stored into a sec ond memory block from which a further average can be calcu lated if the user requests it via panel mounted pushswitch 3 Following storage of each final result calculations of wind speed are made and i displayed on the l c d PULSE There follows a brief RA2 pause after which the next pair of transmis sions and receptions is triggered and processed The over all sampling rate is about 3Hz A screen dump image of the wave forms created by this design is shown in Fig 3a It was cap tured using the author s PIC Dual Channel Scope of Oct 0k O0 The vertical line in the upper trace shows the transmission TX pulse The second trace shows the ringing generated through IC4 by the pulse followed by a delay as the pulse crosses to the receiving transducer Then occurs the output wave form at IC4b caused by the amplification of the received RX pulse Again note the ringing generated In Fig 3b and Fig 3c the schematic graphs show the relative points during the screen trace at which the masking period ends monitored at ICI pin RAO and at wh
18. ich the interrupt routine captures the amplified pulse monitored at IC1 pin RA3 SOFTWARE The PIC program software is available for free download from the EPE ftp site It is also available from the Editorial office on 3 Sin disk for which a small handling charge applies Details of obtaining the software and preprogrammed PICs are given in this month s Shoptalk column There are three software files suffixed ASM TASM grammar HEX MPASM and OBJ TASM The MPASM hex file has configuration and data EEPROM val ues embedded in it If the OBJ file is used the PIC has to be configured sepa rately crystal HS WDT off POR on and the data EEPROM values set manu ally during the value correction process that will be described shortly Note that the unit may respond unpredictably until the values have been installed following OBJ programming The values are decimal 2 80 and 0 to be stored at EEPROM locations 0 1 and 2 respectively Everyday Practical Electronics January 2003 RINGING IC4 PIN 1 ICA PIN 1 RX PULSE MASK END RAO CAPTURE RAB Fig 3 Waveforms associated with the ultrasonic transmis sion and reception functions TRANSDUCER ASSEMBLY The ultrasonic probe assembly is shown in the first photograph This is only a sug gested arrangement and other mounting techniques could be used instead The author used a 10 inch T Brax shelf support This was found to be shaped so that
19. l wind speed monitors were made available to the author First EPE contributor and schematic artist Andy Flind lent the author a hot wire thermistor thermal anemometer which he had bought second hand and uses in kite flying competitions Also Mike Tooley author and editor of EPE s sister publication the Electronics Service Manual arranged for the author to test his and Andy s anemometers in the wind tunnel at Brooklands College Surrey where Mike is a senior tutor in electronics That wind tunnel is used by the College s aeronautical department The readings on all three units corresponded Using Andy s meter as a reference the author s anemometer and wind tunnel were further developed WIND SPEED SENSING Several techniques for measuring wind speed exist The mechanical rotating assemblies with three cups are probably the most familiar These are frequently seen along the verges of roads used for localised meteorological monitoring The technique is also used in commercial weather centres on general sale to the pub lic It has featured in previous weather cen tres designed by the author and others Teach In 2002 Part 7 May 02 was the Prototype Wind Speed Monitor with hand held ultrasonic sensor assembly on a T Brax shelf support Other mounting techniques can be used Everyday Practical Electronics January 2003 monitored and the resulting meter read out shows the equiva lent win
20. l gain stage is provided by tran sistor TRI Its base b is biased normally low by resistor R9 so holding it in a turned off condition The output from IC4b is a c coupled to TRI by capacitor C8 Any positive going pulses from C8 which exceed about 0 6V turn on TR1 causing a full line level negative going pulse at its collector c This pulse is coupled via resistor R11 back to the PIC For reasons unknown the PICI6F628 microcontroller used in this design would not respond correctly when RII was replaced by a direct link wire A 10pF capacitor C9 was also found necessary between the collector and the OV line This was discovered by accident when using an oscilloscope probe which itself has a cir cuit capacitance of about 10pF CONTROL CIRCUIT As shown in the control circuit diagram of Fig 2 the PICI6F628 microcontroller ICI is responsible for generating and sending pulses to the ultrasonic transduc ers and for timing the return of the received signal The results of its calcata tions are output to the 2 line 16 character alphanumeric l c d X2 This is operated in 4 bit control mode with its screen contrast adjustable by preset VR1 The PIC is operated at 20MHz as set by crystal X1 in conjunction with capacitors C3 and C4 It can be programmed in situ via connector TBI whose pins are in the author s standard order suited to ADJUST AVERAGE Fig 2 Circuit di
21. ling bank draft or cheque drawn on a UK bank or pay by card to Everyday Practical Electronics Wimborne Puublishing Ltd 408 Wimborne Road East Ferndown Dorset BH22 9ND Tel 01202 873872 Fax 01202 874562 E mail editorial epemag wimborne co uk Web site http Avww epemag wimborne co uk a Order on line from www epemag wimborne co uk shopdoor htm A We also accept card payments Mastercard Visa Amex Diners Club or Switch minimum card order 5 Send your card number and card expiry date card security code the last 3 digits on or just under the signature strip plus Switch Issue No with your order Everyday Practical Electronics January 2003 51
22. on nected to other components These PICs it seems need to have their first program ming carried out using a normal PIC pro grammer such as Toolkit TK3 It was found that previously used PIC16F628 devices are capable of being programmed in situ and the development of this design was carried out in this fashion Switch on power again and once more check the power supply output at IC2 Adjust the l c d contrast setting using pre set VR1 until a screen display is seen clear ly Ignore the immediate details at present DISPLAY VALUES When you know that all is well and if you have not already done so connect the trans ducers Support the probe assembly so that nothing obscures the direct path between the Everyday Practical Electronics January 2003 Example of main monitoring display during a slight breeze transducers The room in which the testing is to be done must be free of draughts so that the unit just responds in still air Switch on the power Four sets of values will be seen on the Lc d possibly changing a bit erratically at present see above photo On the top line are shown the monitored wind speed values in metres and feet per second both having two decimal places to the nearest 0 01 value The maximum inte ger value that can be shown is 99 The lower line shows the speed in kph and mph to one decimal place with a max imum integer value of 999 good luck if you ever see that
23. pulse shaped by transistor TR1 TP6 Connected to the collector of TRI at which the pulse shaped signal appears Raw transducer signals can also be mon itored at the p c b points to which their leads are connected The most useful scope monitoring that can be done is to first connect scope Channel 1 to TP3 and set the scope to syn chronise to positive going pulses on this channel The 5V transmission pulses being sent to multiplexer IC2 will be observed Keep this probe connected to TP3 Connect Channel 2 to the active pin of each transducer in turn and observe how only alternate transmission pulses are seen on this channel With a sufficiently good scope set to a high gain setting for Channel 2 you might just also see the received sig nal being generated on the transducers between transmission pulses Monitoring TP2 with Channel 2 the multiplex path selection logic pulses will be seen With Channel 2 on TP4 the rela tionship between the occurrence of the transmission pulses and the point at which the PIC s masking period ends can be observed The software triggers TP4 at the end of the masking period and just prior to the PIC starting to listen Monitoring TPS with Channel 2 observe the shape of the received and amplified pulse With sync still on Channel 1 view Channel 2 on its own At the start of the waveform the sympathetic reaction of the amplifier to the transmission signal will be seen as a brief pulse
24. robably up to five or so will keep the ringing within bounds Two pulses though were found to be best with several transducer units some from different manufacturers The pulse count range is 1 to 9 followed by a rollover to 1 The masking value range is to 255 followed by a rollover to 1 The values are changeable in the correction mode by using switch 3 If you have PIC programming facilities you can also confirm that the transmitted frequency is indeed roughly 40kHz There is a command line in the SONICTX rou tine which has been REMmed comment ed out with a semicolon saying GOTO BEAMITW If you reinstate this line re assemble and download to the PIC the fre quency output at TP1 can be monitored on a frequency counter It is a permanent loop until the PIC is reprogrammed without the additional line Unless you are familiar with PIC pro gram writing do not attempt to change the software s transmission frequency loop values To reinstate the software s pulse trans mission REM out the GOTO BEAMITW line again and reprogram To temporarily speed the rate at which pulses are transmitted switch off the power wait briefly then with switch S2 pressed switch the power back on Release S2 a moment or two after the power has been switched on In this mode the PIC s Timer 0 rate is increased so shortening the delay between sending pulses Normal working is resumed next time the unit is switched on IN
25. shown In fact it is not actually known how high a wind speed the unit will correctly respond to but it should be at least SOmph 80kph and likely to be much higher The unknown factor is whether or not at really high wind speeds the transducer grills or other aspects of the probe assem bly might cause interference by generating ultrasonics that could affect the amplifier response a bit like wind whistling in tele graph wires only higher pitched Pressing switch S3 sets the unit into full averaging mode signified by the letters Av being shown at the far right of l c d line 2 In this mode the second block of 16 values previously mentioned is averaged and the calculations use that result instead of the immediate value that is shown when aver aging is off and Av replaced by two blanks on screen Repeated pressing of S3 toggles between the two modes Pressing switch S2 selects the Test mode replacing the top line values with the actual timing values detected during each pair of transmission cycles These are the actual values read from the PIC s Timer 1 register To their right is shown the absolute difference between them without or signs Example display when in Test mode It is normal for the values to fluctuate slightly In the prototype they typically hover at around 3400 but this value depends on the exact distance between the transducers The first two values shown were used by the author during sof
26. t the value has been saved Press switch S2 but not 3 Line 1 then shows WIND MASK 80 Again this value should only be changed if you have an oscilloscope It is improbable though that either of the foregoing values will need changing Press switch S2 again without pressing 3 to display CORRECTION 0 or 0 This is the third correction mode which you might need to use The data EEPROM holds the correction factor as a value between 0 and 15 Any values below 8 are subtracted from 8 and the answer is then subtracted from the sam ple values For example if the value is 7 it is subtracted from 8 and the answer of 1 is subtracted from the samples Conversely values of 8 and above are ANDed with 7 binary 111 and the result is then added to the sample values Thus if the data EEPROM value is 9 this is ANDed with 7 to produce a value of 1 which is then added to the samples The ANDing process is invisible to the user who only sees the result on screen expressed with or without a polarity sign or as appropriate Zero may be returned with either sign or without depending how it has been reached 50 To change the value press switch 3 The value will decrement downwards in steps of one from 1 to 7 for each press of S3 It will then show 0 followed by an increment upwards again in steps of 1 for each press of 3 from 1 to 7 After 7 it again shows 0 and decrements to 7 etc Having set
27. the screen is unnecessary and that any type of 4 way cable could be used If the common OV connections are made between the transducers on the probe assembly 3 way cable could probably be used However these two alternative wiring techniques have not been tested At the unit end the cables were passed through a hole in the box and soldered to the p c b Plug and socket connections were tried but were found to be unreliable fre quently causing signal disruption CIRCUIT CONSTRUCTION Component and track layout details for the Wind Speed Meter are shown in Fig 4 This board is available from the EPE PCB Service code 380 Assemble in any order you prefer but it is suggested that you do 3o in order of ascending component size Don t overlook the four link wires Use sockets for the dual in line d i l i c s but do not insert these i c s until you have made sure that the power supply is functioning correctly Ensure that polarity conscious components i e D1 TR1 and IC2 are inserted the correct way round Insert Imm terminal pins or pin headers for the off board connection points Note that the TBI and TB2 pins are in the author s standard order The c d is connected to the pins for TBI and typical pin arrangements for the L c d itself are shown in Fig 5 Do not connect the l c d until you have checked the power supply Connection of the ultrasonic transducers can be made now but may be left until later if preferr
28. the value press S2 and the word SAVED will be shown on line 2 This confirms that the PIC has stored the new value back to the data EEPROM The SAVED message will also appear if switch S3 has been pressed with the first two correction modes It is then necessary to press S2 to step to the next mode That completes the correction cycle The next press of S2 returns the screen to show the wind speed values Note that pressing the switches may seem to have a lethargic response This is due to the software continuing to take sam ples between each occasion it looks to see if a switch has been pressed The switch must be released before the response occurs Should you need to reinstate or install for the first time the author s values to the EEPROM via the switches they are Wind Pulse 8 Wind Mask 80 Correction 0 THIRD CORRECTION MODE The third correction mode just described can be used if the sampling difference value at the right of line 1 is not fairly con sistently showing zero in still air condi tions The difference is due to the two transducers not responding identically when used in receiving mode Note the value and then set the correc tion value to cancel it For example if the difference value consistently shows 5 then it needs to be corrected by 5 However the difference value is not accompanied by a polarity sign Consequently it may not be immediately clear whether 5 needs to added or subtract ed Try
29. tware development but otherwise have no practical purpose The right hand value is used during the unit s alignment in the unlikely event that this should be found necessary Pressing S2 again once more causes the metres per second m s and feet per sec ond f s speeds to be shown ALIGNMENT The proof of whether or not corrective alignment is needed depends on the value 49 shown at the right of the top line in still air conditions having pressed switch S2 to display the test values First adjust preset ve 2 vRtuntil the received pulses are being adequately amplified ie the displayed values are pretty consistent If the right hand value hovers around 0 to 1 preferably nearer to 0 no correction is needed If it is any greater though adjust ment can easily be carried out as described in the third of the following three correc tion options Switch off the power and wait for the screen display to go blank supply line voltage has dropped to OV Hold the Averaging switch 3 pressed down switch on the power wait a moment and then release S3 Screen line 2 will be blank and line 1 should show the message WIND PULSE 2 This states the number of pulses that the PIC transmits during each detection cycle Do not adjust this value unless you have an oscilloscope to monitor the waveforms generated by the PIC Correction mode screen 1 Correction mode screen 2 Correction mode screen 3 showing confirmation tha
30. type but can be adjusted if required see later Following the masking period the PIC s interrupt function is activated and the pro gram enters a holding loop from which it will only exit if an interrupt signal is gen erated or the timer overflows The received and amplified signal from transistor TR1 is fed via resistor R11 to the PIC s pin RBO This is set as an input and a signal change on it causes an RBO inter rupt to be generated Using a modification of one of Malcolm Wiles interrupt pro cessing routines published in the Mar Apr 02 issues Using PIC Interrupts the interrupt causes the Timer 1 counter to stop the interrupt function to be turned off and an exit made from the holding loop The timer value is now read and stored into one of two memory locations depend ing on which transducer is doing the receiving ROLE SWAPPING The roles of the transducers are then swapped through IC3 and the same trans mission reception routine is repeated Having received the second timing a cor rection value is added or subtracted accord ing to another value which is stored in the data EEPROM and which can also be adjusted by the user again see later The difference between the two timings is then found by subtraction inverting the result if a negative value is created A check is then made to see if the answer is within a reasonable maximum range If it is not the result is limited to an increase of 16 above t
31. us method was to mount it on a car and compare the car s speedometer with the Weather Centre s l c d readout However it was felt that the Centre s size was too great for this and could well prove the undesirable proximity of flashing blue lights and ee aw sirens behind the car Consequently the wind speed sensing cir cuit was constructed on its own mounted in a small enclosure which was then unobtru sively positioned outside the car s window and comparative readings taken spouses come in very handy for such things The system was accurate up to about 25mph and then began to fall off rapidly 44 T wind speed meter anemometer It was concluded that the aerodynamics of the car began to take effect above this speed and it was decided to construct the second spin off design a wind tunnel An assembly comprising a cardboard tube and an electrically controlled fan was built The fan had a known rate of air flow per minute the tube had a known cross sectional area and thus the airflow rate across the ultrasonic sensors was calculat ed and compared against the monitor s readings By providing the fan with a speed control its revolutions per minute were varied and again comparative calcu lations and readings were made PRECISION CHECKING It all seemed fine although there was a bit of uncertainty about whether the fan s rotational rate linearly changed the air flow rate Then unexpectedly two professiona
32. ust be moving directly in line with them In practice it does not matter whether the wind flows towards or away from the source electronic techniques can compensate accordingly As will be demonstrated in the forth coming Weather Centre if several sound Everyday Practical Electronics January 2003 sources and receivers are used at different angles to each other in a fixed location the direction of the wind can also be calculat ed as well as its speed PRACTICAL SOUNDINGS The use of an audio sound source and receiver would not be practical since such a system would be subject to interference from many extraneous sounds Ultrasonic methods though are much less suscepti ble to interference Having searched the Web the author found that there are indeed commercial wind speed and direction sen sors that use ultrasonic techniques One such is shown in the photograph below It operates at 200kHz st CAT1 2 solid state ultrasonic wind speed and direction sensor Photo Courtesy www apptech com cati2 htm Applied Technologies Inc The wind s directional sensing will be discussed in the Weather Centre but the speed assessment is easy to understand Imagine two ultrasonic transducers facing each other across a known distance One shoots a pulse at the other and the time it takes for the signal to cross between the two is measured Using a sufficiently fast timer times can be measured in microseconds Ensuring th
Download Pdf Manuals
Related Search
Related Contents
2014年10月号(No.91) [15104KB pdfファイル] Ouvre Lettres DL100™, DL200™ Adaptador de Video Externo para Monitores Múltiples 1 Press MENU. Extech AN100 Thermo-Anemometer User Manual 920pwh - KCN京都 B2001-2 - Torkflex Copyright © All rights reserved.