Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

PIC Based Serial Port Servo Controller

PIC Based Serial Port Servo Controller

A PIC16F84 drive servo motors. It receives commands from a host computer via a standard RS232 serial interface. Supports 4 servo motors and 4 digital outputs. Can be modified for 8 servo motors.
The PIC Based servo controller is a small project I designed to allow me to control some robotics. I then decided that I should publish it as it may be of interest to other people.

The Servo Controller uses a PIC16F84 microcontroller from Microchip to drive servo motors and digital outputs. It receives commands from a host computer via a standard RS232 serial interface.

You can download the PIC program which contains a HEX file which most PIC programmers can read; and a PIC Assembler code (ASM) file if you would like to see how it works or modify it.

I used the free PIC assembler from Microchip, the manufactures of the PIC range of Microcontrollers.

Several contributors have provided code samples that you can use to drive the PIC Servo project.

Nov, 2001 – Jose Maria Diaz de la Cruz of the Polytechnical University of Madrid (Spain) has provided an ActiveX control (ocx) and a Visual Basic Project. Note you will need to compile the Visual Basic project as it contains source only. Feb 2002 – Richard Gardiner provided a Windows executable which is targeted at driving the 8 servo variant. Here are some Acrobat files for the Schematic, Single sided PCB and Overlay artwork:

Schematic Diagram

PCB Viewed from Component Side

PCB Viewed from Copper Side

Component Overlay

You will need an Acrobat reader available for free from www.Adobe.com to view and print these files.

Note that the PCB is a single sided board, about 88 mm by 53 mm (3.5 inches by 2.1 inches). I have provided the track patters viewed from both sides of the board so you can choose the one that suits your method of production.

I have been asked for a version that will control eight servos, so I have altered the code to support this.

Servo Controller Commands

To control the servos and outputs we need to send commands to the PIC. Some of the commands are single byte commands; some however require two bytes.

The first byte always contains the command and the channel to which the command applies. We will call this the ‘Command’ byte. The second byte (when needed) will contain data for the command; we will call this the ‘Data’ byte and is used when we need to set the servo offset or position for example.

The command byte is split into two nibbles (4 bits), the upper one defines the command to execute and the lower defines the channel (which servo or digital output) is to be affected.

Visit Here for more.

 

More Articles to Read

Robotic Cat Laser
Robotic Cat Laser
LED traffic light
LED traffic light
Estimating Power for ADSP-BF561 Blackfin® Processors
Estimating Power for ADSP-BF561 Blackfin® Processors
Teach Your Arduino to Switch Itself Off!
Teach Your Arduino to Switch Itself Off!
Control a tracked robot with your mind (or joystick)
Control a tracked robot with your mind (or joystick)
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
Shirt Pocket Transceiver with the Si5351 and OLED
Shirt Pocket Transceiver with the Si5351 and OLED
All metal C930e webcam
All metal C930e webcam
The Soldering Tools That Make Your Life Easier
The Soldering Tools That Make Your Life Easier
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 c ...
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 cell Lithium ion battery protection

Top




Shares