Project to detect humming sound on railway tracks

Hi , there is a humming sound heard on the railway track long before train approaches

Link to Proof:

I plan to detect that sound and warn people using arduino as my processor .

I decided to use a sound card ( 24-bit adc , preamplifed ) fitted with a microphone to capture the sound , then feed it to arduino.

Now I have some questions , ( I will feel great if someone gives me a heads up on these ):

  1. What sort of sound card should I buy? (Creative soundblaster etc) [Someone suggested shields called shifty VU shields made by macetech but they severely distort the sound I am dealing with . ]

  2. I could not find any project related to connecting sound card to arduino in this forum . Since I am inexperienced any help/link in this matter will be great .

  3. Should I take a FFT of the signal and concentrate on the amplitude of a particular(resonant frequency of the rail bars) or should I use a differential amplifier and deal with the general amplitude of time domain ( i.e no FFT) only ?

Why would you use a sound card at all?

I'd suggest a simple transistor or opamp amplifier with a piezo or condenser microphone. The Arduino is more than fast enough for realtime FFT (google 8 bit Integer FFT for the library I "created" from code from the forums).

There's no need to have a computer involved at all...

Link to Proof:

I plan to detect that sound and warn people using arduino as my processor .

That "proof" appears to be mostly speculative chat based on something seen in a movie although it has some merit. You probably could hack a $10 gizmo like below easier. If people need to be "warned", they are probably tresspassing on the railroad right of way.

That "proof" appears to be mostly speculative chat based on something seen in a movie although it has some merit.

Yea, I think I saw that movie as a youth. Friendly Indian scout puts ear to RR rail and tells hero cowboy "train 8 mile away, be here soon". :D


@retro Do you mean to say that the statement "the resonance produced by what equates to thousands of feet per second of tempered steel on tempered steel produces a harmonic effect which can be detected for miles and miles of track" is speculative? How can it not be true, it's right there on the internet.

I never knew this part either: "Passenger trains usually give less warning for some reason, probably because they are so much lighter." And I always thought that it was because of their higher speed.


I myself have heard the sound . It gives you a 15-45 secs of getaway time . The device was suggested by a filmmaking unit who shot around and on tracks (with permission) to warn them about approaching trains . It would be also useful in heavy forested areas with a bend and then a crossing in front of it where the guy probably won't hear the train honk due to tall pine trees and the bend . So if I get this device to flash a warning when it picks up train vibrations , it will make the situation safer for these guys .

I think just amplifying the sound to a loudspeaker would be enough - the ambient sound level will be low compared to the vibrations of a train. Note this probably works best with continuous welded track where the longitudinal wave is unimpeded by joiner plates.

There are special microphones for picking up vibrations in a solid (rather than air), might be the most sensitive.

I agree with a previous poster - this is unlikely to be legal unless its your model railway!

So basically what I should do is connect a contact microphone to a mic preamp and then connect the setup to analog input pin of arduino mega board instead of using a sound card and then connecting the usb port/serial port of the sound card to usb/UART communicaton ports of arduino .. right ??

any help regarding whether I should detect a pattern in the sound or level??

my professor insisted on using a sound card and arduino.

I clarified with my professor and he says that we need a higher resolution adc to get the sound .

thats why he was insisting on the sound card .. but the sRam on arduino may not be able to handle a 24 bit sound card (even at low sampling freqs).

the onboard 10 bit is not suffice.

so he asked to find out whether there are >10bit (16-20) low noise adc s that can do the job , also the sampling frequency should be programmable i.e changeable.

any help on that ?

Wouldn't it be simpler to just teach the tracks the lyrics? :stuck_out_tongue_closed_eyes:

In my opinion, interfacing to a sound card with anything but a PC is going to be a larger project than everything else combined. The tail will be wagging the dog.

If the 10 bit resolution of the ADC is the real issue, go with a stand alone ADC chip with higher resolution or go to something like the maple that has a higher resolution ADC built in. (2 more bits may not be enough, but it is more.)

As soon as you start working with ADC solutions much higher than 10 bits, noise will be a big problem. Expect to spend a lot of time designing and re-designing wiring and board layout to get rid of noise.

Good luck with your project.

It seems your biggest problem is that you have no idea what the sound is like when the train approaches. It's not entirely an engineering problem, it's a scientific problem.

The easiest thing to do is to get a recording any way you can. The easiest would be to buy a guitar pickup, feed into a pre-amp, and record it onto something (tape recorder, mp3 recorder, etc).

Download the audio and look at in something like audacity. LISTEN to it. See if you can spot frequencies or patterns. This might be a doppler effect, or a repeating clanking as the train moves past joints. The doppler effect would very nice as you could tell if it was coming or going, and that it is moving sufficiently fast that a warning would even be necessary. I would hope no one would get hit by a train that was moving 1mph.

Then, you can start engineering, and likely not need much sophisticated hardware to do it.

If you can't hear it yourself, then it's unlikely that you will figure out an engineering approach that will work.

Ask your prof if he is proposing to directly connect the soundcard to the arduino. If he says yes, seriously consider finding a new college.