Guide by Tim; Set Up a Geophone with a Raspberry Pi and an ADC (ADS1115)

Hi @Masoud264880 - welcome to the forums :slight_smile:
The ADS1115 ADC is a 4 channel amplifier. To use with a geophone requires 2x channels (to take a differential measurement)

That means each ADS1115 could support 2x geophones.
To add more geophones requires additional ADS1115 ADCs, which can be added to the same I2C bus by setting a new address. Each ADS1115 requires a unique address so the Pi can talk to it individually.

Soldering the A0 jumper will allow connecting a second ADC to the I2C bus (with address 0x49) for a maximum of 4x geophones.

Hi Tim, I am trying to install the packages using the scripts. They are not working. Is there an updated path for these?

1 Like

Hi Dylan,

Welcome to the forum! Can you please share what Pi you are using and what version of the OS you have. I know there’s some issues with pip on Bookworm so you may need to install Bullseye.

1 Like

Could this be adjusted to make a triaxial geophone? That would require 3 elements (2 horizontal SM-24) - can they be sourced?

1 Like

The python code has no waits or sleeps. When you read from i2c, does it wait for the next reading before continuing? ie its however-many samples per sec (Hz), so how do you ensure you read each sample and not double-read or miss a sample?

1 Like

Why do you say you need the 3V supply for the ADC,
when the webpage for that ADS1115 says it can accept " * Wide supply range: 2.0V to 5.5V"

?

2 Likes

Hi Paul,

Welcome!

Unfortunately, we don’t have any suppliers currently stocking horizontal geophones - if you’re after a bulk QTY let us know!

I’m not too sure how Adafruit or Tim crafted the code for this one, in more modern drivers sometimes waits are added to ensure that data

Raspberry Pi’s operate on a logic level of 3.3V, the module has internal pull-up resistors to that supply voltage, so if a 5V supply was used the Pi would be damaged.

Liam

2 Likes

Hi Tim,

Thanks for your amazing tutorial! I have successfully completed this system, but I still have a question, because sometimes the vibration data was always be influeced by some mess data, so I was wondering if I can use two geophones to separate these mess data from a spatial perspective. Do you think the raspberry pi can deploy two geophones? And do you have any idea to achieve it?
Best,
Howard

1 Like

Hi @hongyue258064 - welcome to the forums.

The ADS1115 has 4 channels and each geophone requires 2 channels, so yes you can connect a separate geophone to your ADC (or even add a separate ADC with it’s own geophone to the I2C bus)

from here, you just need to duplicate the user-code to read from the second geophone using the adc.read_adc_difference() function.

Oh thanks Michael! So kind of you:)

I still have another question, I found that our default code can only read approximately 25 readings each second, but can I change some parameters to make this code read more data in a second? such like 100 or 1000 readings?

I want to use the time difference between two geophones receiving data to calculate the distance of the action, so I hope these data collection frequency can be higher. Do you have any ideas about that? Thank you:)

hi @hongyue258064 - for very precise timing you may want to consider using a microcontroller and porting this code to eg. an Arduino or otherwise.

The reason is that python is running on the Raspberry Pi OS and the timing is non-exact. You will need pretty accurate sample times to perform such a task.

In any case, some things to investigate with the current project to improve sample rate are:

  • i2c bus speed
  • remove plotting and file logging calls out of every loop. these take time.
  • sometimes using a different resolution can improve sample rate. you would have to check the ADC datasheet.

Hey Tim, I just wanted to thank you for this tutorial. I was able to set it up so easily. Today I got it working… I happened to live in a place that pretty much shakes everyday… so I thought it’d be cool to have something to detect earthquakes when they happen and thanks to your tutorial I was able to accomplish it.

I know there are more specialized systems that detect earthquakes miles away and stuff but for a home project I just wanted something simple I could play with at home and if there is ever a nearby earthquake on my place to detect it. So thank you because it works. I got it running on a Raspberry Pi 5, works wonders.

I wish I could save the graph data to Calc or to a video file… but that’s something I’ll work on set it up myself. Thank you again :pray:.

1 Like

Hi @David275402, Welcome to the Forums!!!

Glad to hear you got it all working well.

If you do get the graph data saved to Cal or a video file working it would be good to post it here so use those features too!

1 Like

Hi,

Thank you for your tutorial! It was amazing, but I encountered a problem. Why does my data look like this wave? Actually, when I run this default code, I kept myself static, I think it seems like an improper data presentation. Do you think it has any problem with my geophone, or do I need to buy a new one?

Since the wires kept breaking when I used the geophone, I re-soldered it several times, but it doesn’t seem to be reading the same data as when it was totally new. How do you think I can avoid this problem?

Thanks again!!

Best,
howard

1 Like

Hey @hongyue258064,

That output does seem a little strange. Just to confirm, are you doing anything obvious to generate those large spikes? The tutorial recommends shaking the geophone a bit to observe feedback on this graph. Does shaking it cause these spikes or are they happening on their own?

If you are worried your soldering could be causing these issues would it be possible for you to send a few photos of your hardware setup so we could give it a look over for obvious issues?

Thanks,
Sam.

Working on the Geophone project. I’ve been attempting to install the ads1x5 files for python on a fresh pi install of Bookworm with no success. I get file not found. numpy and the libatlas-base-dev went fine. Bit of a NB here. Thanks in advance.

1 Like

Hey @Ray285316, welcome to the forums!

Doing a quick check it seems like the ADS1x15 project still exists under the same name so this install command should work:
sudo pip3 install adafruit-ads1x15

Would you be able to share your specific output and command entered so we can get a better idea of what is going wrong?