กลับไปหน้ารวมไฟล์
coin-detector-and-amount-counter-5ff8aa-en.md

High-Velocity Optical Interrupts: Coin Sorter

If you drop a coin through a plastic slot, it travels incredibly fast. The Coin Detector and Amount Counter completely abandons mechanical switches (which will misfire or jam) and depends entirely upon IR Obstacle Avoidance Transceivers acting as invisible trip-wires. The Arduino mathematics must track which specific trip-wire in the vertical assembly broke, adding specific monetary integers to an accumulated matrix rendered dynamically out to a massive I2C LCD billboard!

button_led_basic_interaction_1772681969235.png

The Multi-Array Photodiode Drop (The "Gate" System)

A physical 3D-printed or cardboard maze dynamically forces quarters, dimes, and nickels into completely separate vertical shafts based entirely on their physical metal diameter!

  1. The Arduino does not sort. Gravity and the 3D-shape sort!
  2. Shaft 1 (Quarters) has IR_Sensor_A.
  3. Shaft 2 (Nickels) has IR_Sensor_B.
  4. The Falling Action: When a quarter plummets through Shaft 1, it physically blocks the IR light for massive fraction of a second (5V pin drops to LOW).

Eliminating The Multi-Coin Register Bounces

Because the coin spins as it drops, it might accidentally trigger the sensitive photodiode three times in a single 20-millisecond drop, artificially turning one $0.25 into $0.75!

  • The Execution Trap: You must enact a massive logic Lockout Cooldown algorithm!
if (digitalRead(QuarterIRPin) == LOW && (millis() - lastQuarterTime > 200)) { 
  // It only registers IF the last quarter was at least 200 milliseconds ago!
  totalBank += 0.25; 
  lastQuarterTime = millis(); // Extremely crucial! Reset the physical timer lock!

  lcd.setCursor(0, 0);
  lcd.print("Total Bank: $"); 
  lcd.print(totalBank); // Dynamically render the new integer math!
}
  • By cascading if-statements mapped uniquely across 3 separate IR sensor gates, the Uno operates as a flawless, incredibly fast casino sorting mechanic!

Financial Hardware Architecture

  • Arduino Uno/Nano (Standard execution speeds are perfectly sufficient).
  • Three TCRT5000 or generic IR Obstacle Avoidance Modules (Strictly aligned facing directly across the falling coin chutes).
  • Standard 16x2 I2C Display (For live monetary telemetry outputs).
  • A precision CNC'd or 3D-Printed Coin Sorting mechanism (The Uno code is completely useless if the mechanical slide fails to size the coins structurally correctly before they hit the optical thresholds!).

ข้อมูล Frontmatter ดั้งเดิม

title: "Coin Detector and Amount Counter"
description: "High-speed kinematic sensor arrays! Execute flawless mechanical hardware debouncing logic, tracking explicitly fast-falling physical metallic disks cutting dual-IR optical gates to sort mass and velocity natively."
category: "Tools & Equipment"
difficulty: "Intermediate"