Zum Inhalt springen

WSAL11820 – RPi Motor Driver Board/en

Aus JW Tech Wiki

Documentation notice: This technical documentation was independently rewritten from an archived supplier source. Check technical details and commands against the product version and manufacturer documentation before use.

Summary

The RPi Motor Driver Board (Waveshare) is a Raspberry Pi expansion board for driving DC and stepper motors. It controls two motors via pins M1–M4, while PWMA/PWMB enable or disable the PWM outputs. The module suits basic robotics projects with remote control.

Related products at JW Tech

Technical overview

  • DC/stepper motor drive via four outputs: M1, M2 to the right motor; M3, M4 to the left motor.
  • PWMA and PWMB are PWM-enable pins; only when high do M1–M4 emit PWM signals, controlling speed.
  • Control logic: forward = M1/M3 high, backward = M2/M4 high, turn right = right motor forward only, turn left = left motor forward only, stop = all low.
  • Infrared remote example: NEC protocol received on pin 18 and decoded; keys 2/8/4/6/5 map to straight/back/right/left/stop; “–” and “+” adjust speed.
  • Demo code is downloaded with wget, unpacked, and launched with Python; if errors occur, install the required library manually.
  • On Bullseye OS: use “apt” instead of “apt-get”; only Python 3 is supported.
  • Chassis and camera are not included and must be purchased separately.

Commands and examples – verify before use: 

sudo apt-get install p7zip
wget https://files.waveshare.com/upload/9/96/RPi-Motor-Driver-Board-Demo-Code.tar.gz
tar xzvf RPi-Motor-Driver-Board-Demo-Code.tar.gz
sudo chmod 777 -R RPi-Motor-Driver-Board-Demo-Code
cd ~/RPi-Motor-Driver-Board-Demo-Code/python
sudo python motor.py

Notes and version constraints

  • The exact hardware revision of the board is not stated in the source; wiring may differ by revision.
  • No supply-voltage, maximum current draw, or protection-circuit details are provided – these values need confirmation before operation.
  • The example requires a separate chassis and camera; without them the demo will not work fully.
  • If the example throws errors, the required Python library must be installed manually; the exact library name is not clearly specified in the source.
  • Key mapping on infrared remotes varies by device; program adjustments may be necessary.

Source and revision record