EMGRobotics - Six Pack TI Launchpad Booster

Information

EMGRobotics - Six Pack TI Launchpad Booster

The Six Pack is a Booster (or shield in Arduino lingo) for the TI Launchpad.  Simply plug it into your TI Launchpad and you can control up to six motors depending on configuration.

 

The Six Pack uses the FAN8200 dual DC motor controller, so motor voltage and current is limited per the FAN8200 specification.  Small 3 volt DC motors work perfect.

 

FAN8200 Datasheet

 

The six pack will control 4 motors from a serial port, "out of the box" using the MSP430G2231 that came with the TI Launchpad.  If the serial port is not required, those 2 pins can be used to control a fifth motor by soldering 2 jumpers on the Six Pack board.  

 

To control all six motors requires a MSP430G2553.

 

 

Members: 9
Latest Activity: Aug 15, 2013

Comment Wall

Comment by eric gregori on November 17, 2011 at 7:55pm

This version of firmware runs on the MSP430G2231 that comes with the TI Launchpad.

It allows you to control 4 motors from the serial port at 2400 baud.

 

You can download the complete project from here: www.robotsee.com/Launchpad_SixPack_Booster/Launchpad_arm_v1_2231.zip

 

 

//---------------------------------------------------------------------------
// TI Launchpad Serial Four Motor Controller
// Written by Eric Gregori ( www.buildsmartrobots.com )
//
// Copyright (C) 2011 Eric Gregori
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see a href="http://www.gnu.org/licenses/>" target="_blank">http://www.gnu.org/licenses/>;;.
//
// TI Launchpad based Serial Motor Controller by Eric Gregori (www.buildsmartrobots.com)
// Plug the TI Launchpad into a PC with the Launchpad driver installed.
// A virtual COM port will be created.
// Open hyperterminal, and connect to the virtual com port.
// Settings are: 2400, 8,n,1 no flow control
// 'a' or 'b' - controls motor 1
// 'c' or 'd' - controls motor 2
// 'e' or 'f' - controls motor 4
// 'g' or 'h' - controls motor 6
//
// Motor 1 is the first 2 pins by the positive VIN terminal
//
// P1.0 - M2 CE
// P1.1 -
// P1.2 -
// P1.3 - M1 CE
// P1.4 - M2 IN
// P1.5 - M1 IN
//
// P1.6 - M6 IN
// P1.7 - M6 CE
// P2.6 - M4 CE
// P2.7 - M4 IN
//
//---------------------------------------------------------------------------
#include "msp430g2231.h"

#define MOTORIO (BIT0|BIT3|BIT4|BIT5|BIT6|BIT7)
#define M1_CE BIT3
#define M1_IN BIT5
#define M2_CE BIT0
#define M2_IN BIT4
#define M6_CE BIT7
#define M6_IN BIT6
#define M4_CE BIT6 // P2
#define M4_IN BIT7 // P2
#define SERIALIN BIT2
#define SERIALOUT BIT1

#define SERIALHIGH P1OUT |= SERIALOUT;
#define SERIALLOW P1OUT &= ~SERIALOUT;

unsigned short BitTime;

void InitPins( void )
{
P1OUT = 0;
P2OUT = 0;
P2SEL = 0;
P1DIR = MOTORIO|SERIALOUT;
P2DIR = 0xff;
}

void Delay( unsigned short in )
{
volatile unsigned short i;
for( i=1; i; ++i )
{
if( i == in )
break;
}
}

unsigned short MeasureLow( void )
{
volatile unsigned short i;
for( i=1; i; ++i )
{
if( P1IN & SERIALIN )
break;
}

return(i);
}

void SendChar( unsigned char data )
{
// Send Start Bit
SERIALLOW
Delay( BitTime );
//-----------------------------
if( data & 0x01 )
SERIALHIGH
else
SERIALLOW
Delay( BitTime );
//-----------------------------
if( data & 0x02 )
SERIALHIGH
else
SERIALLOW
Delay( BitTime );
//-----------------------------
if( data & 0x04 )
SERIALHIGH
else
SERIALLOW
Delay( BitTime );
//-----------------------------
if( data & 0x08 )

Comment by eric gregori on November 19, 2011 at 10:34am

Comment by eric gregori on November 19, 2011 at 10:39am

This version of firmware runs on the MSP430G2553 that comes with the TI Launchpad.

It allows you to control 6 motors from the serial port at 9600 baud.

 

You can download the complete project from here:

www.robotsee.com/Launchpad_SixPack_Booster/Launchpad_arm_V1_2553.zip

 

 

//---------------------------------------------------------------------------
// TI Launchpad Serial Six Motor Controller
// Written by Eric Gregori ( www.buildsmartrobots.com )
//
// Copyright (C) 2011 Eric Gregori
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see a href="http://www.gnu.org/licenses/>">http://www.gnu.org/licenses/>;.
//
// TI Launchpad based Serial Motor Controller by Eric Gregori (www.buildsmartrobots.com)
// Plug the TI Launchpad into a PC with the Launchpad driver installed.
// A virtual COM port will be created.
// Open hyperterminal, and connect to the virtual com port.
// Settings are: 9600, 8,n,1 no flow control
// 'a' or 'b' - controls motor 1
// 'c' or 'd' - controls motor 2
// 'e' or 'f' - controls motor 3
// 'g' or 'h' - controls motor 4
// 'i' or 'j' - controls motor 5
// 'k' or 'l' - controls motor 6
//
// Motor 1 is the first 2 pins by the positive VIN terminal
//
// P1.0 - M2 CE
// P1.1 -
// P1.2 -
// P1.3 - M1 CE
// P1.4 - M2 IN
// P1.5 - M1 IN
//
// P1.6 - M6 IN
// P1.7 - M6 CE
// P2.6 - M4 CE
// P2.7 - M4 IN
//
// P2.0 - M3 CE
// P2.1 - M3 IN
//
// P2.4 - M5 IN
// P2.5 - M5 CE
//
//---------------------------------------------------------------------------
#include "msp430g2553.h"

#define MOTORIO (BIT0|BIT3|BIT4|BIT5|BIT6|BIT7)
#define M1_CE BIT3
#define M1_IN BIT5
#define M2_CE BIT0
#define M2_IN BIT4
#define M6_CE BIT7
#define M6_IN BIT6
#define M4_CE BIT6 // P2
#define M4_IN BIT7 // P2
#define M3_CE BIT0 // P2
#define M3_IN BIT1 // P2
#define M5_CE BIT4 // P2
#define M5_IN BIT5 // P2

void InitUART(void)
{
P1SEL |= (BIT1 + BIT2); // P1.1 = RXD, P1.2=TXD
P1SEL2 |= (BIT1 + BIT2); // P1.1 = RXD, P1.2=TXD
UCA0CTL1 |= UCSSEL_2; // SMCLK

// UCOS16 = 1
// 8,000,000Hz, 9600Baud, UCBRx=52, UCBRSx=0, UCBRFx=1
UCA0BR0 = 52; // 8MHz, OSC16, 9600
UCA0BR1 = 0; // 8MHz, OSC16, 9600
// UCA0MCTL = UCBRFx | UCBRSx | UCOS16
UCA0MCTL = 0x10|UCOS16; // UCBRFx=1,UCBRSx=0, UCOS16=1

UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
}

void InitPins( void )
{
P1OUT = 0;
P2OUT = 0;
P2SEL = 0;
P1DIR = MOTORIO;
P2DIR = 0xff;
}

void SendChar( unsigned char c )
{
while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = c; // TX -> RXed character
}

void main(void)
{
volatile unsigned short i;
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BCSCTL1 = CALBC1_8MHZ; // Set DCO to 8Mhz
DCOCTL = CALDCO_8MHZ; // Set DCO to 8Mhz

InitPins();
InitUART();

__bis_SR_register(GIE); // interrupts enabled

SendChar( '>' );
while(1)
{
// Do nothing, everyhing done in interrupt

} // while(1)
}

// Echo back RXed character, confirm TX buffer is ready first
#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR(void)
{
unsigned char c;
c = UCA0RXBUF;
SendChar(c);
SendChar( '>' );
switch( c )
{
case 'a':
P1OUT |= M1_CE;
P1OUT &= ~M1_IN;
break;
case 'b':
P1OUT |= M1_CE;
P1OUT |= M1_IN;
break;
case 'c':
P1OUT |= M2_CE;
P1OUT &= ~M2_IN;
break;
case 'd':
P1OUT |= M2_CE;
P1OUT |= M2_IN;
break;
case 'e':
P2OUT |= M3_CE;
P2OUT &= ~M3_IN;
break;
case 'f':
P2OUT |= M3_CE;
P2OUT |= M3_IN;
break;
case 'g':
P2OUT |= M4_CE;
P2OUT &= ~M4_IN;
break;
case 'h':
P2OUT |= M4_CE;
P2OUT |= M4_IN;
break;
case 'i':
P2OUT |= M5_CE;
P2OUT &= ~M5_IN;
break;
case 'j':
P2OUT |= M5_CE;
P2OUT |= M5_IN;
break;
case 'k':
P1OUT |= M6_CE;
P1OUT &= ~M6_IN;
break;
case 'l':
P1OUT |= M6_CE;
P1OUT |= M6_IN;
break;
default:
P1OUT &= ~MOTORIO;
P2OUT &= ~(M4_CE|M4_IN|M5_IN|M5_CE|M3_IN|M3_CE);
break;
} // switch
}

 

 

Comment

You need to be a member of EMGRobotics - Six Pack TI Launchpad Booster to add comments!

 

Members (9)

 
 
 

EMGRobotics

© 2014   Created by eric gregori.

Badges  |  Report an Issue  |  Terms of Service