In this Instructable we are going to build a small robot using MSP430 Launchpad from TI.The robot will use two DC geared motors and will employ differential drive system.
The Intelligence is provided with a MSP430 Launchpad Board and the Motors are controlled by L293D Motor Driver chip.
Here I am using the MSP430 Booster Pack for Motor Control for controlling the two motors.
The Base of the robot is made from hard cardboard and is powered by a single 9V battery.The Robot can be programmed in Energia IDE or Standard C using IAR or CCS from TI.
The Booster Pack can be purchasedonline from our ebay Store.
Original Article can be found here.
Step 1: Things You Will Need
For building this Robot you will need
1) MSP430 Launchpad Development Board
3) DC Geared Motor,2 Numbers
4) 9 V Battery
The Booster Pack can be brought online from our ebay Store.
Step 2: Building the Robot Base
The Base of the Robot is build from hard Cardboard,I have actually used the TI sample Box itself for building the robot.
The cardboard base is then wrapped in Black Insulation tape so that the robot will look good and it is quite easy to stick circuit boards using Double sided tape.
One advantage of using cardboard as a building material is that it can be easily shaped using nothing more than a pair of Scissors.
I have documented the Construction of the base from scratch on my website.
In case you already have an off the shelf base with attached motors you can skip this section.
Step 3: Building the Robot
After you have assembled the base of the robot,We will assemble the the electronics section.
The intelligence for the Robot is provided by a MSP430G2553 microcontroller (Launchpad ) while the motors are controlled by an L293D Motor Control Chip (Booster Pack).
Place the MSP430 Motor Control Booster Pack on the Launchpad development Board.
Connect the terminals of the Right DC Motor to MOTOR_R connector of the Booster Pack and Left DC Motor to MOTOR_L connector.
Now Connect the terminals of the 9V battery to P2 connector on the MSP430 Booster Pack.The LED 's on the Power supply section will glow indicating that the board is receiving Power.
By using a 9V battery your motors will be driven at 9V ,the voltage regulators on the booster pack will convert the 9V to 5 and 3.3V for L293D and MSP430 on the launchpad.
You can also provide power through a long cable to the robot.(for eg during Software development)
Step 4: Mounting the Electronics and Battery
You can fix the MSP430 Launchpad along with the Booster Pack on the Robot using Double sided Tape.
Attach the adhesive side of the Double sided tape to the bottom of launchpad board carrying the booster pack.
Select the correct placement for your board on the Robot and then Peel off the second layer.
Press the Launchpad on to the Robot.
Please follow the same procedure for the 9V Battery also.
Step 5: Programming the Robot
Just connect the USB cable of the MSP430 Launchpad directly to the PC and Download the code into the robot using either Code Composer Studio or IAR Embedded Workbench.
Step 6: Programming the Robot to Move Around
Now let's write a simple program to move the robot around your house.The robot uses an L293D motor driver chip to control the two motors arranged in differential drive configuration.In this section i am going to explain only the functions used in the program for controlling the robot locomotion
All the functions for controlling the motors of the robot are included in the motor.c file and the functions and other definitions are on the motor.h file in the code file download.The three main functions are
void RightMotor(char status)
void LeftMotor(char status)
void BotLocomotion(char status)
The Code along with explanation can be downloaded from here.You can also see a video of the robot Moving around .
Step 7: Adding Sensors
After you have completed the Build ,it's time to add sensors to your Robot for performing Line Following or obstacle avoidance .
The Remaining Pins left after controlling the motors are available at the connector P1.
You can connect your line Sensors or temperature sensors to any of the ADC channels available on P1.
They are marked as A0,A3,A4,A5,A6 and P2.7
Also Extra Ground and VCC ( 5V and 3.3V) pins are available near the Power Supply section which can be used for Powering your circuit.
You can find more information about the Booster Pack here.
Step 8: Remote Operation
The Booster Pack comes with an RS485 Communication Section which can be used for controlling the robot remotely.
You can use a USB to RS485 converter to control the Robot from the comfort of your PC.