My project is a piggy bank that plays a sound when a coin is inserted through the slot. I have tried a PIR motion sensor but it ignores metal and seems too slow in response. I'm thinking maybe a sensor that will detect an interrupt (ie. light, magetic field?) as the coin passes by.?
An LDR (light dependent resistor) is very easy to use and should work, with some fiddling. Google "arduino ldr" for lots of ideas on how to use them.
LDR, or photodiode, or break beam sensor (there are some that are used with encoder discs in toy robot kits, like this). They will all see a coin rolling through, regardless of the material as long as it is not transparent to IR.
Inductive and capacitive sensors can also detect a passing piece of metal, but not plastic coins.
Pull apart an old printer. There's lots of great sensors inside them. Look for the ones that detect if the paper has reached a position (or the paper runs out.) They will often be a little "fork" with two arms sticking up from the PCB about 10-20mm. There's an LED on one side and a phototransistor or other light detector on the other side.
With a little work following the PCB traces, it should not be too hard to work out which side is which. If the printer is operable then you can measure the voltages when there is or isn't something in the slot.
Sorry to resurrect an old thread but my project is exactly the same. I have a Yoshi piggybank and I want it to make yoshi sounds when a coin is inserted. I am totally new to programming and arduino. My original plan was to get one of those programmable sound greeting cards but I want to connect a breakbeam sensor or possibly one of the other sensors you guys talked about to make it read the coin. If anyone has time to walk me through setting it up please let me know.
Simple microswitch is another option, one with around 30mm long operating arm.
Not as plentiful these days in disposed electronic gear.
Plenty of slot type opto switches in old printers and the like though.
No need for any debounce then.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.