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 is used to control and interface with the various components.
Component List
Multi Coin Acceptor
- Pins: COIN, DC12V, GND, COUNTER
- Description: Accepts multiple types of coins and provides signals for coin detection and counting.
Coin Hopper
- Pins: VCC, SIGNAL, GND, P, N
- Description: Dispenses coins and provides signals for coin dispensing.
12V 5Ah Battery
- Pins: 12v +, 12v -
- Description: Provides 12V power supply to the circuit.
AC Wall Plug Point
- Pins: E, N, L
- Description: Connects to the AC mains supply.
Thermal Printer
- Pins: RX, TX, +, -
- Description: Prints receipts and other information.
Buck Converter
- Pins: IN+, IN-, OUT+, OUT-
- Description: Steps down the voltage from 12V to a lower voltage required by some components.
TFT LCD Display ST7735S
- Pins: Vcc, GND, CS, RESET, A0, SDA, SCK, LED
- Description: Displays information and user interface.
ESP32 (30 pin)
- 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
- Description: Microcontroller used to control and interface with the various components.
Money Acceptor
- Pins: DC12V, GND, SIGNAL GND, SIGNAL, IN-, IN+
- Description: Accepts money and provides signals for money detection.
Bill Dispenser
- Pins: GND, SIGNAL GND, SIGNAL, IN+, IN-, DC 12V
- Description: Dispenses bills and provides signals for bill dispensing.
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 L
- N: Connected to AC Wall Plug Point N
12V 5Ah Battery
- 12v +: Connected to Money Acceptor DC12V, Money Acceptor IN+, Buck Converter IN+, Bill Dispenser DC 12V, Thermal Printer +, Multi Coin Acceptor DC12V
- 12v -: Connected to common ground
AC Wall Plug Point
- E: Not connected
- N: Connected to Coin Hopper N
- L: Connected to Coin Hopper P
Thermal Printer
- RX: Connected to ESP32 TX0
- TX: Connected to ESP32 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 ESP32 Vin, Bill Dispenser IN+
- 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 Coin Hopper VCC, TFT LCD Display Vcc, TFT LCD Display LED
- GND: Connected to common ground
- Vin: Connected to Buck Converter OUT+
- D27: Connected to Multi Coin Acceptor COIN
- D14: Connected to Multi Coin Acceptor COUNTER
- TX0: Connected to Thermal Printer RX
- RX0: Connected to Thermal Printer TX
- D19: Connected to Coin Hopper SIGNAL, Money Acceptor SIGNAL, Bill Dispenser SIGNAL
- D5: Connected to TFT LCD Display CS
- D4: Connected to TFT LCD Display RESET
- D2: Connected to TFT LCD Display A0
- D23: Connected to TFT LCD Display SDA
- D18: Connected to TFT LCD Display SCK
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 Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
12V 5Ah Battery Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
ESP32 Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This documentation provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code for the microcontrollers used in the circuit.