Coin Sorter

May 2, 2024
Description
I accidentally deleted the other listing when I went to edit it >.<
Arduino Code: https://app.arduino.cc/sketches/667b9aaf-c7f0-41d5-893e-bff4c8cc529d?view-mode=preview
I thought this would be a fun project as the only other time IR sensors have been used is with the line following robot.
A couple notes:
- While planning out this project I miscalculated how many wires would be needed, I included 20 but realistically it needs 24 - =(
- It could really use a reset button... something I didn't think about when planning it out.
- As of this writing I haven't been able to figure out a good way to debounce the sensors - sometimes it will read more than 1 coin when only 1 coin passes because it reads too quickly >.< - working on it still but code is functional.
- I MAY relocate the sensors in the future if time permits. I just think they may work better under the track rather than in the tubes.
What you will need:
- 4 x IR Sensor Modules
- 128x32 OLED SCREEN
- Stepper Motor
- Stepper Motor Driver
- Micro (5x5) Breadboard
- 10 x M3 Bolts
- 10 x F to M Jumpers
- 14 x F to F Jumpers
- ESP32-WROOM Dev Board
Pinout:
Motor:
+ from Driver to VIN of Control Board
- from Driver to GND of Control Board
IN1 from Driver to D27 on Control Board
IN2 from Driver to D14 on Control Board
IN3 from Driver to D12 on Control Board
IN4 from Driver to D13 on Control Board
OLED:
VCC to Pin D26 on Control Board
GND to GND on Control Board
SDA to Pin D21 on Control Board
SCL to Pin D22 on Control Board
Mini Breadboard:
The way the breadboard fits into the case, rows are shared connections.
3.3v from Control Board to top row of Breadboard
GND from Control Board to bottom row of Breadboard
IR Sensors:
All VCC goes to the top row of the Breadboard
All GND goes to the bottom row of the Breadboard
Quarter Out to Pin D15 on the Control Board
Nickel Out to Pin D4 on the Control Board
Penny Out to Pin D16 on the Control Board
Dime Out to Pin D17 on the Control Board
For some reason D2 wasn't working with the sensor so I skipped it, but tried to put all the pins on the same row and next to each other.
After everything is hooked up and programmed and powered on, the sensor boards will probably be reading HIGH as if it is detecting something. There is a potentiometer on the boards, rotate them counter clockwise until the right LED turns off (when looking at it from the sensors towards the pins)
I will get a wiring diagram and video up ASAP.