Silicon ChipBeginner's Project: the PicoMiniCube - January 2015 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Petrol power tools are anathema
  4. Feature: Interfacing To The Brain by Dr David Maddison
  5. Feature: The Micromite Mk.2 by Geoff Graham
  6. Project: Isolating High Voltage Probe for Oscilloscopes by Jim Rowe & Nicholas Vinen
  7. Project: High-Energy Multi-Spark CDI For Performance Cars, Pt.2 by John Clarke
  8. Product Showcase
  9. Project: The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 by Nicholas Vinen
  10. Beginner's Project: the PicoMiniCube by Design by Philip Tallents, article by Ross Tester
  11. Subscriptions
  12. Review: Tektronix RSA306 Real Time Spectrum Analyser by Jim Rowe
  13. Order Form
  14. Salvage It by Ken Kranz
  15. Vintage Radio: The Stromberg-Carlson 5A26 radio by Associate Professor Graham Parslow
  16. Market Centre
  17. Advertising Index
  18. Outer Back Cover

This is only a preview of the January 2015 issue of Silicon Chip.

You can view 36 of the 104 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 "The Micromite Mk.2":
  • 44-pin Micromite PCB [24108141] (AUD $5.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite Mk2 plus capacitor (Programmed Microcontroller, AUD $15.00)
  • PIC32MX170F256D-50I/PT programmed for the Micromite Mk2 (44-pin) (Programmed Microcontroller, AUD $15.00)
  • CP2102-based USB/TTL serial converter with 5-pin header and 30cm jumper cable (Component, AUD $5.00)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
Items relevant to "Isolating High Voltage Probe for Oscilloscopes":
  • Isolated High-Voltage Probe PCB [04108141] (AUD $10.00)
  • Hard-to-get parts for the Isolated High-Voltage Probe (Component, AUD $37.50)
  • Isolated High-Voltage Probe PCB pattern (PDF download) [04108141] (Free)
  • Isolated High-Voltage Probe panel artwork (PDF download) (Free)
  • Isolated High-Voltage Probe drilling guide diagram (PDF download) (Panel Artwork, Free)
Items relevant to "High-Energy Multi-Spark CDI For Performance Cars, Pt.2":
  • Multispark CDI PCB [05112141] (AUD $10.00)
  • ETD29 transformer components (AUD $15.00)
  • Hard-to-get parts for the Multispark CDI (Component, AUD $45.00)
  • Multispark CDI PCB pattern (PDF download) [05112141] (Free)
  • Multispark CDI panel artwork (PDF download) (Free)
Articles in this series:
  • High-Energy Multi-Spark CDI For Performance Cars (December 2014)
  • High-Energy Multi-Spark CDI For Performance Cars (December 2014)
  • High-Energy Multi-Spark CDI For Performance Cars, Pt.2 (January 2015)
  • High-Energy Multi-Spark CDI For Performance Cars, Pt.2 (January 2015)
Items relevant to "The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3":
  • Currawong 2 x 10W Stereo Valve Amplifier main PCB [01111141] (AUD $55.00)
  • Currawong Remote Control PCB [01111144] (AUD $5.00)
  • PIC16F88-I/P programmed for the Currawong Remote Volume Control [0111114A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Front & rear panels for the Currawong 2 x 10W Stereo Valve Amplifier [01111142/3] (PCB, AUD $30.00)
  • Currawong 2 x 10W Stereo Valve Amplifier acrylic top cover (PCB, AUD $30.00)
  • Currawong 2 x 10W Stereo Valve Amplifier top cover cutting diagram (Software, Free)
  • Firmware and source code for the Currawong Remote Volume Control [0111114A.HEX] (Software, Free)
  • Currawong 2 x 10W Stereo Valve Amplifier main PCB pattern [01111141] (Free)
  • Currawong 2 x 10W Stereo Valve Amplifier panel artwork (PDF download) (Free)
Articles in this series:
  • Currawong Stereo Valve Amplifier: A Preview (October 2014)
  • Currawong Stereo Valve Amplifier: A Preview (October 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.1 (November 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.1 (November 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.2 (December 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.2 (December 2014)
  • The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 (January 2015)
  • The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 (January 2015)
  • Modifying the Currawong Amplifier: Is It Worthwhile? (March 2015)
  • Modifying the Currawong Amplifier: Is It Worthwhile? (March 2015)
  • A New Transformer For The Currawong Valve Amplifier (October 2016)
  • A New Transformer For The Currawong Valve Amplifier (October 2016)
Items relevant to "Salvage It":
  • SPICE simulations for Common Mode Chokes (Software, Free)
Your first project: a Pico Mini Cube One of our neighbours at last September’s Electronex show in Sydney was a company called PicoKit, which had a range of educational projects especially for beginners. It’s been a while since we featured a real beginner’s project in SILICON CHIP so with PicoKit’s assistance, we’re going to publish one now – and it’s ideal for school holiday fun! WANT SEE A MOVTO THE PICOM IE OF INIC IN ACTION UBE ? Go to siliconchip video/pico .com.au/ minicube Design by Philip Tallents* Article by Ross Tester W hen we say a beginner’s project, the PicoMiniCube is just that, with about 20 components (mainly resistors) to solder onto a small PCB and 27 LEDs to solder together into a 3-wide x 3-deep x 3-high matrix, forming the display. It’s powered by three AA batteries and driven by a preprogrammed microcontroller, a PIC16F1503. When finished, the PicoMiniCube gives an eye-catching display, perfect for school projects and electronics/radio club demonstrations. Best of all, it sells for less than $30.00! Because of the way the LEDs are soldered together, you’ll gain some valuable soldering experience, not to mention component identification. If it’s not 100% perfect, it will either not work properly or not work at all! What you’ll need First up, you’ll need the PicoMiniCube kit. It’s available via the PicoKit website (www.picokit.com.au) and sells for $26.05 (inc GST) with a pre-programmed PIC chip. If you want to (or can!) program your own PIC, the kit with an un76  Silicon Chip programmed PIC sells for $24.95 – hardly worth the hassle! You can order it with blue LEDs, green LEDs or red LEDs. While you might be tempted to used different colour LEDs for different levels of the matrix, remember different colour LEDs have different apparent brightnesses, so the display might not look as eye-catching. As far as tools are concerned, the requirements are pretty basic: a 30W soldering iron (with a reasonably fine tip), some electronics solder (0.7mm, rosin-cored), a pair of needlenose pliers (fine), a pair of small side cutters and finally, a wet sponge to clean your soldering iron tip. First of all . . . When you open a kit, you should always check to see if all the components (parts) are there. It’s most unusual to find anything missing in a kit but it’s better to find out now than at 8pm on Saturday night when you can’t finish the project! Perhaps you need some help in identifying the components – we’ve put some illustrations in the parts list to help you there. Next, divide the components into the various types – siliconchip.com.au resistors, capacitors, transistors, ICs (integrated circuits – there is only one in this project), and the “hardware”– sockets, connectors, the PCB, Nylon standoffs and nuts, etc. The LEDs are normally supplied in their own bag which keeps them separate – for now, you might as well leave them in there. Many hobbyists like to use small containers to hold the separate “bits” for projects – tiny plastic food containers, emptied(!) and cleaned, are ideal. Or if you can get your hands on some, a scrap of polystyrene foam makes a great storage area because you can push the component leads into it! Where a component (especially an IC) is supplied in black foam plastic, leave it in that until ready for use: the foam is actually conductive and is designed to stop static electricity damaging sensitive components. The next step is to identify the resistor values. With young eyes, it’s not too difficult to read the colour bands and so work out the values but as many colours are easy to mistake (orange and red, for example), nothing beats using a digital multimeter (on Ohms scales, of course) to get a definite reading. Tolerance You will almost certainly discover that a resistor is not exactly the value its colour code suggests. The band at the end of the resistor gives its “tolerance”, or how close it is to its marked value. These days, it’s most unlikely to be worse than 5% and more than likely better. If its colour bands are brown, black, green and gold, that means it is 1.0 megohms (1M), with the gold band meaning it is plus or minus 5% of that value – so the actual value could be anywhere between 950,000 ohms (950k) and 1,050,000 ohms (1.05M). That’s fine – the circuit is designed to take that variation into account. If the circuit actually needs a closer tolerance, it will say so. A 1M, 1% resistor could be anywhere from 990,000 ohms (990k) to 1,010,000 ohms (1.01M). Even closer tolerance resistors are available but the closer they are, the more expensive they are – and, as we said before, most circuits don’t need them. Incidentally, the same comments apply to virtually ALL “passive” components – capacitors, inductors, and so on. You’ll find that some components have much wider tolerances – electrolytic capacitors being a case in point with 10% and even 20% not uncommon. Fortunately, there are only three types of resistors in this circuit – ignoring the last (tolerance) band, 100 (brown-black-brown), 330 (orange-orange-brown) and 1M (brown-black-green). In many cases, up to 1000 ohms value, the symbol (or decimal point) is replaced with the letter “R” – so a 100R would mean 100; 2R2 would mean 2.2 and so on. Above 1k, the letter k serves the same purpose – 100k would mean 100,000 ohms, 4k7 would mean 4.7k or 4,700. Above 1M, the M symbol does the same: 1M means 1M, 3M3 means 3.3M, etc. In this project, the white PCB overlay is marked using this standard. There’s only one capacitor used here, a tiny 1000nF (or 1F) ceramic type. It will probably be marked “105” – that means it is 10pF followed by five zeros or 1000000pF. Converting from pF to F means we move the decimal point six places to the left and end up with 1.000000F. siliconchip.com.au Most of the components solder to the top side of the PCB which becomes the underside with the LED display on top. Confused? Just remember that all components except the LEDs and on/off switch are on the side with the component overlay printed on it. There’s also only one type of transistor – a BC327 PNP switching transistor in a “TO92” case. Don’t worry too much about what those numbers mean – it will all come in time! Of all the above-board components, only the transistors and integrated circuit are polarised (ie, orientation matters on the PCB) – and we’ll look at them in more detail shortly. The “display” components, which mount under the board are the 27 LEDs, (light-emitting-diodes) which could be red, green or blue, depending on what you have ordered. Like all diodes, LEDs are also polarised. You will note that the two legs of the LED have different lengths – the longer leg is its anode (A), while the shorter leg is its cathode (K). Why is it K, not C? To avoid mixing it up with the “Collector” of a transistor, which has the abbreviation “C”. (K stands for Kathode, the German word for . . . you guessed it!). About the only other component, as such, is the microcontroller, a PIC16F1503 (it could be a PIC16F1505 – in this circuit, they are functionally identical). There are loads and loads of PIC types; the 16F1503 is large enough to contain the code stored within it and has enough outputs to drive the 27 LEDs. The code, also called the “program”, can be changed by erasing it and writing new code into its memory; however, you need to know how to write programs to do so. Otherwise, once erased, it will sit there like a dumb, black, plastic thing with lots of legs! As we mentioned earlier, the PicoKit normally comes with the PIC already programmed – and there’s not much you can do which will erase it unless you specifically go about doing so – so rest easy! The PCB (Printed Circuit Board) The PicoMiniCube uses a double-sided board (ie, there January 2015  77 Q1 BC327 A l LED 19 K A l LED 10 K A l LED 1 K A A l LED 20 K A l LED 21 K A K A K K A l LED 4 K l LED 15 K A l LED 3 A l LED 14 K A l LED 2 K A l LED 13 K l LED 24 K A l LED 12 A l LED 23 K A l LED 11 A l LED 22 A l LED 5 K l LED 6 K K A A l LED 25 l LED 26 K K A A l LED 16 l LED 17 K K A A l LED 7 l LED 8 K K E B C 330W A l LED 27 K Q2 BC327 E B C 330W A l LED 18 K Q3 BC327 E B C A l LED 9 330W K 5x 100W 4x 100W 1 13 5 6 12 Vdd RA0/AN0 AN5/RC1 RC5/PWM1 AN7/RC3 RC4/C2OUT AN4/RC0 S2 (ON PCB) 9 1mF 7 MMC 10 11 RA1/AN1 AN2/RA2 IC1 PIC16F1503 8 Q4 BC327 AN6/RC2 LEDS K A BC327 RA3 AN3/RA4 E B C RA5 4 B C 3 4.5V 2 Vss 14 PICOMINICUBE S1 E 1M Ó2014 Fig.1: the LEDs are arranged in three layers of nine and are powered by the four transistors switching on and off according to the outputs of the PIC microcontrollers, which in turn are controlled by the code, or program, previously stored in the PIC. Our LEDs are shown here as red but they could be equally be green or blue, depending on what you order. are tracks on both the top and bottom) though in this case they’re quite hard to see. All the tracks are covered with a black “solder mask” which makes soldering a bit easier. But there is a downside – to see the tracks under the mask you have to hold the board so the light reflects in a certain way. It’s easy to identify the top and bottom of the board – the top side has the component positions and other information printed on it – what is known as a “component overlay” or “silk-screen overlay”. (It’s called that because a technique called silk-screen printing is traditionally used to print the overlay onto the PCB. It’s a process that’s commonly used for printing a vast array of items, probably including the T-shirt that you have on right now!) In this particular PCB, there are also components marked on the bottom side but they are only the bottom layer of LEDs in the display and the on/off switch. The holes in the board, into which you place the components and solder them in place, are “plated through” 78  Silicon Chip (where required) so that when you solder one side, the opposite side also solders. Soldering We’ve almost glossed over one of the most important parts of building this, or any other, project – soldering. Kit suppliers tell us that incorrect component placement or orientation accounts for only about one third of errors in construction. The other 90% is poor soldering! Not only do you need to solder the LEDs together, you also need to solder components to the PCB. And some of them have pins that are pretty close together. Good soldering is a skill that all hobbyists need to develop – you need the right equipment and as mentioned earlier, the right solder. Beginners often ask why they need to use solder especially made for electronics work and not “ordinary” solder sticks with a tin of flux, such as that used by plumbers and sheet metal workers. siliconchip.com.au How it works The PicoMiniCube consists of two main sections: the 3 x 3 x 3 LED matrix forming the display and the circuitry to drive it, consisting mainly of a PIC microcontroller. First of all, we’ll look at the 27 identical LEDs. A light-emitting-diode, or LED, behaves in a very similar way to other diodes – that is, it conducts, or turns on, only when its anode (A) is made sufficiently positive with respect to its cathode (K). However, it has one major difference to other diodes – when it conducts, it emits light. The colour of the light depends on the materials from which the LED is made – and you can get a wide range of colours, ranging from infrared (ie, you can’t see it glow) right through all the colours of the rainbow, to ultraviolet (again, you can’t see it glow but it does make many things glow themselves!). The various colour LEDs require different voltages across them – red LEDs, for example, require a much lower voltage to make them glow than do blue. The 4.5V supply (3x AA cells) is sufficient to light any colour LED. In most cases, a resistor is necessary to limit the current through the LED, otherwise it can burn out. That’s the purpose of the 100resistors in series with each of the groups of LEDs in this circuit. The LEDs are switched on and off by the microcontroller, IC1. This has been programmed with code specifically designed to power the LEDs in certain patterns. The program tells each of the output pins (pins 1-12) when to go “high” or “low” when appropriate. On its own, the microcontroller can’t supply enough current to make the LEDs glow brightly, so connected to pins 1, 2 and 3 are small PNP transistors. These act as switches, turning on and therefore supplying power from the battery to the layers of LEDs when the microcontroller sends pins 1, 2 and 3 low. A fourth transistor, Q4, is used to supply extra power to Q3 because pin 4 cannot even handle the current necessary by itself. If the cathodes of the LEDs were connected to the negative supply, they would light up whenever the transistors turned on. But they aren’t: each LED group is connected (again via that current limiting resistor) to yet more outputs of the microcontroller. Again, these outputs go high and low as the microcontroller program tells them to. To make the LEDs glow, the pins 5-13 microcontroller outputs need to go low at the appropriate time, so current can flow through the LEDs, through the microcontroller to the negative supply. So to light up, the group of LEDs need one of the transistors to turn on AND the associated microcontroller output to go low – for example, when Q1 turns on because pin 2 goes low and when pin 12 goes low, LED 19 will light. If at the same time pin 13 goes low, LED 22 will light. When the transistor turns off or either microcontroller output goes high again, it/they will go dark. If pin 12 stays low but Q2 turns on, LED 10 will light. The result of the continual switching on and off is the pattern of LEDs lighting in the PicoMiniCube whenever it is turned on. You can’t control either the LEDs or the pattern – these are determined by the program. Your choices are power on or power off! use an iron that is either too hot or too cold – either The reason is twofold: (1) plumber’s solder runs the risk of making a “dry joint”, which often has a much higher melting point than electronics results in the solder not properly “taking” to one solder. This heat could damage components part or the other. and (2) ordinary soldering flux is usually quite This can mean that there is no electrical conneccorrosive. That doesn’t matter so much with thick tion between them from the start, or it can mean copper pipes, etc but in quite a short time would that it’s a fault waiting to bite you later on when play havoc with the very thin copper tracks on a it inevitably fails. PCB and/or component leads. Another common mistake, made even by those Just as importantly, electronics solder is norSolder for with many years experience, is to attempt to solelectronics use is mally supplied as a relatively fine “wire” and der oxidised wires and leads. Copper (especially) is much easier to handle than a stick of solder, normally supplied in 500g or even but also tin and most other metals oxidise over particularly in fine work. It also usually has the time and solder simply will not take to them flux, or rosin, running through its core – and that 1kg rolls – various gauges (thicknesses) properly. If in doubt, scrape clean the lead or flux is specifically designed (it’s non-corrosive) are available but part to be soldered beforehand with some fine for use in electronics. 0.7mm to 1mm are emery cloth or even a sharp hobby knife. A common mistake that beginners make is to popular. FLAT EDGE ON LED BODY ANODE CATHODE (K) CATHODE ANODE (A) An old block of styrene foam (eg, from appliance packaging) makes component storing easy . . . siliconchip.com.au Identify the LED leads – the anode is the longer lead and there’s a flat on the LED body against the cathode. On 18 of the 27 LEDs, bend the cathode down 90° with needle-nose pliers and bend it straight 90° again. Now bend the anodes of 12 of them 90° out in the “9 o’clock” direction. Notice the “crank” in the cathode. January 2015  79 CATHODES (LED17, LED26) ON LED7 LED7 CATHODES (LED16, LED25) LED8 LED9 “LED” SIDE OF PCB (BECOMES THE UPPER SIDE) 330W 100W 100W PicoKit – + CATHODES (LED18, LED27) Q3 Q2 Q1 www.picokit.com There are three layers of nine LEDs, two of which are made up as shown here. The top row cathodes solder to the cathodes of the middle row (below), The middle row cathodes and both leads of the bottom layer solder to the PCB. However, to get the spacings right, you can temporarily place the LEDs in their respective spots in the PCB – but be very careful not to solder them in (yet!). The crossconnections (shown in grey) can be made up from excess component lead clippings. LED6 Q4 330W 100W S1 LED5 100W 1M LED4 OFF PROG1 K = NO CONNECTION CATHODES (LED15, LED24) IC1 PIC16F1503 CATHODES (LED14, LED23) CATHODES (LED13, LED22) © 2013 FLAT SIDE 100W 100W 1m F A A K LED2 PicoMiniCube A = SOLDER K A A LED3 CATHODES (LED12, LED21) – K K A 100W 100W K LED1 K CATHODES (LED11, LAYER2 LAYER3 LED20) + FLAT SIDE A A K A K CATHODES (LED10, LED19) 330W 100W “SCREENED OVERLAY” SIDE OF PCB (BECOMES THE LOWER SIDE) We call these diagrams “component overlays” because they show precisely where all the components go on the PCB. On a single-sided PCB, its as if you are looking through the board like an X-ray, with the copper tracks underneath. The photo at right shows the same board from the component side – that is, the side which has the component positions marked on it. Good soldering is a subject which could take many pages to explain and even then, possibly not be enough. By far the best idea is to start with some scraps of wire and try your soldering techniques out before going anywhere near a component or PCB. For a beginner, it’s always easiest to solder the component to the PCB before cutting the excess leads off. Experienced constructors often do it the other way around, claiming a better and neater solder joint. If you want more information, there are many, many websites which will take you through the rudiments of soldering (and even some to help make you an expert!). Ready to start? OK, here’s the order of construction in ten easy steps: (1) Bend the legs of the LEDs (2) Solder 18 of the LEDs together into two layers of nine. (3) Solder the two layers together (4) Test that all the LEDs light using the battery pack with a 100 resistor temporarily connected in series. (5) Place and solder the components (except LEDs) on the PCB, including the PIC socket (but not the PIC!). (6) Place and solder the bottom layer of LEDs on the PCB (7) Solder the two layers of LEDs to the bottom layer. (8) Connect the battery box wires to the PCB. (9) Fit the threaded standoffs to the PCB to act as feet (10) Fit the PIC chip in its socket The LED matrix Before we solder any components onto the PCB, we’re going to make up the two thirds of the LED “matrix” which forms the display. The matrix eventually mounts on the underside of the PCB (ie, the non-component side) and needs to be connected as shown and described, otherwise the display won’t – display, that is! The rows are labeled Layer 2 and Layer 3 on the PCB – that’s a bit confusing, so we’ll refer to them as the top (layer 3), the middle (layer 2) and the bottom (layer 1). The top layer of LEDs have their cathodes soldered to the cathodes of the layer below; later, the middle layer of LEDs will have their cathodes soldered to the PCB. The bottom layer of LEDs have both leads soldered to the PCB. The anodes of the middle layer all connect to the point on the PCB marked “layer 2”; similarly the anodes of the top layer all connect to the point marked “layer 1”. Making it! First you’ll need to bend the cathode leg of 12 of the LEDs sharply out 90° away from the LED body, nice and close to the body. Then as close as your needle-nose pliers will allow, bend it back down 90° again, so that it has a little “crank” in it – this allows the leg to pass by the body of CATHODE ANODE The other six LED anodes are bent out in the opposite (3 o’clock) direction. The other nine LED leads are not bent. 80  Silicon Chip Keep those different types of LEDs separate! It won’t work properly if they’re mixed up. Assemble each layer of LEDs by using the PCB as a template. Make sure you don’t solder them in! Connect the anodes in the top and middle layers with some component lead offcuts or hookup wire. siliconchip.com.au the LED underneath (ie, on the next layer down), where it will solder to its cathode (eg, LED 25 K connects to LED 16 K which connects to LED 7 K). However, the anodes (A) of the LEDs aren’t all the same. 12 of the LEDs are bent 90° one way while six have their anodes bent 90° in the opposite direction (see photos). These bends are to allow each LED to connect to the anode of the next LED. See how all three LEDs in the one group (ie, one row of one layer) have their anodes connected together on the circuit diagram? It’s probably easiest to follow the diagram opposite to work out where the LEDs go and which way around. See how six of the LEDs on each layer have their anode lead bent out one way while three go in opposite direction You can use the PCB to properly space the LEDs while soldering but be careful not to solder the leads to the PCB. The flat side of the LEDs on the PCB indicate the nine CATHODES. They can be held in place by using the same block of styrene foam mentioned earlier. Solder three LEDs together, anode to anode, remove and repeat for the next three LEDs, and so on, until you’ve soldered all nine for the first layer. The sets of LEDs are “cross-braced” by a pair of wires soldered anode to anode to anode. These wires can be the offcuts of component leads. Repeat for the middle layer. Now you can carefully solder the upper two layers of the cube together (see photo). Another connection is required between the anodes on the top two layers and the PCB (the points marked “layer 2” and “layer 3”). It’s probably a bit long to use component offcuts for the top layer so use the supplied short length of hookup wire. If you use uninsulated wire, make sure it touches nothing else! Parts List – PicoMiniCube 1 PicoMiniCube PCB, 50 x 50mm 1 3x AA battery holder* with switch and connecting wires 1 2.5mm stereo socket (optional – for programing if required) 1 mini PCB mounting SPDT switch 4 5mm nylon PCB standoffs (with M3 nylon nuts) – [for “feet”] Semiconductors 1 PIC16F1503 (or PIC16F1505)   programmed microcontroller NOTCH PIN 14 PIN 7 PIN 1 FLAT SIDE 27 5mm LEDs (all same colour) K LONGER LEAD 4 BC327 PNP Transistors FLAT SIDE Capacitors 1 1F ceramic (code: 105 or 1.0) E B C A 105 Resistors (0.25W, 5% supplied in kit) 9 100 (code: brown black brown gold) 3 330 (code: orange orange brown gold) 1 1M (code: brown black green gold) Where to get the kit: All the components above are available exclusively in a kit from PicoKit, who hold the copyright on the design, code and PCB. It sells for $23.68 complete with programmed PIC (ref no is kit #119). Visit www.picokit.com.au for full details of this and many other Picokits to keep you busy these holidays! * You’ll also need 3 x AA batteries (not supplied in kit) Once the two upper layers of the LED cube is completed, before you go any further, use the battery pack (3xAA cells) with one of the 100 resistors temporarily wired in series and check each of the LEDs in your cube. It might be a bit tedious but you really need to ensure that all the LEDs are soldered together correctly. Connected one way, (positive to anodes) the LED should glow. Reverse the connection and it should not. Having satisfied yourself that the cube is all OK, you can start soldering the components onto the PCB. Remember that the components are placed onto the opposite side of the PCB compared to the LED cube but are soldered from the LED cube side. You’ve had plenty of practice soldering the LEDs together so soldering to the PCB should be easy! It is usual practice to leave semiconductors until last (to minimise the chance of damaging them) and to start with the lowest-profile components, the resistors. As mentioned earlier, there are only three values – 9 x 100, 3 x 330 and 1 x 1M. Resistors are not polarised – they can mount either direction. However, it is considered good practice to align them so they all read the same way in either the horizontal or vertical direction. Note that while the resistors supplied in the kit were all 5% tolerance, with a gold band at the end, it is possible that 1% tolerance resistors (with a brown band) could be supplied. The easiest way to identify these is to separate the 330types (first two bands are orange) then look for the single 1Mtype – it will have brown, black, black, yellow Check all of the LEDs in the layers work with the battery pack in series with a 100 resistor. Complete soldering the top side of the PCB and, once again, check that everything is in the right place. Testing the cube siliconchip.com.au Start placing the components – resistors first. Check twice that they’re in the right places! Solder the bottom layer of LEDs onto the underside of the PCB. The square on the overlay marks the anode. January 2015  81 and brown bands. The remaining nine resistors would of course be the 100types: brown black black black brown. Next, solder in the single capacitor – it too is not polarised so can go into the PCB either way. Follow the capacitor with the PIC socket (but without the PIC itself). While the socket itself is not polarised, the PIC chip which plugs into it certainly is! The socket has a notch in one end which matches the notch on the PCB. Be careful soldering the pins of the socket – they’re quite close together and it’s easy to bridge across adjacent pins. This will either prevent the PIC working properly or, at worst, could destroy it. The PIC programming port can go in next, although if you don’t know how to program a PIC, this can be left out – it plays no part in the operation of the circuit. Next come the four PNP transistors. Their orientation is clearly shown on the PCB – one side is curved and the other flat. They must go in this way or they could be damaged – at best, they certainly won’t work! Once again, take care soldering: their pins are very close together. We said earlier that all components apart from the LEDs solder on what is normally the top side of the PCB – but there is an exception. That’s the tiny on-off switch which can now be placed on the opposite side (it doesn’t matter which way around) but soldered from the top sides. Finally, you need to connect the red and black power supply wires from the battery holder onto the board. First, pass both these wires down through one of the two larger holes alongside their solder pads then back up again through the other hole, from underneath the board – this take the strain of the flexible wires so they will have less tendency to break off at the solder joints. The red wire then solders down through the “V+” pad and the black down through the “GND” pad. You may be wondering why this is called “GND” or ground – in battery circuits, it is generally assumed that the negative terminal from the battery is at ground potential, or 0V. Often you’ll see this referred to as “Earth”, perhaps with an earth symbol ( ). Often, the terms are interchangeable (but not always – there are exceptions sometimes!). Plug in the PIC All that remains now is to plug the PIC16F1503 chip into its socket. If you look carefully at the chip, you see it has a notch at one end which matches the notch on the socket. Align the chip over the socket so the notches match and very carefully push the chip in, taking a lot of care that you Connect all the middle layer cathodes to the PCB – both of the arrowed holes in the PCB are for cathodes. 82  Silicon Chip Join the top and middle layer anodes to the PCB middle to position “layer 2” and top to “layer 3”. get all the pins into the socket and not bent underneath or splayed outside. The battery box It’s easy to damage the battery box getting the lid off. There are two clips at one end which must be VERY gently prised out to clear the locating lugs underneath. This can be done with a very small screwdriver or a hobby knife (careful!). Don’t bend them too far or they will break off. Put three AA batteries in the box in the polarity shown and place the lid back on, snapping it in place. Turn the power switch on the battery box to the ON position and similarly turn the power switch on the PCB to ON. (It’s a bit of a trap having two switches – it’s probably better to leave the one on the PCB on all the time). You should now be rewarded with all the LEDs lighting in sequence, then repeating. Congratulations! Uh-oh . . . It’s not working! If it either doesn’t work at all, or if only some of the LEDs light up, there is obviously a problem somewhere. First thing to check is the batteries – if you measure across the V+ and GND terminals on the PCB, you should get very close to 4.5V (assuming standard AA batteries). If you get zero, make sure the switch on the battery box is on and the batteries are all seated properly. If this still gets you nowhere, check that each battery is delivering about 1.5V. If you did get 4.5V, make sure the switch on the PCB is on. If it is and the LEDs aren’t flashing, there is obviously an error somewhere. Check your soldering and the placement and orientation of polarised components. Make sure the PIC16F1503 is inserted in its socket correctly (ie, the right way around) and no pins have missed their correct positions. If you get some LEDs flashing and others not, the chances are that one or more LEDs is the wrong way around or there’s a bad solder joint on the PCB – probably one of the transistors or one of the resistors. You can troubleshoot which component(s) might be suspect by tracing back from the unlit LEDs to the PCB. Because there are so few components, there’s not much that can be wrong. If all the components are soldered in properly, are in the right place and where necessary oriented correctly, it works. If not, it doesn’t! SC *Philip Tallents is Manager and Product Designer at PicoKit (www.picokit.com.au) Run the battery wires down and back up again through the strain relief holes and solder to the correct pads. Plug in the PIC chip, making sure it goes in the right way around (align the notch on the chip & socket). siliconchip.com.au