I've built a penny pusher for my daughter - this is her playing it the other night... I still have a lot of work to do!! http://youtu.be/eqOI4IMVRlQ
I've also purchased a 10p hopper and cheap coin validator mechanism and used the arduino to make a change machine. Paul, this is where both interrupts are being used.
I know now how I'm going to dump the coins using a stepper motor but this thread is about counting the coins falling into the box. The coins will be funnelled into the box so will always have to pass past the led and sensor if I went that way. I'm just still in two minds whether to pay the £12 and go for the mechanical option. With all those LEDs flashing in the background, I'm not sure how stable the opto sensor would be!
Quote from: craynerd on Sep 21, 2013, 08:46 amI've also purchased a 10p hopper and cheap coin validator mechanism and used the arduino to make a change machine. Paul, this is where both interrupts are being used.But that is my point. Why? Why make the code unnecessarily complicated and potentially unreliable (particularly when you need to perform de-bouncing which I am not sure whether that is provided by the coin counter mechanism) when there is absolutely no need whatsoever to use interrupts?
I'm not at all with you??? How do I read the coin validator pulses and coin hopper coin ejection pulses accurately without using the interrupts?? Confused.
I'm also confused how this working function of the machine is having any impact on this coin fall count we are discussing.
A coin falling past a detector is a lifetime to a 16MHz processor and interrupts should not be needed.
I like one poster's idea to use the coin itself as the switch. Use two long, thin pieces of springy copper on either side of the coin slide and detect the short circuit made by the coin.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16