Silicon ChipA Heartbeat CPR Training Beeper - December 2006 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Cheap battery drills are very wasteful
  4. Feature: The Holden Lightship & Its 2321cm Video Screen by Ross Tester
  5. Feature: What’s Happened To Electronic Advances In Cars? by Julian Edgar
  6. Feature: Excellence In Education Technology Awards by Silicon Chip
  7. Feature: Bringing A Dead Cordless Drill Back To Life by Ross Tester
  8. Project: Cordless Power Tool Charger Controller by John Clarke
  9. Project: Build A Radar Speed Gun, Pt.2 by Jim Rowe
  10. Project: A Heartbeat CPR Training Beeper by Jim Rowe & Ross Tester
  11. Project: Super Speedo Corrector by John Clarke & Julian Edgar
  12. Project: 12/24V Auxiliary Battery Controller by Branko Justic & Ross Tester
  13. Project: PICAXE Net Server, Pt.4 by Clive Seager
  14. Salvage It: The good bits in microwave ovens by Julian Edgar
  15. Vintage Radio: The AWA 976A Hybrid Car Radio by Rodney Champness
  16. Book Store
  17. Advertising Index
  18. Outer Back Cover

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

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

Items relevant to "Cordless Power Tool Charger Controller":
  • Cordless Power Tool Charger Controller PCB [14112061] (AUD $10.00)
  • PIC16F88-I/P programmed for the Cordless Power Tool Charge Controller [CHRGCONT.ASM] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Cordless Power Tool Charge Controller [CHRGCONT.ASM] (Software, Free)
  • PCB pattern for the Cordless Power Tool Charge Controller (PDF download) [14112061] (Free)
  • Cordless Power Tool Charger Controller front panel artwork (PDF download) (Free)
Items relevant to "Build A Radar Speed Gun, Pt.2":
  • PCB patterns for the Radar Speed Gun (PDF download) [DOPPLR1A/DOPPLR1B] (Free)
  • Radar Speed Gun front panel artwork (PDF download) (Free)
Articles in this series:
  • Build A Radar Speed Gun, Pt.1 (November 2006)
  • Build A Radar Speed Gun, Pt.1 (November 2006)
  • Build A Radar Speed Gun, Pt.2 (December 2006)
  • Build A Radar Speed Gun, Pt.2 (December 2006)
Items relevant to "A Heartbeat CPR Training Beeper":
  • CPR Trainer PCB [04112061] (AUD $5.00)
  • PIC16F628A-I/P programmed for the Heartbeat CPR Training Beeper [CPRTRAIN.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F628A firmware for the Heartbeat CPR Training Beeper [CPRTRAIN.HEX] (Software, Free)
  • PCB pattern for the Heartbeat CPR Training Beeper (PDF download) [04112061] (Free)
  • Heartbeat CPR Training Beeper front panel artwork (PDF download) (Free)
Items relevant to "Super Speedo Corrector":
  • PIC16F628A-I/P programmed for the Super Speedo Corrector [speedcor.hex] (Programmed Microcontroller, AUD $10.00)
  • PIC16F628A firmware for the Super Speedo Corrector [speedcor.hex] (Software, Free)
  • PCB pattern for the Super Speedo Corrector (PDF download) [05112061] (Free)
Items relevant to "PICAXE Net Server, Pt.4":
  • PICAXE-28X BASIC source code for the PICAXE Net Server temperature controller example (Software, Free)
Articles in this series:
  • PICAXE Net Server, Pt.1 (September 2006)
  • PICAXE Net Server, Pt.1 (September 2006)
  • PICAXE Net Server, Pt.2 (October 2006)
  • PICAXE Net Server, Pt.2 (October 2006)
  • PICAXE Net Server, Pt.3 (November 2006)
  • PICAXE Net Server, Pt.3 (November 2006)
  • PICAXE Net Server, Pt.4 (December 2006)
  • PICAXE Net Server, Pt.4 (December 2006)

Purchase a printed copy of this issue for $10.00.

HeartBeat: Design by Jim Rowe Words by Ross Tester A CPR Trainer During mid-2006, Australian emergency health care providers and first aid bodies largely fell into line with the Australian Resuscitation Council guidelines for the delivery method and timing of cardio-pulmonary resuscitation – or CPR. Here’s a lowcost trainer which provides audible beats to get the timing right. PIC TO COME 66  Silicon Chip siliconchip.com.au F or many years, CPR in Australia has been taught differently by different organisations. Apart from the obvious drawbacks of two differently-trained first-aiders trying to work together to resuscitate a patient, every organisation maintained their method was better than their “competitors”. Now that’s all changed, with Australian first aid organisations – Surf Lifesaving, Red Cross, Royal Lifesaving, St Johns and so on – agreeing with the International Liaison Committee on Resuscitation Guidelines, with the training/accreditation/certification changing so that no matter who taught you, you would work the same as anyone else. It has also been very much simplified, in the hope that many more people will learn CPR and be able to deliver it in an emergency. A staggering fact is that, even today, less than 10% of sudden cardiac arrest victims (ie, heart attack) who are unconscious and not breathing are given CPR – in other words, 90%+ are not given any lifesaving treatment – because no-one knew what to do! While it is true that some, perhaps many, of those victims would not have survived anyway, isn’t it better to know that you have at least tried to assist instead of helplessly standing by? A wise old first-aid instructor once told me that badly-done CPR was infinitely better than perfect watching. The changes to CPR By far the biggest change was in the number of chest compressions per minute – now roughly double at up to 100 – and the much lower importance on providing as much air (oxygen) to the patient with breathing. The reasons for this change were twofold but intertwined: it was found that patients simply didn’t need the amount of oxygen being delivered by the old “five full breaths” – and this took valuable time when compressions should be being delivered. The more important aim was to keep blood pressure up – this was achieved by faster compressions and less “stoppages” to deliver breaths. The odds are very high that the blood already has enough oxygen in it to sustain life – the first aider’s job is to make sure that blood keeps flowing! Another interesting change is the virtual elimination of searching for a pulse in the patient. In trials in the USA, in the adrenaline-charged atmosphere of delivering CPR to an apparently-lifeless patient, it was found that in more than half the tests, the first-aiders either found a pulse that wasn’t there (so didn’t deliver CPR when it was needed) or didn’t find a pulse that was there, so delivered CPR in error. Again, even looking for a pulse was seen as wasting valuable time. (Just about everyone can find their own pulse, especially when shown where. Most can find it on a friend fairly quickly. But translate that to – literally – a life and death situation, and it becomes a LOT harder). So now it is assumed there is no pulse and CPR is commenced immediately. It has been found, again in US trials, that the old belief that performing CPR on a beating heart would likely do damage is not true – there is much less likelihood of damage than there is of death without CPR! The new ratio The old ratio of compressions to breaths was 5:1. The new ratio is 30:2. There is now no difference between adult and child, or between oneperson CPR and two-person CPR, as there used to be. As we said, it’s simpler! Furthermore, we no longer spend significant time identifying the “correct” spot for compressions (it used to be called “walking the ribs”) – it’s now a quick judgement and then straight in! Near enough really is good enough. Our trainer The trainer presented The SILICON CHIP HeartBeat CPR Trainer is small enough to fit in the palm of your hand but delivers the timing necessary for correct CPR. siliconchip.com.au December 2006  67 D1 1N4004 REG1 78L05 OUT TP1 15 CLK OUT TP2 10 RB4 RB1 100k RB2 RA1 100nF 470 µF 16V 330Ω A RB0 4 λ LED1 6 A K LED2 A λ LED3 K λ K 7 8 9V BATTERY 18 PIEZO TRANSDUCER MCLR Vss RA0 17 1N4004 5 K LEDS SC S1 ON/OFF LED 1: COMPRESS LED 2: BREATHE LED 3: CHANGE OPERATORS A 2006 A Vdd IC1 PIC16F628A GND GND 100nF 14 K IN HEARTBEAT CPR TRAINER 78L05 COM K IN A OUT Fig.1: the circuit is based on – or more correctly is almost entirely! – a PIC16F628A microcontroller. Using this particular PIC means that we can do just about everything we want to with one chip! 100k here is aimed at those learning CPR, “warble” tone. This is to tell the CPR so they will develop the rhythms and operators to switch positions. timing and perish the thought, if ever If you have ever had to do CPR “for they are required to deliver “real” CPR, real”, you will know how incredibly it will come naturally. tiring it is. It will also prove valuable in reAt least part of that is psychological, accreditation or proficiency checks with your brain telling you that you and can be used for the real thing to may have the life of a person in your provide a reality check. As we mentioned before, the timing for CPR is now 100 compressions per minute (not far off two per second), with PIEZO TRANSDUCER a ratio of 30:2 – thirty compressions to two breaths. The E1 6 0 2 1 1 4 0 breaths of course take longer PIEZO 6002 © TP2 TP1 to “put in” than compressions, so up to two seconds IC1 PIC16F628 is allowed per breath. 100nF Therefore, our trainer gives 100nF 30 short beeps in a period of LED3 RELED1 NIART RP C LED2 about 18 seconds, followed BREATHE CHANGE COMPRESS by two long beeps of about two seconds each with about 330Ω one second between, with 470 µF 9V BATTERY D1 the cycle then repeating ad +9V 0V infinitum. S1 hands – but it is also very demanding, physically. The human chest was never designed to be compressed by 50mm – but that’s what you have to do 100 times per minute (don’t try this on yourself or a friend!). As well as being as incredibly tiring (and even painful) on the back, shoulders, arms and wrists, CPR is very demanding on the knees, particularly on a hard surface. There is very good evidence (those trials again!) to suggest that even the best CPRers start to lose effectiveness and efficiency after just one minute (even if they don’t feel all that tired). We double that and allow two minutes. Then the trainer says “time’s up!” by giving a “warbling” tones, meaning that the person delivering compressions should swap with the muchless-physically-demanding breath -giver (EAR operator). The warble tone lasts about 1.5 seconds to allow the operators time to swap. The timing beeps continue ad infinitum, because CPR must be maintained until (a) the person recovers and shows “signs of life”; (b) higher-level help arrives (doctors, ambulance paramedics, etc); or (c) those doing the CPR are physically unable to continue due to complete exhaustion and no further assistance is available. (There are recorded cases of victims recovering after more than an hour of CPR). 78L05 REG1 + 4004 Change operators There is one more prompt our trainer gives. Every six compression/breath cycles, (about two minutes) it gives a 68  Silicon Chip Fig.2 (left): follow this diagram and the same-size photo above to assemble the HeartBeat CPR Trainer. siliconchip.com.au Parts List – HeartBeat CPR Trainer 1 PC board, 46 x 53mm, code 04112061 1 small translucent blue ABS case, approx. 82 x 51 x 30mm (Jaycar HB 6004, Altronics H0175 1 piezo transducer, 30mm diameter (Jaycar AB3440) 1 9V battery snap (Jaycar PH9230, Altronics P0455) 1 9V battery (alkaline preferred) 1 SPST switch, PC-mounting (Jaycar SK0975) 1 18-pin DIL IC socket 4 15mm M3-tapped spacers 4 5mm untapped spacers 4 5mm M3 csk head screws 4 10mm M3 panhead screws 1 PIC16F628A microcontroller IC, programmed with CPRTRAIN.HEX 1 78L05 low-power 5V regulator 1 1N4004 diode 1 green LED, 3mm (LED1) 1 yellow LED, 3mm (LED2) 1 red LED, 3mm (LED3) 1 470mF 16V electrolytic capacitor 1 100nF MKT capacitor 1 100kW 0.25W resistor, 5% 1 330W 0.25W resistor, 5% These three shots give a good idea how the PC board is mounted to the front panel, then assembled into the case along with the 9V battery. Note that the switch must be mounted through the front panel before soldering to the PC board. The 470mF electrolytic capacitor decouples the supply which is then regulated to 5V by the 78L05. The 100nF capacitor following prevents unwanted oscillation in the 78L05. Two test points are provided: TP1 connects directly to the PIC’s CLK OUT (pin 15) should you wish to verify the oscillating frequency. TP2 connects to port pin RB4 which is ideal for measuring the length of the various pulses. A convenient earth point is provided close to both test points. The circuit Programming the PIC We use a PIC16F628A microcontroller to generate the timing pulses and drive the piezo tweeter supplying the beeps, so the circuitry is very simple. The micro also drives three LEDs which flash in time with the beeps. The first (green) LED mimics the beeps giving the timing for compressions. The second (yellow) LED lights when the breath beeps sound. The third (red) LED lights at the same time as the warble tone (again by the micro) siliconchip.com.au to indicate operator changeover. A single switch starts and stops the timing sequence. If you turn the switch off, the beeps (and LEDs) start again from zero. There is no external oscillator – clock pulses are generated by the PIC itself and the software driving it sets up the correct timing. The only other components in the circuit are associated with the power supply. Power is derived from a 9V battery, with diode D1 preventing reverse-polarity connection. For those building from scratch, the PIC will need to be programmed. If you have the facilities to do this yourself, the code (a hex file) can be downloaded from www.siliconchip. com.au Incidentally, we strongly recommend that the PIC be inserted into a socket, rather than soldered direct to the PC board, to allow for both troubleshooting now and, if needed, any later firmware changes. Make sure when December 2006  69 you solder the socket in that it agrees with the polarity on the component overlay (notch towards the green LED) – and then when you put the PIC in it too matches that polarity Construction There’s certainly not much to building the HeartBeat – we’d estimate the average hobbyist should finish it in 20 minutes! Start by checking your PC board for any defects (shorted or broken tracks especially) and if all is well, insert and solder the IC socket (note the notched end and which way it goes as shown on the component overlay). The five PC stakes follow, then two resistors, two non-polarised capacitors, the diode (get it around the right way!) and then the electrolytic capacitor and the regulator (ditto and ditto). We haven’t printed a resistor colour code or capacitor code list as we normally do – there are only two resistors and one capacitor. If you have a resistor in your hand with basically browns and blacks, it’s the 100kW; if it has a couple of orange bands, it’s the 330W. If in any doubt, check the values with your digital multimeter before soldering them in. Don’t throw away all the component pigtails – you’re going to need a couple of them shortly. At this stage you can solder on the wires connecting to the piezo transducer – leave say 30-50mm of leads on it. The piezo transducer can be connected either way around (despite its having red and black wires!) as we are using it here in virtual “push-pull” mode. Incidentally, the type of piezo transducer is important. There are many piezo “sirens” available but these are not suitable as they have inbuilt electronics to drive them. We use the PIC to drive ours so combining both types of drive will definitely not work! Now solder on the battery snap leads, (this time watch the polarity). We’d be inclined to leave all of the length of wire on the battery snap; they can squish up between the PC board and the case lid if necessary. You will note we have not yet inserted the IC in its socket nor soldered in the switch or LEDs. The reason for the first should be obvious; the LEDs and switch not quite so. The LEDs have to be soldered at 70  Silicon Chip HEART BEAT CPR TRAINER COMPRESS BREATHE OFF A B 21 C CHANGE ON 15 16.5 A C C 14 14 D A 19 16 A 19 SILICON CHIP www.siliconchip.com.au ALL DIMENSIONS Fig.3 (above) and fig.4 (right): front IN MILLIMETRES panel artwork and front panel (lid) drilling detail, respectively. Fig 5, the PC board artwork, is alongside on the next page. the right height so that they will poke through their respective holes in the case lid; the switch has to first be inserted through the case lid and then soldered to the PC board. In fact, the switch is soldered to a couple of short lengths of wire (eg, resistor pigtails!) which themselves poke through the PC board and are soldered in the normal way to their respective pads. Back to the LEDs: they solder in place so there is exactly 20mm of lead length between their undersides and the top of the PC board. It doesn’t really matter if you get the colour order mixed up (after all the label shows what they represent) but it will certainly matter if you get their leads around the wrong way. Apart from the switch, the only component left to go on the board is the PIC IC, which can now go in. Push it into its socket so the notches on the ends align; make sure as you do that none of the legs are bent under the IC or outside it. Drilling the case The only holes you have to make are in the case lid – these are shown in Fig.4 – and the only tricky one of these is the cutout for the switch. It’s a slot 19mm long x 6.5mm wide and is best made by drilling a line of small holes inside the rectangle and CL HOLE SIZES: A: 3mm DIAMETER, CSK B: 4.5mm DIAMETER C: 5mm DIAMETER D: 19 x 6.5mm RECT. finishing it off with a very fine file. Keep enlarging the hole until the switch just fits. Fortunately, there is a 1mm lip all around the top edge of the switch to hide any “oopses”. Drill the rest of the holes as shown, countersinking the ones marked (this is easily done with a larger drill (say 6-10mm) twisted in the hole with your fingers. Assembly The way the HeartBeat fits in the box is shown in the photographs. It sits on four 21mm pillars (aha! so that’s why the LEDs are 20mm off the PC board!) made up of a 15mm tapped spacer and a 6mm untapped spacer. Screws hold the pillars in place from above (the lid) and from below (through the PC board and the untapped spacers). First we need to mount the piezo transducer to the case lid It simply glues on the underside of the lid so that its hole (centre top of lid) and the hole in the piezo align. You may find that one (or even both) of the screwmounting lugs needs to be clipped off so it doesn’t foul either the standoffs or the case lid mounting points. As we are glueing the transducer on, that’s no problem. A tiny drop of superglue is fine or you can use other plastic glues or even silicone sealant. Whatever you do, don’t get any glue into either hole – the siliconchip.com.au CPR TRAINER © 2006 04112061 push the switch through the panel until it clicks in place (make sure the ‘O’ engraved on the switch goes to the ‘OFF’ side). Now push those resistor lead cutoffs through the holes under the switch, twist them around the switch terminals to make them captive, then solder each to both the switch terminals and the PC board pads underneath. Testing one in the case but especially not into the piezo! When the glue is dry, you can complete the assembly. As you put the spacers and screws in, push the LEDs through their respective holes in the lid. We’re assuming you already have the HeartBeat front panel (shown in Fig.3) glued onto the case lid with the hole cut out for the switch. If so, There really isn’t any testing nor setup to do. If everything is soldered as it should be and the PIC is programmed correctly, it cannot help but work! Switch it on and LED 1 should start flashing as the piezo starts beeping. After 30 beeps you should hear two long beeps and LED 2 should flash in time. After two minutes LED 3 should flash and you should hear the changeover warble. That’s it! Woops! It’s not working? 99% of problems with kits are due to poor soldering – dry joints especially. Check your soldering and component polarity. You can measure the voltage across the large electrolytic capacitor (it should be around 8.5V) and there should be 5V between pins 14 and 5 of the IC (don’t short other pins together as you do it!). If these voltages check out OK, about the only other easy check is the LEDs. Remove the IC from its socket and short socket pins 6, 7 and 8 to earth (0V) respectively. Each of the LEDs should light in turn. If all of this checks out, the chances are you have a problem with the PIC chip – and the only way you can check that out easily is with a PIC programmer. SC What is CPR? Earlier in this article we’ve said that CPR stands for Cardio-Pulmonary Resuscitation. We’ve also said that everybody should learn CPR. But what is CPR? You’ve probably heard of mouth-tomouth resuscitation (it’s more properly called Expired Air Resuscitation, or EAR) – effectively forcing air into the lungs of someone who has stopped breathing of their own accord. You may also have heard of external heart massage (more properly called External Cardiac Compression, or ECC) – manually compressing the heart from outside the body to force it to pump blood through the body when it is not “beating” of its own accord. CPR is, simply, a combination of both EAR and ECC. It can be done with one person but is much better done with two or even three people. Basically, one person places his/her mouth over the victim’s mouth (and/or nose), opens the airway by tilting the head back, seals the nose with either the cheek or finger and thumb and breathes air into their lungs. The second person places the palms of their hands in the middle of the chest, over the victim’s breastbone and pushes – hard – so that the breastbone is forced down about 50mm. siliconchip.com.au This effectively “squashes” the quite soft heart between the breastbone and the spine. The heart contains a number of one-way valves and any blood already in the heart is pushed out, through the lungs (where it picks up oxygen from the air breathed in) and then through the arteries to the various organs of the body. As the compression is released and the breastbone moves back up, the muscles around the heart help it regain its “normal” size. This pulls blood in from the veins, ready for next time the heart is compressed. This process mimics that of a normal, beating heart – the difference being that normally the heart does it all by itself, more than two and a half billion times during a typical 80-year lifetime. EAR works because when you or I breathe, the air that comes out is still rich in oxygen. Normal (sea level) air contains about 20-21% oxygen. When you breathe it in then out again, it still contains about 17% oxygen. That’s more than enough to sustain life. If the heart has stopped beating (whether by shock, drowning, heart attack, or other cause) it stops pumping blood – and therefore oxygen – around the body. Without oxygen, the vital organs become irreparably damaged – at most, in about four minutes at normal temperatures. So it is most important to commence CPR as soon as possible. CPR is quite easy to learn (especially now!) and there are numerous first aid and emergency care organisations very keen to teach you. Not only because we often work around live circuits, SILICON CHIP actively encourages all readers to learn CPR. The life you save could be someone near and dear to you – or it could be a complete stranger. Either way, it’s a life saved. December 2006  71