Silicon ChipA Solar-Powered Lighting System, Pt.2 - June 2010 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Unflued gas heaters are a health hazard / Problems with our VOIP phone system
  4. Feature: Unmanned Aerial Vehicles: An Australian Perspective by Bob Young
  5. Feature: Breakthrough Aussie Innovation: Making 3D Movies by Barrie Smith
  6. Project: Air-Quality Meter For Checking CO & CO₂ Levels by John Clarke
  7. Review: LeCroy WaveAce 112 Digital Storage Oscilloscope by Nicholas Vinen
  8. Project: Dual-Tracking ±19V Power Supply, Pt.1 by Nicholas Vinen
  9. Project: Build a Digital Insulation Meter by Jim Rowe
  10. Vintage Radio: How AGC works and why it’s necessary, Pt.2 by Rodney Champness
  11. Project: A Solar-Powered Lighting System, Pt.2 by John Clarke
  12. Advertising Index
  13. Outer Back Cover

This is only a preview of the June 2010 issue of Silicon Chip.

You can view 31 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:
  • Radio Control (November 1996)
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
Items relevant to "Air-Quality Meter For Checking CO & CO₂ Levels":
  • Air Quality Monitor PCB [04306101] (AUD $10.00)
  • PIC16F88-I/P programmed for the Air Quality Monitor [0430610A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the CO/CO₂ Air Quality Meter [0430610A.HEX] (Software, Free)
  • Air Quality Monitor for CO & CO₂ PCB pattern (PDF download) [04306101] (Free)
  • Air Quality Monitor for CO & CO₂ lid panel artwork (PDF download) (Free)
Items relevant to "Dual-Tracking ±19V Power Supply, Pt.1":
  • Dual Tracking ±0-19V Power Supply PCB [04206101] (AUD $15.00)
  • Dual Tracking ±0-19V Power Supply front panel PCB [04206102] (AUD $5.00)
  • Dual Tracking ±0-19V Bench Supply PCB patterns (PDF download) [04206101/2/3] (Free)
  • Dual Tracking ±0-19V Supply panel artwork/drilling templates (mains-powered) (PDF download) (Free)
  • Dual Tracking ±0-19V Supply panel artwork/drilling templates (plugpack-powered) (PDF download) (Free)
Articles in this series:
  • Dual-Tracking ±19V Power Supply, Pt.1 (June 2010)
  • Dual-Tracking ±19V Power Supply, Pt.1 (June 2010)
  • Dual-Tracking ±19V Power Supply, Pt.2 (July 2010)
  • Dual-Tracking ±19V Power Supply, Pt.2 (July 2010)
Items relevant to "Build a Digital Insulation Meter":
  • Digital Insulation Meter PCB [04106101] (AUD $15.00)
  • Digital Insulation Meter Power Supply PCB [04106102] (AUD $10.00)
  • PIC16F88-I/P programmed for the Digital Insulation Meter [0410610A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Digital Insulation Meter [0410610A.HEX] (Software, Free)
  • Digital Insulation Meter PCB patterns (PDF download) [04106101/2] (Free)
  • Digital Insulation Meter front panel artwork (PDF download) (Free)
Articles in this series:
  • How AGC works and why it’s necessary (May 2010)
  • How AGC works and why it’s necessary (May 2010)
  • How AGC works and why it’s necessary, Pt.2 (June 2010)
  • How AGC works and why it’s necessary, Pt.2 (June 2010)
Items relevant to "A Solar-Powered Lighting System, Pt.2":
  • Solar-powered Lighting System PCB [16105101] (AUD $10.00)
  • PIC16F88-I/P programmed for the Solar Powered Lighting Controller [1610510A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Solar Powered Lighting Controller [0610510A.HEX] (Software, Free)
  • Solar-Powered Lighting System PCB pattern (PDF download) [16105101] (Free)
Articles in this series:
  • A Solar-Powered Lighting System (May 2010)
  • A Solar-Powered Lighting System (May 2010)
  • A Solar-Powered Lighting System, Pt.2 (June 2010)
  • A Solar-Powered Lighting System, Pt.2 (June 2010)

Purchase a printed copy of this issue for $10.00.

Solar-Powered Lighting System Last month we described the operation of our new off-grid lighting system, featuring free power courtesy of the sun! Now we move on to the fun part: building it! Part 2 – By JOHN CLARKE W e’re confident that this will be a very popular project, offering far more features than typical “solar chargers”. One thing we didn’t mention last month is that being all low-voltage, it would make a perfect school electronics project. And the fact that it is decidedly “green” will bring a warm glow to any environmentalist teacher’s heart! To fully understand the project, you will need to refer to the detailed explanation given in Part 1 (May). It also contains the circuit diagram which you might need to refer to during construction. The controller is built on a PC board coded 16105101, measuring 133 x 86mm. This PC board is designed to be housed in a 157 x 95 x 53mm utility box (size UB1), clipping into the integral mounting slots moulded in the side of the case. Begin by checking the PC board for breaks in tracks or shorts between tracks and pads. Repair if necessary. Next, check the hole sizes are correct for each component. The screw terminal holes are 1.25mm in diameter compared to the 0.9mm holes for the ICs, resistors and diodes. Assembly can begin by inserting the links and the smaller resistors. When inserting the resistors, use the resistor colour code table to help in reading the resistor values. A digital multimeter can also be used to confirm the values, especially where close colours might be misleading. We used tinned copper wire for the links although 0Ω resistors may be supplied in kits. These look like small resistors but have just one black stripe around their body. As mentioned last month, resistor R2 (100kΩ) is only installed if a standard PIR detector is to be used. It is left out if the recommended (Altronics) PIR is used. 96  Silicon Chip Next are the diodes, mounted with the orientation as shown on the overlay. Don’t mix up the Zener diodes and ordinary diodes. Now is a logical time to solder in the PC stakes and the 3-way headers for LK1 and LK2 and 2-way pin header for TP3 and TP4. IC1 is mounted on a DIP18 IC socket. Solder in the socket (with the notch in the direction shown) but at this stage, don’t plug in the IC: it’s left out until the 5V supply is adjusted. The remaining ICs can either be mounted using sockets or mounted directly on the PC board. Ensure each IC is placed in its correct position and is oriented correctly, with the notch (or pin 1 indicating dot oriented) as shown. When you solder the fuse clips in, you’ll see they have an end stop or small lugs to prevent the fuse sliding out. The lugs need to be to the outer ends of the fuse – if soldered in back to front the fuse won’t go in. The 0.1Ω 5W resistor can be mounted now. The value of resistor R1 needs to chosen according to the lamp or lamps used. For more detail see Table 2. Next are the trimpots –again, take care to place the correct value in each position. Note that most trimpots are marked with a code rather than the actual ohm value. For the 10kΩ trimpots, the marking may be 103, the 20kΩ trimpots 203 and the 500kΩ trimpot 504. Install the transistors and Mosfets taking care not to confuse Q2, Q3 and Q5 (all BC337 types) with Q6 (a 2N7000). Also, ensure that Q1 is the IRF9540. Mosfet Q4 is the IRF540 and is mounted horizontally on the PC board using a small heatsink. The leads are bent at 90° before inserted into the PC board. It’s easiest to fasten Q4 to its heatsink and the PC board with its screw and not before soldering it in place to ensure that it lines up with the screw hole in the PC board. siliconchip.com.au Same-size photo of the completed PC board. As you can see here, both the LDR and LED can be mounted on the board (the LDR via CON2) and bent over 90° to line up with holes in the case. The 11-way terminals are made using three 3-way and one 2-way section which dovetail together before installing onto the PC board. The wire (entry) side faces the outside of the PC board. S1 can be installed now followed by LED1, which is mounted so the top is about 25mm above the PC board. Ensure the anode (the longer lead) goes into the hole marked “A”. The coil, L1, is mounted upright and secured to the PC board with a cable tie as well as being soldered (see the photo and diagram above). Finally, the LDR can be installed. If you use a clear-lid UB1 box to house the Solar Lighting Controller you may be able to install LDR1 directly onto the PC board. Where the lid is not clear, or if the box will not be exposed to ambient light, the LDR can be fastened to the CON2 connector terminals so that it “sees” through a hole in the side of the box. As we mentioned last month, it can be remotely 10 F 35V 10k 100k IC2 LM353 100 22k 1k 100nF 100nF 100k 10 10140161 G NIT H GIL RAL OS 10k 4148 20k LED1 LDR DAY CON2 NTC1 PIR NIGHT VR5 10k 10k TP4 470 VR4 10k VR3 4.7k 470 4N28 IC3 100 F TP3 A NTC LDR1 100k ZD2 100nF 1k 1nF TP1 LK1 1k Q3 100nF 500k 4.7k 82k 20k MANUAL SWITCH 10nF 2.2k 100nF Q4 IRF540 VR2 S1 TP2 VR1 LK2 10k 10M SIG 2.2k 100nF 1k – IC4 20k + 10 ZD1 10nF 10nF 470 F Q5 – siliconchip.com.au D2 VR6 – D3 Q2 TL499A + + PIR SENSOR 5822 IC1 PIC16F88-I/P – F1 L1 Q1 IRF9540 470 F 4.7k 12V LAMP OR LEDS + 2.2k 12V SLA BATTERY 5822 0.1  5W SOLAR PANEL D1 R1 (SEE TEXT) Fig.6 (below) matches this photo and shows the component overlay together with the connections to the solar panel, SLA battery, PIR, LEDs and manual switch. 1nF 10 COM LDR Q6 R2 (SEE TEXT) located using figure-8 wire. Note that it is either on the PC board or remote, not both! LDRs are not polarised. Similarly, the NTC can be installed on the PC board or remotely, using a figure-8 cable connection for external temperature sensing of the battery. Setting Up Links LK1 and LK2 need a jumper shunt, with the various options shown in Table 1. If you are not sure at the moment, take a guess: they can be readily altered later on. With IC1 still out of circuit, but the fuse in place, apply power to the ‘12V SLA Battery’ + and – inputs on connector CON1. With a DMM, measure the voltage between pins 5 and 14 of IC1 and adjust VR1 for a reading of 5.0V. Now switch off power and place IC1 in position, taking care to insert it correctly: the right way around and no pins bent out of position. Apply power again and measure the June 2010  97 Table 1: Lamp Operation PIR (LK1) LDR (LK2) Output current 200mA 350mA 500mA 700mA Lamp ON Lamp OFF In Night PIR movement detection or with S1 during night time only Timer timeout, S1 or at dawn In Day PIR movement detection or with S1 during day time only Timer timeout, S1 or at dusk In Night (LDR1 disconnected) PIR movement detection or with S1 during day and night Timer timeout or S1 Out Night Day to night transition or with S1, night only Timer timeout, S1 or automatically at dawn Out Day Night to day transition or with S1, day only Timer timeout, S1 or automatically at dusk Out Night (LDR1 disconnected) S1 during day or night Timer timeout or S1 Table 1: reproduced from last month, this shows the various options available with the PIR link in and out and the LDR link (LK2) dark, light or disconnected. voltage across the same (12V SLA battery) inputs. Multiply the measured voltage by 0.3125. For example, if the voltage is 12V, 0.3125 x 12V = 3.75V. Make a note of this figure. Now you need to calibrate the battery voltage so that the 20°C cut-off voltage for the battery is 14.4V and the float voltage is 13.5V. This is really easy: press and hold down switch S1 (otherwise the reading will be false) and connect your multimeter between TP1 and TP2 (with it set to read up to 20V). Adjust VR2 so that the reading equals this worked-out voltage you wrote down (ie, xV x 0.3125). Setting the lamp current As mentioned, the Solar Lighting Controller lamp driver can be set up to drive LEDs directly or low-power 12V lamps R1 (all 5W) 3.3Ω 2.2Ω 1.5Ω 1Ω 1A 2A 0.68Ω 0.33Ω Table 2: resistor (R1) value for constant current LED drive or for over current limiting. TP4 Voltage Timeout Timeout period steps Timeout calculation (approximately) 0V-2.5V 2s-250s 2 seconds (4m) TP4 voltage x 100s 2.5V-4.9V 4m-480m 4 minutes (8h) (TP4 Voltage-2.5V) x 200m 5V No timeout Table 3: timeout adjustment using VR4. This is measured between TP4 and TP1 (ground) while S1 is pressed. instead. Fig.7 shows some of the types of lighting that can connect to the Solar Lighting Controller. 12V lamp varieties could be compact fluorescent lamps (CFLs), halogen filament globes or LED globes. The distinction we are making between LEDs and 12V LED globes is that while 12V lamps can be directly driven from a 12V supply, standard LEDs cannot. This is because LEDs must have a current limited supply to prevent damage. Some 12V LED globes use single or multiple LEDs in the one housing, which include some form of current limiting. 12V LED lighting may not very efficient because of losses, especially if they use simple current limiting resistors. For example, a typical 5W LED MR-16 halogen light replacement may well drive the LED at 5W but the overall power used by the lamp is 7.2W. This represents a 2.2W or 31% loss (69% efficiency) in delivering power to the LED or LEDs. Note that this efficiency is not the amount of light output for a given power input, it is simply the power lost. So while white LEDs are more efficient at producing more light for a given power than halogen lamps, the loss in the current limiting resistor for the LED may change this. When using individual white LEDs directly, the Solar Lighting Controller is set to drive them at the required current. As an example, three star 1W LEDs would be driven at around 300 to 340mA and use a 2.2Ω resistor for R1. For three 3W LEDs the current is around 700mA and R1 is 1Ω instead. Resistor Colour Codes o o o o o o o o o o o No. 1 2 1 2 4 3 2 3 2 1 3 98  Silicon Chip Value 10MΩ (5%) 100kΩ 82kΩ 22kΩ 10kΩ 4.7kΩ 2.2kΩ 1kΩ 470Ω 100Ω 10Ω 4-Band Code (1%) brown black blue gold brown black yellow brown grey red orange brown red red orange brown brown black orange brown yellow violet red brown red red red brown brown black red brown yellow violet brown brown brown black brown brown brown black black brown 5-Band Code (1%) N/A brown black black orange brown grey red black red brown red red black red brown brown black black red brown yellow violet black brown brown red red black brown brown brown black black brown brown yellow violet black black brown brown black black black brown brown black black gold brown siliconchip.com.au For 12V lighting, it may be more efficient to use a halogen 12V lamp such as the Altronics 12V bulkhead light (cat no X2400) instead. Current adjustment over a small range is available using VR6. The easiest way to measure LED current is to connect a multimeter (on a DC current range) across the fuse clips with the fuse removed. The quiescent current drawn while the lamp is off can be subtracted from the total LED drive current for more accuracy. If you require more than three LEDs, then a separate LED driver can be used that is designed to drive several LEDs in series from a 12V supply. An example of a driver that can power up to six 1W-LEDs in series is the Altronics M3310. The setting up for the Solar Lighting Controller Lamp driver for use with a separate LED driver is the same as for standard 12V lighting where R1 is 0.33Ω. Timeout A 5822  K A  A K  3 x 1W OR 3 x 3W WHITE LEDS (R1 = 2.2  FOR 1W LEDS, OR 1  FOR 3W LEDS) + – K + 12V LAMP OR LAMPS (R1 = 0.33 ) – + – 12V LAMP OR LEDS A  K A (LEDS IN SERIES)  K + OUT SEPARATE LED DRIVER + – – (R1 = 0.33 ) CONTROLLER BOARD Fig.7: the Solar Lighting is designed to drive three 1W or three 3W LEDs Depending on your application, the timer in series or 12V lamps. Note the value for R1 is different for each lighting will need to be set to an appropriate period. circuit. For more than three LEDs in series a separate driver is required. Timeout periods can be adjusted from as low through cable glands. The charge LED (LED1) is bent over as two seconds up to about 8 hours using VR4. Table 3 shows the timeout with respect to voltage, set by and protrudes through a hole in the side of the box. Fig.6 shows the wiring connections for the solar panel, VR4. To measure this voltage, a multimeter is connected between TP1 and TP4 and the S1 switch is pressed. The the battery and the lamp plus the PIR and manual switch measured voltage provides a means to calculate the ex- terminals at CON1 and the external NTC and external LDR pected timeout. For voltages up to 2.5V, the timeout period at CON2. As noted the NTC and LDR can be mounted on in seconds is calculated as the voltage measured (in volts) the PC board or mounted remotely (ie, only one LDR and multiplied by 100. By way of example, a 1V setting will one NTC should be connected). In most installations the NTC thermistor can be mounted provide 100 seconds. Above 2.5V, the voltage is multiplied by 200 minutes on the PC board because the Solar Lighting Controller after first subtracting 2.5V from the voltage measurement. and battery would be housed close to each other and their temperatures would therefore be similar. So a 3V reading will provide a timeout of (3V-2.5V) x 200m, However, an external NTC, attached via a length of figor 100 minutes. Temperature compensation for the cut-off and float ure-8 wire and mounted against (glued or taped to?) the voltage is set using VR3. The voltage can be measured side of the battery, would be necessary if the battery is between TP1 and TP3 while S1 is pressed. Compensation installed any distance from the Solar Lighting Controller. is adjustable from 0mV/°C to –50mV/°C. The actual compensation is directly related to the measured voltage. Just Mounting the LDR The LDR needs to be mounted so it receives ambient divide the voltage by 100 to get the mV/°C value. The actual compensation value required depends on the battery with light but so that it does not receive light from the lamp/s manufacturers specifying this mV/°C value. Typically the controlled by the Solar Lighting Controller. For some value for a 12V battery is –19mV/°C. So VR3 would be set installations, the LDR can be mounted inside on the PC board if you use a transparent box and if the Solar Lighting to 1.9V as measured at TP3. Controller is exposed to the ambient light. Installation Alternatively, the LDR can be mounted into CON1 and The Solar Lighting Controller is designed to mount in a exposed to ambient light by having the LDR mounted into UB1 box with wires for the external connections passing a hole in the side of the case. Where the Solar Lighting Controller is mounted inside a cabinet or other dark place, the LDR can be mounted using a length of figure-8 wire in a position where it will be Capacitor Codes exposed to ambient light. Value µF Value EIA Code IEC Code Solar panel position 100nF 0.1µF 100n 104 The solar panel should be mounted on a roof or similar 10n .01µF 10n 103 position and in Australia should be set facing north. (Most 1n .001µF 1n0 102 of the references you see on the internet are for Northern siliconchip.com.au June 2010  99 NOTE: RESISTOR R2 OUT OF CIRCUIT – + SIGNAL + NOTE: RESISTOR R2 IN CIRCUIT (100k) 5822 ALTRONICS SX5306 PIR DETECTOR (REAR) – – NC CONTACTS + SIG + + SIG PIR USING THE ALTRONICS SX5306 PIR DETECTOR PIR – PIR DETECTOR (REAR) CONTROLLER BOARD A 5822 CONTROLLER BOARD B USING A STANDARD PIR DETECTOR Fig.8: this shows how to wire up a PIR detector to the Solar Lighting Controller. When using the Altronics SX5306 PIR Detector, the plus, minus power leads and the signal wire are connected to the controller as shown. R2 is not used on the controller PC board. For use with standard PIR Detectors. the minus supply is linked to one of the NC contacts on the PIR detector relay. The second contact of the NC contact becomes the trigger wire for the controller. Note that R2 needs to be soldered onto the controller PC board when using this standard type of PIR detector that uses a relay. Hemisphere installations, where you would have the solar panel facing south). Inclination should be roughly 23° up from horizontal for NSW, central/south WA and SA and the north island of NZ. Slightly higher angles are required for Victoria, Tasmania and NZ south island, while slightly lower angles will be needed for Qld, NT and northern WA. If in doubt, several internet sites will help you (but again, beware of northern hemisphere sites!). Incidentally, many solar panels do not like to be partially shaded – we’ve seen reports that even a small percentage of shading reduces the output to near zero – so care should be taken to avoid any possibility of shadowing (eg, from a pole or tree) as the sun traverses the sky. Mounting the PIR When mounting the PIR sensor, its position should be placed to provide coverage of the desired detection area. You can test coverage by temporarily mounting the PIR detector, connecting a 12V supply and watch the detect LED light as you move around the detection area. PIR wiring varies depending on whether you are using Looking end-on at the completed project showing both the LED and LDR inside the box, “seeing” through appropriately placed holes. If better water resistance was required (though not waterproofing) some clear film or plastic could be glued over the holes on the inside. 100  Silicon Chip the (recommended!) special low-current Altronics PIR sensor or a standard PIR detector. Fig.8 shows typical wiring for both of these types of PIRs. Note that R2 is not used for the Altronics PIR but it should be installed when a standard PIR detector is used. 4-way alarm cable is normally used for this wiring with only three of the wires used. Most PIR units have a “tamper” detector of some sort which normally uses the fourth wire but in this case, the tamper detector can be ignored. The lamp We made up a LED lamp using three white LEDs and this was shown in the photographs last month. The lamp is wired in to the Solar Lighting Controller using figure-8 wire. A LED light can be made using a clear plastic utility box or an IP65-rated box with a clear lid. This latter style of box is more suited to outside use where it must be waterproof. The LEDs require heatsinking, so are mounted onto an aluminium plate that sits inside the box. The IP65 box has integral mounting bosses for attaching the plate. A plastic utility box (the type we used to house the Controller) has integral (moulded) side clips for mounting the aluminium plate horizontally. The LEDs are mounted onto the plate using Nylon screws and nuts. We used three 1W LEDs arranged in a triangle pattern onto the plate but as discussed earlier, 3W LEDs could be used instead. The LEDs are wired in series and the wires taken out of the box via a cable gland (even though the gland is “waterproof”, for outside use the box should be mounted so the gland emerges from the underside). To spread the light more evenly, we cut a “diffuser” to fit inside the lid, made from a piece of translucent plastic – actually we used a kitchen cutting mat which was about 0.5mm thick and easily cut with scissors – but any suitable translucent plastic sheet could be used. Finally, use crimp connectors for the wires connecting to the battery terminals. Never attempt to solder wires direct to the battery as this can cause irrepairable damage. SC siliconchip.com.au