I’m looking to make a piggy bank that makes a sound when you put a coin in for a gift. I’ve got the sound module and speaker already but just wondering what the best way to trigger the module is. The obvious answer would be a limit/Microswitch but I can’t get it to work it’s quite inconsistent. I thought this may have been done before but couldn’t see anything via the search option. I’m open to any suggestions or ideas.
What is the size of your piggy bank?
i.e. How much room do we have to put in a sensor?
For instance, Is there any room inside the coin slit for a beam break sensor like this?
I can also think of a few different ways of doing this as well that might start overcomplicating this involving different types of sensors but they’d likely be less reliable than a simple beam break.
There are different size and shapes for the slot part.
In short you power the “IR LED” then the coin would break the beam.
You would need to shop around to find the best size/shape and beam location in the sensor to match your setup such that the coin would always break the beam.
Hi Michael. Thanks for that. That option also seems feasible. But excuse poor understanding but would you just cut a slot in the bottom of the “ U piece” so the coin could go through?
That is certainly one option but that is also what is keeping the beam alligned with the detector.
This one is the same type of sensor with a slot a bit wider (0.2mm) than a $2 coin. With the tolerances on the drawing, it could end up on the smaller side.
If you’re searching through DigiKey there are many different photointerrupters in stock and you can optimise your search with a sensing distance. Just check the datasheets to make sure that it isn’t too large to fit into your piggy bank.
there are a few ways and options, just need to ensure it works in your case.
But in short it would mount sideways.
Sorry for my very rough image…
But something like this… box with slot, Just under the slot (inside the box), you place the sensor (red) with the wires going back to the controller/sound board etc.
then as the coin (orange) is dropped it cuts the senor/beam.
Note: The challenge is the size of the coin (slot) v the bit of the beam that needs to be cut; so checking actual specs will be important. e.g. you could have a small coin miss the beam cut while bigger ones work.
there are designs for the slot that can also deal with it.
e.g. Coin drops onto a ramp, then “rolls” past the sensor.
so maybe some cad work and a 3d print ?
So just some idea that may or may not work in your use case.