BB's File Cabinet
Misc

 

 

 

Robotics - Roboricks2 - MiniMotor2 (Rev. C)

 

1.0 Introduction

The MiniMotor2 module is designed to drive to two small (aka "mini") sized motors with a temporary peak current of 1.2 amps and a maximum continuous current draw of 600 mA each. The logic circuitry is separated from the motor H-bridges via opto-isolators.

2.0 Revision Details

The historical detail of the revisions between subsequent versions of this brick will be detailed here.  Only revisions that create differences in the operation, programming or hookup of two modules with different revision numbers will be documented.

Rev C  - Differs  from Rev B only in the physical layout of the module. 

3.0 Hookup Details

The DC motors are connected to the MiniMotor2 at headers N2 and N3.  The power needed to drive the motors  is provided via the CAN Bus cable by an unregulated Bus Power supply connected to the BPwr header on the Controller28 Module.  When choosing motors or a source for the Bus Power, keep in mind that the MiniMotor2 module's are designed to provide a maximum current of 600 mA per motor and maximum surge current of 1.2A. 

Note that the motor leads on N2 and N3 are the mirror image of each other so a forward command sent to both motors will actually cause one motor to run forward while the other runs backward.  Because the typical robot design aligns the motors along the same axis but on opposite sides of the robot, motors must be polarized opposite to each other.  In other words, connecting motor 1 and motor 2 to power and ground in a A-B, B-A configuration respectively will insure that both motors will turn in the same direction when they both simultaneously receive  either a forward or reverse command.

4.0 Assigned Address

The MiniMotor2 has an assigned address of "0x02" but the user can reassign a different address using the Address_Set command so long as the user assigned address is not being used by any other module connected to the CAN bus (see RoboBricks2 - General Information and/or Common Protocol ).

5.0 Default Settings

The Motor Speed Set 1 and Motor Speed Set 2 command values are set to zero and the Duty Cycle Set command is set to 000 = 32µS.

6.0 Programming Hints

  • Table of Programming Command Table
  • Motor Speed Values
    Motor speed values are signed integers (2's complement) ranging from -128 to 127 decimal.  The following chart explains how the 2's complement is calculated:
    Integer Hex Binary Motor
    Speed
    Signed Unsigned
    127 127 0x7f 0111 1111 Fast Forward
    96 96 0x60 0110 0000   
    64 64 0x40 0100 0000   
    32 32 0x20 0010 0000 Slow Forward
    0 0 0 0000 0000 Stop
         

     2's Compliment

      

    -32 224 0xe0 1110 0000 Slow reverse
    -64 192 0xc0 1100 0000   
    -96 160 0xa0 1010 0000   
    -128 128 0x80 1000 0001 Fast Reverse

Graphically, the values shown in the above chart can be mapped to a line as shown below:

          0                Forward              127  128             Reverse                255
Stop |-----------------------------------------| |-----------------------------------------|
           slow        -------------->       FAST   FAST      -------------->         slow    

 

 

 

 

© 2010 All Rights Reserved