HC-SR04 triggering Audio Player

  1. I am 66 and just getting back into the model railroad hobby. My electronics background dates back 48 years. My coding skills are minimal at best.

  2. My goal is to have a sound file start when viewers approach a model train module and stop when they move out of the area.

  3. I was initially looking at using an Arduino, HC-SR04 Ultrasonic Distance Sensor Module, a DF Player, and speakers.

  4. Would it be possible to have one of your audio players, such as the Little Soundie, activated by the HC-SR04 sensor?

  5. If so, what products would you recommend for me to be able to accomplish my goal?

  6. Any suggestions/recommendations will be greatly appreciated. I realize this is likely a very simple project to a techie but my skills are currently struggling with it.

Yes, that would be possible.

You’d need a micro controller like an Arduino to read what the HC-SR04 is sensing and then the micro controller could send a trigger to your audio board. You will have to write a little program for the micro controller to do all this.

Here are the major parts you would need, you will also need whatever wires and miscellaneous parts needed to connect these parts together.

  • - [Arduino Uno
  • - [[HC-SR04](https://www.sparkfun.com/products/15569)
  • - Audio board. ([[Little Soundie](https://www.sparkfun.com/products/14006), [[Papa Soundie](https://www.sparkfun.com/products/14554), [[Qwiic MP3 Trigger](https://www.sparkfun.com/products/16892) or [[WAV Trigger](https://www.sparkfun.com/products/13660))
  • [/list]](https://www.sparkfun.com/products/13660)](https://www.sparkfun.com/products/16892)](https://www.sparkfun.com/products/14554)](https://www.sparkfun.com/products/14006)](https://www.sparkfun.com/products/15569)](https://www.sparkfun.com/products/11021)