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
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.
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...
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?
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.
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!