And In-Circuit Programming
Back To Index
Tail Wheel Assembly
[click photo for larger view]
Tail Wheel Assembly:
As shown in the photo above,
Micro-Bot uses a Great Plains RC airplane tail wheel assembly, and a
precision "press-to-fit" 3x10x4mm micro-bearing for the rear tail wheel.
The bearing is pressed into the rear bumper as shown below in Photo #1. To level Micro-Bot or make adjustments, remove
the top metal collar using the hex key wrench provided. Loosen the lower
black metal collar, and slide the axle shaft up or down through the bearing
to make the adjustment. Re-install the upper & lower metal
shaft collars pressing them both firmly against the bearing while tightening
the collar set-screws. The shaft & tail assembly should spin freely when
both collars are installed properly.
The precision micro-bearing
provides very smooth mechanical movements of the rear tail wheel axle and prevents
binding. Keep both collars snug against the micro-bearing to prevent lateral
movement, but do not over tighten.
Photo #1: Tail Wheel Assembly &
Connect the left servo motor connector to the 3-pin header marked "A". Connect the right servo
motor connector to the 3-pin header marked "B". The silk-screen
legends on the circuit board labeled W are the servo PWM control wires.
These PWM control wire on some servo brands will be white, while others may be
orange. Check the servo datasheet before making the motor connections to
avoid damaging the servo.
Grand Wing Servo Wire Colors:
[Default servos shipped with each Micro-Bot]
Orange = PWM Control Wire [Connect
Red = + Positive [Connect to R]
Brown = Ground [Connect to B]
Parallax & Futaba Servo Wire Colors:
White = PWM Control Wire [Connect
Red = + Positive [Connect to R]
Black = Ground [Connect to B]
Figure #1 shows the correct servo
connections for Grand Wing brand servos. If you're using servo motors with
white/red/black wire colors, the white wire will connect to the W position.
Red to R, and black to B.
Figure #1: Grand Wing Servo
The pin sockets marked A & B shown above
in Figure #1 are for making the PIC I/O-pin connections to the modified
servo motor PWM control lines.
Use the two motor wires provided with Micro-Bot
to make the connections between the A & B pin sockets [shown in
Figure #1a below], and the PIC I/O-pin female header socket [shown in Figure
#1b below]. The bare motor wire ends plug into the A & B pin sockets. The
other end of each motor wire has a 0.025 square male pin which plugs directly into the
female header sockets [shown below in Figure #1b] to connect the PIC I/O-pins to
each servo motor PWM control wire. Micro-Bots motor wires are the two wires
with heat shrink on both ends.
Figure #1a: A & B Motor Wire
Figure #1b: PIC Motor Wire
Servo & Main Board Power
Figure #2 shows the
2-position screw terminals for connecting the 4 x AA, and 9-Volt batteries.
The servo power wires are used to hold the servo PWM control wires in
place by running the servo power wires up & under the circuit board, then around
the servo control wires, and then back through the plastic wire guide. We
found this handy for keeping the servo wires tight against the plastic wire
Four AA batteries
provide power for the servo motors. Connect the AA battery wires to the left
screw terminal marked SERVO as show below in Figure #2.
The 9-volt battery provides power for
the microcontroller and experimental circuits.
Figure #2: Power Connection Screw
Connect the leads from the 4 x AA
battery pack to the 2-position screw terminal marked SERVO as shown above in
Figure #2. The leads from the 9-Volt battery holder connect to the rear
2-position screw terminal on the right in Figure #2 above.
When making battery connections be sure to observe polarity markings on the
circuit board. Plug the red [positive] battery lead into the screw terminals
marked +, and black battery leads into the screw terminal marked -
[negative]. Reversing polarity on the battery connections may damage the
servo motors. The +5V regulator for the microcontroller power section is
diode protected to help prevent damage, but if polarity is reversed on the
primary power input, the microcontroller section will not have power.
Figure #2 above shows the primary power
switch in the OFF position. The center position supplies power to the
microcontroller section. Slide this switch into the MIC position to program
the PIC in-circuit without power to the motors. Slide it to the ALL position
to supply power the motors & microcontroller. Figure #3 shows a close-up of
the primary power switch. Be sure to return the power switch to the OFF
position when you're not using Micro-Bot to conserve batteries.
Figure #3: Close-up of Switches,
As shown above in Figure
#3, the Micro-Bot
circuit board has a switch thatís marked XT IO. This switch is used to
select the PIC internal oscillator or external oscillator. It also
connects or disconnects the PIC16F628 PortA.6 & PortA.7 oscillator pins from the
female headers used for I/O connections as shown in Figure #3 above.
= External crystal connected to PIC oscillator pins. Port pins RA.6 &
RA.7 are disconnected from the female I/O connection header, and cannot
be used for general purpose I/O.
Position = External crystal is disconnected from PIC oscillator pins. Port
pins RA.6 & RA.7 are connected to the female I/O connection header, and
can be used for general purpose I/O.
With this switch in
the IO position, youíll need to use the 16F628 internal oscillator, and
replace the @ DEVICE HS_OSC entries with @ DEVICE INTRC_OSC to use the
PIC16F628 series internal 4MHz oscillator..
Using the internal
oscillator frees up pins RA.6 & RA.7 for use as normal I/O-pins. When using
an 18-pin PIC without an internal oscillator, this switch should always
remain in the XT position to ensure the external crystal is connected to the
of the code examples provided with Micro-Bot are written for use with a 20MHz
crystal. Using 20MHz keeps timing compatible with projects you'll find for the
BASIC Stamp, including the BOE or Board of Education BASIC Stamp robot. If you
use the PIC16F628 internal oscillator, or prefer to use an external 4MHz
crystal with Micro-Bot, you will need to make adjustments to the example code
provided with Micro-Bot.
PGM/RUN Switch & In-Circuit Programming
The PGM/RUN switch
is used to switch between in-circuit programming, and run mode. In the PGM
position pins RB.6 & RB.7 of the PIC microcontroller connect to the in-circuit programming header allowing
the PIC installed in Micro-Bot to be programmed in-circuit. The EPIC Plus, Warp-13,
and several other device programmers are capable of in-circuit programming.
If you plan to use a device programmer other than the EPIC Plus or Warp-13,
check with the manufacturer of your programmer to be sure it supports
programming, simply move the switch back to the RUN position to use
pins RB.6 & RB.7 for general purpose I/O. This switch allows programming
the PIC microcontroller "in-circuit" without disturbing external circuits connected to the PICs
program data & clock pins RB.6 & RB.7. Without this switch, we would need to
remove the PIC from the socket for programming or disconnect
external circuits from pins RB.6 & RB.7 prior to in-circuit programming. Loads on
these pins will cause in-circuit programming errors, and possibly damage some types of
external circuits. Refer to the Micro-Bot schematics for further details.
shows the EPIC Plus programmer connected to Micro-Bot, the PGM/RUN switch,
and the in-circuit programming headers. The EPIC Plus programmer has a dual
10-pin header [dual row, five pins in each row] that's used for connecting
Zero-Insertion-Force programming adapters to the EPIC. These adapters are for
programming different package
styles such as 8-18-20 pin DIP, 28-40-pin DIP, and many different surface
mount package styles. This same 10-pin header also serves to connect
the EPIC Plus to the Micro-Bot main board for in-circuit programming as shown
below in Figure #4.
Notice how the
5-pin Warp-13 in-circuit programming header pins are labeled RB6, RB7, VPP,
GND, and VDD. This 5-pin header corresponds to the Warp-13a programmer
in-circuit programming header.
Important Note: VDD from the Warp-13a &
EPIC programmers is not used to power the Micro-Bot board
during in-circuit programming. The VDD silk screen legend on the
Micro-Bot board programming headers is for in-circuit programming cable orientation purposes
only. The VDD header pin does not connect VDD from either programmer to VDD on the
Micro-Bot circuit board.
Power to the
Micro-Bot board during in-circuit programming is provided by the 9-volt
power supply installed in the Micro-Bot battery holder. The OFF/MIC/ALL power switch
must be in the MIC position during in-circuit programming, and the EPIC or
Warp-13a must be separately powered by their own power supply's.
main board has a Vpp blocking diode that isolates the programmers higher Vpp
programming voltage from the main boards power supply rail during in-circuit
programming. This diode is labeled D1 on the
Micro-Bot Main Board Schematic
Figure #4: EPIC Plus Programmer
In-Circuit Programming Connection
Steps For In-Circuit
Programming With The EPIC Plus:
Install Micro-Bots 9-volt battery
Compile your code to produce
the Intel .HEX file ready to burn into the PIC [or open the projects .HEX on
Move the Micro-Bot PGM/RUN switch to the
PGM position as shown above in Figure #4
Connect the EPIC Plus programmer with a
10-pin ribbon cable to the Micro-Bot 10-pin in-circuit programming
header as shown above in Figure #4
If you don't have the 10-pin ribbon
cable, you can wire the EPIC to the header as shown in the
Micro-Bot Main Board Schematic
or remove the PIC and program it directly in the EPIC
Connect the EPIC programmers 25-pin
cable to your PC parallel printer port, and connect power to the programmer
If not already running, start your PC
Start the EPIC programmer software
Locate and open your compiled program
code .HEX file
Move the Micro-Bot OFF/MIC/ALL switch
into the MIC position. The green power indicator LED should be on
Click the Program button on the EPIC
software screen to program the PIC16F628 in-circuit on the Micro-Bot board
Move the PGM/RUN switch back to the RUN
Remove the 10-pin ribbon cable
connecting the EPIC to Micro-Bot in-circuit programming header
Your program should now be up & running.
If not, start over again, carefully, from the
Programming With The Warp-13 or Other Programmer:
In front of the 5-pin
in-circuit programming header on the Micro-Bot circuit board labeled Warp,
you'll see white silk screen legends RB6, RB7, VPP, GND and VDD.
RB6 is the programming
"clock" pin. RB7 is the programming "Data" pin. The programmer clocks in
data during the programming process on these two pins. VPP is the
programming voltage applied to the PICmicro /MCLR pin by the programmer during programming.
GND is for the common circuit ground connection between the PIC in-circuit &
programmer power supply. VDD is +5V
from the programmer, and is not used for programming the PIC on Micro-Bot.
Micro-Bot its 9-V battery/regulated +5V power supply during in-circuit
programming. The VDD silk screen legend is for in-circuit programming cable
orientation purposes only, and does not connect the programmers VDD to
Most programmers will
support in-circuit programming, and you can simply wire the RB6, RB7, GND,
and VPP signals from the programmer to the 5-pin in-circuit programming header
labeled Warp, but it's advisable to
check your programmers documentation or check with tech support where you
purchased your programmer to be 100% sure your programmer will support
For the Warp-13, the
silk screen legend marked RB6, RB7, VPP, GND and VDD on Micro-Bot match the silk screen legends on the
Warp-13s white 5-pin in-circuit programming header. Simply wire these
connections to the header on Micro-Bot from the Warp-13. The Warp-13
software documentation has part numbers for cable connectors available from Digi-Key to construct your own in-circuit programming cable.
Easy Swap Oscillator:
Micro-Bots 20MHz oscillator is installed in pin sockets allowing quick
changes to support different crystal oscillators. If you need to
swap-out the crystal, simply un-plug the one that's installed & plug-in another
one. Be sure to turn power off when replacing crystals. Some crystals have
very long leads, and you may want to trim them down a bit to keep the
crystal from extending too far above the crystal pin sockets. We've trimmed
about 1/8" from the crystal leads as shown in the photos below.
Note: The Micro-Bot crystal
oscillator circuit uses 22pF capacitors [yellow caps shown in photos below].
If you use another crystal with Micro-Bot, be sure to use a parallel cut
crystal, and one that will function with the 22pF parallel capacitors in
Micro-Bots oscillator circuit.
OFF/MIC/ALL Power Switch:
has two separate power sources. One 9V battery for the microcontroller
section, and four AA batteries providing 6-volts to the servo motors. The power switch [shown
below] is marked
OFF MIC ALL, and switches power to the microcontroller circuit when in the
MIC position. In the ALL position power is switched ON to the microcontroller + servo motors.
In the OFF position, power is switched OFF to both motors and primary
controller. Turn power off before making any circuit connections, and when
Micro-Bot is not in use.
Move this switch to
the MIC position for
in-circuit programming, and then move it to the ALL position to enable the servo
motors. In the OFF position no power is supplied to motors or primary board, and
batteries will be conserved. The green power indicator LED will be ON with
this switch in the MIC or ALL positions indicating power is ON.
Shown above in Figure #3, the RESET switch connects ground to
the PIC reset or /MCLR when pressed, and can only be used if
you have /MCLR enabled. Using the @ DEVICE MCLR_ON option would allow you to
use the RESET switch to force a hardware reset when pressed. Refer to the
Micro-Bot schematic for details. Itís possible some folks may want to use
the Micro-Bot board for PIC development with the in-circuit
programming capabilities, so we added the external RESET switch to cover all
possibilities. Reset can be used to force Micro-Bot to begin code
execution from the beginning instead of resetting or cycling power with the
Jumpers RA5/C & RA4/P:
As shown below, the Micro-Bot circuit board has two shorting jumpers marked RA5/C and RA4/P. Use of these jumpers is explained
RA5 [Connect] RA4 [10K Pull-Up]
Jumper RA5/C = ON, PIC RA5 input only pin is connected to the prototyping I/O header position marked RA5.
Jumper RA5/C = OFF, PIC RA5 pin is isolated from the prototyping I/O header marked RA5.
Jumper RA4/P = ON, PIC RA4 pin is connected to the R1 10K pull-up resistor.
Jumper RA4/P = OFF, PIC RA4 pin is disconnected from the R1 10K pull-up resistor.
Pin RA5 is input
only with /MCLR internally disabled, and is used during in-circuit
programming. Installing jumper RA5/C connects RA5 to the prototyping
headers to be used as an input pin.
Vpp [programming voltage] is applied to RA5 by the programmer during the
in-circuit programming process, and this may be potentially damaging to an external
circuit or the programmer if the external circuit is connected to RA5 during
in-circuit programming. Care should be
taken if you use RA5 as an input pin together with in-circuit programming to avoid external
circuit connections to RA5 during in-circuit programming.
If you do not
need RA5 for an input pin, please leave the RA5/C jumper OFF. Micro-Bot is
shipped without the RA5/C jumper installed, and the RA4/P pull-up jumper
With jumper RA4/P installed, PORTA.4
is connected to the 10K pull-up resistor R1 as shown in
the Micro-Bot schematic. RA.4 is a bi-directional I/O-pin, but can only output [sink]
ground since itís an open-drain type output pin. Connecting the 10K pull-up
resistor to RA.4 with the RA4/P shorting jumper allows the pin to function
normally. IE, it can output ground as any other I/O-pin, and +5V through the 10K pull-up resistor.
The photo in
Figure #3 above shows RA4/P disabled, and RA5/C enabled. Be sure when you
place the shorting jumpers on these headers to connect each jumper as shown
on RA5/C in the Figure #3 photo. Each shorting jumper will be "in line" with
the silk-screen legend on the circuit board when properly installed to
enable the optional feature. You can remove a jumper or install it on one pin as shown
in Figure #3 for the RA4/P disabled position. Leaving the jumper on a single
pin when disabling a feature helps prevent loosing the jumper. These jumpers
are small and easy to misplace.
Micro-Bot Main Circuit Board
Body & Wheel Assembly
Back To Index
Copyright © 2007