ESP32-Based Coin and Bill Acceptor with TFT Display and Thermal Printer
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to interface various components including a Multi Coin Acceptor, Coin Hopper, 12V Battery, AC Wall Plug Point, Thermal Printer, Buck Converter, TFT LCD Display, ESP32 microcontroller, Money Acceptor, and Bill Dispenser. The circuit is powered by a 12V battery and includes a buck converter to step down the voltage for components requiring lower voltage levels. The ESP32 microcontroller serves as the central control unit, interfacing with the display, coin acceptor, printer, and other peripherals.
Component List
Multi Coin Acceptor
- Description: Accepts multiple types of coins and provides a signal for each accepted coin.
- Pins: COIN, DC12V, GND, COUNTER
Coin Hopper
- Description: Dispenses coins when triggered.
- Pins: VCC, SIGNAL, GND, P, N
12V 5Ah Battery
- Description: Provides 12V power supply to the circuit.
- Pins: 12v +, 12v -
AC Wall Plug Point
- Description: Provides AC power input.
- Pins: E, N, L
Thermal Printer
- Description: Prints receipts or other information.
- Pins: RX, TX, +, -
Buck Converter
- Description: Steps down voltage from 12V to a lower voltage.
- Pins: IN+, IN-, OUT+, OUT-
TFT LCD Display ST7735S
- Description: Displays information to the user.
- Pins: Vcc, GND, CS, RESET, A0, SDA, SCK, LED
ESP32 (30 pin)
- Description: Microcontroller unit for controlling the circuit.
- Pins: EN, VP, VN, D34, D35, D32, D33, D25, D26, D27, D14, D12, D13, GND, Vin, D23, D22, TX0, RX0, D21, D19, D18, D5, TX2, RX2, D4, D2, D15, 3V3
Money Acceptor
- Description: Accepts paper money and provides a signal for each accepted bill.
- Pins: DC12V, GND, SIGNAL GND, SIGNAL, IN-, IN+
Bill Dispenser
- Description: Dispenses bills when triggered.
- Pins: GND, SIGNAL GND, SIGNAL, IN+, IN-, DC 12V
Wiring Details
Multi Coin Acceptor
- COIN: Connected to ESP32 pin D27
- DC12V: Connected to 12V Battery 12v +
- GND: Connected to common ground
- COUNTER: Connected to ESP32 pin D14
Coin Hopper
- VCC: Connected to ESP32 pin 3V3
- SIGNAL: Connected to ESP32 pin D19
- GND: Connected to common ground
- P: Connected to AC Wall Plug Point pin L
- N: Connected to AC Wall Plug Point pin N
12V 5Ah Battery
- 12v +: Connected to Bill Dispenser DC 12V, Buck Converter IN+, Thermal Printer +, Money Acceptor DC12V, Money Acceptor IN+, Multi Coin Acceptor DC12V
- 12v -: Connected to common ground
AC Wall Plug Point
- E: Not connected
- N: Connected to Coin Hopper pin N
- L: Connected to Coin Hopper pin P
Thermal Printer
- RX: Connected to ESP32 pin TX0
- TX: Connected to ESP32 pin RX0
- +: Connected to 12V Battery 12v +
- -: Connected to common ground
Buck Converter
- IN+: Connected to 12V Battery 12v +
- IN-: Connected to common ground
- OUT+: Connected to Bill Dispenser IN+, ESP32 Vin
- OUT-: Connected to common ground
TFT LCD Display ST7735S
- Vcc: Connected to ESP32 pin 3V3
- GND: Connected to common ground
- CS: Connected to ESP32 pin D5
- RESET: Connected to ESP32 pin D4
- A0: Connected to ESP32 pin D2
- SDA: Connected to ESP32 pin D23
- SCK: Connected to ESP32 pin D18
- LED: Connected to ESP32 pin 3V3
ESP32 (30 pin)
- 3V3: Connected to TFT LCD Display Vcc, TFT LCD Display LED, Coin Hopper VCC
- GND: Connected to common ground
- Vin: Connected to Buck Converter OUT+
- D2: Connected to TFT LCD Display A0
- D4: Connected to TFT LCD Display RESET
- D5: Connected to TFT LCD Display CS
- D14: Connected to Multi Coin Acceptor COUNTER
- D18: Connected to TFT LCD Display SCK
- D19: Connected to Bill Dispenser SIGNAL, Coin Hopper SIGNAL, Money Acceptor SIGNAL
- D23: Connected to TFT LCD Display SDA
- D27: Connected to Multi Coin Acceptor COIN
- TX0: Connected to Thermal Printer RX
- RX0: Connected to Thermal Printer TX
Money Acceptor
- DC12V: Connected to 12V Battery 12v +
- GND: Connected to common ground
- SIGNAL GND: Connected to common ground
- SIGNAL: Connected to ESP32 pin D19
- IN-: Connected to common ground
- IN+: Connected to 12V Battery 12v +
Bill Dispenser
- GND: Connected to common ground
- SIGNAL GND: Connected to common ground
- SIGNAL: Connected to ESP32 pin D19
- IN+: Connected to Buck Converter OUT+
- IN-: Connected to common ground
- DC 12V: Connected to 12V Battery 12v +
Documented Code
Multi Coin Acceptor
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
12V 5Ah Battery
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
ESP32 (30 pin)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This document provides a comprehensive overview of the circuit, including a detailed component list, wiring details, and documented code for the microcontrollers used in the circuit.