I have just shared content in Guides > Raspberry Pi: “Set Up a Geophone with a Raspberry Pi and an ADC (ADS1115)”
Read more
Would it be possible to replicate this (without the camera) on a Raspberry Pi Pico?
Hey mate,
You will still need an ADC hardware component to communicate the Geophone response correctly to the Raspberry Pi Pico. Having achieved that you would need to program up the system to output what you desire in the manner you desire. If all you wanted was a CSV log of the movement that gets saved to the Micro-SD Card the above script in my guide should be quite helpful. You won’t have the beautiful Raspberry Pi OS to operate/code in when you are utilising a Raspberry Pi Pico so it is a little more challenging to get a final project up and running.
Kind regards,
Tim
Thanks for the reply Tim, maybe a Zero might be more suitable for me. Cheers.
@Tim Great guide - I got it running with a zero and played around with a few control methods, great piece of kit. I’m looking to get it running on a Pico for another project - I managed to get the Adafruit library going on the pico but I am getting a ‘RuntimeError: No pull up found on SDA or SCL; check your wiring’. I tried adding a 2.2k resistor after the two GPIO pins on the pico to no affect.
However after googling I see the Pico has the ability to directly read an analogue signal - is there any reason not to wire the sm-24 to the pico and read the differential value that way? I have a bit of experience with the linux/SBC side of things but am a total novice with the microcontrollers. I see in the above comment you mention an ADC is still needed?
Hi Kevin,
Welcome to the forum
The signal output by the geophone is very low in amplitude so Tim used an ADC with a programmable gain amplifier built in to boost the signal up so the ADC could read it.
You could use the ADC built into the Pico but you’d need to add an external amplifier so the Pico could get a usable measurement.
@Trent5487676 Thanks for your reply. In that case I will stick with the ADS1115 ADC via i2c per the guide. I am wiring it identically but using the SDA/SCL pins on GP0/1 on the pico on the other side of hte board however it is giving me ‘RuntimeError: No pull up found on SDA or SCL; check your wiring’. It works without issue on the zero and from googling the ADS1115 already has onboard pullups?
I also tried adding an additional 2.2k resistor between the SDA/SCL pins and the ADS board and it gave the same error. code below just for testing, all the imports etc are working.
import board
import busio
import Adafruit_ADS1x15.ads1115 as ADS
i2c = busio.I2C(board.GP1, board.GP0)
adc = ADS(i2c)
while True:
value = adc.read_adc_difference(0, gain=GAIN)
print(value)
Heyya Kevin,
Does seem like something weird is going on. The ADS1115 definitely does already have pull-up resistors. It may have something to do with the Adafruit_ADS1x15 Package doesn’t have the functionality required to operate with a Raspberry Pi Pico.
I discovered this Package for using Texas Instrument ADS1115 analog-to-digital converter with the Raspberry Pi Pico which should help hugely - GitHub - antgon/pico-ads1115: A C library for using Texas Instrument ADS1115 analog-to-digital converter with the Raspberry Pi Pico
I also discovered this quite seriously in-depth video about making ADS1115 work with Raspberry Pi Pico. He is taking two Analogue inputs (from joysticks) to the ADS1115 board and then being read by a Pico - Raspberry pi pico [ADS1115 MicroPython Driver] From scratch Part 2 - YouTube
Hopefully, that information will be all you need to get your Geophone and Raspberry Pi Pico Project off the ground really looking forward to seeing it work.
Kind regards,
Tim
Hello all,
maybe there is something missing ?
I built all up as shown in the YT Video, but headless.
I installed all the links on a fresh RasPi Debian with user Pi.
I get this Error:
Traceback (most recent call last):
File "Differential-Data-Collect-Gain.py", line 3, in <module>
import Adafruit_ADS1x15
ImportError: No module named Adafruit_ADS1x15
I installed i2c-tools and my ADS was found ad address 0x48.
Maybe someone could give me a clue ?
Edit:
I got it working with:
Phyton3 Differential-Data-Collect-Gain.py
Now another Question:
I want to have a portable System, just to walk down the street.
For that I just want to use a SPI 1.8" Display “Model: SBC-LCD01”
How have I to modify the code to draw / print the Graph on the SPI Display ?
Thanks!
Kind Regards
Atratus
Hi guys! I’m new to the forum, and to the world of Raspberry Pi, so I could definitely use some help.
I am working on an art installation that uses a geophone as a trigger for sound. Is there a way to create a script that will let the geo phone trigger pre-made .wav files instead of triggering a camera?
Hey Stef,
That sounds like a brilliant idea! And it is definitely possible to customise the photo-geophone script to instead play sounds.
A great Python Package that would work for you is | pygame |.
A basic script to make | pygame | to run a .wav file would look something like below.
import pygame
pygame.mixer.init()
pygame.mixer.music.load("YOUR_FILE.wav")
pygame.mixer.music.play()
while pygame.mixer.music.get_busy() == True:
continue
The fun part comes in by adding those lines of code appropriately into the photo-geophone script to make it play your sounds (instead of taking a photo) once the threshold is reached.
I hope this helps
Kind regards,
Tim
That worked wonders! Thank you so much @Tim, you’re a gem!
Does anyone here have any experience using the SM24 geo-home directly as a microphone for say a ZOOM recorder or something similar? If so: how would one hook it up? Could I just attach a minijack cable to the + and - points at the Geophone?
Hey Stef,
I absolutely love this idea! From my quick research it looks like people have done this with a geophone called LOM Geofón. https://www.robbieeliassound.com/post/lom-geofón-field-recording-experiments
I see no reason why it couldn’t be done with the SM24. We have this forum topic here but it didn’t lead anywhere of huge value - Geophone SM -24 connect to ZOOM H5 digital recorder
Ill pop your forum post around and see what others have to contribute.
Kind regards and thanks for your kind words,
Tim
Hi Stef,
The geophone is really just a passive microphone with no internal amplification so you’ll probably need some form of pre-amplifier to get meaningful signal output for any device you use it with unless your device of choice is designed for passive microphone input.
This is handled in Tim’s guide using the amplifier built into the ADC, to boost the signal up to a useful level before conversion.
If you really wanted to optimise your signal measurement you’d want to match your device input impedance to the impedance of the geophone. There are a few details on its impedance characteristics on the datasheet, but it gets into deep-level audio design fast. For most users, Tim’s setup is a good balance of complexity and performance.
Dear all,
It’s been a while, but since your help earlier this year I have embedded the geophone in a new installation I made whilst on residency in Taiwan. You can find more information about the work, Soil Dogs, here
Now I’m invited by a dutch museum to set it up there, and I bought a new Raspberry Pi for the occasion. Unfortunately, after going through all the installation steps, both Thonny and Geanny give me an error along the following lines:
pygame 1.9.6
Hello from the pygame community. Contribute - pygame wiki
Traceback (most recent call last):
File “/home/stefveldhuis/Desktop/SoilDogs.py”, line 25, in
adc = Adafruit_ADS1x15.ADS1115(address=0x48, busnum=1)
File “/usr/local/lib/python3.9/dist-packages/Adafruit_ADS1x15/ADS1x15.py”, line 319, in init
super(ADS1115, self).init(*args, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/Adafruit_ADS1x15/ADS1x15.py”, line 82, in init
self._device = i2c.get_i2c_device(address, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/I2C.py”, line 64, in get_i2c_device
return Device(address, busnum, i2c_interface, **kwargs)
File “/usr/local/lib/python3.9/dist-packages/Adafruit_GPIO/I2C.py”, line 97, in init
self._bus = Adafruit_PureIO.smbus.SMBus(busnum)
File “/usr/local/lib/python3.9/dist-packages/Adafruit_PureIO/smbus.py”, line 114, in init
self.open(bus)
File “/usr/local/lib/python3.9/dist-packages/Adafruit_PureIO/smbus.py”, line 140, in open
self._device = open(f"/dev/i2c-{bus}", “r+b”, buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: ‘/dev/i2c-1’
My code is similar to the one you made, with tweaks here and there to customise it to my needs.
How can I fix this problem? I have tried reinstalling everything, but to no avail.
Kindest regards as always,
Stef
Hey Stef,
It looks like there is an error there with you i2c interface and the file or directory ‘/dev/i2c-1’ cannot be found.
One possible solution is to check if the necessary kernel module is loaded by running the following command in the terminal:
sudo modprobe i2c-dev
Another possibility is that the I2C interface on your system is not enabled by default. To enable it, follow the instructions in this guide.
Give those a go and see if it helps resolve any issues, if not there may be some more steps we can take to figure out what’s going on.
Cheers,
Blayden
That did it Blayden! Works like a charm now. Thank you very much!
Thanks a lot for your lovely tutorial! It helps a lot!
I’m new to this field and have questions need your kind help.
I plan to deploy like 4 to 5 geophone in my room and get wave graph from each. It seems uneconomical to buy 5 RPi to implement them. Is it possible to use wireless communication module (eg, radio, wifi, IoT) instead of wired connection between geophones and RPi? Do you have tutorial?
Thanks!
@Tim Hi, Tim. Could I have a chance to get my question answered? Is it feasible to connect RPi and several geophones through wireless communication?
Thanks~~~
Hello
My name is Masoud and my work is exploratory geophysics. I saw your nice program about using geophone and making a simple seismograph and it was very nice. My question to you is how to increase the number of channels of this seismograph so that a seismic wave can be observed with it. That is, he observed several seismic signals in one record.
Thanks