Universal Robot Controller

This robot controller board is designed based on 28-pin PIC microcontroller from Microchip. It can be programmed to use for various kind of robot interfaces.

Finished board

Features
This controller board can operate using AC adaptor or battery (6 – 12 volt) and equipped with the voltage regulator (LM7805) to ensure a stable 5V 1A Voltage. The PIC is not directly soldered to the board. instead, a socket is used for easy PIC exchange. The IDC header enables in-circuit programming (as for me, I use PIC Kit2 compatible programmer). The I/O pins in port A, B and C can be connected individually to a single device or all pins in line to an external module, each connection type has one +5v and ground pins.

Example of connection to a single device

Example of connection to an external module

Circuits
Below is the schematic of the controller. It consists of regulated power supply, basic circuit to run the PIC and connections to the I/O interface and programming headers.

Power circuit
Main circuit

Component Layout
The components are arranged neatly to minimize the size of the board (dimension = 9.5cm Length x 3.5cm Width).

Component arrangement

Part List
If you would like to build the board, below is the list of components that are required.

ItemParts ValueDescriptionQtyParts
147uF25v Electrolytic Capacitor1C1
20.1uFPolyster Capacitor1C2
31N4004Diod1D1
4LED5mm Red LED1D2
54K7Resistor1R1
60.47KResistor1R2
716F87228 Pin PIC Microcontroller1IC1
8LM7805C5V 1A Voltage Regulator1IC2
94MhzResonator1X1
10SwitchPush On Switch1SW1
11PCB HeaderIDC Header 5×2 Way1CN1
12AC/DC SocketPower Connector Socket1CN2
13Battery HeaderMolex 2 Pin1CN3
14IC Socket28 Pin IC Socket1CN4
15PCB HeaderPCB Header 20 Way1CN5

Testing the Board
Let’s write a program to test the board. The code written using MicroCode Studio and compiled using PIC Basic Pro. The hex file then will be programmed into the board using a usb programmer that I bought from a local electronic store. This time, I have selected PIC16F872 as the brain.

Programming the board

When the controller is run with the example code below, it will continously toggle the pins in port B.

i VAR BYTE
mainLoop:
FOR i = 0 TO 7
TOGGLE PORTB i
PAUSE 50
NEXT
GOTO mainLoop
END


I have built a LED Display Board to test the controller board that run with the code that I have programmed.

Testing the board

What’s next?
The board is now ready to be used for further applications and it will be the basis for other robotics projects. We can create any kind of robot interface using this controller by changing the PIC’s program.

Popular Posts