Below is a schematic-level review focused strictly on what’s observable in your design. Per Flux knowledge base guidance for reviewing schematics, I’m flagging only concrete connectivity, component, and documentation issues, and proposing targeted corrections.
Electrical and logical issues
- Unused relay contacts and orphan connector pin:
- K2 NO and NC contacts are not routed anywhere. Nets “Net (K2 - NO)” and “Net (K2 - NC)” only touch K2. Action: connect K2’s NO/NC to the intended output connector (likely J6) or remove K2 if not needed.
- “Net (J6 - 1)” is an orphan net with only J6. Action: connect to K2’s contact or remove the unused pin.
- Relay coil drivers are missing base pulldown resistors:
- Q1, Q2, Q3, Q4 each have a series base resistor (R1, R2, R3, R4 = 1 kΩ), but no base-to-emitter pulldown. This can leave the coils partially or intermittently on due to leakage/noise. Action: add ~47–220 kΩ from base to emitter on each NPN.
- Mains/line distribution consistency:
- AC line net “Net (U1 - IP+)” ties PS1 to U1 and to relay COMs of K1/K2/K3/K4; AC neutral net “Net (J11 - 2)” connects PS1 to J11, J5, J8, J9. This is logically consistent; no cross-mixing with low-voltage nets is observed.
Component-level review
- 5 V bus decoupling is very light for inductive loads:
- Only one 100 nF cap C2 is placed across the +5 V bus (“Net (J4 - ~)”) to GND. Four relay coils are driven; despite flyback diodes, supply dips/noise are likely. Action: add a bulk capacitor (electrolytic or low-ESR polymer) on the 5 V rail near the relays, and keep C2 or add additional 100 nF ceramics locally per branch.
- ACS712 supply/filtering:
- U1 is on the 5 V rail, C1 = 1 nF is present on FILTER (good), but no local VCC-to-GND decoupling is placed at U1. Action: add a local decoupling cap from VCC to GND at U1 per its datasheet.
- ESP32 module power:
- ESP1 is tied to the 5 V bus and ESP1 goes to J10. No 3V3 decoupling is visible in this schematic. The DevKit usually includes on-module regulation/decoupling; however, that is not verifiable here. Action: confirm the DevKit’s power path and ensure adequate decoupling near the module’s VIN/3V3 as required by its documentation.
- Flyback diodes on relay coils:
- Present and correctly oriented: D1, D2, D3, D4 have cathodes to +5 V and anodes to coil low side nets with K1/K2/K3/K4.
- Input dividers from 5 V to ESP32 I/O:
- IO34: R10=120 kΩ to +5 V via J1, R9=220 kΩ to GND.
- IO35: R8=120 kΩ to +5 V via J2, R7=220 kΩ to GND.
- IO25: R12=120 kΩ to +5 V via J3, R14=220 kΩ to GND.
- IO26: R13=120 kΩ to +5 V bus, R15=220 kΩ to GND.
- These dividers reduce 5 V to about 3.235 V at the ESP32 input (5 × 220/(220+120) ≈ 3.235 V), which is under 3.3 V. Note that the source impedance is high (hundreds of kiloohms in total); if these feed ADCs, consider lower values or buffering for acquisition accuracy and noise margin.
Power and signal integrity
- 5 V rail naming/visibility and distribution:
- The main 5 V bus is the net labeled “Net (J4 - ~)”, which also includes PS1, relay A1 pins, ESP VIN, and multiple connector pins. Action: explicitly label this net “+5V” and add a visible star/bus topology if needed for clarity. Add bulk capacitance as noted above for relay surges.
- ADC/analog source impedance:
- The 120 kΩ/220 kΩ dividers present very high source impedance to ESP32 inputs. Action: if these are analog measurements, reduce divider resistances (e.g., by ~10×) or buffer the node to improve settling and noise immunity.
Schematic best practices and clarity
- Ambiguous connector pin naming:
- J1/J2/J3/J4 pins are all labeled “
”. Some of those “” pins connect to GND (GND net shows J1/J2/J3/J4:~) and others to +5 V (“Net (J4 - )”). This makes auditing error-prone. Action: rename connector pins (or annotate) so each pin name is unique and use explicit net labels (“+5V”, “GND”, “SIG”) to avoid confusing cross-usage of “”.
- Net labeling:
- Replace generic auto-generated names with explicit ones:
- “Net (J4 - ~)” -> “+5V”
- “Net (U1 - IP+)” -> “AC_L”
- “Net (J11 - 2)” -> “AC_N”
- Label relay contact nets (e.g., “K1_NO”, “K1_NC”, etc.) and map them to their connectors (J5, J8, J11, J6).
- Key-node annotation:
- Add brief notes near each divider indicating nominal input range and purpose (e.g., “5 V sense into IO34 via 120k/220k”).
- Add test points for +5V and GND near relays and near ESP1.
Observed confirmations (good/consistent)
- Relay coil drive topology is correct:
- K1/K2/K3/K4 A1 pins on +5 V rail, A2 to Q1/Q2/Q3/Q4 collectors, emitters to GND, base series resistors in place, flyback diodes D1–D4 across coils oriented correctly.
- ACS712 connections:
- Primary: U1 net is the AC line being switched by relay contacts; U1 goes to J9. Secondary: U1 on +5 V; U1 to C1; U1 through a divider R5/R6 into ESP1. Topology is coherent.
Actionable corrections summary
- Connect or remove unused parts/nets:
- Wire K2 NO/NC to J6 (or intended connector) or remove K2/J6 if not needed. Remove orphan “Net (J6 - 1)” if unused.
- Stabilize coil drivers:
- Add base-to-emitter pulldown resistors for Q1–Q4.
- Improve power robustness:
- Add bulk capacitance on +5 V near the relays and local decoupling at U1 VCC. Confirm ESP1 power path and ensure it is adequately decoupled.
- Clarify nets and connectors:
- Replace auto-generated net names with explicit labels (+5V, AC_L, AC_N, etc.). Rename/annotate J1–J4 pins so each pin’s function is clear and not mixed across multiple nets.
- Consider divider impedance for ADC use:
- If IO34/IO35/IO25/IO26 read analog, consider reducing the 120 kΩ/220 kΩ dividers or buffering to meet ADC input impedance/settling requirements.
If you want, I can implement the net label changes, add the pulldowns, and place the decoupling/bulk capacitors in the schematic; just say the word and specify any preferred values for the pulldowns and capacitors.