Silicon ChipHeart Of LEDs - May 1999 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: GPS navigation in cars
  4. Feature: A Web Site That's Out Of This World by Ross Tester
  5. Feature: Model Plane Flies The Atlantic by Bob Young
  6. Project: The Line Dancer Robot by Andersson Nguyen
  7. Project: An X-Y Table With Stepper Motor Control; Pt.1 by Rick Walters & Ken Ferguson
  8. Serviceman's Log: Life's tough without TimTams by The TV Serviceman
  9. Project: Three Electric Fence Testers by John Clarke
  10. Order Form
  11. Product Showcase
  12. Project: Heart Of LEDs by Les Grant
  13. Project: Build A Carbon Monoxide Alarm by John Clarke
  14. Feature: SPECIAL OFFER: Low-Cost Internet Access by SILICON CHIP
  15. Back Issues
  16. Feature: Getting Started With Linux; Pt.3 by Bob Dyball
  17. Vintage Radio: Restoring the butchered set by Rodney Champness
  18. Product Showcase
  19. Notes & Errata: Low Distortion Audio Signal Generator / Electric Fence Controller / Multi-Spark CDI / LED Ammeter / Capacitance Meter / Bass Cube Subwoofer
  20. Market Centre
  21. Advertising Index
  22. Book Store
  23. Outer Back Cover

This is only a preview of the May 1999 issue of Silicon Chip.

You can view 33 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.

Articles in this series:
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
Items relevant to "The Line Dancer Robot":
  • Line Dancer Robot PCB pattern (PDF download) [11305991] (Free)
Items relevant to "An X-Y Table With Stepper Motor Control; Pt.1":
  • DOS software and sample files for the XYZ Table with Stepper Motor Control (Free)
  • XYZ Table PCB patterns (PDF download) [07208991-2, 08409993] (Free)
  • XYZ Table panel artwork (PDF download) (Free)
Articles in this series:
  • An X-Y Table With Stepper Motor Control; Pt.1 (May 1999)
  • An X-Y Table With Stepper Motor Control; Pt.2 (June 1999)
  • An X-Y Table With Stepper Motor Control; Pt.3 (July 1999)
  • An XYZ Table With Stepper Motor Control; Pt.4 (August 1999)
  • An XYZ Table With Stepper Motor Control; Pt.5 (September 1999)
  • An XYZ Table With Stepper Motor Control; Pt.6 (October 1999)
Items relevant to "Three Electric Fence Testers":
  • Three Electric Fence Tester PCBs (PDF download) [11303992-4] (PCB Pattern, Free)
  • Electric Fence Tester panel artwork (PDF download) (Free)
Items relevant to "Heart Of LEDs":
  • Heart of LEDs PCB pattern (PDF download) [08205991] (Free)
Items relevant to "Build A Carbon Monoxide Alarm":
  • Carbon Monoxide Alarm PCB pattern (PDF download) [05305991] (Free)
  • Carbon Monoxide Alarm panel artwork (PDF download) (Free)
Articles in this series:
  • Getting Started With Linux; Pt.1 (March 1999)
  • Getting Started With Linux; Pt.2 (April 1999)
  • Getting Started With Linux; Pt.3 (May 1999)
  • Getting Started With Linux; Pt.4 (June 1999)

Purchase a printed copy of this issue for $10.00.

Tell someone you love them! a e v a H art e H Now is the month of May-ing, when merry lads are play-ing, Fa-la-la-la and as everyone knows, it will soon be Mother’s Day. So we have produced a project for Mother’s Day and for any other day that you want to tell someone you love ’em. It is the Heart of LEDs. Build it now and you’ll be in that special someone’s “good books”. by LES GRANT* 56  Silicon Chip B ACK IN NOVEMBER 1998 we published the “Christmas Star”. It turned out to be very popular and just the ornament for the top of the Christmas tree. We’re taking the same basic idea and indeed the same circuit to produce a version for Mother’s Day: the Heart of LEDs. Now you can have something different to give to that special Mum or Grandmother. Or you may be able to redeem yourself if you forgot St Valentines Day! Either way, the Heart of LEDs will certainly last a lot longer than the traditional bunch of flowers! O r, i f y o u don’t want to give your heart away, you can actually wear it “on your sleeve” or better still, on your lapel. This is readily done if the Heart of LEDs is powered from four AA cells and these could be installed in a 4‑cell holder which you keep in your pocket. The Heart of LEDs is a modestly sized PC board with an array of 30 LEDs arranged in two concentric heart‑shaped patterns, ie, one heart inside the other. Driven by a single IC microcontroller, it flashes the LEDs in a seemingly endless sequence of patterns. For those who don’t like microcontroller projects, just pretend the micro is a dedicated LED driver IC that happens to have been designed to control 30 LEDs in the shape of a Heart (what a stroke of luck!). And it won’t be declared obsolete just after publication like a purposedesigned IC might be! As the design is derived from the Christmas Star, those readers who saw that article will notice that the schematic is very similar. In fact, you might think it is identical but the row connections to the microcontroller are different. The major differences between the Heart and the Star are in the shape of the PC board, the physical layout of the LEDs and the software. Why use a Microcontroller? Using a PC parallel port to control external devices is a popular approach these days but imagine the response when you present your Mum with a flashing Heart attached to an umbilical cable running into the next room! No, self‑contained is better. The answer is to use a small micro- Heart of my heart: give this to your Mum on Mother’s Day or wear it on your lapel when you’re out and about. This board has the 8‑pin socket for an optional EEPROM but this can be left out. controller. They are cheap and easy to use. And if the software doesn’t work first time (when does it?), you simply change the program and re‑program the micro. As this project demonstrates, by changing the software you can make a circuit which originally did one job do something quite different. Now we’re not going to go into the ins and outs of the circuit because that was done in the November 1998 issue of SILICON CHIP. We’ll just mention that the microcontroller is the Atmel AT89C2051 and is a version of the 8051 family. Here it is used to drive 30 LEDs which are connected in an X‑Y matrix; ie, the LEDs are interconnected in 6 rows and 5 columns. The appropriate combination of LEDs in a column is switched on for a short time (about 2ms) and the process is repeated for each column, taking just 10ms for a full cycle. Provided the multiplexing is done quickly enough, the persistence of vision “fills in the gaps” and we see all combinations of LEDs without any flicker. The power supply uses a 7805 3‑terminal regulator with 0.1µF bypass capacitors at its input and output. Diode D1 provides reverse polarity power protection. The maximum current drawn by the Heart is about 140mA with all LEDs on but less than about 50mA for most patterns. It is powered by a 9V DC plugpack. Do not use a 12V DC plugpack as the higher output voltage will cause excessive heat in the 3‑terminal regulator. The software As with the Christmas Star, the basic source code for the Heart will be available free (you can download it from www.grantronics.com.au). An extended version that uses an optional 24C16 EEPROM for storage may also eventually become available. The software is written in C language using the low cost Dunfield Development Systems Micro/C compiler. There is nothing particularly smart or tricky about the software – it was written to be easy to understand and to encourage use of small micros. Consequently, there are no interrupt routines and no use of the MAY 1999  57 Fig.1: the microcontroller (IC1) drives the 30 LEDs in a 5 x 6 matrix, with 5 columns and 6 rows. The EEPROM is optional, to store extra patterns in the future. It can be left out. counter/timers, the UART or the comparator though Micro/C can make use of these resources. The software is table driven. This means that the display patterns and sequences are determined by data stored in a table (an array of bytes). There is a simple interpreter that scans through the table to perform the specified operations. The defined byte values are listed in Table 1. Note that the software for the Heart is a little smarter than for the Christmas Star – so it can do more Table 1: Software Table Byte value or range 01 to 30 (0x01 to 0x1e) 33 to 62 (0x21 to 0x3e) 64 (0x40) 65 to 79 (0x41 to 0x4f) 128 (0x80) 129 to 191 (0x81 to 0xbf) 253 (0xfd) 254 (0xfe) 255 (0xff) 58  Silicon Chip Operation Turn on LED 1 to 30 Turn off LED 1 to 30 (LED number = byte ‑ 32) Go back to byte after loop start Loop start, count = byte ‑ 64 Delay (use last delay count), each count = 10ms Delay, count = byte ‑ 128, each count = 10ms All LEDs on All LEDs off End of table complex pattern sequences. Note also that there are still quite a few undefined values so future expansion is possible. Putting it together Assembly of the PC board is quite straightforward. You will need a soldering iron with a fine tip, preferably temperature‑controlled to about 320°C. The first step is to carefully check for shorts between tracks and broken tracks. Fit the smallest parts first, the wire links, followed by the resistors and diodes. Next, fit the crystal (or resonator) and the IC socket for the micro. Then install the transistors, capacitors and LEDs. Pay particular attention to the orientation of the LEDs – they all point the same way but they don’t work when installed backwards! Finally, install the 3‑terminal regulator and the 2.1mm DC power socket. Don’t insert the micro into its socket just yet. Do another close visual inspection, looking for solder bridges especially on the transistor pads. Then apply power and check for the presence of 5V between pin 20 (+) and pin 10 of the socket for IC1. If all is OK, remove the power, plug in the micro (make sure it’s the right way around) and apply power again. The micro then generates quite a range of patterns with the LEDs which then repeat after a while. Running it from batteries Earlier, we mentioned the possibility of running the circuit directly from four AA cells; ie, 6V. To do this, you would need to omit the 7805 regulator and connect a link from D1 to C5. This will give a supply rail of close to +5.4V. Note that the diode must be present because the maximum supply for the microcontroller is 6V. The hole near LED2 may be used to hang the Heart. If you hard‑wire the power supply, you may be able to use this hole as a strain relief and hang the Heart on the power wires. Finally, the appearance of the Heart may be enhanced by placing a piece of red cellophane over the front. Fig.2: the component overlay. Make sure that you insert all the LEDs correctly. The cathode or flat side is oriented away from the DC socket in all cases. Don’t insert the micro until you’ve done a voltage check on the board (see text). – it is so easy to change the behaviour by changing the software. And what about the optional 24C16 EEPROM? Well, an enhanced version of the Heart would read its data from the EEPROM for much longer sequences. To check out the latest version of Fault finding If the 5V DC is not present, check the applied power polarity. The centre pin of the 2.1mm DC socket (SK1) must be positive. Check that D1 is correctly fitted, and check the tracks from SK1 via diode D1 and the 7805 to IC1 for breaks or shorts. If one LED does not work, it may be inserted backwards or it may be shorted by a solder bridge between its pads. If one group of adjacent LEDs does not work, check the circuitry and soldering around the appropriate column drive transistor. If several individual LEDs do not work, check the corresponding row drive circuitry. Remember, faulty components are rare but soldering faults are common. The future The Heart is still evolving. That is part of the attraction of using a micro the software, log in at http://www. grantronics.com.au If you don’t have Internet access, send a stamped ($1) self‑addressed envelope with an IBM format 3.5‑inch disc to Grant-ronics and you will be sent the current software files. Parts List 1 Heart‑shaped PC board, code 08205991 1 2.1mm DC connector (SK1) 1 crystal or ceramic resonator, approx 12MHz (X1) 1 20‑pin IC socket 1 9V DC 150mA plugpack or 4 AA cells and 1 4 AA cell holder Semiconductors 1 AT89C2051 programmed microprocessor (IC1) # – See next page 1 7805 5V regulator (REG1) 30 red LEDs (LED1‑LED30) 5 BC557 PNP transistors (Q1‑Q5) 1 1N4002 power diode (D1) 1 1N4148, 1N914 silicon diode (D2) Resistors 5 2.2kΩ 6 120Ω (code: red red red brown or red red black brown brown) (code: brown red brown brown or brown red brown black brown) Capacitors 1 10µF 16VW electrolytic 3 0.1µF monolithic or MKT polyester 2 27pF ceramic (code: 104 or 100n) (code: 27 or 27p) MAY 1999  59 Included more for interest than anything else, this “accidental” photo clearly shows the multiplexing of the LEDs as they are being scanned in a linear motion. No, LEDs do not light up in stripes! Acknowledgement: I would like to thank the people at BEC Manufacturing who rushed the prototype boards through in time for publication. SC * Les Grant is the Engineering Director at Grantronics Pty Ltd, electronics design engineers. Grantronics are the Australian distributors for Dunfield Development Systems low priced software development tools. See the advertisement in the Market Centre. Fig.3 actual size artwork for the PC board. #Where to buy the kit Jaycar Electronics stores will have the complete kit available for $29.95. Alternatively, Grantronics Pty Ltd can supply the programmed microprocessors for $10 plus $5 for packing and postage. Send remittances to Grantronics Pty Ltd, PO Box 275, Wentworthville, NSW 2145. Phone (02) 9896 7150. When you need mains power and there's no power outlet available, look to Bainbridge Technologies. Look at the superb 1800W "Pure Sine Wave" inverter - because it's sine wave you'll have no trouble with delicate test equipment, computers, communications equipment, tools... anything. Don't need 1800W? Bainbridge Technologies have you covered – with 150W output, the 150i 12V to 240V inverter is ideal for consumer equipment including TVs and VCRs. There's a Bainbridge Technologies inverter to suit YOUR requirements. Call today for more details! 60  Silicon Chip