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 |
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.
Item | Parts Value | Description | Qty | Parts |
1 | 47uF | 25v Electrolytic Capacitor | 1 | C1 |
2 | 0.1uF | Polyster Capacitor | 1 | C2 |
3 | 1N4004 | Diod | 1 | D1 |
4 | LED | 5mm Red LED | 1 | D2 |
5 | 4K7 | Resistor | 1 | R1 |
6 | 0.47K | Resistor | 1 | R2 |
7 | 16F872 | 28 Pin PIC Microcontroller | 1 | IC1 |
8 | LM7805C | 5V 1A Voltage Regulator | 1 | IC2 |
9 | 4Mhz | Resonator | 1 | X1 |
10 | Switch | Push On Switch | 1 | SW1 |
11 | PCB Header | IDC Header 5×2 Way | 1 | CN1 |
12 | AC/DC Socket | Power Connector Socket | 1 | CN2 |
13 | Battery Header | Molex 2 Pin | 1 | CN3 |
14 | IC Socket | 28 Pin IC Socket | 1 | CN4 |
15 | PCB Header | PCB Header 20 Way | 1 | CN5 |
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.