Train Tracker

Once again, I am in need of knowing when trains travel nearby at the crossing of Court ST and other crossings nearby.  This time is to confirm my readings from a pressure transducer (really just like a microphone but gives out voltages) on the assumption that freight trains emit infrasounds through the air.  I’ve already confirmed they emit seismic waves through the ground.  So, it’s back to 24/7 audio recordings listening for train toots.  Here’s a current comparison of geophone activity to transducer.  You can see that a nearby heat pump compressor is causing repeated readings.

Geophone + 2 Transducers

The problem is: how do I determine when a train was nearby? I have a Raspberry Pi  which continuously records outside the bay window of my house and picks up train horns for advancing and receding trains.  The next step is to slog through 24 hours of audio recordings and identify the trains by their horns.  That’s not in my job description, but it is a task well suited for an computer using artificial intelligence models.

Previously, I have been sending myself emails when I hear a train to document the event so I have a date and time reference.

Emails To Myself

But typing on a tablet in bed is very problematic for me and it takes time, so my ability to synchronize the time exactly (all my machines on my network are within 1 second of another synchronized to satellite time).  And at 2:00 AM in the morning?  That’s asking an awful lot.

I’ve had chatGPT build a simple web page where all you have to do is push a button and it will log that you heard a train.  I’ve asked my wife to have the page open on her phone so if she hears a train horn, all she has to do click a button.

Train Logger

But “we want more” — Andreas Spiess, the man with the Swiss accent whose 500 YouTube videos have drawn me into the world of electronics. So in addition to our manually logging train events when, and if, we should hear them, I now have an automated method using computers.

Now ChatGPt and I have built a software processor which can detect train horns in a recording.  It take a couple of minutes to process an entire day’s worth of audio recordings thank to a graphics card processor I recently purchased.  Here’s an example of results for the last 26 hours:

Date & Time (PST) Event Duration Horn Score
Nov 5, 2026, 6:24:09 PM 1 2.88 s 0.305
Nov 6, 2026, 2:51:13 AM 1 0.96 s 0.284
Nov 6, 2026, 2:51:22 AM 2 2.40 s 0.367
Nov 6, 2026, 2:51:32 AM 3 0.96 s 0.463
Nov 6, 2026, 6:19:39 AM 1 0.96 s 0.122
Nov 6, 2026, 6:21:06 AM 1 0.96 s 0.105
Nov 6, 2026, 8:57:00 AM 1 0.96 s 0.212
Nov 6, 2026, 9:50:27 AM 1 0.96 s 0.204

Generated by yamnet_events_to_markdown.awk | 2026-11-06 19:29:37 PST

Maybe I can sleep better at night knowing that any loud trains will not sneak by unnoticed and then evaluated for the low frequency emissions.

This Hyperscale Sound Monitor Project has intrigued me because: I have to capture that which I cannot hear.  (Meaning low frequency “infrasound” waves below 20 Hz) That problem keeps me awake at night, so now I may be able to sleep better knowing I have a tool which can help document the presence of trains and fix them to a high precision time.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *