Sensor recommendation for small enclosed box — hand detection project

Hi all,

I'm working on a DIY project and looking for sensor advice.

A small box with a sensor inside. When a hand is present inside the box, a song plays (via DFPlayer Mini or similar + small speaker). The trigger is the hand being inside.

The box suppose to be sealed on 3 sides — only one open side

Relatively small internal space Powered by a 5V USB charger

Microcontroller: probably arduino nano

I'm not sure yet whether I will use: binary data - hand present / not present or continuous — distance or position data (useful if I later connect to a PC for further processing)

I'd love a sensor that could potentially support both use cases..

I'm considering HC-SR04 (ultrasonic), TCRT5000 (IR reflective), or a capacitive touch sensor — but I'm not sure which is best suited for a confined, enclosed space like this.

p.s - another sensor that might be good(?) is this one: GP2Y0A51SK0F

What would you recommend?

Thanks in advance!

you probably need to try different sensors looking a sensitivity/cost/easy of use, etc
e.g. what about a HLK-LD2410B+BLE 24Ghz Human Presence Body Induction Distance Detection Radar Sensor Module support GPIO and UART?

The sensor you shared gives only binary output, right? in that case I might prefer continuous data

How small?
Dimensions?

I don't have the exact dimension but it will probably be 25cm - 40cm long and 15cm - 25cm wide. the arduino and electronics will placed on a layer below the box

PIR?
No problems with ambient light.
I have one in front of me now, one of those common modules. on eBay etc.
Reacts reliably to hand gestures at centimetre range.
Just shield to avoid unwanted detection.
For reliability, maybe use two technologies.

  • You might want to investigate using a simple light beam break circuit.

Would also recommend PIR. Easy to use and will only respond to motion from a warm body.

Why don't you explain what are you actually after? Position data of a hand in a small box sounds pretty exotic..
Beam break is likely most reliable/easy/cheap, but it detects any object. PIR is better for a hand, but obviously detects foot as well...

Would use an array of PIR sensors so it can detect how far the hand goes in.
And they are fast.

ultrasound might have interference due to reflections in the box.

my 2 cents

the basis idea is very simple - a person hand goes inside a box - a sound is playing - hand is out - no sound. This is the basic.

further thought is to use a continus data of how deep the hand is inside the box in order to control other parameters of soud such as volume or to fade in and out a LED.

assuming both type of data needed - what will be the best sensor for the above?

I would go with multiple beam breaks. Or multiple PIR if only heat sources should be detected.

multiple beams will give me only binary data in different places - those value can be translated to smooth/continuous numbers?

You provided width and length but not height.
What is height of box?
What is box made of?
Is there anything else in the box?

I will know exactly later on but for the moment I could dsay that the hight will be 10cm - 15cm

It will probably 3D printed so PLA

no that I can think of (apart of the sensor) - arduino will be seatted below

Hopefully, the box is at hand level, and not on the floor.
These days, tying shoe laces is a gymnastic/yoga contortion.
Some well placed tape could solve the foot problem.

After some thought I think I would like to integrate a camera so it could also scan the hand to imitate Medical scan. Which camera I should look into?

the idea is to integrate it with web page to display the hand scan

What's the budget?

How close will the hand be to the camera? Have you found possible cameras that will work for you? Do not ask the forum people to do your research for you!

I looked into that camera OV5640 along side with ESP32-CAM board

How close will the hand be to the camera?

around 10 cm