In this Instructable We are going to control two DC motors remotely using RS485 Protocol from a x86 PC.
A Cross platform Master Control Program running on Windows/Linux will communicate with a MSP430 Launchpad using RS485 Protocol. The Computer user will be able to control the two motors connected to the MSP430 Launchpad from PC using RS485 Protocol .
Source Codes and Circuit Diagram can be downloaded from the original article.
This Instructable can be used as a starting point for developing your own remote control robot or Industrial control system.
The Project is divided into two sections
1) PC side
2) Microcontroller Side
Control Program running on the PC acts as Master and Communicates with the Slave MSP430 Launchpad . The Control Program running on PC is written in
Python (Python 2.7 and Python 3.0)
The PC uses aUSB to RS485 Converter to convert the USB signals from PC to RS485 signal levels which is then used to communicate with the slave.
MSP430 Launchpad along with Motor Control/RS485 Booster Packacts as a slave and operates the two motors in accordance with the signals send by the PC .
The MSP430 Booster Pack and the USB to RS485 Converter used in this tutorial is available on our Store
Step 1: Materials Required
For this Instructable you will require the following
2) MSP430 Launchpad
3) MSP430 Motor Control/RS485 Communication Booster Pack (Robot Shield V1.0)
4) Twisted Pair Wire for RS485 Communication
5) DC Motors ,2 Numbers
6) USB Cable
7) Screw Driver
Step 2: Connection Diagram
Step 3: MSP430 Slave Unit With Motors
Slave Unit consists of a MSP430G2553 microcontroller interfaced with a L293D Motor Control Chip and MAX485 RS485 communication Chip.
Two motors are connected to the L293D chip terminals .The MSP430 waits for commands from PC send through the RS485 cable, On Receiving the commands the controller Switches the Motors on and off.
A detailed explanation of the slave unit as well as the explanation of the Source code can be found here.
Step 4: PC Side Master
The Master unit consists of a x86 PC running a Linux or Windows Operating system and a USB to RS485 Converter.
Since most PC's do not have a RS485 port, we are using a USB to RS485 converter based on FT232 chip and MAX485 chip to translate the USB signal to RS485 differential signals.
The control code running on the PC is written in C# and Python .
The code, both C# and Python can be made to run on Windows and Linux Platforms without any modifications.
A Detailed explanation of the Master Control Program can be found here.