![Raspberry Pi RoboPi User Manual Download Page 22](http://html1.mh-extra.com/html/raspberry-pi/robopi/robopi_user-manual_3760660022.webp)
RoboPi v1.00
User Manual v0.85
Copyright 2014 William Henning
A/B Two Wire interface
For two wire drivers, use
digitalWrite()
to set the direction you are
NOT
going in to 0, then use
analogWrite()
to control the motor speed using pulse width modulation for the direction you want the
motor to turn. Please note that the minimum speed will likely be higher for two wire motors, and
different for different motors.
The inexpensive low current L9110S h-bridge is one example of a two wire A/B interface, however
many L293D and L298 boards tie EN high to effectively become two pin drivers.
A B
Function
0 0
Break
0 1
Rotate in one direction
1 0
Rotate in opposite direction
1 1
Break
EN/DIR/PWM Three Wire Driver
Some motor drivers will have an EN signal, but use extra logic to to use one pin as motor direction, and
another as a PWM input to control the motor speed.
For these drivers, use
digitalWrite()
to set the enable and direction pins, then use
analogWrite()
to
control the motor speed using pulse width modulation. Please note that the minimum speed will be
different for different motors.
DIR/PWM Two Wire Driver
Other motor drivers use extra logic to to use one pin as motor direction, and another as a PWM input to
control the motor speed.
For these drivers, use
digitalWrite()
to set direction pin, then use
analogWrite()
to control the motor
speed using pulse width modulation. Please note that the minimum speed will be different for different
motors.
http://Mikronauts.com
22
2014-01-27