Silicon ChipA low-cost large display anemometer - March 2006 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Standard definition plasma TV sets are not the best proposition
  4. Feature: The Electronic Camera, Pt.1 by Kevin Poulter
  5. Feature: The World’s Most Highly Modified Hybrid Car by Julian Edgar
  6. Project: PC-Controlled Burglar Alarm System, Pt.2 by Trent Jackson
  7. Project: Low-Cost Intercooler Water Spray Controller by Julian Edgar
  8. Feature: Six Low-Cost Expansion Boards For The AVR200 by Peter Smith
  9. Project: AVR ISP SocketBoard by Peter Smith
  10. Project: A Line Tracker For Your Microbric Viper by Ross Tester
  11. Feature: Salvage Engineering by Stan Swan
  12. Project: Phone/Fax Missed Call Alert by Jim Rowe
  13. Salvage It: A low-cost large display anemometer by Julian Edgar
  14. Vintage Radio: The unique Healing "Scales" 403E receiver by Rodney Champness
  15. Book Store
  16. Advertising Index
  17. Outer Back Cover

This is only a preview of the March 2006 issue of Silicon Chip.

You can view 35 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • The Electronic Camera, Pt.1 (March 2006)
  • The Electronic Camera, Pt.2 (April 2006)
Items relevant to "PC-Controlled Burglar Alarm System, Pt.2":
  • PIC16F877A-I/P programmed for the PC-Controlled Burglar Alarm [PCCBA.HEX] (Programmed Microcontroller, AUD $20.00)
  • PIC16F84A-04(I)/P programmed for the PC-Controlled Burglar Alarm keypad [keypad.hex] (Programmed Microcontroller, AUD $10.00)
  • PIC16F877A/PIC16F84A firmware for the PC-Controlled Burglar Alarm [PCCBA.HEX/keypad.hex] (Software, Free)
  • Host software for the PC-Controlled Burglar Alarm (Free)
  • PCB patterns for the PC-Controlled Burglar Alarm System (PDF download) [03102061/2] (Free)
  • PCB pattern for the PC-Controlled Burglar Alarm keypad (PDF download) [07203061] (Free)
  • Keypad panel artwork for the PC-Controlled Burglar Alarm System (PDF download) (Free)
  • PC-Controlled Burglar Alarm System front panel artwork (PDF download) (Free)
Articles in this series:
  • PC-Controlled Burglar Alarm System (February 2006)
  • PC-Controlled Burglar Alarm System, Pt.2 (March 2006)
Items relevant to "AVR ISP SocketBoard":
  • PCB pattern for the AVR ISP Socketboard (PDF download) [07103061] (Free)
Articles in this series:
  • Adding Infrared To Your Microbric Viper (February 2006)
  • A Line Tracker For Your Microbric Viper (March 2006)
  • Microbric Viper: The Sumo Module (April 2006)
Items relevant to "Phone/Fax Missed Call Alert":
  • PCB pattern for the Phone/Fax Missed Call Alert (PDF download) [12103061] (Free)
  • Phone/Fax Missed Call Alert front panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

Salvage It! BY JULIAN EDGAR A low-cost large-display anemometer Live in a windy area? Like to have a big dial showing the outside wind speed? Here’s an anemometer that you can build for next to nothing. I F YOU’RE A SAILOR or kite flyer it’s a must to know wind speed; and even if you’re neither of these, it’s fun to watch the display. The measurement range here will depend on how you set it up but typically you’ll be able to read speeds from just a few km/h upwards. Cost? Well, depending on how you source the components, you’re looking at not much at all! And best of all, this is a project that will totally stun your friends or spouse – they will wonder how the hell you made a working instrument from all that junk! The components Hang onto your seat, folks; this project is for “Serious Ratters” only. Why? Well to make this design, you’ll need a whole bunch of stuff but most will be able to be picked up for next-to-nothing at a few garage sales. Alternatively, it’s a project to keep in mind as you collect bits and pieces over a period. First up, you’ll need the video head assembly from a VHS video cassette recorder. The bearings have to be in good nick, so before removing the head from the VCR, give it a spin while listening closely. The vast majority will Fig.1: the anemometer uses the internals of a discarded mouse to generate a frequency output proportional to wind speed. This signal is fed into an amplifier (salvaged from a cassette player) which feeds a charge pump circuit made from a handfull of passive components. The resulting voltage is displayed on the speedo. 90  Silicon Chip Fig.2: the mouse plug pin-outs. You can easily find the pinouts for other mouse plugs by doing a web search for “mouse pinouts”. In this application, we use only +5V and ground (earth) connections. siliconchip.com.au A video head salvaged from an old VHS VCR provides the bearings, mounts and precision shaft for the anemometer. The complete VCR cost just $1.00. spin superbly – they have really good bearings – but occasionally you’ll find one that’s a bit gritty in its rotation. If that’s the case, get hold of another! (We showed you how to scrounge the video head from a VCR in “Salvage It!” in the December 2005 issue.) The VCR used here cost just $1 from a garage sale. Second, you’ll need an old cassette player, preferably a battery/mains portable. It doesn’t matter if it’s stereo or mono but go for a small design that uses an amplified speaker. We picked one up for $3 – knocked down from the $5 being requested at a garage sale. Third, you’ll need an old computer mouse of the sort that uses a ball. We already had one stuffed away in a drawer, so that part didn’t cost anything. And last of all, you’ll need an electronic speedo or tacho from a car. Alternatively, if you can’t lay your hands on one of those, you can use a VU meter from an old cassette deck (see “Salvage It!” in the June 2005 issue for more on using salvaged VU meters). The speedo used here was bought at a local metal recycler for $3 – in fact, to be accurate, that price also included the tacho and the vacuum fluorescent fuel and temperature gauges! They’re the major bits but in addition you’ll need some discrete electronic components – some of which almost certainly can be ratted from the VCR. You also need three kitchen measuring spoons, a short length of 90mm plastic pipe and some 90mm plastic end caps. The design So how do we turn all those bits and siliconchip.com.au In this view, you can see from top to bottom, the stainless steel measuring spoons that form the cups, the upper section of the video head, the shaft, the upper pipe cap, the lower section of the video head containing the bearings, the slotted optical wheel and sensors, and the mouse circuit board. The slotted optical sensor wheel is glued to the end of the shaft. The mouse circuit board is mounted so that the slotted wheel interrupts the light beam between a LED and its adjoining sensor – just as it did in the mouse. Only one of the two mouse sensors is used (the unused one can be seen at bottom left). pieces into an anemometer? In summary, the video head provides the lowfriction ball bearings, hardened steel shaft and aluminium bearing housing. The measuring spoons – they’re usually stainless steel – are used to form the anemometer cups (they mount on one end of the shaft). The computer mouse donates the LED/phototransistor pair and also the finely slotted wheel that interrupts the light beam as it spins. These components are used March 2006  91 Fig.3: this diagram shows how the mouse, cassette player and charge pump are interconnected. Note that only the existing external connections to the cassette player PC board are used – you don’t need to probe into its internal circuitry. The regulated power supply is optional – in most cases, the original cassette player power supply can be used without modification. to generate a frequency that varies in proportion to wind speed. The signal from the mouse is then amplified by the cassette player and fed into a charge pump circuit that comprises just a handful of passive components. This circuit converts the frequency into a voltage which is then read on the car speedo (or VU meter). If you use a speedo, you’ll be able to read the wind speed directly in km/h from the dial. By altering the charge pump capacitors, a variety of meters can be catered for. To make it all happen you don’t need to get deeply into the intricacies of the circuits of the mouse, cassette deck or speedo – provided you have a frequency reading multimeter, it’s all pretty straightforward. Main Features • • Large analog display • Works down to very low wind speeds • • • Linear or non-linear scales Span can be set to suit local wind conditions Makes use of junked equipment Very cheap to make 92  Silicon Chip Fig.1 shows a block diagram of how the anemometer works. Building it The key to making the anemometer is to build it in the right sequence of steps – that way, you can test each part of the system as you go along. THE OPTICAL SENSOR: the mouse is used to provide the optical sensor of the anemometer. The PC board in the mouse remains intact – we just tap into it to extract the signal. The first step is to power up the mouse and then find the signal output, which is taken directly from the photosensor. Fig.2 shows the pin-outs of the plugs used on PS2 mice. In this application, we need to use only the power supply and ground connections. Open up the mouse, cut off the cable and then use Fig.2 to identify the power and earth leads. Apply 5V to these leads (the voltage doesn’t have to be absolutely precise, so four partially flat 1.5V cells are fine, or you can use an adjustable bench power supply) and then use a frequency measuring multimeter to probe the pins of one of the two internal light receptors (positive probe of the meter to the device and negative to the ground wire). Alternatively, you can probe the pins of the IC to find the same signal. Now spin the small slotted wheels by hand and keep probing until you find a pin that has an output frequency that increases with the speed of one of the wheels. In the prototype, this varied from about 40-2000Hz. Of course, if you have one, a scope is ideal for this sort of pin finding. Carefully solder a wire to this signal pin. The output of the sensor is likely to be a varying DC signal. In fact, you don’t even need a frequency measuring multimeter to check this – just use your trusty old analog multimeter switched to a low DC voltage range. At low frequency outputs, the needle will flicker faster or slower, depending on the speed of the wheel. To block this DC component of the signal, wire a 470nF (0.47mF) capacitor in series with the output – this converts the signal to an AC waveform. You now have an optical sensor with a high-resolution frequency output! THE AMPLIFIER: the cassette deck is used to amplify the small signals coming from the optical sensor. To achieve this, the signal output from the optical sensor is connected to the tape head input of the cassette player. Access the cable that goes to the tape head. In most cheap cassette players, this will comprise just a single signal wire inside the shield. Connect this signal wire to the signal output of the optical sensor, then connect the shield of head input wire to the ground wire of the mouse. siliconchip.com.au The mouse circuit board is held in position by a bracket formed from scrap aluminium sheet. Note that heatshrink has been used as an insulator between the board tracks and the bracket. Now power up both the cassette player and the mouse, set the cassette player volume to full and press the “play” button. When you spin the optical wheel in the mouse, you should hear a noise from the cassette player’s speaker that changes in pitch with wheel speed (in fact, if all you want is an audible wind speed indicator, you can pretty well stop right now – the wiring part of the project finished!). If you have difficulty finding the right wires from the head (perhaps because there are four wires or multiple heads), touch the different head connections with a finger while the tape player is running. Touching the correct signal wire will result in a loud hum in the speaker. (If you are using a mains-powered cassette player, you should take care that you cannot come into contact with high voltages. In this case, it is best to extend the head wires outside of the case and then temporarily close it up again.) Because the amplifier has very high gain, it is susceptible to picking up noise. To reduce this, a 1kW pot is wired across the mouse output, with the wiper connecting to the amplifier. In use, this pot is adjusted so that adequate signal is provided without there being too much noise present (indicated by lots of noise in the speaker even with no rotation of the wheel). This wiring – and in fact the complete circuit of the anemometer – is shown in Fig.3. You now have a high gain amplifier suitable for amplifying the output of the optical sensor! siliconchip.com.au THE SPINNING ASSEMBLY: disassemble the video head, gutting it of any electronics that you see. Pulling the head apart usually requires a Phillips head screwdriver and a small metric Allen key. Some brass collars are also a light press-fit on the shaft – these can be removed by gently using a hammer and a punch. Prise out the black magnetic material that is within the head. It easily shatters, so be careful when doing this – it’s best to wear safety glasses when performing this operation. Once you’ve got the head bare, you can build the impeller. We used three small (1 teaspoon or 20ml) measuring spoons from a supermarket. These particular ones were made of stainless steel with a non-slip (and noncorrosive!) coating. The spoons were bolted together, using the existing holes located at one end of the handles. The spoons were then spread evenly (ie, with a 120° spacing) and matching holes were drilled through the spinning aluminium housing and the handles of the spoons. The spoons were then bolted in place using short screws and nuts and once this was done, the heads of the spoons were carefully twisted through 90° to form the anemometer cup assembly. The completed assembly should spin freely in even the lightest puff of wind. If the assembly is out of balance, hold the shaft horizontally and see which cups always points downwards. Place a small weight on the side opposite. Getting the assembly well-balanced yields dividends The spinning disc has lots of slots in it – we counted 40 but that might not be right! In any case, the output resolution of the sensor is very good – if you wish, you can calibrate the scale to read wind speeds of just a few kilometres per hour. Stainless steel measuring spoons were used to form the anemometer cups. These were bought (gasp!) new for the project. in longevity – an out-of-balance shaft puts a greater load on the bearings. The half of the video head that contains the bearings is bolted to the inside of a 90mm PVC pipe cap. As with the rotating part of the head, some new holes will probably need to be drilled through the aluminium for the mounting bolts. The next step is to fit the slotted mouse wheel to the opposite end of the shaft to the cups. Cut the slotted encoder wheel off its plastic shaft and then use a fine flat file to smooth each side, being careful not to burr the tiny March 2006  93 The rotating assembly can be balanced by adding weights – here a bolt and some extra nuts (arrowed) have been placed on one side of the assembly. The speedo was mounted in a small picture frame. Note that it is easy to backlight the dial – all car speedos have this facility and in some, even the needle is illuminated! slots. Then, using instant adhesive, very carefully glue the slotted wheel to the end of the anemometer shaft. It needs to be perfectly concentric; ie, when the shaft is turning there is no run-out. The mouse PC board is mounted so that the slotted wheel spins between the LED and its adjacent photosensor. We used a small piece of scrap aluminium to make the locating bracket. Note that if the shaft has a tendency to slide downwards through the bearings, so causing clearance problems between the slotted wheel and its sensor, place a drop of instant glue on the shaft right next to a bearing before A Fun Instrument If you want a fun instrument rather than a calibrated km/h design, simply pick capacitors in the charge pump that give full-scale deflection of the speedo when the cups are quickly flicked. Then use a computer, scanner and printer to make a scale that shows wind speeds like “Boring”, “Some Excitement”, “Hell It’s Blowing”, “Where’s The Cat Gone?”, “Take Shelter!” and “Are We Still Alive?”. sliding it through the bearing to the correct position. You now have a very sensitive and durable spinning anemometer head with a variable frequency output! THE DISPLAY: the display can comprise an electronic car speedo or tachometer, or a cassette deck VU meter. The car instruments make for a much more impressive readout, so we’ve used one of those. In any case, we don’t need the frequency-to-voltage converter that’s used within these car instruments; instead, as mentioned above, we make our own charge pump system. Doing this means that we can match the amplified output of the optical sensor to a very wide range of meters, as well as easily changing characteristics like smoothing and range. Remove the speedo or tacho and strip it down until just the meter and its electric movement remain. When a low voltage (eg, 2V) is applied, the meter should swing full scale. Take note of the positive and negative leads, as revealed by this test. If you’re using a speedo, you should be able to retain the standard km/h scale. Alternatively, if you use a tacho or you want the scaling to be different Fig.4: this charge pump circuit is used to convert the amplified frequency signal from the mouse to a DC signal proportional to the wind speed. 94  Silicon Chip to the original on the speedo, a new scale will need to be made using a scanner, PC and printer (see “Salvage It!” in the March 2005 issue for more on rescaling car tachos). In this case, the positions of the increments will be found during the calibration procedure (see below). You now have a large analog anemometer readout! POWER SUPPLIES: two voltages need to be provided: 5V to the mouse circuit and (usually) 6V to the cassette player (we now know these components as the optical sensor and amplifier, respectively!). If absolute accuracy in the wind speed readout isn’t required, the amplifier can be powered directly by the mains, batteries or a plugpack – whatever was originally used by the cassette player. The down-side of this approach is that the displayed wind speed will vary with supply voltage fluctuations. This is because the square-wave amplified output is driven from rail to rail – the cassette player is no longer acting as a feedback amplifier. The alternative is to use a voltage regulator, which is what we chose to do. As well as providing better instrument accuracy, this also allows easy calibration in a car as the system can be powered from the car supply. We powered the regulator from a spare plugpack we had previously salvaged. The supply for the optical sensor is obtained by simply using a 10kW pot across the power feed that originally went to the cassette player motor, adjusted to provide 5V when loaded by the optical sensor. Fig.3 shows the power supply wirsiliconchip.com.au ➊ ➎ ➋ ➌ ing, both for the amplifier and the optical sensor. FREQUENCY-TO-VOLTAGE CONVERTER: the frequency-to-voltage converter (charge pump) is the final stage in the build and is best optimised on the bench with the whole system working. Fig.4 shows the way in which the charge pump works. For the moment, disregard the variable resistor VR1. Initially, C1 and C2 are discharged. When the input voltage goes high, C1 starts to charge through D1 and C2. Because C1 is much smaller than C2, C1 fully charges earlier than C2 and when this occurs, current stops flowing. However, during this process, C2 has received a small charge increase. When the input voltage goes low, C1 discharges through D2, but C2 does not discharge because D1 blocks the discharge path. The result is that each time the input voltage goes high, a small amount of charge is added to C2, resulting in C2’s voltage rising in proportion with the input frequency. C2 powers the meter; ie, C2 is being constantly discharged by the meter’s load. VR1 allows adjustment of the meter’s deflection for a given voltage level across C2. C2 should be kept as low as possible but must be sufficient to provide a damped meter movement at the lowest frequency output at which the amplifier will work. If the speedo needle flickers when the cups are turned at the slowest speed at which you will be making measurements (this value desiliconchip.com.au ➍ pends on the scale you have chosen), then C2 needs to be increased until the needle moves smoothly. C1 needs to be small enough to allow it to fully discharge during the time that the input signal is low. In the prototype, where the car speedometer has a 100W resistance, C1 comprises two 10mF electrolytic capacitors (wired negative to negative to make the pair non-polarised), while C2 has a value of 220mF. The 16W resistor in series with C1 reduces the peak current through the amplifier. Note that if you are using a VU meter instead of a car speedo, C1, C2 and the resistor in series with C1 will all be much lower in value. It all starts to sound a bit compli- The basic layout: (1) cassette player circuit board, being used as an amplifier; (2) pot that provides the 5V supply to the mouse board; (3) voltage regulator and associated capacitors powering the amplifier (only required if there will be major mains supply variations); (4) amplifier input attenuating pot and capacitor; (5) charge pump circuit. Incidentally, the expensive looking NEC pots were bought very cheaply on eBay. cated but when you realise that the frequency-to-voltage charge pump circuit uses only six low-cost components, you can breathe easily again! To find the best values for C1 and C2, initially lash up the anemometer circuit on the bench – power supplies and all. Start with the capacitor values cited above and set VR1 so that its resistance is as low as possible. Spin the anemometer cups by hand – rotating them fairly slowly – and check that the speedo (or VU meter needle) smoothly deflects a little. Now spin the cups faster and check that the deflection is greater. Adjust VR1 and check that the deflection for a given cup speed is reduced. If the deflection is too small, in- This is the cassette player that donated its amplifier. In many cases it will be easiest to use the original cassette player power supply and mount the new components inside. The garage sale purchase price was knocked down form the marked $5 to $3. March 2006  95 player PC board to mount it in a new box, keep in mind that you must bridge the switch that is normally activated when the “Play” button is pressed – otherwise, the amplifier won’t work. The display is easily mounted remote to the main box, so if retaining the cassette player housing, it’s easy to tuck it out of sight. While it might appear that the distance between the head and amplifier should be kept very short, we had no difficulties in stretching this distance to 25 metres, using salvaged multi-core alarm cable. Calibration The working anemometer, seen positioned high on the roof. The cup covering the centre section of the rotating assembly was made from an aerosol cap. For improved durability, everything you see here should be painted. crease the value of C1. If the needle deflection becomes non-linear at high speed (ie, its deflection is much less than expected), reduce the value of C1 and then reduce C2 proportionately. In short, just play around with the capacitor values (always keeping C1 much lower than C2) until the needle behaves as wanted over a variety of cup speeds. Note that as a set-up guide, a fast flick of the anemometer cups will spin them to a wind speed of about 40km/h. If you only want to measure wind speeds up to 50 km/h, size the capacitors so that you get nearly full scale deflection with a fast whiz of the cups. Final assembly The rotating assembly is completed by adding the short section of 90mm plastic pipe and the second end-cap. Use PVC pipe adhesive to glue these parts together. Alternatively, if you want to be able to easily disassemble the container, use self-tapping screws to hold one of the end-caps in place. Make sure you seal the hole where the cable exits. Note that the anemometer is orientated so that its rotating cups are below the plastic housing – this helps prevent the ingress of water. The prototype was mounted using square aluminium tube. This tube was bolted to the upper end cap. We mounted the electronics in a new box. The cassette player PC board was removed from its original case. However, especially if you are going to use the cassette player’s power supply, we suggest that you leave everything inside the cassette player, placing the charge pump and other minor components inside. If you remove the cassette Rat It Before You Chuck It! Whenever you throw away an old TV (or VCR or washing machine or dishwasher or printer) do you always think that surely there must be some good salvageable components inside? Well, this column is for you! (And it’s also for people without a lot of dough.) Each month we’ll use bits and pieces sourced from discards, sometimes in mini-projects and other times as an ideas smorgasbord. And you can contribute as well. If you have a use for specific parts which can 96  Silicon Chip easily be salvaged from goods commonly being thrown away, we’d love to hear from you. Perhaps you use the pressure switch from a washing machine to control a pump. Or maybe you have a use for the highquality bearings from VCR heads. Or perhaps you’ve found how the guts of a cassette player can be easily turned into a metal detector. (Well, we made the last one up but you get the idea . . .) If you have some practical ideas, write in and tell us! Calibration is easily achieved by placing the whole device in a moving car, locating the rotating assembly outside, and then calibrating against the speedo reading. Just make sure that you do the calibration on a still day! The device can be powered by the car supply or the cassette player’s internal batteries. If you are using a preformed, linear scale, setting the correct needle position with VR1 should be done at a couple of speeds. Note that because of non-linearities in the anemometer aerodynamics, amplifier and meter, you won’t get a perfectly accurate readout at all wind speeds – but you should be within 10% everywhere. If you are devising your own scale, start with one with linear markings (eg, 1-10) on the scale. Write down the wind speed at each of the markings are then print out a revised scale with these speeds in the correct positions. Incidentally, if you want to decrease the sensitivity to high wind speeds (ie, expand the lower wind speed scale), tweaking the value of C1 upwards will do this for you! Conclusion This is a fun and engrossing project to make – from disassembling the mouse and video head, to trying different charge pump capacitor values to give you the scale and sensitivity that you want. The anemometer is sufficiently sensitive to spin with wind speeds of just 2-3km/h (and has an output resolution to measure those speeds too!) and if well balanced, is still rugged enough to cope with high speeds and full weather exposure. Best of all, it makes use of a heap of stuff you’d otherwise just throw SC away! siliconchip.com.au