![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhderLSV2O8l5j_Ozh_LyMZGcS9I6JUlKbff6NHIqYGB8SMMIk0yP0z6mWom7cUyFG05qPQ8CqxbO_44yi3p_VNv7ce51Q53zd1ht7kQNzWMD1lDbEXupdT12VLUIhSbR1RoG7yEbBrrFk/s400/WP_000329.jpg)
I decided to use a photoresistor as a "coin detector". When the arduino is powered up, it will go through a calibration state. During this phase, the arduino will be recording the light intensity for about 5 seconds and after that, it will calculate the average light intensity. Finally, the arduino will now accept coins. Once coin is inserted, the light intensity will change. This is a very basic way of detecting a coin.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghgVjghfl9DYU5cZKQ8okX-GZHhDQDuha_7u5VZEO8E-Ra2a2_LMQJwSHie4GX3nUDMyH8Am0fLassbNm-0igWMYeoblPP1jKM3hKFfp8vn5Nw4TTtQP1zGHwx1_Xk3mUzj5k-5bWGbpg/s320/WP_000332.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixcbPcUWqxG4llVF2CvMSPH1wapOOIbNtJgmId_J34eUK5FXDQEWPbWh7YbevdHcwQ7bi0LV777QUsh1xsFEaD-NYcwD16z-FsaLvsChX1D7qxYZNEATnvR4ZznLu0qUz8Wg1nWPjjN-M/s320/WP_000330.jpg)
Once the state has been determined, simply insert the coin and your deposit will be incremented by the amount specified.
features:
- 5 buttons (5 cent, 10 cent, 25 cent, 1 dollar, 2 dollar)
- 5 LED's will represent each button to identify the current state
- current balance will be displayed on LCD
- savings will be recorded and saved (unless the power is turned off)
- a photoresistor will be used as a coin detector
Parts:
- 5x red LEDs
- 5x 330 ohm resistor
- 5x pushbuttons
- 6x 10k ohm resistor
- 1x photoresistor
- 1x RGB LCD (16 x 2)
- 1x 10k potentiometer
Using a photoreisstor as a coin detector can cause some problems. For example, suppose the arduino is running its calibration in a very bright room. When the calibration period is over, turning off the lights will confuse the arduino and it will think that a coin is constantly being inserted. This is because the arduino is comparing the average light intensity during the calibration period with the current light intensity. When there is a significant difference between these light intensities, the balance will be incremented.
CAN you send me The Arduino Code please?
ReplyDeleteEduardAguilar03@gmail.com
can u send me the code?
ReplyDeleteI want to code now , please.
ReplyDeleteautcharakham@gmail.com