Home ] Up ] [ TrikiBoard 1 (8052) ] TrikiBoard 2 (PIC 16F877) ] TrikiBoard Tips ]

TrikiBoard 1

Before reading this page, I hope you have already read the Triki Board Overview.

Block Diagram of TrikiBoard-1

In the block diagram of TrikiBoard-1 above: 

  • All connections to/from the Board are shown by small circles.

  • IC4, MAX232, is used to connect to the PC by serial port. This connection is useful for debugging and controlling the robot by issuing the command through the keyboard of the PC. Though in real autonomous run of the robot, this connection would be taken off.

  • IC3, 74HC573 is used to demultiplex the address bus for the 32KB RAM chip.

  • IC2, L298D, is a dual H-Bridge DC motor driver. 

This is How the completed TrikiBoard-1 would look.


How to Make it

To get the PCB made:

The process to get the PCB made has 2 steps:

  1. Make the film from Gerber files

  2. Make the PCB from the film

Step 1: Getting the Film Made:

  • Either give the Gerber files to your PCB maker. (you can email the Gerber files directly to Image & co., and call them on 28347898. They will make the "films or photoplots" of your pcb, which you'll give to any PCB maker.) Get the Silkscreen and printing of labels also done on the PCB if you can spend more. (Approx cost of photoplots with legends Rs. 400-450 at Image).

  • Or print the Top and Bottom layer PDF files on a 1200 dpi laser printer, and give the printout to your PCB Film maker or PCB maker directly. I do not recommend this method as the print quality may not be good, and tracks may get shorted. But this is the last resort usually of the Non-Metro residents.

  • Getting the Film made from a printout (the second method above) is usually less expensive but the quality may not be proper. Your Film-maker will tell you if he can make it from the printout you'll give to him after looking at it. (approx cost is 25paise/cmsq).

  • Getting the Film made from the Gerber File is more expensive, but the quality is best. It would be better if many friends share a common film's cost. (In IIT, one of the Yantriki coordinators may get many PCBs made in bunch after finding out the demand, as was done a few years ago).

  • IITan's can also try getting their complete PCB done in the PCB facility of EE dept for free. But that pcb would not have component names printed on it. Moreover the dept. facility may not allow too many PCBs of the same type because the tool there is much more expensive in its running cost.

Step 2: Getting the PCB Made:

  • Just give the Film to PCB maker.  (Some vendors in Bombay are listed on the Vendors page here.)

  • IMPORTANT: Tell the PCB maker to drill, 0.8mm holes for the L298 & 7805 chip. If the holes are not big for these 2 chips, the chip wont go in the PCB and whole PCB would be useless. 


  • Refer to the Component Layout PDF file and Parts List while soldering and the image of the final board.

  • IMPORTANT: NOTE THAT R1 and C3 are UNDER the 89c52 chip. Hence solder these first among all. Solder C3 such that it can be bent under the chip (leave little pin length above the surface to allow bending) Or solder it on the opposite side (Take care of the polarity of C3).

  • Then follow the usual soldering procedure: Solder IC Sockets first, and the components with lowest height first. Thus capacitors, connectors and 7805 go to board last.

  • RN1 & RN2 are Single-in-Line Resistor packs (called SIP resistors in market). Use 4K7 sips, with 8+1 pins. The common pin, denoted by a dot, goes to Vcc (+5v) track.

  • Note that there are tracks on top layer under the Crystal Q1. Hence do not touch the metal body of the crystal to the surface if the PCB is not green painted.

How to Use TrikiBoard

As mentioned earlier, TrikiBoard Version 1.0 is very simple board just to give a head start to Yantriki Level 3 participants who need a Microcontroller Board to control their robots, and it forms a base for EDL Beginners if all they need is a Serial Link to PC or Memory interface to mcu to check their initial project designs.

Power Supply: Apply 8 to 12 volts through the connecter K1. This Battery voltage shall be used to drive the motors by the board. The 7805 chip on-board shall produce 5 volts for the microcontroller. If the 7805 or L298D gets heated too much on your board, add a Heatsink to these chips. Commonly available 7805 would require a heatsink.

Program the microcontroller with the basic test programs given at the end of this page. Then write your own code.

Provisions on TrikiBoard ver. 1.0

Dual H-Bridge for DC Motors

The board can drive 2 DC Motors (which maybe wheel-drive motors). The chip L298D is Dual H-Bridge chip. The motor directions are controlled by the 4 port pins as follows

P1.4  P1.5 Motor 1 (K1)
0       0 Off
0       1 Forward
1       0 Reverse
1       1 Off
P1.6  P1.7 Motor 2 (K2)
0       0 Off
0       1 Forward
1       0 Reverse
1       1 Off

Speeds of the Motors can be controlled by generating a PWM on these Port pins by software. In other mechatronic applications, a Bi-polar stepper motor (usually 4-wire type) can also be controlled if its 2 windings are connected to K1 & K2 instead of 2 dc-motors.

The 2 LEDs associated with each Motor, on-board, can be used for debugging. Red Led would signify one motor direction and Green the opposite. The L298 can drive practically 12V, 1A consuming motors by each driver.

NOTE: The actual Voltage supplied to the DC motor would be = Vbatt - Vdrop_in_L298D_IC

The usual drop on the transistors inside the L298D is 1.5 to 2.5 Volts. Hence if your battery Voltage is 12V, assume that the motors would practically run at about 10V.

See a quick explanation of how PWM is used to control the speed .

Modification for Running 2 Stepper Motors

If you need to run 2 Stepper Motors, you can add a ULN2908 IC as connected in TrikiBoard-2 and connect 2 Stepper Motors as shown here.


This external RAM is provided in-case your Maze-solving algorithm in Yantriki level 3 requires lot of RAM. EDP users sometimes need just a microcontroller with external RAM to test their initial designs. This board can be used instead of messing with the breadboard wires. The RAM start address is 0000H. :)

RS232 Port

A serial link can be established between a PC and TrikiBoard by EDL junta if needed, and Yantriki users for debugging (Note: in actual Yantriki Contest (maze solving) no off-board link/processing is allowed).

If needed, connector K4 has to be connected to the the 9-pin Serial connector of the PC as follows.

K4 pin (TrikiBoard) PC 9-Pin D-type
1(Gnd) 5 (Gnd)
2 (Tx) 2 (Rx)
3 (Rx) 3 (Tx)

Hyperterminal in windows can be used to check the serial link. Use the simple serial test program given in samples to check the serial link.

14 Digital IO Lines and prototyping Area

The 14 digital lines are available on pin headers JP1 and JP3. The general purpose pcb area can be used to add simple sensor amplifier circuits etc. Yantriki users may observe that an ADC is missing in this design. If you need an ADC you can add AD0801 on the prototyping area or use TrikiBoard-2 ! This chip is single channel ADC but is not as wide at AD0809 (with 8 analog channels) so it can fit in the prototype area. Anyway, for current Yantriki level-3 problem, I don't think an ADC is necessary, and simple op-amp based comparators may do the job (big hint!).

The power supplies for the extra circuits/sensors can be taken from pin-header JP2.

AT89C52 Microcontroller

Atmel AT89C52 is used in TirikiBoard Ver.1.0, because is it low cost and commonly available in India. For the un-informed, its just an 8052 with 8KB Flash program memory (plus a clock-out option which a beginner will not use).


To write and simulate programs you can download the C51 tools from www.keil.com. The hex files generated after compiling the code, are to be burned in the microcontroller using a programmer. (For IITians in the EE Dept. WEL Lab) The code can be written in C or ASM. Or you can use google to find plenty cross assemblers for 8051.

Sample & Test Code

  1. First compile this mblink1.a51 to check if LEDs are blinking, and Motors (if connected) are running forward and backwards at an interval of 5 seconds. If this code doesn't run, there is a problem with the basic 8052 circuit or L298 circuit on board. See the Samples & Tips section and the intro talk for pointers to debug the circuit.

  2. Next compile this ramtest.c to check the RAM. If RAM is okay green LED of Motor1 would light up in 1-2 seconds else Red LED of Motor 2 would glow. This program also gives an example how External Memory can be used and how programming is done in C on Keil for 8052.

Sensor Links (Yantriki Level 3 specific)

Sensors associated circuits are deliberately not provided with TrikiBoard, because there can be too many sensing styles, strategies, and circuits, there is lot of scope of innovation here.

The reason TrikiBoard was designed, is that many needed a microcontroller board to run their algorithms on, and were trying to find ways to mount the the usual 8051 Kit on the robot.

Here are some links which could be useful, but I guess you can do a better google search and spend more time searching circuits (or making your own).

Vivek Vaid

(for email address: replace <|a-t|> by @ above and _ by .  )