LEARN.PARALLAX.COM
Published on LEARN.PARALLAX.COM (https://learn.parallax.com)
Home > BlocklyProp Seismometer

BlocklyProp Seismometer

This Learn project was written by a long-time Parallax friend and robotics enthusiast, Carol Hazlett. Most of the parts come from the BlocklyProp Starter Kit, but several components will likely require a trip to a local hardware store.

This can be made with the Blocklyprop Starter Kit with the addition of four 5/8-inch-wide springs, eight 4/40 screws 5/8 inch in length, eight 4/40 nuts and a flat base which can be made of plastic, wood, or metal. This project can be done in just a couple of hours and will be fun for everybody.

 

Parts Needed:

From the BlocklyProp Starter Kit (#32520):

  • (1) – Memsic2125 Dual-Axis Accelerometer (#28017)
  • (1) – 96 x 64 Color OLED Display (#28087)
  • (1) – Piezospeaker (#900-00001)
  • (2) – 220 ohm resistors (red-red-brown)
  • misc jumper wires

Additional hardware:

  • (8) – 4/40 5/8’s screws
  • (8) – 4/40 nuts
  • (4) – 5/8th X 1 ½ inch springs
  • (1) – Wood or Plastic base material

Assemble and Wire It

  • Make a base any size you want that is big enough to hold the board and battery pack.
  • Using the Propeller Activity Board WX for size reference, drill holes to match holes in board’s corners and insert screws from the underside of the base and secure with a nut.
  • Put the other 4/40 screws in the corners of the Activity Board and secure with a nut also.

See picture below. The nuts should be positioned on the underside of the Activity Board, and on the top side of the base.

I used 1.5 inch-long by 5/8 inch-wide springs for the seismometer mounting. You want the springs to move freely so they should be long enough to keep screws from touching each other. This gives a very responsive base for the movement of whatever you set your seismometer on. I refer to the springs as “force amplifiers”.  It is sensitive enough to drive you a little crazy if you put it on your desk! The width of the springs is to keep them in place by fitting snugly around the nuts.

 

Wiring it Up

  • Follow the wiring diagrams below closely, along with the sensor placement and schematics.

There are tutorials on these sensors on the Parallax Learn website using several languages to program them with, like Prop C, Spin, and Blocklyprop. We will be using Blocklyprop for this project because of its ease of use. Below on the left is a picture of the breadboard wiring without the sensors, and on the right is the sensor placement. You might want to place the piezospeaker and accelerometer before beginning your wiring, to make it easier. The OLED can be added after the wiring is complete.

 

Below is a graphic representation of the wiring diagram without sensors installed, plus the schematics for each of the 3 sensors we’re using in this project. The brown lines are the 220-ohm resistors pictured above, and the line colors match the colors on the sensor schematics. Make sure your project agrees with these pinouts.

This is an image of the board fully wired, with sensors installed:

  • Once the board is set up, secure the battery pack to the base, in the middle of the springs.
  • Place the Activity Board WX on top of the springs so the screws secure it into the springs, and connect the barrel jack from the battery pack.

Calibrate and Install the Full Program

Once you have your wiring done you will want to know the numerical range of your Memsic sensor in order to give your program the correct numbers to look for when the board is shaken.

  • Using Blocklyprop, make a program to print the numbers your sensor is putting out.

  • After sending the program to the board let it settle down for a while to get the steady state of the sensor. Watch the terminal output for repeated similar numbers.

Anything over that will indicate movement.

Once you have your baseline numbers you can use them to program the logic to let your seismometer know when to sound off. The following Blocklyprop program is what I wrote for my seismometer but you can make your own noises and OLED graphics to suit yourself. It is easy to modify and there are many things you can do with the OLED! Be sure to replace my Memsic baseline numbers with your own.

  • Download the blocks file  and upload it or create the program by hand in a new BlocklyProp Propeller Activity Board WX project.

The logic I used for the seismometer is: if the numbers coming from the Memsic sensor are greater than the numbers when it is in its steady state it will sound the alarm. I put the speaker and the OLED in their own functions to make it easy to change them when the whim hits me for something different or better.  Do not forget to right click on a block and use the help function to get the information on a block and how to use it. I hope you enjoy this project!

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024


Source URL:https://learn.parallax.com/courses/blocklyprop-seismometer/
Links