Bot115 Picaxe Create: Revolution
Bot115 Picaxe Create: Revolution
• Infra-red output
• Piezo output
• LED output
• Darlington transistor output (e.g. for buzzer)
• L293D reversible motor driver output
• Servo Output connector
(purchase GBX013 servo separately)
• SRF005 Ultrasonic Range Finder connector
(purchase SRF005 sensor separately)
• Serial LCD connector
(purchase AXE133 or AXE133Y Serial LCD separately)
This manual includes side by side examples of both ‘PICAXE BASIC’ and
‘Logicator flowchart’ programs. Either can be used to program the PICAXE
Create system.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 2
Contents
PICAXE Programming System 1
BOT115 PICAXE Create Contents List 3
PICAXE Create Power Supply 4
The Microbric Connector 4
Programming Software 5
Programming Cable 5
Download Hard Reset 6
PICAXE-18M2 Pin Connections 6
Assembly Guide - BOT116 Outputs PCB Panel 7
Assembly Guide - BOT123 Servo Outputs Pack 9
Assembly Guide - BOT117 Inputs PCB Panel 10
Assembly Guide - BOT121 Sensors PCB Panel 12
BOT127 (optional) Line Tracker / LED Upgrade Pack 14
TVR010A (optional) Infra-red TV Style Remote 15
Programming Example 1 - LED Module 16
Programming Example 2 – Push Button Switch 17
Programming Example 3 – Piezo Sounder 18
Programming Example 4 – Motors 19
Programming Example 5 – Infra-red Receiver 22
Programming Example 6 – Infra-red Transmitter 23
Programming Example 7 – LDR Light Sensor 24
Programming Example 8 – (optional) SRF005 Ultrasonic 25
Programming Example 9 – Servo 26
Appendix 1 - Making your own sensors 27
Appendix 2 - BOT115 Motherboard Schematic 28
Appendix 3 - BOT116 Output Modules Schematic 29
Appendix 4 - BOT117 Input Modules Schematic 30
Appendix 5 - BOT121 Sensors Pack Schematic 31
Appendix 6 - BOT123 Servo Pack Schematic 32
Appendix 7 - Copyright and Trademarks 33
BOT120 Microbot - the robot version motherboard!’ 33
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 3
1 Buzzer SPE005
1 LCD Cable DAG002
1 Servo Cable DAG001
http://www.picaxe.com/docs/bot115.pdf
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 4
A unique aspect of the Create system is that, once the modules have been
initally assembled, all reconfiguration of the system can be completed
without requiring a soldering iron or other tools apart from an Allen key.
All parts of the Create starter pack either bolt or clip together so can be
quickly and easily connected, rearranged, or removed as required.
The circuit boards are connected to each other using a patented plastic
‘microbric’ system. The bric has two purposes, firstly it physically holds
the modules together and secondly it provides electrical connection
between the modules.
Each bric has three holes into which nuts should be inserted to form a
complete bric assembly
Each bric has four locating posts which mount with corresponding holes
in the circuit board modules; two posts go into one board and two into
the other.
Note that the posts only allow the bric to be connected in one way.
When correctly oriented the connecting bric will fit flush to the circuit
board. If incorrectly fitted the connecting bric will be angled to the circuit
board; in this case remove the connecting bric, rotate it through 180
degrees and then refit.
When aligned correctly, bolts are then used to clamp the two modules
together and to form electrical contact from one board to the other.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 5
Programming Software
The ‘brain’ of your Microbot is a PICAXE-18M2 microcontroller.
All software can be downloaded from the software pages of the PICAXE
website at www.picaxe.co.uk
In addition to the Microbot and your preferred software you will also
need a download cable to connect your computer to the Microbot to
download your programs. We recommend the AXE027 USB download
cable.
Programming Cable
Once the AXE027 USB download cable has been installed and you have
drawn your flowchart or written your PICAXE BASIC program you need
to connect the cable to the download socket on the motherboard. Make
sure the jack plug is fully pushed into the socket.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 6
A Hard Reset is performed by turning your boards power off using the
slide switch on the motherboard, starting the download, and then
turning the power back on. As the PICAXE-18M2 wakes-up it will always
check for a download request and allow the new program to be
downloaded, regardless of the program in memory.
All circuit board modules are connected via the connector bric; bolting
the bric into place completes the electrical connection from one board to
the other.
In order to control your system you need to interact with its hardware via
programming the appropriate PICAXE-18M2 pins.
Note that the ‘Logicator for PICAXE’ flowcharting software uses a slightly
different pin naming system than the BASIC language used by
Programming Editor / AXEpad. In Logicator the portB pins are simply
called ‘outputs’ and the port C pins are simply called ‘inputs’.
PICAXE-18M2
(DAC / Touch / ADC / Out / In) C.2 1 18 C.1 (In / Out / ADC / Touch)
(SRQ / Out) Serial Out / C.3 2 17 C.0 (In / Out / ADC / Touch)
(In) Serial In / C.4 3 16 C.7 (In / Out) {kb data}
(In) C.5 4 15 C.6 (In / Out) {kb clock}
0V 5 14 +V
(SRI / Out / In) B.0 6 13 B.7 (In / Out / ADC / Touch)
(i2c sda / Touch / ADC / Out / In) B.1 7 12 B.6 (In / Out / ADC / Touch / pwm)
(hserin / Touch / ADC / Out / In) B.2 8 11 B.5 (In / Out / ADC / Touch / hserout)
(pwm / Touch / ADC / Out / In) B.3 9 10 B.4 (In / Out / ADC / Touch / i2c scl)
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 7
1 Buzzer SPE005
The circuit boards of the BOT116 Outputs Pack require a small number of components
to be fitted and a small amount of simple soldering. All components required are
supplied.
Assembly Instructions:
Carefully remove all PCBs from the panels by applying a gentle rocking motion to the
PCBs until they snap out of the panel. Note that in each case the bottom of the PCB is
marked with the gold text label (e.g. Piezo).
Piezo Module
Solder the piezo onto the PCB (either way around) and cut the legs short.
LED Module
Place the 33 resistor (orange orange black gold) over the black text on the board so that
the legs come out the solder pads on the bottom of the board. Resistors can be placed
either way around. Solder in position and cut the legs short.
Place the long leg of the LED through the ‘red’ hole on the PCB. Solder in position and
cut the legs short.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 8
If desired, screw the supplied buzzer into the terminal block, ensuring
the coloured wires match the coloured markers on the PCB.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 9
* Please note that the 3 x 3 way headers may sometimes be supplied as 1x10
way header which needs to be simply snapped into 3 x 3 way lengths.
Assembly:
Carefully remove all PCBs from the panels by applying a gentle rocking
motion to the PCBs until they snap out of the panel. Note that in each
case the bottom of the PCB is marked with the gold text label (e.g.
SERVO).
SRF005 Adapter
Place the 220 resistor (red red brown gold) over the black text on the top
of the board so that the legs come out the solder pads on the bottom of
the board. Resistors can be placed either way around. Solder in position
and cut the legs short.
Place the 3 way header onto the top of the PCB, so that the pins come
out the bottom. Solder in position.
Place the 5 way socket onto the top of the PCB, so that the pins come out
the bottom. Solder in position.
Using a Servo
Purchase a servo and connect it to the servo module.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 10
The circuit boards of the BOT117 Inputs Pack require a small number of
components to be fitted and a small amount of simple soldering. All
components required are supplied.
Assembly Instructions:
Carefully remove all PCBs from the panels by applying a gentle rocking
motion to the PCBs until they snap out of the panel. Note that in each
case the bottom of the PCB is marked with the gold text label (e.g.
button).
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 11
The optional 4 way connector is for connecting an iButton probe, part RSA001
(not supplied).
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 12
The circuit boards of the BOT121 Sensor Pack require a small number of
components to be fitted and a small amount of simple soldering. All
components required are supplied.
Assembly Instructions:
Carefully remove all PCBs from the panels by applying a gentle rocking
motion to the PCBs until they snap out of the panel. Note that in each
case the bottom of the PCB is marked with the gold text label (e.g. IR
RX).
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 13
Place the two 220 resistors (red red brown gold) over the black text on
the bottom of the board so that the legs come out the solder pads on the
top of the board. Resistors can be placed either way around. Solder in
position and cut the legs short.
Bend the infra-red receiver legs at 90 degrees so that it can lie flat on the
top of the PCB between the resistor solder joints. Solder the 3 receiver
legs on the other side of the PCB and cut the legs short.
Place the 33 resistor (orange orange black gold) over the black text on
the top of the board so that the legs come out the solder pads on the
bottom of the board. Resistors can be placed either way around. Solder
in position and cut the legs short.
Carefully bend the legs of the LED so that it points out at 45 degrees to
the PCB. The IR LED on the first board should always be in the position
nearest the black terminal on the bric connector point. If using two IR
LEDs make sure they point in opposite directions on the two boards. The
long leg (anode) of the LED must be placed in the red hole. Solder in
position and cut the legs short.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 14
Assembly:
Carefully remove all PCBs from the panels by applying a gentle rocking
motion to the PCBs until they snap out of the panel. Note that in each
case the bottom of the PCB is marked with the gold text label (e.g. LED).
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 15
Before use, the universal remote control must be programmed with the
special ‘Sony’ transmit code.
Note that buttons A, C, D, E, F and G are for setting the remote control
into different modes which are not required for using the Microbot - the
Microbot only ever uses mode B. We recommend always pressing ‘B’
before use.
Avoid pressing these other letter buttons as this will accidentally set your
remote into another mode. You can always return to the ‘B’ mode by
pressing the B button.
When a key is pressed on the remote control the red LED in its top left
corner will light and flash and a number will be sent to the Microbot IR
receiver. These numbers will correspond to keys pressed as follows:
Symbol KEY_POWER = 21
Symbol KEY_UP = 16
Symbol KEY_DOWN = 17
Symbol KEY_RIGHT = 18
Symbol KEY_LEFT = 19
Symbol KEY_1 =0
Symbol KEY_2 =1
Symbol KEY_3 =2
Symbol KEY_4 =3
Symbol KEY_5 =4
Symbol KEY_6 =5
Symbol KEY_7 =6
Symbol KEY_8 =7
Symbol KEY_9 =8
Symbol KEY_MINUS = 98
Symbol KEY_0 =9
Symbol KEY_PLUS = 11
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 16
The following flowchart will turn the left LED on for half a second, turn
that LED off and turn the right LED on for half a second and repeat.
main:
low B.1
high B.3
pause 500
high B.1
low B.3
pause 500
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 17
Connect the push button module to input C.6 and an LED module to
B.3. Reading pin C.6 will return a reading of 1 when the button is pushed
and a value of 0 when it is not pushed.
The following program tests the operation of the push button by lighting
the an LED on the motherboard B.3 when the button is pushed.
main:
if pinC.6 = 1 then
high B.3
else
low B.3
end if
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 18
The following program will play the “Happy Birthday” tune whenever the
push button (on input pin C.6) on the motherboard is pushed.
main:
if pinC.6 = 1 then
play B.2,0
end if
goto main
The following program will make a two-tone beep whenever the push
button (input pin C.6) on the motherboard is pushed.
main:
if pinC.6 = 1 then
sound B.2,(50,100,100,100)
end if
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 19
There are four output pins used to control motor directions, left motor
drive forward, left motor drive backward, right motor drive forward and
right motor drive backward. Motor control pins are assigned as below:
Veer Left
Low High Low Low
Forward
Veer Left
Low Low High Low
Backward
Veer Right
Low Low Low High
Forward
Veer Right
High Low Low Low
Backward
A ‘turn’ movement is an ‘on the spot spin’ when one motor is switched
forward and the other backward.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 20
Logicator Only
BASIC Only
Veer Left
Forward B Halt A
Forward
Veer Left
Halt B Backward A
Backward
Veer Right
Halt B Forward A
Forward
Veer Right
Backward B Halt A
Backward
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 21
main:
forward A ; go forwards
forward B
; test bumpers
; to see if hit
if pinC.2 = 1 then doLeft
if pinC.1 = 1 then doRight
goto main
doLeft:
backward A ; reverse for 0.5s
backward B
sound B.2,(50,100) ; beep
pause 500
forward A ; turn for 0.32s
backward B
pause 320
goto main
doRight:
backward A ; reverse for 0.5s
backward B
sound B.2,(100,100) ; beep
pause 500
backward A ; turn for 0.32s
forward B
pause 320
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 22
main:
irin C.0,b1
debug
goto main
main:
irin C.0, b1
select case b1
case KEY_UP
forward A
forward B
case KEY_DOWN
backward A
backward B
case KEY_LEFT
backward A
forward B
case KEY_RIGHT
forward A
backward B
case KEY_MINUS
low B.1, B.3
case KEY_PLUS
high B.1, B.3
case KEY_DIAG_CROSS
halt A
halt B
end select
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 23
To check the IR Transmitters are working fully you will need two
Microbots, one sending and one receiving and reporting what it has
received. The operation of the IR transmitters is invisible to the human
eye but can usually be observed by using a PC webcam, mobile phone
camera or camcorder.
Take care not to place any webcam, digital camera or camcorder too close
to the IR LEDs to view their operation as this may permanently damage
the image sensors. Observing the IR LEDs in this manner is undertaken
entirely at your own risk.
symbol KEY_UP = 16
symbol KEY_DOWN = 17
main:
irout B.0, 1, KEY_UP
pause 5000
irout B.0, 1, KEY_DOWN
pause 5000
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 24
main:
readadc C.1,b7
debug
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 25
#terminal 9600
main:
pause 10
pulsout C.2, 2
pulsin C.2, 1, w0
w1 = w0 * 10 / 58 ; Convert to cm
w2 = w0 * 10 / 148 ; Convert to inches
sertxd(“Distance is “, #w1, “cm”,CR,LF)
sertxd(“Distance is “, #w2, “inch”,CR,LF)
goto main
For Logicator flowcharts use of the SRF005 is very simple, as all the ‘hard
work’ is carried out automatically via the ‘ultra’ command cell. The
BASIC program is slightly more complex.
Note that there should be at least a 10ms pause between each triggering
of the SRF005 Ultrasound Module.
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 26
The following program will turn a connected servo from left to right
switching every two seconds.
main:
servo B.0, 100
pause 2000
servo B.0, 200
pause 2000
goto main
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 27
Note the order of the connection point contacts on the servo header:
Note that the motherboard has 220 ohm series protection resistors on all
signal lines on the motherboard (see the circuit diagram in the appendix
2). This must be accounted for when designing home made circuits.
The maximum output sink/source current of any i/o pin is 20mA, with a
maximum total load of 90mA for all output devices. Exceeding these
values may permanently damage your motherboard.
www.rev-ed.co.uk/docs/bot120.pdf
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 28
1 2 3 4 5 6
D D
D
+
-
C.7 C.6 C.2 C.1 C.0
5V 5V 5V 5V 5V
5V
5V +
B.7
SW SPDT B.7 D
1
CON2 C1
CAPACITOR
-
C C
5V
B.6
B.6 D
J2
R2 C2
22k CAP
-
PHONEJACK2
R1 5V 5V
10k RP1 U1 RP2
C.2 1 16 1 16 C.1 5V
1 18
2 15 2 15 C.0
B.5
10 7 10 B.5 B.5 D
7 12
B.3 8 9 8 9 B.4
B 8 11 B
9 10
220 x 8 220 x 8
PICAXE18M2 -
5V 5V 5V 5V 5V
B.0 B.1 B.2 B.3 B.4
+
+
-
-
D
D
B.0 B.1 B.2 B.3 B.4
OUTSIDE EDGE 1-1-1 OUTSIDE EDGE 1-1-1 OUTSIDE EDGE 1-1-1 OUTSIDE EDGE 1-1-1 OUTSIDE EDGE 1-1-1
A A
1 2 3 4 5 6
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 29
1 2 3 4 5 6
D D
X201Pos
+ +
P1
D 1 D
1
2
2
U1
Piezo 1 16
- -
2 15
J2
3 14
4 13 C1 1
5 12 100nF 2
C 6 11 C
Terminal Block
7 10
8 9
+
L293D
Transistor Output D
J1
Terminal Block
2
-
D1
1
A K
1N4001
2
1
D R1 Q1
100 BCX38C
-
B B
A A
1 2 3 4 5 6
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 30
1 2 3 4 5 6
D D
J1
S1
+
D Touch Pad D D
D
C - C
R1 SW SPDT Terminal
X201Neg
- - 10k -
+ + R3
TACT SWITCH 4k7
B J2 B
S01 U1
B1 A1 1 LED+
VDD
D B2 A2 D 2 LED-
DQ
3 1-wire
GND
4 0V
R2 DS18B20
1-wire header
- 10k -
A A
1 2 3 4 5 6
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 31
1 2 3 4 5 6
D D
X201Pos
+ X202Pos
+ + R206
330R
IRD1
D R201 D R202 D R205
O
33 33 220R GND
V
C D201 D203 D202 D204 C
- - - IRM DETECTOR
LED LED LED LED
LDR A LDR B
LDR201 LDR202
+ 58-0134 + 58-0134
B B
D D
- R207 - R208
10k 10k
A A
1 2 3 4 5 6
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 32
1 2 3 4 5 6
D D
C C
+ +
5
4 1 1 1
220 D D
3 2 2 2
2 3 3 3
1 Servo Servo Servo
SRF005 - -
B B
A A
1 2 3 4 5 6
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD
BOT115 PICAXE Create 33
revolution (c) Copyright Revolution Education Ltd. Web: www.picaxe.co.uk Version 1.0 11/11
BOT115.PMD