Finding the right proximity sensor and speaker

I’m fairly new to electronics but I have a project that requires lots of proximity sensors and speakers, and was wondering if anyone could recommend a suitable one.

I have a very long hallway (around 75m total length, 4m width), and I’d like to detect people’s presence in it. Where they are, sound and light will trigger (say within a 1-2m radius of the person). The sensors will probably be mounted on the ceiling/wall.

As I’m going to need quite a lot of sensors to cover this area, I’ll need something that is cost-efficient, can work for the distance and has low latency if possible. Also, a speaker that is decent enough without a huge cost. Any recommendations would be much appreciated.


Hi Monica,

Welcome to the forum :slightly_smiling_face:

There’re a few different parts to this project so I’ll start with just the motion sensing for now.
The cheapest form of motion sensor that is likely to cover up to 4 meters will be infrared sensors. These come in two main flavours: Passive InfraRed (PIR) and InfraRed breakbeak sensors.

Break beam sensors are the sort that is used on the door buzzer you see in a takeaway shop.
PIR sensors are the kind that are used in your motion sensor patio light.

I think PIR sensors might be slightly more useful for tracking someone as they hit certain points down a hallway. Adafruit have written an awesome tutorial for them that I’ll link below.

You can find both types of motion sensor on our shop here:

We have a handful of small speakers, but you will also need an amplifier of some sort to drive them, and some kind of device to send the audio to the speakers. How complex the audio setup is depends on what you need it to do, buzzers are super cheap and easy, but music or sound effects get a bit harder and as the length of the audio file and audio quality improve things get more expensive again.

Usually you’d need a microcontroller of some sort to fill the role of audio controller like an Arduino, Pico, or similar.

There is a simplified Audio FX Sound Board that doesn’t require programming to set up, but it’s less customisable than a dedicate microcontroller and separate audio amplifier system.


Thank you for your help!

1 Like

You can take a look at this too: WhatsApp Surveillance Video Camera with IR Proximity Sensor - Share Project - PCBWay
This project is based on Raspberry pi. It helps you get notified via WhatsApp with a video (mp4) and a captured first-look thumbnail image as intrusion alert when the IR sensor detects motion.


Hi Monica,

One more thing. If you’re after some larger affordable speakers, Voll audio is known for being the “bare minimum cost” speakers good enough for music or audio. You may wanna take a look if that’s what you’re after:


1 Like

Thanks James! I’ll check them out.

1 Like

Hi Monica

This is a useful audio playback device, simple to use, easy to load audio effect tracks

and as mentioned

I used this module and a Pico in my Borg Cube project as it is very straight forward to control by sending simple text strings to the MP3 player via the Pico’s UART … i.e. to play effect 1 when sensor 1 is triggered your would send this text message
to the MP3 player

(I worked on something very similar way back in 1999 using - expensive - industry distance measuring sensors, a Programmable Logic Controller (PLC), a Show Controller audio module and a rack of amplifiers for a theme park. The distance sensors were used as the owners wanted different tones played as different height patrons moved through the effect tunnel … )


p.s. Thinking through what I just said above, you could use the distance sensor I used in the Borg Cube for a similar effect ( more effect tracks and programming needed, maybe V2.0 version :crazy_face: )



That’s brilliant, thank you! I love how it links to WA.

1 Like

Thanks Murray, that’s really helpful. I will check out the speaker and distance sensor. Enjoyed reading about the Borg Cube!


Hmm as a starting point bill of materials idea … Pico, distance sensor, mp3 player (can use it’s internal amplifier), one or two Glowbit 8x8 modules or Sticks, speakers, and a power source …

Based on distance you could play appropriate sound(s) and/or colour the Glowbits. Certainly useful for prototyping / testing. Then you can ‘go bigger’ as necessary.


1 Like