This is a motor / light driver board. Its core is two DRV8262 dual H-bridge driver chips, controlling 4 DC motors simultaneously, or dimming 4 DC lights (LED / halogen).
From your PC you simply send one command over serial (MODBUS protocol) to run a motor forward, reverse, stop, or set a light to 30%, 80%, and so on.
| Purpose | Pins | Channel |
|---|---|---|
| Chip1 · Motor 1 | IN1 = PB0 , IN2 = PB1 | M1 |
| Chip1 · Motor 2 | IN3 = PB4 , IN4 = PB5 | M2 |
| Chip2 · Motor 3 | IN1 = PA0 , IN2 = PA1 | M3 |
| Chip2 · Motor 4 | IN3 = PA2 , IN4 = PA3 | M4 |
Connect the two drive wires of each motor to INx / INy. The board automatically drives them with a 20 kHz PWM for speed and direction.
| Purpose | Pin | Channel |
|---|---|---|
| Motor1 current | chip1_IPROPI1 = PA4 | M1 |
| Motor2 current | chip1_IPROPI2 = PA5 | M2 |
| Motor3 current | chip2_IPROPI1 = PA6 | M3 |
| Motor4 current | chip2_IPROPI2 = PA7 | M4 |
| Function | Pin | Description |
|---|---|---|
| TOFF | PC13 | Off-time / duty clamp config |
| OCPM | PB2 | Overcurrent blanking time select |
| nSLEEP | PC15 | Driver enable (low = sleep) |
| DECAY | PB8 | Decay mode |
| MODE | PB15 | Control mode |
| nFAULT1 | PB12 | Chip1 fault (active low, readable) |
| nFAULT2 | PB14 | Chip2 fault (active low, readable) |
| Purpose | Pins | Parameters |
|---|---|---|
| RS485 port (UART1) | TX=PA9, RX=PA10, dir=PA8 (A/B differential) | 8N1, baud = factory config (default 38400) |
| UART3 port | TX=PB10, RX=PB11 | fixed 115200, 8N1 |
Slave address: the board uses a fixed MODBUS slave address of 1. No dip switches are needed.
This is the core table. Learn it and you can control everything.
| Register | Function | Access | Value notes |
|---|---|---|---|
| 2000 | Motor M1 speed | R/W | Signed -100 ~ +100 + = forward, - = reverse, 0 = stop |
| 2001 | Motor M2 speed | R/W | |
| 2002 | Motor M3 speed | R/W | |
| 2003 | Motor M4 speed | R/W | |
| 2010 | Motor M1 current (raw ADC) | Read | Motor working current |
| 2011 | Motor M2 current | Read | |
| 2012 | Motor M3 current | Read | |
| 2013 | Motor M4 current | Read | |
| 2020 | Chip1 fault nFAULT1 | Read | 1 = fault, 0 = ok |
| 2021 | Chip2 fault nFAULT2 | Read | 1 = fault, 0 = ok |
503 as the "master switch".503=ON → motors can run; write 503=OFF → all motors forced to stop.Enable (motors can run): 01 05 01 F7 FF 00 19 FE Disable (forced stop): 01 05 01 F7 00 00 58 0E Read enable status: 01 01 01 F7 00 01 68 0E
Create a new connection in Modbus Poll:
Connection > Connect Slave ID: 1 (fixed default address) Serial port: your COM port Baud rate: 115200 (if you use RS485 use 38400 or the factory value) Data bits: 8 Parity: None Stop bits: 1 Protocol: MODBUS RTU
Read 4 registers starting at 2000:
Function (FC): 03 Read Holding Registers Starting Address: 2000 Quantity: 4
If you get back 4 values, communication is OK. Default speed is 0 (motors off).
Write register 2000 with value 50 (50% forward):
FC: 06 Write Single Register Register: 2000 Value: 50
Motor 1 should start running forward at half speed.
| What to do | Write register | Value |
|---|---|---|
| Motor1 reverse (50%) | 2000 | -50 |
| Motor1 stop | 2000 | 0 |
| Motor2 forward 100% | 2001 | 100 |
| Motor3 forward 30% | 2002 | 30 |
| Motor4 reverse 80% | 2003 | -80 |
If you connected DC lights, the speed value becomes "brightness". Write 2000 = 80 for 80% brightness, 0 to switch the light off.
Use any "serial assistant" in HEX mode and paste one frame below (CRC=Lxx Hxx are the check bytes, already computed). All samples use the fixed address 1.
| Action | Full frame (copy & paste) |
|---|---|
| Forward 50% | 01 06 07 D0 00 32 2D 58 |
| Reverse 50% | 01 06 07 D0 FF CE 6C E9 |
| Stop | 01 06 07 D0 00 00 AC 8D |
| Action | Full frame |
|---|---|
| Forward 80% | 01 06 07 D1 00 50 FD 71 |
| Action | Full frame |
|---|---|
| M1=50 and M2=50 | 01 10 07 D0 00 02 04 00 32 00 32 8A C6 |
| Action | Full frame |
|---|---|
| Read 4 speeds (2000-2003) | 01 03 07 D0 00 04 61 4E |
| Read 4 currents (2010-2013) | 01 03 07 DA 00 04 41 4C |
| Read 2 faults (2020-2021) | 01 03 07 E4 00 02 A0 82 |
01 06 07D0 0032 — 2D58
Addr Func Register Value CRC check
The address, function, register, and value are plain data; only the trailing CRC is computed. Tools calculate it for you automatically.503 (master enable) is ON (default ON on power-up).The speed register is a "command value" applied to PWM every millisecond. If it doesn't run, check:
1. Enough power (motors need their own supply, not the MCU supply).
2. Soft coil 503 (master enable) is ON (default ON).
3. Read back register 2000 to confirm the write was accepted.
That is usually a PWM duty / configuration issue. Try a smaller speed (e.g. 20%) first, and make sure the motor voltage matches the board supply — avoid over-voltage and over-current.
Fault = 1 means the chip detected overcurrent, overtemperature, or under-voltage. Power off, check the wiring, remove any short, then power back on; once the fault clears, the register returns to 0.
| Desired effect | Register value | Two's complement (HEX) |
|---|---|---|
| 0 = stop | 0 | 0000 |
| 20% forward | 20 | 0014 |
| 50% forward | 50 | 0032 |
| 100% forward | 100 | 0064 |
| 50% reverse | -50 | FFCE |
| 100% reverse | -100 | FF9C |