Silicon ChipDo-It-Yourself Seismograph With Tsunami Alarm - February 2013 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Texting while driving could be prevented
  4. Feature: Replace Your Halogen Down-lights With LEDs by Leo Simpson
  5. Feature: The Historic Rubicon Hydroelectric Scheme by Dr David Maddison
  6. Project: High Performance CLASSiC DAC; Pt.1 by Nicholas Vinen
  7. Project: Do-It-Yourself Seismograph With Tsunami Alarm by Dave Dobeson
  8. Project: Mobile Phone Loud Ringer by John Clarke
  9. Project: Improved Jacob's Ladder by Leo Simpson
  10. Project: Accurate GPS 1pps Timebase For Frequency Counters by Jim Rowe
  11. Book Store
  12. Vintage Radio: More Philips Twins - the Dutch 209U and the Australian 112A by Rodney Champness
  13. Market Centre
  14. Advertising Index
  15. Outer Back Cover

This is only a preview of the February 2013 issue of Silicon Chip.

You can view 19 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "High Performance CLASSiC DAC; Pt.1":
  • CLASSiC DAC main PCB [01102131] (AUD $20.00)
  • CLASSiC DAC revised main PCB [01102134] (AUD $25.00)
  • dsPIC33FJ128GP306T-I/PT programmed for the CLASSiC DAC v1.02 [0110213B.hex] (Programmed Microcontroller, AUD $25.00)
  • Red & White PCB-mounting RCA sockets (Component, AUD $4.00)
  • SMD parts for the CLASSiC DAC (Component, AUD $80.00)
  • CLASSiC DAC front & rear panels [01102132/3] (PCB, AUD $20.00)
  • Firmware for the CLASSiC DAC [0110213B.HEX] (Software, Free)
  • CLASSiC DAC main PCB pattern (PDF download) [01102131] (Free)
  • CLASSiC DAC front and rear panel PCB patterns (PDF download) [01102132/3] (Free)
  • CLASSiC DAC front & rear panel artwork (PDF download) (Free)
Articles in this series:
  • High Performance CLASSiC DAC; Pt.1 (February 2013)
  • High Performance CLASSiC DAC; Pt.1 (February 2013)
  • High Performance CLASSiC DAC; Pt.2 (March 2013)
  • High Performance CLASSiC DAC; Pt.2 (March 2013)
  • High-Performance CLASSiC DAC; Pt.3 (April 2013)
  • High-Performance CLASSiC DAC; Pt.3 (April 2013)
  • High-Performance CLASSiC DAC; Pt.4 (May 2013)
  • High-Performance CLASSiC DAC; Pt.4 (May 2013)
Items relevant to "Do-It-Yourself Seismograph With Tsunami Alarm":
  • Mk2 Seismograph with Tsunami Alarm PCB [21102131] (AUD $20.00)
  • PICAXE-08M BASIC source code for the Mk2 Seismograph with Tsunami Alarm [SeismographV2.bas] (Software, Free)
  • Mk2 Seismograph with Tsunami Alarm PCB pattern (PDF download) [21102131] (Free)
Items relevant to "Mobile Phone Loud Ringer":
  • Mobile Phone Loud Ringer PCB [12110121] (AUD $10.00)
  • Mobile Phone Loud Ringer PCB pattern (PDF download) [12110121] (Free)
  • Mobile Phone Loud Ringer front panel artwork (PDF download) (Free)
Items relevant to "Improved Jacob's Ladder":
  • High Energy Electronic Ignition PCB [05110121] (AUD $10.00)
  • PIC16F88-E/P programmed for the High Energy Electronic Ignition System / Jacob's Ladder [0511012A.HEX] (Programmed Microcontroller, AUD $15.00)
  • ISL9V5036P3-F085 360V, 46A IGBT for the High-Energy Electronic Ignition System (Component, AUD $10.00)
  • High Energy Electronic Ignition System Firmware (HEX/ASM - zipped) [0511012A.HEX] (Software, Free)
  • High Energy Electronic Ignition PCB pattern (PDF download) [05110121] (Free)
Items relevant to "Accurate GPS 1pps Timebase For Frequency Counters":
  • Accurate GPS 1pps Timebase PCB [04103131] (AUD $10.00)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • Accurate GPS 1pps Timebase PCB pattern (PDF download) [04103131] (Free)
Build your own . . . Seismograph Now with audible tsunami alarm! Back in September 2005 we presented a seismograph which was simple to build and get going. Now there is new software available which makes it easier to record earthquakes so we are presenting a slightly updated version of the original design, together with details of the revised software. The circuit also now incorporates a piezo transducer, so that the seismograph can operate independently of a computer and warn of distant quakes and possible tsunamis. By DAVE DOBESON* A USTRALIANS can be thankful that we are not normally affect­ed by the large earthquakes and volcanoes that regularly devastate so many other parts of the world. But if you travel overseas you soon become aware of just how destructive they are and their dramatic effect on the countries concerned. Add in the wholesale destruction and loss of life due to tsunamis and it is not surprising that there is continuing interest in making a seismograph. About The Author* This simple seismograph was originally described in “Scientific American” in 1979 and has been adapted for science teachers to build and use in the school laboratory – see http://science. uniserve.edu.au/school/Seismograph Dave Dobeson (ddobeson<at>bigpond.net. au) is a science teacher at Turramurra High School and the University of Sydney Science Teacher Fellowship holder for 2005. 28  Silicon Chip Designed for schools Movements of the seismograph, which is basically a horizontal pendulum, are detected using a simple light sensor circuit. In operation, a metal vane attached to one end of the pendulum (or bar) partially blocks the light between a LED and an LDR (light-dependent resistor). However, when the room moves (ie, during an earthquake), the amount of light falling on the LDR is modulated by the metal vane. The unit described here is known as a “Lehman” or “Horizontal Pensiliconchip.com.au this drives a PICAXE-08M microcontroller which functions as an analogto-digital converter. You can feed the resulting data to a computer to store, display and print the results. AmaSeis The original seismograph used PC software called StampPlot Lite to plot the results but it required several steps to see the output over more than a few hours. Since then, I have discovered “AmaSeis” (see http://pods.binghamton. edu/~ajones/AmaSeis.html) which is an excellent freeware program for use with amateur-built seismographs. Written by Alan Jones, it can accept the digital output from a number of commercial ADCs and display it as a 24-hour helical drum recording, just like professional seismographs (more on AmaSeis later). The hook at the end of the turnbuckle sits in a 5mm dimple that’s drilled into a large washer. This assembly forms the top pivot point. Building the seismograph The mechanical section of the seismograph uses parts that are readily available from a hardware store. It’s based on a swinging horizontal pendulum and movement is detected using a vane and light sensor circuit mounted at one end. dulum” seismograph. It’s also called a “Swinging Gate Seismograph”, because the bar and its supporting wire look like an old-fashioned farm gate. The “hinges” (actually the pivot points) of the “gate” are not quite vertically aligned, with the top hinge just forward of the bottom hinge so that the “gate” will swing shut. In practice, this means that the horizontal pendulum (or bar) swings slowly back to its original resting position The signal produced by the LDR is fed to an inverting op amp stage and siliconchip.com.au OK, let’s take a look at the mechanical details of our seismograph. The basic set-up comprises an 800mm-long 5/16-inch threaded steel rod that’s fitted with a 2-3kg mass at one end. The other end of the rod is ground to an edge and pivots on the end of a ½-inch bolt – this forms the lower pivot point. The supporting wire is attached to the rod at one end, just before the weights, and to a turnbuckle at the other end. This then pivots about 25-30cm above the lower pivot. If we align the seismograph pivots so that the top pivot is less than 1mm forward of the bottom pivot, then the seismograph bar will always swing back to its central position and will have a natural period of about 5-10 seconds. However, if the pivots are exactly vertically aligned, there will be no restoring force and it will never swing back. We cannot move the top pivot too far forward though, other­ wise the seismograph will be less sensitive. This unit is very sensitive to the mostly horizontal motion of earthquake “L-waves” but is insensitive to “P-waves” which are mostly vertical. Kiwis, because they are much closer to the action, might be able to detect P-waves if they use a spring instead of the wire and cut the end of the metal vane at 60°. Perth, Tennant Creek and Yass also have small local quakes every few months, so you might like to experiment with a spring support This alternative scheme for the top pivot point is an improvement on the original scheme. In this case, the hook sits in a dimple drilled into the end of a metal lever. The lever allows fine adjustment of the horizontal position of the turnbuckle hook and eliminates the need for tilt adjustment bolts (so the seismograph can now sit flat on its base). system if you live in these areas. By the way, it’s important to remember that although we often talk about the bar (or pendulum) of the seismograph “swinging”, it’s really the room that moves during an earthquake. The bar, because of the inertia of a heavy mass attached to one end, initially stays still. In effect, the unit and its associated logger act as a low-pass filter which renders the unit insensitive to everyday events (footsteps, doors closing, passing traffic, etc). The accompanying photos show February 2013  29 This labelled photograph clearly shows how the Seismograph is built. This version uses a magnetic damper but liquid damping could also be used (see the September 2005 article). Note that the light sensor and A/D converter unit shown here is an early prototype. TOP PIVOT POINT (25-35CM ABOVE LOWER PIVOT POINT) TURNBUCKLE STEEL WIRE 1-2MM DIA. 2-3KG MASS DAMPER METAL VANE LIMITING BOLTS BAR: 5/16-INCH x 800MM THREADED STEEL ROD LIGHT-SENSOR & A/D CONVERTER CIRCUIT most of the construction details. The only critical dimension is that the top pivot must be less than 1mm in front of the lower pivot. As well as the wooden frame shown, the unit could be built into any strong cupboard, bookcase, shelf or even a strong metal frame. In that case, the brackets and wooden frame would not be needed. Any type of metal rod could be used (as long as it’s strong enough) and the same goes for the mass at one end. Note that you will have to “re-zero” the seismograph for the first few weeks 30  Silicon Chip TILT ADJUSTMENT BOLTS RIGHT-ANGLE BRACKETS WITH DIAGONAL STAYS after building it, as the wire, brackets and wood flex under the strain. After that, it will be a matter of making routine adjustments every few months. Top pivot point The top “hinge” (or pivot point) is made by drilling a 5mm diameter hole about half-way through the outer section of a large, thick washer or through a flat metal lever, ie, to make a “dimple”. Small washers and a nut are used to hold the large washer or lever in position, while a nut and lockwasher This view shows the magnetic damping arrangement fitted to the prototype seismograph. It uses a couple of super magnets, a U-bracket and a large coil of wire with the ends joined. BOTTOM PIVOT POINT behind the wooden upright panel lock the bolt in place. As shown in the photos, the hook at the end of the turnbuckle sits in the dimple, so that it can freely pivot. In operation, the turnbuckle adjusts the tilt of the bar and is set so that the bar is horizontal. The securing bolt can be screwed in or out to move the top pivot point relative to the bottom pivot. This is important for the overall functioning of the seismograph because it affects the natural period of the bar (ie, the time for one complete swing A better magnetic damping scheme involves using a single super magnet which moves inside a large coil of enamelled wire wound on a bobbin salvaged from plumber’s tape. siliconchip.com.au siliconchip.com.au IN K A K 1N4004 10k 22k 8 Vss SER 2 IN VR2 5k 3 P4 P3 4 6 A LED1 PIEZO TRANSDUCER IC2 7 PICAXE P0 -08M 5 P2 P1 Vdd 1 3.3k SC 1k CON1 2013 VANE ON SEISMIC MASS 470 F 25V 9V DC IN A SIMPLE SEISMOGRAPH MK2 10k 10k* (SEE TEXT) 2 x 470 F K D1 1N4004 K LOGGER OUTPUT H L E 3.3k 3 4 7 IC1 741 10k 2 6 SENSITIVITY VR1 100k 10k LDR1   LED1 A Fig.1: the circuit uses a light detector based on LED1 & LDR1 to detect movement of an interrupter vane placed between them. The resulting signal is then amplified by IC1 and fed to the logger output. IC1 also drives IC2, a PICAXE-08M chip programmed to function as an A/D converter. Its P0 (pin 7) output is fed to the serial input of a PC which provides an alternative data logger, while the P2 (pin 5) output drives a piezo transducer for the tsunami alarm. OUT 78L05 GND 5 3 2 S T R GND +5V OUT IN REG1 78L05 100 Swinging the weight Just about any mass of 2-3kg will provide sufficient inertia to initially keep the bar still during an earthquake, provided it doesn’t hang too far below the bar. A pair of 1.25kg barbell weights are ideal for the job. They cost just a few dollars each from a sports store and come with a ready-made hole 100nF Mounting point alignment In order for the seismograph to work correctly, the lower mounting point must be directly below the upper mounting point. The best way to ensure this is to use a plum-bob made from fine fishing line and a lead sinker. The two rear-most vertical bolts that go through the support brackets are used for tilt adjustment – see photo. These both screw into threads that are tapped through the wooden base and the brackets (nuts under the wooden base will do) and each has a screwdriver slot cut into its end. This allows you to use a screwdriver to tilt the seismograph sideways and forwards or backwards, to alter the position of the bar and thus its period and sensitivity As stated above though, tilt adjustment is unnecessary if you use the lever method for the top mounting point. The far end of the seismograph wooden frame has a single central support. A sheet of plywood or particleboard underneath will stop the three supports from sinking into the carpet when the unit is positioned on the floor. SERIAL OUTPUT CON2 D9F CON3 SERIAL OUTPUT from the centre to one side, then back through the centre to the other side and finally back to the centre again). A period of about five seconds seems to work best for the author’s seismographs in Sydney. Note that the lever option is the better of the two schemes. It allows the horizontal position of the turnbuckle hook to be finely adjusted and so eliminates the need for tilt adjustment bolts (so the seismograph can sit flat on its base). The pivot end of the 5/16-inch threaded rod is ground to a knife-edge and this sits against the end of a ½-inch bolt. Wind a nut onto the rod before you cut and grind it, so that the thread is restored when the nut is removed. Be sure to use safety goggles when drilling, cutting or grinding metals – you only have one pair of eyes. February 2013  31 IC2 470 F 10k 21102131 VR2 5 E L H 10k 10k IC1 741 100nF CON2 2 3 +5V 470 F TO PIEZO 22k – + PICAXE 08M 3.3k 470 F LDR1 3.3k K REG1 78L05 10k A (SLOT IN BOX ABOVE) 100 D1 LED1 10k CON1 PIEZO TRANSDUCER 1k 9V DC IN (BEND LEADS SO LED FACES LDR1) 1N4004 CON3 SERIAL PROG D9F VR1 100k 5k LOGGER OUT Seismograph Mk2 Fig.2: install the parts on the PCB as shown here, making sure that all polarised parts are correctly orientated. IC2, REG1, VR2 and CON2 can be left out if you already have an external data logger and don’t intend using a PC. through the middle. This means they can be simply slipped over the end of the bar and clamped in position using nuts and washers on either side. Damping Once earthquake waves set the bar swinging, it will keep swinging for hours unless it is damped. Perfect damping would stop the bar after a few swings but in practice, under 2-3 minutes is OK. You can use either magnetic or liquid damping but magnetic damping is the more consistent. Magnetic damping involves attaching one or two super magnets to the end of the bar. A coil of wire with the ends joined is then placed in the magnetic field. When the bar moves (ie, during an earthquake), current is induced into the wire coil. This in turn produces a magnetic field that counters the magnet(s) and damps the motion of the bar. The accompanying photos show two alternative schemes. The best scheme is to use a single super magnet which moves inside a large coil wound on a plastic bobbin salvaged from “plumber’s tape” (this will damp the seismograph in about one minute). Just wind on as many turns of 0.71mm-diameter enamelled copper wire as you can and don’t forget to join the ends of the coil. The super magnet is attached to the threaded rod using Liquid Nails® or similar adhesive. Positioning the seismograph The ideal location for your seismograph is on a concrete block that’s set into bedrock at the bottom of a sealed mine shaft! If you don’t have access to a mine shaft(!), the seismograph should be installed in a closed room or cupboard, or in a strong bookcase surrounded by a Perspex cover (to prevent air movement over the unit). This is important because it is the location of the seismograph and the vibrations and mechanical “noise” around it that determine its ultimate sensitivity. Detector circuit details Fig.1 shows the detector circuit. Power comes from a 9V DC plugpack supply, with D1 providing reverse polarity protection. The associated 100Ω resistor and 470μF capacitor provide supply decoupling and ripple filtering. The filtered DC rail is used to power LED1 via a 1kΩ current limiting resis- tor. The LDR and its associated 10kΩ resistor effectively form a voltage divider across this supply rail, the voltage at their junction varying according to the resistance of the LDR. This in turn depends on the amount of light reaching it from the LED. The output from the LDR is fed to the inverting (pin 2) input of op amp IC1 (741) via two back-to-back 470μF capacitors. These capacitors block the DC component at the output of the LDR while allowing signal fluctuations to be fed to the op amp. They also block any slow variations in the LDR signal due to thermal variations in the room. IC1 functions as an inverting amplifier stage and its gain can be varied from 0-10 using potentiometer VR1, which is in the feedback loop. IC1’s output at pin 6 is fed to a voltage divider consisting of two 3.3kΩ resistors. The top of this divider (ie, at pin 6) can be used to directly drive an external data logger. Alternatively, the divider output (at the junction of the resistors) can be used to provide a nominal 0-5V signal, which may be required by some loggers. Pin 6 of IC1 also drives trimpot VR2 and this is used to set the maximum signal level into pin 3 of IC2, a Table 1: Resistor Colour Codes o o o o o o No.   1   4   2   2   1 32  Silicon Chip Value 22kW 10kW 3.3kW 1kW 100W 4-Band Code (1%) red red orange brown brown black orange brown orange orange red brown brown black red brown brown black brown brown 5-Band Code (1%) red red black red brown brown black black red brown orange orange black brown brown brown black black brown brown brown black black black brown siliconchip.com.au original circuit involves the addition of a piezo transducer which is driven by the P2 output (pin 5) of IC2. Hence if an earthquake is detected, the piezo transducer will immediately sound. Power for IC2 is supplied via 3-terminal regulator REG1 which provides a regulated +5V rail to pin 1. PCB assembly This view shows the completed PCB without the DB9 socket (not necessary if you intend using the 3.5mm stereo jack). Note the arrangement for the LED & the LDR. PICAXE-08M or PICAXE-08M2. IC2 is programmed to function as an analogto-digital (A/D) converter. Its serial data output is taken from pin 7 (P0) and fed to pin 2 of DB9F socket CON2. This socket is in turn connected to the serial port of a PC, to provide the alternative data logger. Of course, most PCs these days don’t have a RS232 serial interface but you can jump this hurdle by using a USB-to-serial interface cable to make the connection. As a result, this Mk.2 version of the circuit also includes a 3.5mm stereo jack socket (CON3) in parallel with the DB9F socket, with the P0 output from IC2 going to the sleeve (S). This allows the circuit to be connected to the PC via an AXE027 PICAXE USB Download Cable (from Revolution Education). This cable has a USB connector at one end and a 3.5mm stereo jack plug at the other (instead of a DB9M connector). The PICAXE-08M is programmed via pin 3 of CON2 or via the ring (R) of CON3. The incoming data is fed to pin 2 (SER IN) of IC2 via a voltage divider consisting of 22kΩ and 10kΩ resistors. The other important change to the Building the unit is easy since all the parts are mounted on a small PCB coded 21102131. Fig.2 shows the assembly details. Note that REG1 and the PICAXE (IC2) are not needed if you propose to use an external data logger (and don’t need the audible alarm). If so, these parts can simply be left out, along with the DB9F socket CON2, CON3, trimpot VR2, the 100nF capacitor and the 22kΩ and 10kΩ voltage divider resistors from pin 2 of IC2. On the other hand, if you want to have the piezo transducer, you need REG1, IC2 and their associated parts. Follow Fig.2 to install the parts on the PCB, making sure that all polarised parts are correctly orientated. IC1 & IC2 are fitted using sockets but don’t plug the ICs in yet – that step comes later. Note that the 10kΩ resistor shown in series with the LDR on Fig.1 is correct for most LDRs. However, some LDRs have a lower resistance than others in the presence of light and you may have to adjust the value of the 10kΩ series resistor accordingly. To do this, just measure the resistance of the LDR when it is fully lit by In the prototype, the LED & the LDR were brought out through holes in the case, with the seismograph’s vane sitting between them – see above. In the final version (right), the LED & LDR are inside the case and the vane rides in a slot. The vane is adjusted so that it normally “shadows” about half the LED body. siliconchip.com.au February 2013  33 Fig.3: before programming the PICAXE, you first have to select the device to be programmed in the PICAXE Programming Editor. the LED in a dark room and select a series resistor that’s about the same value. Checks & adjustments Before fitting the ICs, it’s necessary to make several voltage checks. First, connect a 9V DC plugpack supply and switch on. The LED should immediately come on. If necessary, adjust it so that it shines directly on the LDR. Next, use a digital multimeter to check the voltages on IC1’s socket pins. Pin 7 should be at the supply voltage (about 9V, depending on the plugpack), pin 2 should change when the light to the LDR is suddenly interrupted and pin 3 should be at half supply voltage. That done, check for +5V on pin 1 of IC2’s socket and for 0V on pins 2, 3, 7 & 8. Fig.4: the COM port that the detector PCB is connected to is selected using this dialog box. Here, the AXE027 cable is being used and the relevant port is COM7. If it all checks out so far, disconnect the plugpack and install IC1 (but not IC2). You now have to adjust trimpot VR2 so that the voltage on pin 3 of IC2 can never exceed 5V. This is done as follows: (1) Connect a clip lead across the two back-to-back 470μF capacitors (ie, short them out). (2) Set VR1 & VR2 to their mid-range positions. (3) Place a piece of thick cardboard between the LED and the LDR to block the light. (4) Reapply power and check the voltage at pin 6 of IC1. It should be about 1V less than the supply rail. (5) Monitor the voltage at pin 3 of IC2’s socket and adjust VR2 for a reading of 4V (or slightly less). Once that’s done, disconnect the plugpack and install the PICAXE-08M, with its notch facing to the left – see Fig.2. Final assembly The PCB is designed to fit inside a standard UB3 utility case. It’s mounted on the lid on four 9mm untapped spacers and secured using M3 x 15mm screws and nuts. That done, you have to make a cutout in one end of the case to provide clearance for the DB9F socket (CON2) and the pot shaft. This cut-out measures 45mm long x 12mm high and is about 12mm from the lip of the base. You will also need a hole in the side of the case to access CON3. You also need a hole directly in-line with the DC power socket (CON1). This is horizontally centred 17mm Fig.5: this dialog shows the main window of the PIXAXE Programming Editor after opening the software file. Clicking the Program button then downloads the software into the PICAXE (IC2). Don’t forget to adjust the alarm thresholds (see text). 34  Silicon Chip siliconchip.com.au Par t s Lis t: Seismograph Detector Fig.6: use the Terminal dialog to check that the baud rate for the transmitted data is 4800. from the lip of the case and should be drilled and reamed to 8mm. Finally, a slot must be cut in the case in line with the light sensor to provide access for the vane that’s attached to the bar. This slot should be positioned 37mm from the end of the case and can be about 4mm wide. The unit can then be assembled into the case and attached to the base of the seismograph. Position the vane so that it normally blocks about half the light between the LED and the LDR. Note: if you are using the seismograph for demonstration purposes, leave the cover off the utility box. This will let people can see how the vane partially blocks the light beam and lets them monitor how the onscreen display and the alarm respond to movement (the seismograph will, however, be sensitive to rapid changes in light level). Audible alarm How effective is the piezo transducer in sounding the alarm? Well, a recent magnitude 6.6 quake near Vanuatu (October 21, 2012) triggered the alarm for about five minutes while a larger 7.3 earthquake in the Banda Sea (near Indonesia) on December 11, 2012 set the transducer going for more than 30 minutes until the wave sequence had passed through Sydney (see Fig.7). The alarm woke me up but Berowra (just to the north of Sydney) is hardly likely to be affected by tsunamis so I did not bother to evacuate! In any case, the quake took place 150km down in the subduction zone, so there was no damage or tsunami siliconchip.com.au 1 PCB, code 21102131, 123 x 57mm 1 9V DC plugpack 1 piezo transducer (Jaycar AB-3440, Altronics S-6140) 1 2.1mm DC power socket (CON1) 1 DB9F connector (PC-mount) or 3.5mm stereo jack socket (Altronics P-0094) 1 plastic utility box, 130 x 67 x 44mm 4 9mm-long untapped spacers 4 M3 x 15mm machine screws 4 M3 nuts 1 serial computer cable or USBto-serial cable (see text) 2 8-pin IC sockets 1 100kW linear potentiometer (VR1) (Jaycar RP-8518) 1 5kW horizontal trimpot (VR2) 1 Light Dependent Resistor (LDR1) 1 3-way pin header 2 M2.5 x 6mm machine screws & nuts (to secure transducer) Semiconductors 1 741 or OP27 op amp (IC1) 1 PICAXE-08M or PICAXE-08M2 microcontroller (IC2) 1 78L05 3-terminal regulator (REG1) 1 1N4004 diode (D1) 1 red or white high-brightness LED (LED1) Capacitors 3 470mF 25V electrolytic 1 100nF MKT (code 104 or 100n) Resistors (0.25W, 1%) 1 22kW 1 1kW 4 10kW 1 100W 2 3.3kW reported. If you want to find out more, you can go online to Geoscience Australia to find the epicentre and read the tsunami warnings. Those who do live in areas at risk from tsunamis would get plenty of advance warning if the alarm sounded. That’s because earthquake waves travel more than 50 times faster than the tsunami waves, so there’s usually plenty of time to get to higher ground. Programming the PICAXE Of course, as well as adding the piezo transducer, you also have to reprogram the PICAXE-08M so that can drive the transducer (as well as correctly interact with AmaSeis). To 1 x 10kW or 1 x 3.3kW or 1 x 1kW resistor to match LDR resistance – see text Mechanical Parts 1 800mm-long x 5/16-inch threaded steel rod 5 5/16-inch nuts and washers to suit rod 1 50mm-long x 1/4-inch bolt 3 1/4-inch nuts and washers 1 40mm-long x 1/2-inch bolt 1 1/2-inch nut and washers 1 3/8-inch washer 1 1-metre length 1-2mm diameter steel wire 1 2-2.5kg mass (eg, 2 x 1.25kg barbell weights) 1 piece of thin aluminium sheet (to make vane to interrupt light beam) 1 bulldog clip (to attach metal vane to threaded rod) 1 or 2 super magnets 1 metal bracket to carry magnets (see text) 1 coil with shorted ends (see text) 2 braced right-angle brackets, 250 x 250mm 8 1/4-inch x 40mm bolts, nuts & washers 3 5/16-inch x 100mm roundhead bolts, nuts & washers 1 wooden base, 900 x 250 x 20mm 1 wooden back, 400 x 250 x 20mm Note: the PCB can be obtained from SILICON CHIP PartShop. do that, you need to first download and install the PICAXE Programming Editor on your PC. It's available for free from www.PICAXE.com/Soft­ware While you’re there, you should also grab the AXE027 USB Cable Driver (but only if you intend using the AXE027 PICAXE USB Download Cable from Revolution Education). Once the PICAXE Programming Editor software has been installed, switch off and connect the detector PCB to the PC. If you are using an old PC that has serial ports, this can be done using a standard serial cable (eg, scrounged from an old modem). If your PC doesn’t have a serial port, then you will have to use a USB-toFebruary 2013  35 Fig.7: this screen grab from AmaSeis shows the results of a 7.3 magnitude earthquake that occurred in the Banda Sea near Indonesia on December 11, 2012. It set the piezo transducer going for more than 30 minutes at the author’s location in Berowra (north of Sydney), until the wave sequence had passed. serial cable to make the connection. One option is to use the abovementioned AXE027 PICAXE USB Download Cable. However, before connecting this cable, you first have to install the driver that you downloaded earlier. This is necessary for the computer to automatically recognise the cable when it is subsequently plugged in. The AXE027 PICAXE USB Download Cable is included in the PICAXE-08M Starter Kit from Altronics – Cat. Z6101. Alternatively, you should be able to use other USB-to-serial cables, such as the Jaycar XC-4834. Unlike the Revolution Education cable which comes fitted with a 3.5mm stereo jack socket at one end, this latter cable is fitted with a DB9M connector. In each case, it’s just a matter of following the instructions supplied with the cable to install it. Programming editor With the cable connected, the next step is to launch the PICAXE Programming Editor, then click the Options button, select the Mode tab and select the device to be programmed – either a PICAXE-08M or a PICAXE-08M2 (see Fig.3). That done, click the Serial Port tab, scroll down and select the relevant COM port (see Fig.4), then click OK. You are now ready to program the PICAXE. To do this, click the Open button on the main window and load the program listing (Fig.5). To save you typing it out, this listing is available for free download from the SILICON CHIP website. The file you need is called SeismographV2.bas. Alternatively, you can type the listing out (it’s shown in the panel at right) and then copy and paste it into the PICAXE Programming Editor window (or you can just type it in directly). It’s now just a matter of clicking the Program button to download the software into the PICAXE. When you have loaded the software, you can see the transmitted data by looking at the PICAXE –> Terminal drop down menu – see Fig.6. Check that the baud rate is 4800. The value transmitted is between about 400 and 600 when the seismograph is at rest and should cover from 0 to nearly 1000 with a gentle, sustained blow on the seismograph bar. If this is incorrect, you will have to adjust the position of the metal vane and/or the sensitivity control (VR1) until you do get the full range. In the Option window, you can see which serial COM port the data is being sent through. Adjust the alarm thresholds in the program to be 100 above or below the resting value. If you make the thresholds too close, the seismograph might cry “wolf” with every breeze or footstep. Be aware also that small power supply “glitches” caused by stoves, heaters or air-conditioners might make the alarm give a single “chirp”. A real quake, however, produces a very distinct “hee-haw” sound with every “swing” of the bar. Setting up AmaSeis You must now close the PICAXE Issues Getting Dog-Eared? Keep your copies safe with our handy binders Available Aust, only. Price: $A14.95 plus $10.00 p&p per order (includes GST). Just fill in and mail the handy order form in this issue or ring (02) 9939 3295 and quote your credit card number. 36  Silicon Chip siliconchip.com.au Seismograph Program Listing main: readadc10 4,w1 sertxd (#w1,cr,lf) if w1>600 then top if w1<400 then bot pause 162 goto main ' makes a 10 bit A-D conversion of the value at input 4 and sends to w1 ' sends the value at w1 out to the Amaseis program ' sets the alarm threshold above the resting signal value (about 500) ' sets the alarm threshold below the resting signal value ' tells the picaxe to pause for 162 ms and gives 6 data feeds per second ' loops the program back to the start top: sound 2, (100,10) goto main ' when the signal >600 ' output 2 sounds a high note ' loops the program back to the start bot: sound 2, (50,10) goto main ' when the signal <400 ' output 2 sounds a low note ' loops the program back to the start Programming Editor to free the COM port, so that you can install AmaSeis. Once it’s installed, use Explorer to display the files associated with AmaSeis, then use Notepad to open the “AS1 Configuration Settings” file and change BAUD=2400 to BAUD=4800 to match the PICAXE baud rate. That done, open AmaSeis using its desktop icon, go to Settings and alter the following parameters: (1) Set the COM port number so that it is the same as for the PICAXE; and (2) Set Device to AS-1 (this was a commercial circuit using an older PIC chip). Other settings such as Station Name, Set Zero, Gain and Filters can be set later on, when the seismograph is running. Now close AmaSeis and then reopen it again from the desktop icon. You should now see a displayed seismograph line but it may be hidden above or below the screen if AmaSeis has not correctly reset it zero. In Settings –> Show Data Values, you should see the data value read by Amaseis. You might then need to use “Set Zero Level” to correct for the data value error from zero. On the main display screen, you should now see the seismograph line progress across the screen each hour. In Settings –> This Station, you can add your location and coordinates, while in Settings –> Helicorder, you can adjust the gain (5 or 10 or 20) of the computer. You should also turn Glitch Removal and Filters on. The program even appears to correct (at the end of each hour) for the few seconds gained or lost by inaccurasiliconchip.com.au Other Uses For AmaSeis Although AmaSeis is designed for use with seismographs, it could easily be put to other uses. For example, it can be used to provide a permanent record of any activity monitored by the PICAXE’s A/D inputs, eg, freezer, greenhouse or home-brew temperatures; solar panel output; cat flap position, etc. And with the PICAXE programmed with the alarm option and the added piezo transducer, it can have even more uses. cies in the PICAXE timing. The time displayed by the program is Universal Time. Analysing the display When you detect a quake, the program also has a number of options for analysing the display. “AltPrint Screen” lets you copy a quake plot to Paint for scaling or printing. And of course, if the serial cable is disconnected, the seismograph and its PICAXE-based detector circuit will operate as an independent earthquake and tsunami warning device. For further seismograph design ideas, including magnetic detector and amplifier circuits, point your browser to http://sydney.edu.au/science/uniserve_science/school/Seismograph/ index.html Finally, my thanks to Manfred for his help with the circuit design and for his continued enthusiasm for the SC project. Helping to put you in Control Control Equipment Arduino XBee Shield Simplifies the task of interfacing an XBee wireless module with your Arduino. Works with all XBee modules Series 1, 2.5, standard and Pro version. ARD-091 $25.00+GST DIN Rail Power Supplies Powered from 230VAC these 40W slim power supplies are available with 5VDC, 12VDC or 24VDC outputs. PSM-154 $54.00+GST Slim Isolation Amplifier Only 7.5mm wide it features 1500V 3-way isolation. It has a +/-10V input and 20 selectable outputs 0-5V, 0-10V, 4-20mA etc AXB-103 $149.00+GST LED Yellow Warning Light Being LED they have an expected life of 100,000hours plus. Available in 12VDC or 24VDC and colours Red, Green and Yellow. HEL-012 $19.95+GST Universal Indicator Programmable it can accept thermocouple, RTD, 4-20mA,0-5V or 010V signal. Powered from 100~240VAC or 24~240VDC. IPI-134 $99.95+GST Sail Winch Servo This RC servo rotates one full turn (360 °) over the standard 1 to 2 ms pulse range. It features a stall torque of 7.6Kg-cm at 6V MOT-310 $24.95+GST Triangular LED Strip Easily mounted into corners the aluminium triangular shape provides great illumination in cabinets and cupboards. Available in 300, 500 and 1000mm lengths. From CSL-4120 $24.95+GST Contact Ocean Controls Ph: 03 9782 5882 www.oceancontrols.com.au February 2013  37