Arduino Code and Diagram Review

Wire J1 to U1 VIN and GND, place it at the board edge, route, and run final DRC.
I’ll wire J1 to VIN/GND, move it to the board edge for access, then attempt routing and run final checks.
Wired J1 pin 1 → VIN and J1 pin 2 → GND, placed J1 at the lower-left board edge, and ran the auto-router successfully; the route check now reports nothing left to route.
Open items:
  • ERC is clean.
  • DRC is not clean: it still reports route-geometry issues — airwire/trace, dangling-trace, and overlapping-copper errors — even though the router says all nets are routed.
  • The board should not be sent to fabrication until those DRC route errors are resolved.
Suggested next steps:
  1. Ask me to do a DRC cleanup pass on the routed traces.
  2. If cleanup is stubborn, re-place U1/U2/DS1 with more spacing and re-route.
  3. After DRC is clean, export Gerbers/BOM for manufacturing.
Clean DRC and export
Fix DRC errors
Re-place and reroute
Export after clean
Review current risks
DS1
U1
R3 P2 - DS1 C
J1 1 - U1 VIN
U1 IO18 - U2 SRCLK
U1 IO23 - U2 SER
U2 QD - R4 P1
U2 QB - R2 P1
U1 IO23 - U2 SER
R6 P2 - DS1 F
U2 SRCLR - C1 P1
U1 IO5 - U2 RCLK
U1 GPIO12 - DS1 GND 2
U1 GPIO33 - SW2 1-1
U2 QA - R1 P1
U1 GPIO32 - SW1 1-1
U1 GPIO27 - DS1 GND 4
U1 3.3V - U2 VCC
R5 P2 - DS1 E
U1 GPIO27 - DS1 GND 4
U2 QE - R5 P1
U2 QB - R2 P1
R7 P2 - DS1 G
R3 P2 - DS1 C
U1 IO18 - U2 SRCLK
R4 P2 - DS1 D
U2 QF - R6 P1
R5 P2 - DS1 E
U1 IO5 - U2 RCLK
R8 P2 - DS1 DP
R2 P2 - DS1 B
U2 QC - R3 P1
U1 GPIO14 - DS1 GND 3
R1 P2 - DS1 A
U1 GPIO14 - DS1 GND 3
U2 QA - R1 P1
J1 1 - U1 VIN
U2 QD - R4 P1
U2 SRCLR - C1 P1
R4 P2 - DS1 D
U2 QE - R5 P1
U1 GPIO25 - SW3 1-1
R2 P2 - DS1 B
U1 GPIO12 - DS1 GND 2
U1 GPIO32 - SW1 1-1
U2 QH - R8 P1
U2 QF - R6 P1
R7 P2 - DS1 G
U1 GPIO13 - DS1 GND 1
R8 P2 - DS1 DP
R6 P2 - DS1 F
U1 GPIO13 - DS1 GND 1
U2 QH - R8 P1
R1 P2 - DS1 A
U1 3.3V - U2 VCC
U1 GPIO33 - SW2 1-1
U2 QG - R7 P1
U1 GPIO25 - SW3 1-1
U2 QG - R7 P1
U2 QC - R3 P1
SW1
GND
U2
GND
SW3
SW2
GND
GND
SW2 2-2 - SW3 2-1
SW1 2-2 - SW2 2-1
GND
GND
SW1 2-2 - SW2 2-1
SW2 2-2 - SW3 2-1
R3
Resistance
220Ω
R4
Resistance
220Ω
R5
Resistance
220Ω
C1
Capacitance
100nF
R8
Resistance
220Ω
R1
Resistance
220Ω
J1
R2
Resistance
220Ω
R6
Resistance
220Ω
R7
Resistance
220Ω

Refine this doc
Ask about this doc
ESP32 7-Segment Counter Design Notes
Source files
  • sketch_v3.ino: ESP32 Arduino firmware for a 0-9999 counter.
  • diagram_v3.json: Wokwi wiring diagram.
Implemented circuit
  • ESP32 DevKit V1 30-pin GPIO13 variant, custom part created because the exact Wokwi 30-pin DevKit was not available in the Flux library and the closest 40-pin module lacked GPIO12/13/14.
  • CD74HC595 shift register at U2.
  • 5461AS four-digit common-cathode 7-segment display at DS1.
  • R1-R8: 220 Ω segment current limiting resistors for A/B/C/D/E/F/G/DP.
  • SW1/SW2/SW3: +1, -1, and reset pushbuttons to GPIO32/GPIO33/GPIO25, active-low with ESP32 internal pull-ups.
  • C1: 100 nF local decoupling for U2.
Pin mapping

Table


FunctionESP32 GPIONet / target
74HC595 SER/DSGPIO23SR_DATA
74HC595 SRCLK/SHCPGPIO18SR_CLOCK
74HC595 RCLK/STCPGPIO5SR_LATCH
Digit 1 common cathodeGPIO13DIG1
Digit 2 common cathodeGPIO12DIG2
Digit 3 common cathodeGPIO14DIG3
Digit 4 common cathodeGPIO27DIG4
+1 buttonGPIO32BTN_UP
-1 buttonGPIO33BTN_DOWN
Reset buttonGPIO25BTN_RESET
Important hardware caveats
  • The Wokwi design directly drives the 5461AS digit common cathodes from ESP32 GPIO pins. On real hardware this can exceed recommended GPIO sink current when several segments are on. A production-quality revision should add four low-side digit driver transistors and invert/update the digit-enable logic in firmware.
  • GPIO12 is an ESP32 boot strapping pin. Because it is connected to a display digit common, verify the display circuit does not force an invalid boot state.
  • The custom ESP32 DevKit footprint uses public nominal 30-pin DevKit geometry; measure the exact module before fabrication if mechanical fit is critical.
  • Source files

  • Implemented circuit

  • Pin mapping

  • Important hardware caveats

Documents

  • ESP32 7-Segment Counter Design Notes

Assets

Assets are files uploaded to this project which can be used in various ways.

ESP32 7-Segment Counter thumbnail
ESP32-based 4-digit 7-segment counter using a 74HC595 shift register and three pushbuttons for increment, decrement, and reset.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$0.26–$0.62

Digi-Key

$0.30

HQonline

$0.12

LCSC

$0.81

Mouser

$0.66

Verical

$0.29–$0.63

Controls

New control