Motor Controller for a Robot Arm
Board Bring-Up Plan — Closed-Loop DC Motor Controller
Table
| Rail | Source | Expected Voltage | Tolerance | Measure At | Current Limit | Pass Criteria |
|---|---|---|---|---|---|---|
| VIN_IN | J1 pin 1 | Applied input, start 3-5 V then 12 V nominal | Supply setting | J1/F1 input | 50-100 mA first power | No short/current-limit hit |
| VIN_RAW | F1 output / input TVS / LM74700 anode | Approximately VIN_IN after PTC | Depends on PTC drop | F1 P2 or U5 ANODE | 50-100 mA first power | Tracks input with correct polarity |
| VM_PROT | LM74700/Q1 protected bus | Approximately VIN_RAW minus MOSFET drop | <100 mV drop at light load | U5 CATHODE, U3 VIN, U2 VPWR | 50-100 mA first power | Comes up only with correct input polarity |
| 3V3 | U3 LMR33630 buck output | 3.3 V | +/-5% initial | C9-C12/C32 or U1 VDD | Logic-only <250 mA expected | 3.135-3.465 V, no oscillation |
| BUCK_SW | U3 SW/L1 | Switching waveform | N/A | U3 SW or L1 P1 | Probe only | Regular switching, no overheating |
| MOTOR_A/MOTOR_B | U2/J2 | Hi-Z while disabled | N/A | J2 pins | No motor connected | No unintended drive during reset |
Table
| Signal | Net | Expected State | Measure At | Notes |
|---|---|---|---|---|
| Reset | NRST | High at idle, low when SW1 pressed | U1 PG10-NRST or J4 pin 5 | SWD reset also uses this net |
| Boot strap | BOOT0 | Low | U1 PB8 / R4 | Normal flash boot |
| H-bridge enable | HBRIDGE_EN | Low until firmware arms | U2 EN / U1 PB5 | R12 pull-down is safety default |
| Disable D1 | HBRIDGE_D1 | Low at reset | U2 D1 / U1 PA10 | High disables bridge |
| Disable D2_N | HBRIDGE_D2_N | High at reset | U2 | Low disables bridge |
| Fault | HBRIDGE_FAULT_N | High when no fault | U2 | Active-low open drain via R7 |
| Current zero | MOTOR_CURRENT_ADC | About 1.65 V at zero motor current | R14/C27/U1 PA1 | INA240 REF1=3V3, REF2=GND |
| Power-good | PWR_GOOD | High when 3V3 valid | U3 PG / U1 PB12 | R3 pull-up to 3V3 |
Table
| Connector | Type | Pins to Verify | Test Method |
|---|---|---|---|
| J1 | 2-pin power terminal | PIN1 VIN_IN, PIN2 GND | DMM continuity and polarity mark check |
| J2 | 2-pin motor terminal | PIN1 MOTOR_A, PIN2 MOTOR_B | DMM continuity to R13/U2 outputs; no short to GND |
| J3 | 6-pin encoder header | 3V3, GND, ENC_A_RAW, ENC_B_RAW, ENC_Z_RAW, GND/shield | Apply slow 0-3.3 V pulses; verify U6 outputs and MCU timer count |
| J4 | 2x3 SWD | 3V3, SWDIO, SWCLK, GND, NRST, SWO | ST-LINK target detect/read ID |
| J5 | 1x4 control UART | 3V3, GND, UART_TX, UART_RX | 115200 baud UART telemetry and echo/control test |
Table
| Interface | Signals | Connector | Tool |
|---|---|---|---|
| SWD | 3V3, SWDIO, SWCLK, NRST, GND | J4 | ST-LINK / STM32CubeProgrammer |
| UART telemetry/control | UART_TX, UART_RX, GND | J5 | USB-UART at 3.3 V logic |
Table
| Test | Components | Input | Expected Output | Pass Criteria |
|---|---|---|---|---|
| Power LED | U3, LED1/R21 | 3V3 valid | LED1 on | LED current limited, no overheating |
| Heartbeat LED | U1, LED3/R23 | Firmware running | LED3 toggles | Confirms MCU boot loop |
| Fault LED | U1, LED2/R22, U2 SF | Simulated fault or firmware command | LED2 changes | Fault input readable |
| Encoder | J3, D3, R15-R20, C28-C30, U6, U1 TIM3 | Slow A/B quadrature pulses | Encoder count changes | Direction and count correct |
| Current sense | R13, U4, U1 ADC | Dummy load current | ADC matches DMM within calibration tolerance | Zero-current around 1.65 V |
| H-bridge no-load PWM | U1/U2 | Firmware low-duty command, no load | MOTOR_A/MOTOR_B switch as expected | Truth table matches MC33926 |
| Dummy load drive | U2/R13/U4 | 10-50 ohm power resistor or lamp | Controlled current and PWM | No current-limit trip, no overheating |
| Real motor | U2/J2 | Final motor unloaded, low duty | Smooth rotation and valid encoder feedback | Current below configured limit |
Table
| Measurement | Location | Expected Value | Tolerance | Instrument |
|---|---|---|---|---|
| 3V3 rail | C32/U1 VDD | 3.3 V | +/-5% initial | DMM/scope |
| INA240 zero output | C27/R14 | ~1.65 V | +/-100 mV before calibration | DMM/ADC |
| R13 shunt voltage at 2 A | R13 Kelvin pads | 20 mV | Depends on load | DMM/scope |
| INA240 output swing at 2 A | MOTOR_CURRENT_ADC | +/-0.4 V from 1.65 V | After calibration | ADC/scope |
| MC33926 FB at 2 A | HBRIDGE_FB_ADC | ~1.30 V with 270 ohm R6 | Approximate, coarse feedback | ADC/DMM |
| HBRIDGE_EN reset state | U2 EN | 0 V | Logic low | Scope/DMM |
| HBRIDGE_FAULT_N no-fault | U2 SF | 3.3 V | Logic high | Scope/DMM |
Table
| Test Section | Result | Notes |
|---|---|---|
| Visual Inspection | [ ] Pass / [ ] Fail | |
| Power Rails | [ ] Pass / [ ] Fail | |
| Critical Signals | [ ] Pass / [ ] Fail | |
| Connectors | [ ] Pass / [ ] Fail | |
| Programming | [ ] Pass / [ ] Fail | |
| Encoder | [ ] Pass / [ ] Fail | |
| Current Sense | [ ] Pass / [ ] Fail | |
| Motor Drive | [ ] Pass / [ ] Fail |
Prerequisites
1. Visual Inspection
2. Power Rail Verification
3. Critical Signal Verification
4. Connector and Interface Tests
5. Programming and Debug Interface
6. Functional Validation
7. Expected Measurements Reference
8. Motor-Specific Precautions
Pass/Fail Summary