Skip to content
HYPERPCB

DIY Pet Food Dispenser Schematic: What to Fix Before PCB Fab?

Published 2026-09-30

Fix power path protection, motor suppression, sensor interfaces, and decoupling before sending your dispenser PCB to fab.

Power path and protection first

Choose a single DC input (e.g., 12 V) sized for stall current. Add reverse‑polarity protection using a P‑MOSFET ideal‑diode arrangement (30 V, low Rds_on) or a Schottky diode if loss is acceptable. Place a TVS diode on the DC jack (e.g., SMBJ15A class for 12 V rails) and a resettable fuse (PTC) sized for motor stall. Put bulk capacitance near the jack (220–470 µF electrolytic) and a ceramic array (2×10 µF + multiple 100 nF) before the DC/DC.

How should I generate 5 V and 3.3 V?

Use a buck from 12 V to 5 V sized for peak servo/motor+logic current (often 2–3 A). Then derive 3.3 V with either an LDO (quiet, low dropout, 300–600 mA) or a synchronous buck if 3.3 V load >300 mA. Keep switcher loop small; place input 10–22 µF and output 22–47 µF ceramics tight to pins, plus a fast diode if non‑sync topology. Add LC or ferrite bead (600 Ω@100 MHz) before noisiest loads.

Motor or servo driver choices

• DC motor: design for stall ≈ 4–6× rated current. Use an H‑bridge or a low‑side N‑MOSFET (logic‑level, Rds_on < 20 mΩ @ 4.5 V). Always add a flyback path: fast diode (e.g., SS54) across the motor for low‑side drive, or rely on integrated body diodes in bridges. Add a series snubber across motor (100 nF + 100 Ω) to curb EMI. PWM at 20–25 kHz to avoid audible noise.

• Servos: allow 1–2 A stall per standard servo. Power servos from 5 V buck, not from MCU rail. Place 470–1000 µF low‑ESR bulk near the servo connector bank.

• Steppers: choose a driver that matches winding current; add bulk 100–220 µF per driver and route sense lines as a tight pair.

Sensor interfaces and noise immunity

IR break‑beam or reflective sensors: drive LED with 10–20 mA via series resistor; receive with a phototransistor and a 10 k pull‑up. Add an RC at the receiver (1 k + 100 nF) to reject PWM hash. For mechanical limit switches, use 10 k pull‑up and 100 nF to ground, or debounce in firmware at 10–20 ms.

For a load cell + ADC (e.g., 24‑bit type), route the differential pair as a twisted pair to the board, add 100–220 Ω series resistors and 1–4.7 nF caps to ground close to the ADC inputs. Keep the analog ground quiet and connect to power ground at a single point.

Do I need watchdog, brownout, and timekeeping?

Yes. Enable the MCU watchdog and brownout detect near your 5 V/3.3 V rails (typical BOR 2.7–3.0 V on 3.3 V MCUs). For time‑based feeding, add an RTC with coin cell or supercap backup; isolate the backup with a Schottky diode and test for switchover in firmware.

Grounding, layout, and EMC

Star the motor/servo return to the input bulk cap negative, then tie logic ground at a single point to minimize injective noise. Keep the H‑bridge current loop tight and away from sensor/MCU traces. Route clocks, I2C, and ADC inputs far from motor traces; if they must cross, do so orthogonally. Guard analog inputs with ground. Place one 100 nF per IC power pin and one 4.7–10 µF per supply island. Add a bidirectional TVS on any long external cable (buttons, sensors that exit the enclosure).

What trace widths and clearances are safe?

Use IPC‑2152 for sizing. As a rule of thumb on outer layers with 1 oz copper, plan 80–100 mil for 2 A with a 10–20 °C rise; with 2 oz copper, 40–50 mil often suffices. Keep motor currents off inner layers where possible. For 12 V systems, IPC‑2221 creepage/clearance is modest; 0.5–1.0 mm clearance around the input and high‑di/dt nodes is practical. Use multiple vias (0.3–0.4 mm drill) in parallel for any path carrying >1 A.

Connectors, power path, and safety

Use locking headers for motors and servos and provide strain relief. Key the DC input connector to avoid reverse insertion. Add a 10 k/100 nF soft‑start or EN pin timing on buck regulators to prevent brownout on plug‑in. Mark polarity on silk and add test pads for VIN, 5 V, 3.3 V, and GND.

Firmware‑assisted reliability

On boot, home the mechanism with slow PWM and verify sensor states before enabling full power. Implement jam detection: compare expected motor current or encoder ticks to PWM duty; if mismatched for >300 ms, cut drive and alert.

Checklist before you order PCBs

  • Reverse‑polarity MOSFET or diode, input TVS, and PTC fuse present
  • Correct buck sizing and bulk caps at input/output; bead to noisy loads
  • Freewheel paths and snubber on motor; PWM at 20–25 kHz
  • One 100 nF per IC pin, plus 4.7–10 µF per rail island
  • Sensor RC filtering and switch debounce; analog ground guarded
  • Star ground from motor return; single‑point tie to logic ground
  • Trace widths per IPC‑2152; multiple vias on high current
  • Test points for power rails and key signals; labeled connector polarity

Manufacturing notes you can apply

If the dispenser is consumer‑grade, target IPC Class 2 acceptance; for tighter inspection, IPC Class 3 is available. Keep silkscreen clear on connectors and polarity marks to speed bring‑up. If you ship products in regulated markets, design and document material choices so the PCB can be built with RoHS and REACH compliance. For quoting and early manufacturability feedback, you can expect a 24‑hour quote and DFM comments within 1 business day. Our quality management system is ISO 9001:2015 certified (SGS CN‑2023‑Q1156, valid to June 2027), which helps keep documentation, revisions, and traceability tight for repeat builds.

Common mistakes to catch in the schematic

  • Missing flyback paths or snubbers on motors/solenoids
  • Powering servos from the MCU 5 V pin instead of the buck output
  • No brownout/ESD/TVS on external connectors
  • Forgetting pull‑ups on I2C and sensor lines, or undervaluing them (<1 k hurts EMI)
  • Single ground pour without star point, causing ADC noise and false triggers

Send your dispenser Gerbers—24‑hour quote and 1‑day DFM; IPC Class 2/3 and RoHS/REACH are supported. — Get a quote