Silicon ChipCybug - The Solar Fly - September 2000 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Electrical licence to build a kit is ridiculous
  4. Feature: How They're Bringing You The Games by Ross Tester
  5. Project: Build A Swimming Pool Alarm by John Clarke
  6. Feature: Network Troubleshooting With Fluke's NetTool by Greg Swain
  7. Product Showcase
  8. Project: 8-Channel PC Relay Board by Ross Tester
  9. Product Showcase
  10. Order Form
  11. Project: Fuel Mixture Display For Cars, Pt.1 by John Clarke
  12. Feature: LA-CRO - A Must-Have For Students by Peter Radcliffe
  13. Project: Protoboards: The Easy Way Into Electronics, Pt.1 by Leo Simpson
  14. Project: Cybug - The Solar Fly by Ross Tester
  15. Vintage Radio: HMV's Nippergram: a classic 1950s portable radiogram by Rodney Champness
  16. Notes & Errata: PC Controlled VHF FM Receiver / 40V/1A Adjustable Power Supply / Loudspeaker Protector & Fan Controller
  17. Book Store
  18. Market Centre
  19. Outer Back Cover

This is only a preview of the September 2000 issue of Silicon Chip.

You can view 36 of the 96 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.

Items relevant to "Build A Swimming Pool Alarm":
  • Swimming Pool Alarm PCB pattern (PDF download) [03109001] (Free)
  • Swimming Pool Alarm panel artwork (PDF download) (Free)
Items relevant to "8-Channel PC Relay Board":
  • QBASIC source code for the LPT 8-Channel Relay Board (Software, Free)
Items relevant to "Fuel Mixture Display For Cars, Pt.1":
  • PIC16F84(A)-04/P programmed for the Fuel Mixture Display [AIRFUEL.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F84 firmware and source code for the Fuel Mixture Display [AIRFUEL.HEX] (Software, Free)
  • Fuel Mixture Display PCB patterns (PDF download) [05109001/2] (Free)
  • Fuel Mixture Display panel artwork (PDF download) (Free)
Articles in this series:
  • Fuel Mixture Display For Cars, Pt.1 (September 2000)
  • Fuel Mixture Display For Cars, Pt.1 (September 2000)
  • Fuel Mixture Display For Cars, Pt.2 (October 2000)
  • Fuel Mixture Display For Cars, Pt.2 (October 2000)
Articles in this series:
  • Protoboards: The Easy Way Into Electronics, Pt.1 (September 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.1 (September 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.2 (October 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.2 (October 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.3 (November 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.3 (November 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.4 (December 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.4 (December 2000)

Purchase a printed copy of this issue for $10.00.

He has eyes! He has a heart! He has a stomach! He even has feelings! He has memory! He has a brain! He has legs! He has nerves! He’s CYBUG – The Solar Fly by Ross Tester Here’s a great “first kit” to build. It’s a simple robot which has just a few components – but is a real attention-getter! L ooking for a first kit to build, something to start you (or maybe someone else) on that path to the fascinating world of electronics? Here’s one that you’ll “fly” through. (OK, OK, I’m sorry!). But what is it? Well, you know how bright light 78  Silicon Chip attracts insects? It doesn’t just happen in nature: Cybug senses the brightest object and moves towards it. The fly’s feelers help it navigate its way around obstacles in its path – and it even has a short-term memory. Pretty clever, eh? And all this is done with just a handful of components. There are just six resistors, three capacitors, two ICs, a couple of diodes, three transistors and two motors. Oh, and two solar cells. It’s those solar cells which not only sense the bright objects, they also supply the power which drives Cybug. Cybug has a solar engine which in some ways resembles a chloroplast. In living plants, a chloroplast is the part of the plant responsible for con- verting sunlight to energy (in the form of starches). In Cybug, its “chloroplast” converts sunlight into energy, in the form of a steady voltage for powering logic (life support function) and channels any excess or bonus voltage to the motors for mobility. So in some ways, Cybug has most of the elements of a real, live animal: sight (its infrared diode detectors), nerves (transistors), a stomach (a large electrolytic capacitor to hold energy), memory (more electrolytic capacitors), brains (a voltage comparator), a heart (solar engine) and even a sense of touch (its feelers). The best part, though, is that you don’t have to feed him or water him. He gets everything he needs from sunlight. Circuit diagram Fig.1 shows the circuit of the complete Cybug Solar Fly. At its heart is the Motorola MC34164-3 micro-power undervoltage sensing circuit (Q4). (Normally we would call this an IC and label it as such but we’ll stick with the component labels as they appear on the PC board to avoid confusion later.) Q4 monitors the output voltage of the solar cells as they charge the electrolytic capacitor (C1) While ever the voltage stays high (nearly 7V), Q4’s reset stays high. Normally, if the voltage drops be- This is what you’ll get when you open the kit up: the weird-shaped PC board (left), all components, two motors and even the guitar string wire used for Cybug’s feelers. About the only extra thing you need is a roll of insulation tape. low 7V, its output is sent low but in this case, a 220kΩ resistor connected between Vin and the positive supply causes its low voltage sense to drop to 5V. This difference is called hysteresis. While the output of Q4 is high, Q3 is turned on, which will enable either of the motors to operate if either receives an input signal (via Q1 or Q2). These are Darlington transistors, which simply means two transistors connected together inside one package. They are driven by the comparator circuit, based around U1a and U1b. circus Fig.1: Cybug’s circuit. The solar batteries charge a capacitor which provides power to run the circuit as well as power to the motors. Which motor is turned on depends on the amount of light striking the infrared diodes (D1 and D2). SEPTEMBER 2000  79 These comparators monitor the voltage from each of the infrared (IR) diodes – the higher the light level, the higher the voltage. Capacitors C2 and C3 across these two diodes slow their response time, giving a little bit of “memory” to the circuit. If IR diode D1 detects more light than its partner, U1a turns Q1 on and the left motor lurches into life. The converse is also true. As the motors operate, the robot turns left and right, which could turn the “lit” IR diode away from the light. If this happens, its partner gets more light and turns the robot back in the other direction. The motor will operate while the “chloroplast” solar engine pumps out energy, keeping its capacitor charged. If there's not enough light and this capacitor discharges, the voltage sensor output goes low, removing bias from Q3 which in turn prevents either motor from operating. The end result of all this is that the Cybug moves in “steps”, according to which IR LED is receiving the most illumination. It then waits until the solar cells have recharged the capacitor before moving off again. Naturally, the more illumination the solar cells receive, the faster these steps will be. places where connections must be made and no component leads are placed. That's the case with this board – when finished, it looks like it’s missing some components but the holes are actually connection points. The technical name for one of these connecting holes, by the way, is a “via”. Note that the circuit (that is, the way the components connect together) rarely, if ever, looks just like the circuit diagram. The circuit diagram is almost always laid out neatly and clearly with a natural “flow through” of functions. The PC board tracks, which as we said form the circuit, are laid out in a way which makes everything fit but often the tracks snake their way from one side of the board to the other. Two components which are alongside each other on the circuit diagram may in fact be at opposite ends of the PC board – an vice versa! One final point before we move away from the component layout: in the vast majority of projects, we Circuits and printed circuits Now turn to the component layout, Fig.2. This shows the layout of all components on the printed circuit board (which we normally abbreviate to PC board; sometimes you will see it expressed simply as pcb). All the components mount on the top side (the side with the printing on it) with their leads poking through holes in the board to where they are soldered to the copper tracks (the “printed circuit”) underneath. These tracks connect the various components together to form the electrical circuit. Most PC boards you will use are single sided – components are on the top, the copper tracks underneath. However, the Cybug PC board is actually double-sided, which means there are also some tracks on the top side of the board immediately under the components. As you might imagine, connections must be made between the two sides. Some of these are made by the holes the components go through, with the leads ending up soldered to both the top and bottom. But there are other 80  Silicon Chip Fig.2: component layout of the doublesided pc board. No track layout is shown. publish an “X-ray” drawing of the PC board, viewed as if you are looking through it and able to see the copper tracks underneath. Of course, you cannot normally see through it but we do it this way to make component placement easier. Unfortunately, in the Cybug project, no copper pattern artwork was available, so none is shown. It is sometimes confusing to beginners when we do print both an “X-ray” image and the copper pattern itself because they are not identical – they are a “mirror image” of each other. The reason is that the PC board artwork, or pattern, is published is as if you are looking at the underside of the board from that side, while (as we said before) the component overlay is viewed from the top side – the side you put the components through. That's why they are mirror image. Building it The best approach in building a project using a PC board is to assemble the lowest-profile compo- Parts List – Cybug Solar Fly 1 Cybug PC board 2 solar cells, approx. 3.5V output 2 low voltage DC motors 1 motor bracket 2 slices of glue stick for wheels 1 double-sided adhesive foam pad 1 steel guitar string 1 100mm length brass wire 1 150mm length hookup wire 1 roll black insulation tape* Semiconductors 1 TLC27L2 dual op amp IC (IC1a, IC1b) 1 MC34164P-3 voltage detector (Q4) 3 MPSA12 high speed Darlington transistors (Q1-3) 2 Infrared LEDs (D1, D2) Capacitors 1 2200µF 16VW electrolytic capacitor (C1) 2 1µF 16VW electrolytic capacitors (C2, C3) Cybug looks like this rolled onto his back, ready for fitting the motor assembly. Two electrolytic capacitors mount on this side. nents first – almost always resistors, followed by small capacitors, then larger capacitors, and last of all semiconductors. Many components, including large capacitors (usually “electrolytic” types) and almost all semiconductors (plus some others) are “polarised” – that is, they must be connected the right way around to work. Indeed, many components will be instantly destroyed if connected back-to-front. In the case of electrolytic capacitors, there is almost always a “–” (minus) sign printed down their bodies to indicate the negative lead. The other lead is of course the positive. Always insert an electrolytic capacitor with positive to the hole marked positive and negative to the hole marked negative on the PC board. Semiconductors usually don’t have a plus or minus sign on them, mainly because most semiconductors have more than two leads (diodes being the obvious exception). Almost always, a “pinout” is shown on the circuit diagram to show you how the leads are arranged. Where transistors are concerned, they have three leads, a base, emitter and collector (abbreviated to B,E,C) and different manufacturers have used every possible combination of Resistors (0.25W, 5%) 5 100kΩ resistors (code: brown-black-yellow-gold) 1 220kΩ resistor (code: red-red-yellow-gold) * Not included in kit these positions at some stage. Always check the particular transistor against its diagram – never assume! Integrated circuits (or ICs) have from three to hundreds of legs or pins, though most of the ones you will be using as a hobbyist will have between 8 and 16. And most of those will be the “dual in-line plastic” type (abbreviated to DIP) which indeed the IC in this kit is (an 8-pin type). Have a look at the IC – you will see against one pin a little dot in the plastic. This marks pin 1 of the IC. You may also note a notch in one end – this is usually used as well as a dot but in some cases the IC will have only a dot or only a notch. With the IC held so you are looking at its top surface (ie, pins away from you) and the notch uppermost, pin 1 is always the one immediately to the left of the notch. Numbering then works anticlockwise around the IC – so pin 8 in this IC is directly opposite pin 1. One more point about semiconductors before we get into real construction. Many semis can be damaged by static electricity, so you should never handle them any more than you absolutely have to and then never hold them by their pins. This is less of a problem these days than it used to be, fortunately. OK, we’re nearly ready to start building. The first thing to do is have a good look at the PC board to make sure there are no obvious signs of damage or defects in it. In most magazine projects, a PC board pattern is published to help you do this but this is not always available (and it’s not here!). Second, check that you have all the components by checking them off against the parts list. Once again, a full list is usually published with each project. And third, ensure that you have the tools you’re going to need. Even for this simple kit, you’re going to need:  A soldering iron – the best type is a temperature-controlled model or soldering station but a mains-powered, fine-point soldering iron, intended for electronics use with about a 30W element will be OK.  Solder – a roll of electronics solder. Just because it’s in a roll doesn’t mean it’s intended for electronics use. Some plumbing solder is available in rolls or coils and this often has a corrosive flux which will eat away at the SEPTEMBER 2000  81 A close-up of the motor assembly, complete with double-sided adhesive foam (on top of the aluminium motor bracket). The motors are stuck to the motor bracket with black insulation tape. The wheels are in fact slices from hot-melt glue sticks.     PC board and eventually ruin it. Always buy your solder from electronics stores – then you know that you’re getting the right stuff! A pair of needle-nose pliers (they have very fine tips for working with small components). A pair of side-cutters (again, make sure they’re intended for electronics work. Some are sold for electricians to use but are far too big for small components!). A roll of insulation tape (preferably black). And a pair of safety glasses (to protect your eyes from bits of flying leads when you cut them, solder splashes, etc). Construction As we said before, start with the resistors. R1, R2 and R4-R6 are all the same – 100kΩ, which has a colour code of brown, black, yellow, gold. The other resistor, R3, is 220kΩ (red, red yellow, gold). Gently bend the leads of the resistors down 90°, using the needle-nose pliers, so that you have an upside-down “U” shape where the leads line up with the appropriate holes in the PC board. Check that you have the right resistors in the right holes, solder them in place (on the underside of the PC board) and snip the excess leads off with your sidecutters. We’re going to depart just a little from the order we said before: the next component to mount is Q4, the 34164P voltage monitor. This looks just like one of the tran82  Silicon Chip sistors so we’re going to identify it now and get it out of the way to save mix-ups later. This device is polarity-sensitive – it must be inserted the right way around. The flat side of the device corresponds to the flat side of the image on the PC board. Transistors or ICs with leads are seldom inserted all the way into the PC board – some lead length is left so the devices are up off the board, helping them to stay cool. Leave about 5mm of lead on the top side of the PC board and solder Q4 in on the other side. Now we will do the same with the three transistors (Q1, Q2 and Q3). Again, they have to go in the right way around and they also mount 5mm or so above the board. Next are the two infrared diodes. These are also polarity sensitive – there is a flat spot on the edge of these which marks their cathode (abbreviated K). Make sure the flat on the edge corresponds with the flat side painted on the PC board. When soldered, bend both diodes forward 90° so they emerge from the front of the PC board. And while we are at it, let’s insert and solder the two electrolytic capacitors in parallel with these diodes. There’s one big difference here – these two capacitors mount on the underside of the PC board and are soldered on top – again, watch the polarity. You can cut off the excess lead on the outside, or negative leads of these capacitors but DO NOT cut off the excess off the positive leads (the inside leads) – we are going to use them as part of the Cybug’s feelers. With your needle-nose pliers, form a small loop (about 10mm around) in the end of the lead and bend it down 90° so that it is vertical to the PC board surface. The IC is next. The notch aligns with the notch on the symbol on the PC board. When soldering the IC, be very careful because the pads on the PC board are very close together and it’s easy to bridge across them. If you need to, use a magnifying glass to carefully examine your soldering, just to make sure. We will now attach the solar cells to the PC board. These require short (10mm) lengths of hookup wire. In the kit, this was supplied as a length of multi-part wire (actually computer connection cable) but fortunately this is easy to separate into individual lengths. Cut four lengths and strip the insulation of, say, 3mm each end. Carefully solder these four lengths to the solar cells + and – terminals. Place the solar cells on the PC board and solder the other end of the four wires into the holes marked S+ and S–, with the pluses and minuses corresponding with the same markings on the solar cells. The cells are held in position with insulation tape across their undersides, sticking them to the underside of the PC board. You only need short lengths of tape to do this. Tools for hobby electronics: on the left is a pair of side-cutters and a pair of needle-nose pliers, on the right a mains-powered soldering iron on a stand. The motors are wired to the PC board in a similar way, except that this time we are going to need 8cm lengths. On each motor, note which terminal has a red dot – this is the positive terminal of the motor and it is connected to the “MOTOR” pad on the PC board marked with a +. Before that, though, use some more of your black electrical tape to secure the motors to the support bracket. (DC motors are only polarised in the sense that connecting them back-to-front will cause them to run backwards). Also, when soldering in the wires from the motors to the PC board, they need to cross over – the right motor connects to the M1 pads which are on the left side of the board and the left motor to the M2 pads on the right side of the board. The wheels are actually slices of hot-melt glue sticks and we fix these to the motor shafts by melting the centres of the “discs” with the soldering iron, sliding them onto the shafts and holding them squarely in place until the glue hardens again. Nifty, eh? (Not only that, but if you “throw a wheel”, you’ll know how to make another one and mount it!) The motor mounting bracket, with motors and wheels, mounts to the PC board with double-sided adhesive foam (supplied). The assembly needs to be attached as close as possible to the centre of gravity of the PC board for best performance. The final component, as such, to mount is the large electrolytic capacitor (C1) which is in parallel with the solar cells. Again, this capacitor is polarity sensitive. It can be mounted either standing up, in the normal way, or lying flat down on the board as a sort of “tail”. It’s up to you. The feeler wires In the kit is a length of steel guitar string wire. This must be cut to form the feelers but we have to warn you, it is very tough – probably tougher than the jaws of your sidecutters and may “nick” them. So you might prefer to find an old pair of cutters or even some old scissors to cut the wire. Don’t be tempted to pinch mum’s good scissors to cut it – you may find Cybug suddenly becomes very flat and you won’t be able to sit down for a week… Cut two lengths of guitar string wire 120mm long and bend down 90° 5mm from one end. Thread an end through the left feeler loop, bend first, and solder it to the pad beside the “C2” marking on the PC board. Repeat for the right feeler, soldering it into the pad by the “C3” marking. Once in place, grip the feelers about 50mm from the PC board and bend outwards 90°. You may also want to bend them down a little so they’re close to (but not touching) the ground, and thus able to detect small objects low down. Now carefully adjust the feelers so they lie, at rest, in the middle of the loops you made earlier. (It may be easier to adjust the loops in some cases). The idea is that when a feeler touches something, it is pushed onto the loop, making contact with it. The rest of the time, no contact is made. Last, cut the two antennas – these are about 70mm long with the same 90° bend 5mm from one end. These are soldered into the empty holes on the right and left sides of the head. The antennas are normally just for decoration but can form part of an optional power pickup (see panel). Finally, install the two stabilisers which prevent the robot from tipping forward or backward. These are made from two 80mm lengths of the heavier brass wire. One is soldered into either of the two small pads at the very end of the Cybug while the other goes to the larger hole Where do you get it? Cybug is distributed exclusively in Australia and New Zealand by Dick Smith Electronics and is available at all stores or through DSE Mail Orders or via their website, www.dse.com.au The complete kit sells in Australia for $71.31 including GST Here’s what your finished Cybug should look like with his motors and wheels attached, his feelers, wheels and front/rear stabilisers. right in middle of the head. Bend the ends of the brass wires into a “J” shape so the wires won’t jag on anything. If you wish, a ground wiper wire can be made from a 50mm length of guitar string wire, soldered into the small pad just above the IC. This will be used if you create a “feeding station” for your Cybug. That completes the assembly. If all is well, it should look much like the photographs. All that remains is to check it out. With the sun high overhead (so as not to act as a distraction to the infrared diodes), hold small white objects in front of Cybug and watch as he lurches towards them. If he goes the wrong way, you either have the motors connected back to front (remember we said they had to cross over) or wired in the wrong polarity. What to do next Try increasing the size of C1 – larger sizes will produce longer delays between each step but the steps themselves will be much larger. If you use a much larger capacitor (many thousands of microfarads) the robot will take a few seconds to charge in direct sunlight but will move for two to three seconds per step. The instruction book which comes with the Cybug kit will also give you some other ideas to try, including a “feeding station” where he picks up extra power from a 9V battery. You could also pick up even more tips by visiting Cybug's website, http://members.home.net/cybug SC SEPTEMBER 2000  83