Remotely Controlling DC motors through RS485 Protocol using MSP430 Launchpad Booster Pack

Pinterest icon

ors being controlled by MSP430 from PC through RS485 link

In this tutorial we are going to control two DC brushed motors remotely using RS485 protocol.The Motors are connected to the PC through a twisted pair RS485 cable and the software running on the PC controls the two motors.

The Software is written in both C sharp (C#) and Python so that they can be run on multiple systems like Windows,Linux etc.

The two DC motors are controlled using MSP430 Launchpad and Robot Shield (L293D + MAX485) and the RS485 twisted pair cable is connected to the PC USB port using USB2SERIAL (USB to RS485 converter).

Hardware Used 

USB2SERIAL - An easy to use USB to RS485/RS232/Serial converter that is used to add a RS485 to the Linux or Windows PC .More Details 

Buy USB to RS485 converter online from here   Buy USB to RS485 converter online from here (made in India )

Robot Shield - A booster Pack for MSP430 Launchpad that can be used for controlling DC motors as well a providing RS485 communication.More details 

Buy MSP430 Motor Control Booster Pack from here  Buy MSP430 Launchpad Shield for Motor Control from here

 

The Project is divided into 2 sections,

1) A cross platform control software written in Csharp and Python which runs on an x86 PC (on Linux /Windows) and sends control codes to the MSP430 Robot shield .The PC software acts as the Master and controls the motors on the RobotShield.USB2SERIAL is used to send commands from PC into the RS485 cable.

You can Read more about the control software here.

2) A slave unit composed of MSP430 Launchpad interfaced with Robot Shield board which controls two DC brushed motors attached to it.The unit receives signals from the PC through RS485 twisted cable and switches the motors accordingly.

More information about the slave unit can be found here

 

Sourcecodes and Circuit Diagram 

link to xanthium enterprises repo on Github containing code for serial communication using CSharp and Dot net Framework 

All the source files and Circuit Diagram used in this tutorial  can be downloaded from our GitHub Page.If you are new to Github Check this article to download code .

Master Control Software consists of Code written in C Sharp and Python.Python codes for both Python 2.7.x as well as Python 3.x.x is provided.

The code for slave unit is compiled in embedded C using IAR embedded Workbench.

Circuit Diagram as well as User Manual for Robot Shield can be downloaded from Here.

User Manual for USB2SERIAL can be downloaded from Here.