Silicon ChipLow cost, Arduino-based 3-Axis Seismograph - April 2018 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: New blood at Silicon Chip
  4. Project: 230VAC Thermopile-based Heater Controller by John Clarke
  5. Subscriptions
  6. Project: Low cost, Arduino-based 3-Axis Seismograph by Tim Blythman and Nicholas Vinen
  7. Review: Rohde & Schwarz RTM3004 by Nicholas Vinen
  8. Serviceman's Log: Why can't I program MY alarm? by Dave Thompson
  9. Project: The Clayton’s “GPS” time signal generator by Tim Blythman
  10. Review: New “Facett” hearing aids from BlameySaunders by Ross Tester
  11. Feature: El Cheapo Modules 15: ESP8266-based WiFi module by Jim Rowe
  12. Vintage Radio: 1962 Astor M2 Cry-baby: radio, intercom and baby monitor in one by Ian Batty
  13. PartShop
  14. Market Centre
  15. Advertising Index
  16. Notes & Errata: Full Wave 10A Motor Speed Controller / Budget Senator Loudspeakers / Making Power From Rubbish
  17. Outer Back Cover: Hare & Forbes Machineryhouse

This is only a preview of the April 2018 issue of Silicon Chip.

You can view 47 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 "230VAC Thermopile-based Heater Controller":
  • Thermopile-based Heater Controller PCB [10104181] (AUD $10.00)
  • PIC12F675-I/P programmed for the Thermopile-based Heater Controller [1010418A.hex] (Programmed Microcontroller, AUD $10.00)
  • Firmware (HEX AND ASM) files for the Infrared Sensing Heater Controller [1010418A.HEX] (Software, Free)
  • Thermopile-based Heater Controller PCB pattern (PDF download) [10104181] (Free)
  • Thermopile-based Heater Controller lid panel artwork (PDF download) (Free)
Items relevant to "Low cost, Arduino-based 3-Axis Seismograph":
  • Arduino Sketch (.ino) and libraries for the 3-Axis Arduino-based Seismograph (Software, Free)
Articles in this series:
  • Low cost, Arduino-based 3-Axis Seismograph (April 2018)
  • Low cost, Arduino-based 3-Axis Seismograph (April 2018)
  • Arduino Seismograph revisited – improving sensitivity (April 2019)
  • Arduino Seismograph revisited – improving sensitivity (April 2019)
Items relevant to "The Clayton’s “GPS” time signal generator":
  • ESP-01 WiFi module (with ESP8266 IC) (Component, AUD $5.00)
  • CP2102-based USB/TTL serial converter with 5-pin header and 30cm jumper cable (Component, AUD $5.00)
  • Arduino Sketch (.ino) file for the Clayton's GPS Time Signal Generator (Software, Free)
Items relevant to "El Cheapo Modules 15: ESP8266-based WiFi module":
  • ESP-01 WiFi module (with ESP8266 IC) (Component, AUD $5.00)
  • Software for El Cheapo Modules: ESP-01 (Free)

Purchase a printed copy of this issue for $10.00.

Three-Axis Arduino Seismograph By Tim Blythman and Nicholas Vinen This “helichart” from a Seismograph operated by the US Geologic Survey (USGS) shows a magnitude 6 earthquake recorded at Guam on February 13th, 2018. One of the disadvantages of this format is that large tremors cause the pen to overwrite other data. T he Seismograph projects we have published in the past involved building a horizontal pendulum and then sensing its motion. However, pendulum designs only respond to waves in one of the horizontal axes and so their sensitivity will vary, depending on where the epicentre of the quake is located, compared to your location. Waves which are orientated along the pendulum would barely register at all. It can also miss vertical waves, such as the S-wave and Rayleigh waves. (For an explanation of earthquake wave types, see the desctiption in last month’s Earthquake Warning Alarm – siliconchip.com. au/Article/10994). In contrast, the 3-axis accelerometer used in this project will pick up vibration with any orientation: up/down, forward/back or side-to-side. 26 Silicon Chip Using a sensitive three-axis accelerometer to log seismic activity over long periods, this Seismograph allows you to detect and analyse distant or close earthquakes. It’s a great educational project, easy and cheap to build and it logs seismic activity in all three axes, along with the overall magnitude, to a microSD card. So you won’t miss any waves which happen to pass by and you can even determine the type of waves later while examining the data, based on the relative amplitude picked up by each axis. This one is also much easier to build because it’s completely electronic. Another big advantage of this Seismograph, besides its low cost is that it’s a stand-alone unit and so don’t need your PC to log the data. Totally unattended, it can log seismic data for days, weeks or even months, and you can simply unplug the SD card any time and load the data onto your PC for analysis when it’s convenient. This is the second Earthquake monitoring project we have published that uses a 3-axis accelerometer. It is a development from the previously mentioned Earthquake Early Warning Alarm project published in our March 2018 issue. This incorporates both alarm and logging functions in a single unit. How it works The 3-axis Arduino seismograph can be built from the Earthquake Warning Alarm (March 2018) with just a few extra parts. Celebrating 30 Years The Earthquake Warning Alarm used an Arduino with an MPU6050 accelerometer/ gyroscope module to detect either Pwaves (which have a horizontal component) or S-waves (which have a vertical component). When that unit detects a P-wave, it flashes a LED and sounds a siliconchip.com.au siren, giving warning about the possibly imminent arrival of the more destructive S-wave and surface waves. There are many thousands of earthquakes every year – between 12,000 and 14,000 according to reliable data. But unless you hear about them on the news, you will probably not even be aware of them. However, they can be detected and you can get some idea of the distance, magnitude and depth of the quake, based on the faint vibrations that you can pick up at your location. If you want to study the details of a seismic event after it happens, you will need to record even the faintest vibrations and also the time they arrive. It turns out that this can be done with the same Arduino and MPU-6050 combination we used for the Early Warning Alarm. We just need to add an SD card module to store the data and a real time clock (RTC) module to provide accurate time-stamps. Recording the data A helichart Seismogram being recorded at the Weston Observatory in Massachusetts, USA. Note how the arc within which the pen moves causes distortion of the larger amplitude tremors. Image credit: Wikipedia user Z22. In researching this project, it was surprisingly difficult to find a stand- view all the axes at the same time, to files can have multiple channels and ard data format for recording and see how the vibrations at different ori- they log data sampled at evenly-spaced viewing raw seismic data with multi- entations correspond. time intervals too. ple channels. We eventually managed to find some So why couldn’t we store and proThese days, with MEMS acceler- software which could handle this type cess seismic data as if it’s simply lowometer chips being readily available, of file but it only seemed to be intend- frequency audio data? more and more seismographs log data ed to process seismic data, not view If you think about it, that’s pretty in multiple axes – so it would be logi- it. The commonly available viewers much what it is and this is one reacal to standardise on a suitable storage mostly show just one seismic plot at son why earthquakes can involve a format. Yet this does not seem to have a time and that just isn’t adequate for lot of noise! happened. the task, in our opinion. We considered storing the data as You may recall seeing images of the a .csv (comma separated value) file, old-fashioned drum type seismographs Oh, the Audacity! which is easy to analyse but the sheer which use a pen and weight to log seisHowever, we did find one piece of quantity of data involved in logging day mic data onto a roll of paper. software – Audacity – that despite after day would make this awkward. Sometimes, three of these machines not loading specialised seismic data would be placed in the same location file formats, would open audio (WAV) Viewing seismic data but with different orientations, to cap- files. The output of a seismograph is ture all the components of seismic acAnd that gave us an idea. Audio known as a seismogram and traditiontivity, much like ally, this was in the form we are doing with of a helichart. the three-axis acThis is an abbreviacelerometer. tion for helical chart Sensor type: ................................ 3-axis, 16-bit accelerometer But when storand derives from the fact Full-scale measurement: ........... ±4g ing the data digitalthat the chart would be Resolution: ................................... 0.000122g ly, it makes sense wrapped around a roto store it in a sintating drum, while the Practical minimum reading:...... around ±0.001g gle file, stamped recording pen moves Frequency response:.................. 0.625 (-3dB) to 21Hz (Nyquist limit) with the time and slowly along the chart in Sampling rate:.............................. 42Hz date that the rea 24-hour period, taking File format:.................................... WAV, four channels cording started. a helical path. That way, all the A traditional helichStorage medium:......................... microSD card, up to 32GB data can be copied art seismogram is shown Data rate:....................................... 1.2MB/hour, 29MB/day, 10.6GB per year or moved as one above. This appears as a Maximum recording time:.......... 512 days unit and you can series of lines across the SPECIFICATIONS siliconchip.com.au Celebrating 30 Years April 2018  27 Fig.1: the Arduino (MOD1) senses vibration by reading data from accelerometer MOD2, then logs the acceleration readings onto an SD card using MOD4. The real-time clock, MOD3, allows you to determine what time the data was recorded, so you can time stamp any tremors that were picked up. page when removed from the recording drum. Seismic activity appeared as wiggles in those lines. Nowadays, the helichart is generated by a computer, and the lines are horizontal rather than sloping. So, that brings us back to the .wav file format and Audacity. Although designed for sound, it is well suited to any sort of data that can be represented as a waveform. Typical wave files will be one or two channels (ie, mono or stereo), but the .wav format can theoretically support thousands of channels. As mentioned above, we’re using four channels to record our data: separate X, Y and Z channels and a combined magnitude of all channels. Its display is much like that of a helichart. Some other applications may not handle .wav files with more than two stereo channels but we found Audacity handles them well. You could play the file back as audio but the sound is not very interesting. Unless a seismic event is very close (ie, close enough for you to feel), you will need to amplify the data greatly to get anything remotely audible, and given the low frequencies involved, you will probably have to speed it up as well. But what Audacity does very well is let you view the data, scroll around and zoom in to view events. Audacity 28 Silicon Chip also shows a time scale at the top of its window, so determining the time at which a given event was recorded is straightforward (see Fig.4). You can also easily cut out an interesting section of data and save it into a separate file for further analysis later. Circuit details The circuit diagram of the Seismograph is shown above. The MPU-6050 Accelerometer module (MOD2) communicates with the Arduino (MOD1) via an I2C bus, using the SDA (data) and SCL (clock) pins. The micro sends set-up commands and then periodically retrieves acceleration readings over this bus. MOD2 runs off the same 5V supply as the Arduino. In contrast, SD card module MOD3 is wired up to the SPI interface on the Arduino, which is on pins D10-D13 while the real-time clock module, MOD4, connects to the same I2C interface as the accelerometer (MOD2), ie, the SDA and SCL pins. Because the SDA and SCL functions on the Uno are shared with analog pins A4 and A5, you can’t use these as analog inputs when you’re using I2C. You may be wondering why there is a 4.7kΩ pull-up resistor from the ADO pin on MOD2 to +5V. If you look at our Earthquake Early Warning alarm Celebrating 30 Years circuit in March 2018, it did not have this resistor. But when we built our first prototype, we were mystified to find that as soon as we had wired up the RTC module, the accelerometer/gyro module stopped giving valid data. This was even before we’d added any new code to query the RTC module. We spent quite a while troubleshooting before deciding to check the default I2C addresses of these two modules. Surely, out of the 127 possible addresses, they would not have chosen the same one? The DS3231’s address is fixed at 68 hexadecimal. So we looked up the MPU-6050 default address. Hard to believe but it’s true – it was 68 hex too. Luckily, the MPU-6050 does give you the option to change the address to 69 hex, by pulling the ADO line high. So that’s why we added the 4.7kΩ resistor in this way; to allow the two units to share the sole I2C bus that the Arduino provides. Another small change we had to make was to change the pin controlling the alarm LED and siren from D12 to D7, as using D12 interferes with the SPI bus on the SD card. If you’re building this project as a seismograph and you don’t need the alarm function, you can leave these siliconchip.com.au A data-logging shield incorporates the RTC module and SD card socket, giving a compact layout. the Arduino code is checking the serial port for user input. This is because we’ve incorporated a function to set the date and time manually over the serial console. This allows you to ensure the real-time clock is set properly, so your logged data will be accurately timestamped. If at any time an SD card fault is detected, the routine stops and LED2 flashes. You will need to correct the fault (eg, insert a fresh and empty microSD card) and press the Arduino reset button to resume logging. Similarly, to remove the card, press S2, remove the card, then insert a new card and press the reset button to resume logging. Construction components off but they’re inexpensive so we figured it was worthwhile to leave them in. We’ve also added a second LED (LED2) to give status information about SD card errors which would stop data being recorded. It’s pulsed on briefly when writing to the SD card, to give a visual indication that the unit is working. It’s driven by digital output D5. Note that we also briefly pulse LED1 if LED2 is flashing to indicate an error writing to the card, for example, if it’s full. This results in a periodic chirp from the siren, alerting you to the fact that the unit needs attention. There’s also tactile push-button S2, sensed by digital input pin D4, which you can use to stop logging to the SD card. You can then safely remove it without corrupting the data. In operation, the Uno reads the acceleration data from MOD2, runs it through the filtering algorithm (to remove the force of gravity and so on) and after reading the current time from RTC MOD3, saves the data and time to the SD card using MOD4. The data saved in the file is the separate X, Y and Z accelerations in units of g and also an overall acceleration magnitude which is computed using an RMS algorithm. The time and date are stored in the file name of the WAV file itself. A new file is created at midnight and its file name will contain the date. When you open the file in a program like Audacity and are viewing the data, because it displays the time from the start of the siliconchip.com.au file, this will correspond to the time that the data was recorded. Having written the data to the SD card, the Uno then checks the filtered acceleration values to check if a Pwave or S-wave has been detected, and activates the alarm as necessary. The cycle is repeated 42 times per second but writes do not necessarily occur to the SD card this frequently. Rather, they are buffered and flushed once per second, so you can expect about 2-3 block writes per second to occur. At the same time as it’s logging data, There are two ways you can put it together. We’ve tested both approaches and they give the same result. The first method is the same as used in the Earthquake Warning Alarm and that is to solder the three separate modules (MOD2, MOD3 and MOD4) to a prototyping shield and then plug this into the main Arduino Uno (or compatible) board – see below. The other approach is to use a data logging shield like the Jaycar XC4536 or Altronics Z6380. These shields already have the RTC module and SD card module built in. They also have a prototyping area where you can sol- One other option for building the unit is to add separate SD card and RTC modules to the Earthquake Early Warning Alarm (from last month). Celebrating 30 Years April 2018  29 D13 and CS to D10. Ideally, MOD4 should be placed as near these pins as possible to keep the wires short. The SPI interface needs to run very fast, and you may get issues with the SD card if the wires are too long. The final assembly step is to reconnect the assembled board to MOD1. Building it from scratch Again shown larger than life size, this photo of the back of the data logging shield PCB shows where the wire links and single 470Ω resistor are located. der the remaining parts. The latter solution is probably simpler, but the DS1337 RTC used in these shields is not quite as good a the DS3231 real-time clock module. And depending on where you get the parts, it may end up costing more (although probably not by very much). If you have already built the Earthquake Early Warning Alarm, to add the extra functions, detach the protoboard from your Arduino and move the 91Ω resistor from pin D12 to D7, to free up the SPI pins. Then add the 4.7kΩ between the ADO and VCC pins of MOD2. Now you need to add red LED2, its current-limiting resistor, push-button S2 and modules MOD3 and MOD4. Connect LED2’s anode to pin D5 and then solder the 470Ω resistor between its cathode and GND. We used the large GND strip in the corner of the protoboard. Tactile switch S2 is connected be- tween pin D4 and GND, again using the large GND strip. Make sure you use the right pair of pins since some of the pins will be permanently connected internally. Use a DMM set on continuity mode to check which pins are shorted when the button is pressed. The two new modules are added last. MOD3, the RTC module, can be conveniently placed near the I2C pins on A4 and A5, which avoids piggybacking wires onto the existing connections for MOD2. This is possible because on an Arduino Uno board, A4 is connected to SDA and A5 is connected to SCL, so these pins have the same function. The connections for MOD3 are similar to those for MOD2: 5V to VCC, GND to GND, A4 to SDA and A5 to SCL. MOD4 is connected to the power rails and SPI pins, with D10 being used as CS/SS (chip select/slave select). Connect VCC to 5V, GND to GND, MOSI to D11, MISO to D12, SCK to If you’re building the Seismograph using separate modules on a protoboard, use the following instructions. Otherwise, jump to the section below titled “Using a data logger shield”. Start by soldering the three modules onto the protoboard, near the pins which they need to connect to. Refer to our photos and the circuit diagram to determine where they should go. You will need to solder the supplied 8-pin header to the MPU-6050 accelerometer board. You can solder an 8-pin female socket to the protoboard to make it easily removable, or simply solder the other end of the header to the shield. Solder the 4.7kΩ resistor adjacent to the header for MOD2, between the VCC and ADO pins, then connect it to those pins. Use zero ohm resistors or wire links to connect the four main pins of MOD2 to the Arduino pins: VCC to +5V, GND to GND, SCL to either A5 or SCL and SDA to either A4 or SDA. If you want to retain the Early Warning Alarm function, you will need sensitivity adjustment trimpot VR1. This can be soldered directly next to the A0/A1/A2 pins and then wired up to those pins in the most direct manner. To retain the alarm function, you will also need to wire the piezo siren up to the board, either by soldering its leads directly or via a plug and socket. Wire the positive lead directly to the VIN pin on the Arduino Previous Seismograph and Earthquake related articles Build your own Seismograph by Dave Dobeson. September 2005 – siliconchip.com.au/Article/3173 Revised Seismograph by Dave Dobeson. February 2013 – siliconchip.com.au/Article/2364 Earthquake Early Warning Alarm by Allan Linton-Smith and Nicholas Vinen. March 2018 – siliconchip.com. au/Article/10994 30 Silicon Chip We’ve come a long way since the seismograph featured in our Septembter 2005 issue: yes, it worked well but involved quite a deal of mechanical work. Now, with a 3-axis accelerometer and Arduino UNO, you can build a seismograph that works in all three directions and allows you to examine the various earthquake waveforms in detail. And the best part? It costs very little to build – particularly if you already have the Arduino UNO! Celebrating 30 Years siliconchip.com.au and the negative lead to the collector of Q1; the bottom of Fig.1 shows which pins of Q1 are which. Wire the emitter of Q1 to a convenient GND point. Next, solder the cathode of blue LED1 to the central (base) pin of Q1 and then solder its anode to a 91Ω resistor, with the other end to Arduino pin D7. Now follow the steps listed above, immediately under the Construction heading, to fit the remaining components which are unique to this design. Using a data logger shield The data logging shield version of the Arduino Based Seismograph is probably an easier way to build this unit from scratch, as MOD3 and MOD4, along with red LED2, are already on-board. Start by adding a wire link (eg, a resistor lead off-cut) between the pins marked 5 and L1. This connects the on-board LED and series current-limiting resistor to pin D5 on the Uno. Solder one leg of the 91Ω resistor from pin D7 to the anode of LED1, then connect LED1’s cathode to Q1’s base (middle pin). This can be done by placing the components near each other as shown in the photos, and trimming the legs slightly longer than necessary. The legs can then be bent until touching and soldered together. The next few connections should be made with some short lengths of insulated wire, and we found it easier to run the wire underneath the shield. The emitter of Q1 is connected to GND, and its collector to the siren’s negative lead (or to a polarised plug for the siren, if fitted). The siren’s positive lead is connected to the shield’s 5V supply. If you are using a siren which can run from more than 5V, this can be taken to VIN instead, which is fed from the DC jack on the Uno. The tactile switch is mounted next and it will need to be right against the edge of the prototyping area on the shield to allow space for MOD2. Connect one side of the switch to GND and the other to D4. Fit MOD2 next. We used a short length of female header strip to make the module removable and this also allows it to easily clear LED1 and Q1. You could solder it directly to the shield if you have space. Regardless, place the accelerometer assembly on siliconchip.com.au Parts list – Arduino 3-Axis Seismograph 1 Arduino Uno or compatible board (MOD1) 1 Arduino data logging shield (LED2/MOD3/MOD4) [Jaycar XC4536 or Altronics Z6380] or see below 1 MPU-6050 based accelerometer/gyroscope module (MOD2) [Altronics Z6324] 1 small plastic box (eg, UB5 Jiffy box; optional) 1 1-13V loud piezo siren [Altronics S6115] 1 100kΩ mini horizontal trimpot (VR1) 1 2-pin polarised header and matching plug (CON1; optional) 1 USB power source (eg, USB charger or computer with free USB port) a few short lengths of light-duty hookup wire Semiconductors 1 5mm blue LED (LED1) 1 BC337 NPN transistor (Q1) Resistors (.25W, 1%) 1 91Ω (code white brown black brown or white brown black gold brown) 1 4.7kΩ (code yellow violet red brown or yellow violet black brown brown) Additional parts if not using data logging shield 1 Arduino prototyping shield 1 5mm red LED (LED2) 1 DS3231 real-time clock and calendar module and button cell (MOD3) [SILICON CHIP Online Shop Cat SC3519] 1 microSD card interface module (MOD4) [SILICON CHIP Online Shop Cat SC4019) the board before soldering, to check that everything will fit. Use short lengths of wire to connect MOD2 to the shield, with VCC to 5V, GND to GND, SDA to SDA and SCL to SCL. There’s a small pad with these four connections in one corner of the shield, which makes these connections tidy. The only thing to watch is that SDA and SCL are reversed between the two, so these wires will have to cross. Now add the 4.7kΩ resistor between ADO and VCC on MOD2. The final component is trimpot VR1, which neatly slots into the pads for A0 and A2. Use a wire link to connect the middle leg to A1. Now double check all the wiring and Fig.2: the output from the serial monitor showing normal data display, along with the time and date being set. Time setting mode is entered by pressing the “~” key. Celebrating 30 Years April 2018  31 This straight-on view of the protoboard shows the location of the various components and connections. This is a little different from the board shown last month as it also has the microSD card adaptor module (centre top) and the DS3231 RTC module (lower right), both mounted vertically to the protoboard. plug the assembled shield into MOD1 (the Arduino Uno board). Programming it If you haven’t already done so, download and install the Arduino IDE from www.arduino.cc/en/main/ software There are a number of libraries that need to be installed to support the RTC module and SD card module. Two of these are easily added by the Library Manager feature, which is only available from IDE version 1.6.4 but we will also supply them in the software download package (as ZIP files). If you don’t have this version, unzip the three library folders into your Arduino libraries folder. This is usually found in your Documents folder, under Arduino/libraries. You may need to restart the IDE after adding the new libraries, but this usually is not necessary. To use the Library Manager, go to Sketch  Include Libraries  Manage Libraries and search for “rtclib”, click the version by “Adafruit” and click install (see Fig.3). Do the same for “SdFat” and install the version by Bill Greiman. With the libraries installed, open the sketch file, connect the Uno to the computer via a USB cable and click Sketch  Upload. If the compile and upload do not complete successfully, check that the libraries are in the correct place and properly installed. Also, check that you have the correct COM port selected in the Tools menu. Now open the Serial Monitor (Tools  Serial Monitor or Ctrl-Shift-M) and check that the baud rate is set to 115200. This will give detailed error messages if there are problems and also allow you to set the time accurately. Set-up You might notice that the red LED is flashing in groups of two. This is because it has not been able to detect the card (presumably, you have not inserted it yet). Disconnect the Uno from the computer and install an SD card or microSD card as appropriate. The card should be formatted with FAT16 or FAT32. Re-connect the Uno and restart the Serial Monitor. If the Serial Monitor is showing a Fig.3: using the Library Manager makes installing libraries straightforward. Here we are installing the library for the RTC module. The procedure is similar for the SdFat library 32 Silicon Chip Celebrating 30 Years siliconchip.com.au stream of |XY| and |Z| values, like that shown in Fig.2, then everything is working as it should be. The blue LED should light up if the unit is picked up and shaken, and you should also see the values in the Serial Monitor change. Now is a good time to adjust the alarm sensitivity. Clockwise on VR1 is more sensitive, so turn VR1 fully clockwise then turn it slowly back until the blue LED just stays off (remembering the alarm condition persists for a few seconds when triggered). If you find the red LED is still flashing, count the number of flashes in each group. If you are getting one flash at a time, the Uno could not detect the RTC module. Check that the wiring to the RTC module is correct. Any more than that indicates a problem with the SD card. If you are getting two flashes and the card is installed, check the wiring to MOD4. If you are getting three or more flashes, the card is being detected but cannot be written to. This may be a corrupted or full card. We’ve found that the unit generates about 30MB of data per day, so even a 1GB card will last a month without filling up. FAT16 has a restriction of 512 directory entries, which should give over a year of operation. Using it When you want to remove the SD card to examine the logged data, press tactile switch S2 and the red LED will light continuously. This indicates that the SD card has been shut down safely and the Seismograph can be powered down without corrupting or losing data. If you are simply changing to another card, you can remove the old card, insert a new card, then press the Arduino reset button to resume logging. The files are stamped with the date and time that logging started and a new file is created at midnight. As mentioned above, you can set the time and date via the Serial Monitor. This is done by sending a ‘~’ character to the Uno, which will cause it to pause logging and wait for an input. The input is of the form YYMMDDHHMMSS, and should just be digits. For example, for 3:30pm on March 15th, 2018, enter 180315153000. Remember that you have to press ‘Enter’ for the Arduino Serial Monitor to send the data. siliconchip.com.au The simplest method is to uncheck the “Autoscroll” option on the Serial monitor, then type ~ and press enter. Type the twelve digits for the time and date and press enter as soon as the actual time matches exactly what you have entered. You should see a message that the time has been changed and a new file is created starting at the current time. See Fig.2 for an example of this. Locating the unit The seismograph can be fitted in an appropriately-sized Jiffy box if desired or it can be operated as-is. But it should be mounted somewhere solid, away from doors and not on top of a desk or other piece of furniture which can either be bumped or will easily transmit footsteps, vibrations from traffic or other non-seismic sources of vibration. Perhaps the best place for it would be on top of a concrete slab in a basement. If you don’t have a basement, it could be mounted on a solid groundfloor wall (away from doorways) or kept on the floor in an out-of-the-way place (eg, a closet). This will maximise seismic pickup while minimising other sources of vibration. On the other hand, maybe you’re interested in seeing artificial sources of vibration, such as passing traffic, in which case you may want to deliberately mount the unit near a road. It’s up to you! Try to avoid placing it on any soft surfaces which might absorb seismic energy, such as carpet or vinyl flooring. Viewing the files using Audacity Audacity is available as a free download from www.audacityteam.org/ download/ The WAV files created by the Seismograph have four channels and can be viewed (and even played) in Audacity. Note that under normal circumstances, the data will simply look like a flat line unless you amplify it since if the unit is picking up any tremors, they are likely to be quite weak. We actually couldn’t see any activity at all until we amplified the waveforms by 20dB, after which we could see movement starting about the time we came into the office in the morning (truck traffic on the nearby road would have increased at around the same time). Celebrating 30 Years April 2018  33 Fig.4: a Seismogram displayed in Audacity. Note the time code along the top of the window. The unit was shaken three times and you can see how the movement was picked up by different combinations of the three axes. The first shake was side-to-side, the second forward/back and the third up/down. All register in the bottom (combined) trace. Note that Audacity will display the traces with a vertical scale from -1.0 to +1.0 while the data actually represents g-forces of -4.0 to +4.0. So you will need to multiply any readings taken off the vertical scale by a factor of four, to convert them to gs. By the way, we suggest after opening the WAV file, you use the View  Fit Vertically option (CTRL+SHIFT+F) to expand the display. The first channel, normally labelled “Left”, is actually the X-axis reading from the accelerometer, while the second “Right” channel is the Y-axis. A small diagram printed on the top of the Altronics Z6324 module indicates the orientation of the X-axis, with the arrow pointing towards in direction of acceleration which will result in positive readings. Similarly, the Y-axis is shown on the board. The Z-axis is the third channel, by 34 Silicon Chip default labelled “Mono” and indicates up-down motion of the accelerometer, with forces pushing it down being positive (ie, in the same direction as gravity). Since the fourth “channel” of the recording (also labelled “Mono”) constitutes the magnitude of the threedimensional force vector, that means it is effectively rectified, ie, the value shown will always be between 0 and 1, corresponding to a force of between 0 and 4g. The advantage of this data is that it’s guaranteed to pick up vibrations regardless of their orientation relative to the unit. If you see anything interesting in the plot and want to zoom in and examine it, all you need to do is move your mouse cursor over that area, hold down the CTRL key and rotate your scroll wheel up. It will zoom in and expand that Celebrating 30 Years section of the recording. Rotating the scroll wheel in the opposite direction will allow you to zoom back out. We suggest initially, you use the USGS Earthquake map at https://earthquake.usgs.gov/earthquakes/map/ to locate recent earthquakes in your part of the globe and then estimate when they would have arrived at your location, based on a speed of around 3-8km/s. You can then check your seismogram files to see if you picked up the tremors. If you can’t see anything, try amplifying the signal in a 30-minute window surrounding that time by successively large dB values (by dragging a selection over that time period and using the Effect  Amplify menu option) until you can see the tremors. Once you’ve found a few earthquakes in this manner, you will know what to look for in future. SC siliconchip.com.au