You are on page 1of 70

KAREL

User’s Manual

Karel project has been funded with support from the


European Commission.
This publication reflects the views only of the author, and the
Commission cannot be held responsible for any use which
may be made of the information contained therein.
KAREL
User’s Manual
Mihai Agape
Cristina-Maria Agape
Maciej Aleksandrowicz
Maria-Genoveva Agape

Karel – Autonomous Robot for Enhancing Learning


Karel User’s Manual
Copyright © 2015 by Karel project. Each author owns the copyright of their
work, according to the Author’s Contributions.
This work is licensed under the Creative Commons Attribution-ShareAlike
4.0 International License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/4.0/.
You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material for any
purpose, even commercially.

All trademarks in this manual are trademarks of their respective owners.


Rather than use a trademark symbol after every occurrence of a
trademarked name, we use names in an editorial fashion only, and to the
benefit of the trademark owner, with no intention of infringement of the
trademark.

Authors’ Contributions:
- Mihai Agape: 1, 2.1.2, 2.2, 2.3, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.3, 4.2, 5, 6
- Cristina-Maria Agape; 3.1.1, 4.2
- Maciej Aleksandrowicz: 4.2.3
- Maria-Genoveva Agape: 2.1.1, 3.2, 4.1

Coordinator: Mihai Agape

The information in this manual is distributed on an “as is” basis, without


warranty. Although every precaution has been taken in the preparation of
this work, the authors shall have any liability to any person or entity with
respect to any loss or damage caused or alleged to be caused directly or
indirectly by the information contained in this manual.
Karel User’s Manual

Contents
1 Introduction .................................................................................................................................................. 3
1.1 Important Information! ............................................................................................................................... 3
1.2 What About This Manual Is? ....................................................................................................................... 3
1.3 Who Wrote This Manual? ............................................................................................................................ 3
1.4 What Is Karel?.............................................................................................................................................. 3
1.4.1 Karel – Autonomous Robot for Enhancing Learning ............................................................................... 3
1.4.2 Karel, the Robot ...................................................................................................................................... 4

2 Karel’s Specifications .................................................................................................................................... 6


2.1 Hardware Specifications .............................................................................................................................. 6
2.1.1 Mechanical Specifications ....................................................................................................................... 6
2.1.2 Electrical Specifications ........................................................................................................................... 6
2.2 Software, Financial, and Environmental Specifications ............................................................................... 7
2.3 Challenges.................................................................................................................................................... 7
2.3.1 Compulsory ............................................................................................................................................. 7
2.3.2 Optional ................................................................................................................................................... 7

3 Karel’s Design Evolution ............................................................................................................................... 8


3.1 Karel’s Electronic Modules ........................................................................................................................... 8
3.1.1 Electronic Switch ..................................................................................................................................... 8
3.1.2 Lithium Polymer (LiPo) Charger............................................................................................................. 11
3.1.3 Motor Driver ......................................................................................................................................... 12
3.1.4 +7 V Voltage Regulator .......................................................................................................................... 16
3.1.5 12 Reflectance Sensor Array ................................................................................................................. 17
3.2 Karel’s Mechanical Design ......................................................................................................................... 20
3.2.1 Chassis ................................................................................................................................................... 20
3.2.2 Wheels................................................................................................................................................... 21
3.2.3 Brackets ................................................................................................................................................. 22
3.2.4 Motors ................................................................................................................................................... 22
3.3 Karel’s Prototypes ...................................................................................................................................... 23
3.3.1 First Karel Prototype, Karelino .............................................................................................................. 23
3.3.2 Second Karel Prototype ......................................................................................................................... 30
3.3.3 Third Karel Prototype ............................................................................................................................ 33

4 Hardware .....................................................................................................................................................34
4.1 Mechanical Components ........................................................................................................................... 34
4.1.1 Chassis ................................................................................................................................................... 34
4.1.2 Wheels................................................................................................................................................... 34
4.1.3 Brackets ................................................................................................................................................. 35
4.1.4 Motors ................................................................................................................................................... 35
4.2 Electronics.................................................................................................................................................. 35
4.2.1 Lower Board .......................................................................................................................................... 36
4.2.2 Upper Board .......................................................................................................................................... 41
4.2.3 Input / Output Peripherals .................................................................................................................... 52

5 Manufacturing .............................................................................................................................................55

Page 1 of 66
Karel User’s Manual
6 Programming .............................................................................................................................................. 56
6.1 Karel Code Writing .................................................................................................................................... 56
6.2 SPI Programming ....................................................................................................................................... 58
6.3 Debugging ................................................................................................................................................. 60
6.4 Fuses Programming ................................................................................................................................... 61
6.5 USB Programming ..................................................................................................................................... 62

7 Bibliography ................................................................................................................................................ 64

Page 2 of 66
Karel User’s Manual

1 Introduction
1.1 Important Information!
Before you start using, or manufacturing Karel robotic platform, you must read this manual completely!

The documentation contains information related to manufacturing, and operating the robot properly.

In order to avoid dangerous situations all the activities related to the Karel platform have to be made
under the supervision of a fully qualified teacher!

The authors of this manual cannot be made responsible for any damages caused by neglecting this
manual’ instructions, and safety instructions related to the fields involved.

1.2 What About This Manual Is?


During the implementation of the Karel project we designed, manufactured, and tested the Karel
robotic platform. The files necessary for manufacturing robotic platform Karel are freely available for all
people who want to build their own Karel robots. For some people –who are experienced in field of
electronics, and programming– is quite easy to use these files, but is not so easy for the beginners.
That’s why we wrote this manual: to make it easier for a beginner to understand how to make, and use
the robotic platform Karel.

This manual details both, the hardware, and the software of the Karel platform. You will find
information about the final prototype, but also information related to the evolution of the platform, and
the intermediary prototypes. You also can find in one place the links to the different documents
necessary to produce and use Karel.

1.3 Who Wrote This Manual?


During the implementation of the Karel project, we decided together that this manual has to be written
in cooperation by all partners. Unfortunately, our Turkish, and Greek partners couldn’t involve in this
task. That is the reason that this manual is written just by Romanian, and Polish team. Anyway, this
manual include references to the works of our Turkish partners in the Karel project.

1.4 What Is Karel?


1.4.1 Karel – Autonomous Robot for Enhancing Learning
The multilateral Comenius partnership Karel brought together four partners: two technical high schools
from Poland (Technikum nr 1 im. Stanisława Staszica w Zespole Szkół Technicznych w Rybniku), and
Turkey (Beypazari Teknik ve Endüstri Meslek Lisesi), one theoretical high school from Greece (Platon
Schools), and a nonformal educational institution from Romania (Palatul Copiilor Drobeta Turnu
Severin). The purpose of the Karel project was to develop curricular materials for science and
technology learning with robots. Karel is a recursive acronym for “Karel – Autonomous Robot for
Enhancing Learning”. The name of the project was proposed by the project’s initiator, Mihai Agape, and
it is a tribute to Karel Čapek, the Czech writer who introduced the word robot.

Karel project has been funded with support from


the European Commission.
This publication reflects the views only of the
author, and the Commission cannot be held
responsible for any use which may be made of
the information contained therein.

Page 3 of 66
Karel User’s Manual
The Karel project has been implemented in period 2013 – 2015. During the two years of the project we
designed, built and tested three prototypes of Karel, an autonomous, mobile, flexible, and low-cost
robotic platform for secondary schools. This platform it is affordable for the secondary schools and has
better performances than the commercial available kits with similar prices. We created a platform user
manual in order to help the people who wants to manufacture their own Karel robots. We also
developed a curriculum for the KAREL robot. The curriculum includes lesson plans from different fields
(physics, biology, electronics, mechanics, programming, and robotics). We also created a short robotics
dictionary.

The Karel implementation process was interdisciplinary, challenging and promoted teamwork,
innovation and lifelong learning. After we agreed detailed specifications for the Karel platform, we
designed, built, and tested mechanical, and electrical parts of it. During these processes we met
different theoretical and practical problems we had to solve. We succeed to improve the process of
manufacturing, and assembling PCB’s in order to accommodate small footprint packages. For designing,
and testing some electronics prototypes, we were in contact with different companies in order to clarify
aspects related to their products (Rayson), or to receive free samples used in our prototypes (TI, Seiko).
We created programs for Karel robotic platform using C language. Claudia Tudosie, a former student of
the Romanian partner, and her colleague Andra Carmina Radu created, as part of their university
graduation project, MicroBlocks, a visual programming environment for the Karel platform.

The Karel project involved both pupils (girls, and boys ages 14 to 19), and teachers (women, and men).
People involved in Karel project used and developed their competences in mathematics, ICT,
technology, sciences, curriculum design, and languages. Due to the many problematic situations that
arisen, participants developed their competence in problem solving. During the different workshops we
organized (PCB manufacturing, assembling, and testing; Arduino, and Karel programming; using Google
Docs), we shared our experience. So, each partner developed the competences necessary to build their
own Karel platforms. All participants improved their English but they also learned robotics terms in
languages of the partners.

All partners manufactured their Karel robots and they can use it with the lessons in the curriculum we
created. The created documentation (drawings of electronics parts, user’s manual of robotic platform,
and curriculum) are freely available in electronic format (under different open source licenses). These
can be useful for schools that want to start a robotics course.

We disseminated the Karel project at local, national, and international level. We organized four
symposiums during our project meetings, one in each partner’s country. The project was disseminated
during two international conferences: Scientix 2 (Brussels), and TTTNet (Sofia); the participants
considered that the project is very complex for a Comenius multilateral partnership. We also organized
3 international robotics trophies (two in Poland, and one in Romania); students and teachers
appreciated the features of the Karel platform.

In the future, we can improve the Karel project in many different ways: adding new I/O devices;
redesigning some electronics modules with easy to find electronic components; write new codes for the
robot; developing a visual programming environment; creating new lesson plans in different STEAM
fields. These could be done in a future Erasmus+ project.

1.4.2 Karel, the Robot


Karel is a low cost autonomous mobile robotic platform, designed for beginners, as well as experienced
electronics and software developers, as an introduction to the fascinating world of robotics. The
platform has two driving wheels, and a caster wheel. There are 2 PCB’s, the lower one also being the
chassis of the robot. On the two PCB’s there are next electronics modules:

- Lower Board

Page 4 of 66
Karel User’s Manual
o Battery protection circuit
o Battery charger
o Line sensor array
- Upper Board
o Power switch
o +7 V voltage regulator
o +5 V voltage regulator
o +3.3 V voltage regulator
o ATmega32U4 microcontroller
o Bluetooth module
o Voltage level converter 3.3 V to 5 V
o Motors drivers
o User pushbuttons
o User LEDs
o User potentiometer
o SPI, USB, and UART interface
o Connectors

The modular structure of the PCB’s gives you the possibility to include in your Karel robot just the
modules you are interested in. As example, if you don’t want to use the +7 V voltage regulator, you
don’t assembly the components of this module on the PCB. This way, you can customize Karel to your
needs.

Karel also gives you the opportunity to add your own I/O devices. This way you can add new features to
Karel for a lot of interesting experiments from different STEAM fields.

Page 5 of 66
Karel User’s Manual
2 Karel’s Specifications
Karel robotic platform was designed according to the hardware, software, financial, environmental, and
functional specifications [1] agreed in the first project meeting, held in Beypazari.

2.1 Hardware Specifications


The mechanical, and electrical specifications that the Karel platform had to satisfy are listed in this
section. We decided to have two kind of specifications: compulsory, and optional.

2.1.1 Mechanical Specifications


2.1.1.1 Compulsory
Should be able to climb a surface with a 30 % slope 
The maximum speed should be more than 0.5 m/s 
The footprint smaller than 12 x 12 cm 
Height less than 10 cm 
Weight less than 250 g 
Payload 200 g 
Two wheels 
Two ball caster1 x
Two DC brushed gear motors which drive independently both wheels 
2.1.1.2 Optional
One slot for a felt pen in the centre of the robot base 
Two incremental encoders x
One robot gripper x
One shooter x
2.1.2 Electrical Specifications
2.1.2.1 Compulsory
The battery autonomy has to be at least 2 hours (for a movement time around 15 %) 
Operating voltage 6 – 9 V 
Reverse voltage protection circuit 
Digital circuits supply voltage 5 V (level shifters are used for system bus connection of 
components which use other supply voltage)
MOSFET IC drivers with output continuous current at least 1.2 A 
Microcontroller with at least 16 kB flash memory and frequency at least 8 MHz 
Communication between controller and PC via USB 
Two bumper sensors 
Four user programmable pushbuttons / switches 
Eight infrared optical sensors (ambient light, obstacle detection, line detection) 
Four LEDs 

1
The final prototype of the Karel robot has just one ball caster
Page 6 of 66
Karel User’s Manual
One servomotor 
2.1.2.2 Optional
One potentiometer 
One microphone x
One speaker x
One colour sensor x
Two ultrasonic sensors x
Two encoders x
Wireless communication with computer using Bluetooth technology 
TV remote receiver x
Arduino compatible 
2.2 Software, Financial, and Environmental Specifications
The financial, environmental, and robotics challenges specifications that the Karel platforms has to
satisfy are:

The software used for programming the robot has to be open source 
The price of the raw materials used for robotic platform should be less than 99 EUR 
The robot is designed for indoor use 
The robot generates a low noise (no audible noise from a distance of 10 m) 
2.3 Challenges
In this section, the robotics challenges that the Karel platform had to be able to perform are listed.

2.3.1 Compulsory
Follows the light 
Follows the wall 
Follows a front moving object (when nothing is in front of it, it stops) 
Avoids obstacles 
Follows the line 
Fights in sumo contest 
Escapes from a line maze 
Escapes from a maze with walls 
2.3.2 Optional
Draws with a marker attached to the robot 
Breaks balloons of one colour x

Page 7 of 66
Karel User’s Manual
3 Karel’s Design Evolution
Karel robot is complex, and we decided to start designing, manufacturing, and testing first the electronic
modules totally new for us. After that, we designed, manufactured and tested three prototypes, one
more complex than the previous one. In this section we will present the modules, and the three
prototypes we designed. The last prototype will be detailed in the next section of this manual.

3.1 Karel’s Electronic Modules


First electronic modules that we designed are: electronic switch, motor driver, battery charger, voltage
regulator, and, line follower sensors array. These will be presented in this subsection.

3.1.1 Electronic Switch


The electronic switch was less complex than other modules, and it was designed by a Romanian student,
Cristina-Maria Agape. She wrote a paper [2] that she presented in different scientific events for
students.

We chose next specifications for the electronic switch:

- Connect / disconnect the load from the battery


- Protect load against battery reverse polarity connection
- Maximum voltage of the battery 9 V
- Maximum load current 3 A

We identified two possible solutions:

- A switch in series with a diode (hard version)


- An electronic switch (soft version)

3.1.1.1 Hard Version – Mechanical Switch, and Diode


The simplest solution requires just two components: a mechanical switch, and a diode, connected as in
Figure 1.

Figure 1 Schematic of the circuit with mechanical switch, and diode

The battery is connected to J1 connector, and the load to J2. The S1 switch connect and disconnect the
load from the battery. The D1 diode protect the load if the battery is connected with wrong polarity, i.e.
the + pole of the battery connected to the ground (pin 2 of J1).

The circuit is very simple, but it has some disadvantages:

- The components are quite big (Figure 2).

- The average power dissipated by D1 diode, P = U * I = 0,5 V * 3 A = 1,5 W, is also big

Page 8 of 66
Karel User’s Manual

Copper and silkscreen – top view 3D top view


Figure 2 Assembly design for hard switch

In order to eliminate the disadvantages of this solution, we designed an electronic switch with MOSFET
transistors, which will be described in next subsection.

3.1.1.2 Soft Version – Electronic Switch


The electronic switch we designed (Figure 3) is based on the FDC6329L integrated load switch [3], and
the IR6402 P-Channel MOSFET [4]. The battery is connected on J1, and the load on J2. The circuit is
controlled with a jumper connected between the pins of J3 connector.

The T1 transistor protects the load in case of battery reverse polarity:

- If the battery is connected the right way (+ to VBAT, and – to the GND), T1 is in conduction and
the battery voltage is on the input of IC1 load switch
- If the battery is connected the wrong way (– to VBAT, and + to the GND), T1 is blocked, and the
IC1 load switch, and the load are protected.

The on-off switch is working as follows:

- If the jumper is connected between pins 1, and 2 of J3 connector, the switch is on, and the load
is powered by battery
- If the jumper is connected between pins 2, and 3 of J3 connector, the switch is off, and the load
is disconnected

Figure 3 Electronic switch schematic

The power dissipated by the electronic switch is smaller than the power dissipated by the Schottky
diode used in hard version of the switch. The PCBA (Printed Circuit Board Assembly) we designed (Figure
4) for soft version of the switch also is smaller than hard version of the switch.

Page 9 of 66
Karel User’s Manual

Figure 4 Electronic switch – Copper & Silkscreen

Of course, we decided to use in Karel platform the electronic switch.

3.1.1.3 Electronic Switch Prototype


We manufactured our single-sided PCB using TTS (Tonner Transfer System) method. We used a
soldering iron to solder the components on the PCB.

3D View – Bottom 3D View - Top


Figure 5 Electronic switch 3D views

Our electronic switch prototype (Figure 6) looks similar as 3D views of our design (Figure 5).

Bottom Top
Figure 6 Electronic switch prototype

If you want to manufacture the electronic switch presented here, you can use the documentation we
posted on Github [5].

3.1.1.4 Electronic Switch Testing


We tested the electronic switch with a 2s LiPo battery (7.4 V) connected on J1 and a small load (tens of
mA). We use a jumper connected on J2 to switch on / off. Our first test went so:

1. We connected the battery on J1 with reverse polarity. The switch didn’t connect the battery to
the load, i.e. success.

Page 10 of 66
Karel User’s Manual
2. We connected the battery on J1 with right polarity.

a. When the jumper in off position, the battery wasn’t connected to the load, i.e. another
success.

b. When the jumper was in on position the battery again wasn’t connected to the load, i.e.
a big failure.

First conclusion after testing was that our electronic switch did nothing, load being all the time
disconnected from the battery. We tested the functioning of T1, and it was OK. This means that the
error was located in load switch IC1. First we checked if the components have the value in our schematic
(Figure 7) but everything was OK.

Figure 7 Electronic switch schematic with a design error (R2)

After we measured the voltages in the circuit we understood that we had a big mistake in our design.
Our first prototype didn’t function because the R2 value was wrong. I hope you are asking how this was
possible.

In FDC6329L, it is given next design relation: R1 / R2 = 10 – 100. Bye mistake, we used the relation R2/R1
= 10 – 100. For R1 = 2.2 kΩ we obtained R2 = 22 – 220 kΩ, and we chose R2 = 100 kΩ, as you can see in
Figure 7. Because R2 was around 50 times bigger than R1, IC1 switch was blocked all the time,
regardless the position of the jumper.

Using the right design relation, for R1 = 2.2 kΩ we obtained R2 = 22 – 220 Ω, and we chose R2 = 220 Ω.

We reworked our prototype, and after we replaced the wrong R2 with the right one, the electronic
switch passed all the tests.

You can find a detailed description of the electronic switch in [6].

A modified version of the electronic switch was included in the last Karel design.

3.1.2 Lithium Polymer (LiPo) Charger


In this subsection we will describe the LiPo battery charger we designed in the first phase of Karel
development.

We intended to build a charger for battery on the platform, in order to not be necessary to buy an
external charger for the battery. Because we didn’t have previous experience with LiPo battery charging,
we decided to start with something easy. That’s why we designed first a charger for a single LiPo cell.
We select the integrated circuit MCP73833/4, which is a stand-alone linear Li-Ion / Li-Polymer charge
management controller, produced by Microchip Company.

We used the typical application circuit (Figure 8), recommended in the MCP73833/4 datasheet [7].

Page 11 of 66
Karel User’s Manual

Figure 8 Single Lithium Polymer cell charger with MCP73833 schematic

The voltage source can have a voltage between 4.5 V and 6 V, and it is connected on J1 connector. The
LiPo cell is connected on J2 connector. Use the right polarity: connect the negative terminal of voltage
source, and cell to the GND! The LEDs D1, D2, and D3 provides information on the state of charge. The
R7 thermistor sense the temperature of the cell. Resistances of R1 – R6 resistor was designed according
to recommendations given in datasheet.

Copper & silkscreen Copper – bottom Silkscreen – bottom PCB


Figure 9 PCB design for charger with MCP73833 (scale 2:1)

We designed and manufactured a PCB of the charger (Figure 9). We didn’t assembly the components on
the PCB, because in the meantime we decided to focus on a solution for a charger able to charge 2
series Lithium Polymer battery (2s LiPo).

If you want to manufacture the single cell LiPo charger presented here, you can use the documentation
we posted on Github [8].

3.1.3 Motor Driver


In this subsection we will describe the single, and dual motor drivers with DRV8833 we designed,
prototyped, and tested.

For the previous robots we built we used different versions of L293, and L298 motor drivers ICs. Even
these two IC’s are quite old, they are still widespread. Because these two drivers use as power switches
bipolar transistors (BJT), which doesn’t have a good efficiency. That’s we decided that is time to reorient
to the new motor drivers, which are using field effect transistors (FET), which have a better efficiency
than the BJTs.

We research the new motor drivers based on FETs, and finally we decided to use DRV8833 motor driver
[9]. The circuit has a wide power supply voltage range (2.7 V to 10.8 V), and a high output current (1.5 A
RMS). The DRV8833 IC can drive to DC brush motors, but also the outputs can be in parallel in order to
double the output current (3 A RMS). We designed two motor drivers, which will be described in next
subsections.

Page 12 of 66
Karel User’s Manual
3.1.3.1 Single Motor Driver
The schematic of the single motor driver with DRV8833, which we designed, is shown in Figure 10. The
battery is connected on J1 connector (negative terminal of battery to GND). The circuit made by T1, R1,
and D2 protects IC1 against battery reverse connection. The DC brush motor is connected to J3
connector. In order to control the driver we use 2 signals In1, and In2 (J2 connector). If we apply a low
signal on nSLEEP input (J2), the circuit enters a low-power sleep mode. The nFAULT signal (J2) is an
output that will be in driven low by IC1 whenever an overcurrent, undervoltage, or overtemperature
occurs. This state is signalised by red LED D1.

Figure 10 Single motor driver with DRV8833 schematic

We design a single sided PCB (Figure 11) with two jumper wires routed on the top side. The copper top
drawing is used just to show you where to connect the jumper wires.

Copper bottom Copper top Silkscreen bottom Silkscreen top


Figure 11 Single motor driver with DRV8833 PCB design

During the manufacturing of the motor driver we made some mistakes, which will be described next.

M1. Our first PCB we manufactured looked like in Figure 12. As you can see, the distance between the
pads for IC1 is smaller than the distance between pins of IC1. We obtained this result because we had
some wrong printer settings. Unfortunately, we produced a lot of small PCBs on the same board, and we
cannot use any of them.

Page 13 of 66
Karel User’s Manual
M2. After we assembled the components on the good PCB, our circuit didn’t function at all. We
succeeded to fix the problem after we discovered that the T1 transistor was placed in a wrong position
on the PCB (Figure 13).

M3. After we place the T1 transistor in the right position, we had a big surprise: the red LED was on,
which meant overcurrent, undervoltage, or overtemperature. We immediately discovered the there was
an overcurrent caused by a short circuit between output OUT1, and ground. This fault also is visible on
the left PCBA in Figure 13. On the right PCBA everything is OK.

Figure 12 Wrong PCBs because of scaling problems

Finally our single motor driver prototype functioned very well. We learned that we can have problems
even with small circuits.

Initially we intended to use two single motor drivers on the Karel platform. Because of the lack of the
space on the upper board of the Karel platform, we finally used one dual motor driver.

The drawings for manufacturing the single motor driver with DRV8833 are available online [10].

PCBA with mistakes 3D bottom view PCBA OK


Figure 13 Mistakes on the left PCBA: transistor T1 placed wrong & short circuit between OUT1 and GND (right upper side)

3.1.3.2 Dual Motor Driver


We designed a dual motor driver with DRV8833, which was included in the Karel robotic platform
(Figure 14). The positive battery terminal is connected to VMM, and the negative one to the GND. One
motor is connected between AOUT1, and AOUT2. The other motor is connected between BOUT1, and
BOUT2. Each of the resistors R1, and R2, are in series with one of the two motors, and provide
information related to the currents in the two motor, to the IC1. The two motors are controlled with the
signals on inputs AIN1, AIN2, BIN1, and BIN2.

Page 14 of 66
Karel User’s Manual

Figure 14 Dual motor driver with DRV8833 schematic

We designed two PCB’s: a single sided one, and a double sided one. The first design was included in the
first Karel platform prototype, and the second one in the last prototype. As you can see in Figure 15, for
the single-sided PCB design we used four jumper wires.

Copper & Silkscreens 3D view top 3D view bottom


Figure 15 Dual motor driver with DRV8833 single sided PCB design

During the tests of the dual motor driver we discovered a short circuit between on pin of the IC1, and
GND. We initially supposed that the short circuit was created during the manufacturing process. When
we check the documentation, we observed that there was a short circuit also in documentation (Figure
16). We were surprised, because we checked we our PCB design software if there are short circuit in the
design, and the result was negative.

Copper bottom wrong design 3D view top Copper bottom right design
Figure 16 Mistake on the left PCB (short circuit between nF signal and GND.

Indeed, there was not a mistake in our design. The problem caused by one of the pads in the PCB, which
had a very small aura. Because of that, the software didn’t see a short circuit. But when we printed the

Page 15 of 66
Karel User’s Manual
copper bottom, the distance from pad to rounding ground area was so small that appeared like a
contiguous region, and that’s how a short circuit was born.

Finally, the dual motor driver functioned well, and it was included in the design of the Karel platform.

If you want to build the dual motor driver on single sided PCB, use documentation [11], and if you want
to build the dual motor driver on a double sided PCB, use documentation [12].

3.1.4 +7 V Voltage Regulator


In this subsection we will describe the +7 V voltage regulator with TPS63060 IC that we designed,
prototyped, and tested.

First of all, why a +7 V voltage regulator? The speed of the motor depends on the battery voltage, which
decrease when battery discharges. In order to regulate the speed of the motor we could use encoders,
but we didn’t chose this solution because of lack of the pins of the microcontroller. So, we decided to
use a voltage regulator, in order to maintain motor supply voltage constant regardless battery state of
charge. Because the nominal voltage of motors we use is 6 V, and there are voltage drops across
switching transistors in motor driver, we decided to increase voltage at +7 V.

The regulator input voltage is the same as the battery voltage, i.e. from 6 V to 8.4 V. Because 7 is in the
range of input voltage, the regulator has to be able to increase and to decrease input voltage,
depending on the value of input voltage. That is why we chose to design a switching regulator based on
the Texas Instruments TPS63060 IC [13] , a highly efficient, single inductor, internally compensated,
buck-boost converter, in a 10-pin, 3-mm × 3-mm WSON package.

Figure 17 +7 V voltage regulator schematic

The schematic of the regulator is shown in Figure 17. The power supply is applied on J1 connector, and
the regulated voltage is available on J2 connector. We dimensioned R1, and R2 resistors for an output
voltage of 7 V.

Copper & Silkscreen Copper bottom Silkscreen bottom Silkscreen top


Figure 18 +7 V voltage regulator PCB design

We designed a PCB as in Figure 18. As we know, for all switching power supplies, the layout is an
important step in the design, especially at high peak currents and high switching frequencies. If the

Page 16 of 66
Karel User’s Manual
layout is not carefully done, the regulator could have stability, and EMI problems. We followed the
recommendations in the IC’s datasheet.

The PCB manufacturing was quite challenging because the distance between package pads is just 0.5
mm. Because it was first time when we soldered a WSON package, we had to try more than once in
order to solder IC1. The result can be seen in Figure 19.

We were very nice surprised that the voltage regulator gave us an output voltage of +7 V. We tested
output voltage for different values of input voltage, and everything was OK. The enthusiasm decreased
after we measured the output voltage as a function of the load current. The output voltage remain
constant, +7 V, until the current increased to 0.3 A. From this value, the output voltage started to
decrease as the output current increased. We consider that this behaviour is due to thermal protection
activation activate because the copper area cannot dissipate the heat of the IC1.

3D view bottom PCBA bottom


Figure 19 +7 V voltage regulator 3D view & PCBA

The +7 V voltage regulator was included in the final design of the Karel prototype.

If you want to build the +7 V voltage regulator use the online documentation [14].

3.1.5 12 Reflectance Sensor Array


In this subsection we will describe the line sensor with 12 IR reflectance sensors that we designed, and
manufactured. The line sensor was designed to be used in a performant line follower.

The line sensor (Figure 20) has 12 SMD reflective optical sensors of type KTIR0711S [15]. In order to
reduce current consumption we connected the LEDs of three sensors in series. Of course, this wouldn’t
be a good idea if the supply voltage is 5 V, because is not large enough to power three LEDs in series.
We do that because we had in mind that we will have a 7 V regulator on the platform, and this voltage is
large enough to power three LEDs in series. We can control the flow of current through LEDs by C signal
applied on the gate of T1 MOS transistor. If the voltage applied on the gate of T1 is close to the ground
(0 V) T1 is off, so there is not current through LEDs. If no external voltage is applied on the gate or the
applied voltage on the gate is close to the VCC (5 V) the T1 transistor is on, and there is a current which
passes through LEDs. As you can see you can use the R17 trimmer potentiometer to modify the value of
the current through LEDs. This is useful to adapt the LEDs lighting level to the ambient illumination. The
line sensor is controlled by a microcontroller digital output connected to the C signal.

Page 17 of 66
Karel User’s Manual

Figure 20 12 reflective optical sensor array (line sensor)

We also power the line sensor with VCC voltage (5 V) which supplies the output circuits (phototransistor
in series with a resistor). We use VCC in order to have an output voltage range from 0 V to 5 V, compatible
with the voltage range of microcontroller analogic inputs. The information from sensors is available as a
0 – 5 V variable voltage on A0 – A11 outputs. The A0 – A11 outputs of the line sensor has to be connected
to the 12 analogic inputs of microcontroller.

The output voltage of each sensor (A0 – A11) depends on the reflectivity of the surface under the sensors:

- If the surface is black is large the amount of reflected light is small, the phototransistor resistance
is high, and the sensor output voltage is close to the power supply voltage, VCC;
- If the surface is white, the amount of reflected light is high, the resistance of the phototransistor
is small, and the sensor output voltage is close to the GND.

The sensor output voltage is inversely proportional to the value of the surface reflectivity coefficient. The
output voltage of each sensor (A0 – A11) also depends on many other factors as the distance between
sensor and surface, angle between surface and the sensors plan, and ambient illumination.

Figure 21 Line sensor behaviour simulation

Page 18 of 66
Karel User’s Manual
We use some Excel sheets (Figure 21) in order to simulate the behaviour of the line sensor for different
relative positions of the sensors positions on the PCB. This help us to decide how to position the optical
sensors on the PCB.

We designed a single side PCB and used THD resistors in order to reduce the number of the jumper
wires used. You can see the 3D views and PCBAs of the line sensor in Figure 22.

There are a lot of sensors on the board. Next question is: how to compute the error? The error is the
difference between the desired (reference) value and the actual (measured) one. If we consider that the
positions of the 12 sensors are -11, -9… -1, 1… 9, 11, and S1, S2… S12 are the values of sensors A0, A1…
A12 (read by microcontroller) we can compute the error using weighted mean ( 1 ).

(1)

When we tested the line sensor, we discovered that 10 sensors have a similar behaviour, but two of
them provide different values of output voltage. This was due the fact that those two sensors were not
parallel with PCB.

If you want to manufacture the line sensor presented here, you can use the documentation we posted
on Github [16].

Figure 22 Line sensors – 3D views and PCBAs

Page 19 of 66
Karel User’s Manual
3.2 Karel’s Mechanical Design
In this section we will discuss about mechanical components of the Karel platform. The Turkish team
was in charge of the mechanical parts of Karel.

3.2.1 Chassis
For the first Karel prototype, Turkish team designed, and built two chassis, as you can see in Figure 23.
The both chassis were made of plastic. The chassis were presented in first Rybnik project meeting. None
of the two prototypes manufactured by Turkish team didn’t satisfy the specifications, being too large.

Figure 23 Chassis designed by Turkish team

You can watch a video which presents the manufacturing process of the two bases [17]. As we can see in
the movie the process is quite complex.

Because the design of the prototype was delayed by Turkish team, Romanian team designed and
manufactured two chassis (Figure 24). These chassis are made from plastic and are very easy to
manufacture. The hexagonal shape didn’t satisfy the specification related to climbing a 30% ramp.

Figure 24 Chassis designed by Cristina-Maria Agape

During the first project meeting in Katerini we integrate the mechanical, and electronical parts, and we
had to choose between these four designs presented. Finally we chose one of the designs proposed by
the Romanian team, because was the only one which satisfied all the requirements for the chassis. More
than that, we decided that the chassis will be one of the PCB of the robotic platform. In this way, the
chassis is accommodating not just the mechanical parts of the robot, but also some of the electrical
subsystems of the robot.

Page 20 of 66
Karel User’s Manual
3.2.2 Wheels
We tried to manufacture different type of wheels. Turkish team, which was in charge of the mechanical
system designed and manufactured the wheel in Figure 24. The wheel had the right dimension without
tire. But if we add a tire, the wheel would became too large. Romanian team proposed a wheel they
designed before start of Karel project, and it was produced by a 3D printer. The wheel had the right
dimensions but we didn’t have a tire for it.

Figure 25 Wheel designed and manufactured by Turkish team Figure 26 Wheel designed by Romanian
team and 3D printed

Romanian team manufactured a silicon tire (Figure 28) for the aluminium wheel (Figure 27) produced by
Solarbotics [18]. The silicon tire we manufactured has a high traction.

Figure 27 Aluminium wheel manufactured by Solarbotics Figure 28 Silicon tire manufactured by


Romanian team

We manufactured the tires form silicon, using some iron moulds Figure 29.

Figure 29 Moulding silicon tires

Page 21 of 66
Karel User’s Manual
3.2.3 Brackets
Turkish team designed a bracket to fix the motor on the chassis (Figure 30). Unfortunately, the bracket
didn’t fit with Karel lower board design. This is why we decided to use the plastic mounting brackets,
produced by Pololu Corporation, for mounting the micro gear motor motors on the lower board.

Figure 30 Brackets designed and manufactured by Turkish team

3.2.4 Motors
We decided to choose some geared micro motors produced by Pololu company [19]. In order to satisfy
the power needs we chose an HP (high-power) motor. In order to satisfy the speed requirement we
tested next motors: 30:1 HP, 50:1 HP, and 100:1 HP. Finally we choose the 50:1 HP dual shaft motor
(Figure 31) as it can satisfy both requirements related to power and speed [20]. Because of the extended
output shaft that protrudes from the rear of the motor it is possible to add and encoder to provide
motor speed.

Figure 31 50:1 HP dual shaft gear motor

The motor has next parameters:

- Size: 10 × 12 × 26 mm
- Weight: 9.5 g
- Shaft diameter: 3 mm2
- Gear ratio: 51.45:1
- Free-run speed @ 6V: 630 rpm
- Free-run current @ 6V: 120 mA
- Stall current @ 6V: 1600 mA
- Stall torque @ 6V: 1.08 kg cm

Page 22 of 66
Karel User’s Manual
3.3 Karel’s Prototypes
3.3.1 First Karel Prototype, Karelino
First prototype we designed was less complex than we initially proposed. We decided to do it so
because we didn’t find solutions for some systems, as management system for Lithium Polymer battery,
and +7 V voltage regulator. We found a TI solution for LiPo balancing, but in short time the IC became
obsolete. For +7 V / 1.2 A buck boost voltage regulator we didn’t find a solution at that time.

Because we were behind the schedule, in order to advance, we decided to give up some features, and
create a simpler prototype, Karelino. Cristina-Maria Agape named this prototype Karelino from two
reasons: Karelino suggests a small Karel, and also it suggests association with Arduino platform. As you
already know, Karelino uses ATmega32U4 microcontroller, the same microcontroller used in Leonardo
Arduino platform.

3.3.1.1 Karelino Schematic

Figure 32 Karelino schematic

Page 23 of 66
Karel User’s Manual
As you can see in Figure 32, Karelino consists of next modules:

o +5 V voltage regulator
o +3.3 V voltage regulator
o ATmega32U4 microcontroller
o Bluetooth module BTM-112
o Voltage level converter 3.3 V to 5 V
o Motor driver
o User pushbuttons (3)
o User LEDs (3)
o SPI and USB interface
o Connectors

One of requirements for Karelino was to have all the 12 analog inputs available for the user. So, Karelino
could be used with the 12 reflective optical sensor array we designed and manufactured. The
microcontroller pins were allocated as follows:

- Drive the transistor which control the current through emitters (1): PE6

- Phototransistor reading (12): PF7–PF4 (A0–A3), PF –PF0 (A4–-A5), PD4 (A6), PD6 (A7), PD7 (A8),
and PB4–PB6 (A9–A11)

- Motors Drivers Control (4):

o Motor 1 (pin 12 – OC0A = AIN2, pin 18 – OC0B = AIN1)

o Motor 2 (pin 31 – OC3A = BIN2, pin 32 – OC4A = BIN1)

- Pushbuttons (3): PB1 – PB3 (SPI pins)

- LEDs (3): PB0, PD1, and PD5

- Bluetooth Communication (2): RX and TX

We don’t describe the operation of Karelino because all the modules are included in the final prototype,
and will be described in the “Hardware” chapter of this manual.

3.3.1.2 Karelino PCB Design


In order to be easier to manufacture the Karelino PCB, we decided to use a single sided PCB laminate (at
that time we didn’t have experience with double sided PCBs). The copper bottom layer of the PCB is
shown in Figure 33.

Figure 33 Karelino PCB – copper bottom layer

Page 24 of 66
Karel User’s Manual
We used both types of components, SMD and THD. Using THD components we succeed to reduce the
number of jumper wires used for routing some connections. For components assembly on the PCB use
the drawings in Figure 34.

Figure 34 Karelino PCB – bottom & top silkscreen

The 3D views of the PCBA are shown in Figure 35.

Figure 35 Karelino PCBA—top & bottom 3D views

3.3.1.3 Karelino PCB Manufacturing


In this subsection we will describe the method and materials for manufacturing PCB, and assembly
PCBA.

We manufactured PCBs using the Transfer Tonner System (TTS) method. Romanian team uses this
method since 11 years ago, and is quite experienced in this field. The challenge was given by the large
size of the board, and the small size of some components.

We use for PCBs manufacturing the materials in Pulsar kit “PCB Fab in A Box”. Detailed information
related to this kit and to the TTS method are available online on the manufacturer website [21].

Next, we will present on short the steps of manufacturing PCBs, based on the presentation delivered by
Cristina-Maria Agape during the first Rybnik project meeting [22]. Some images taken during the
manufacturing of Karelino PCB by Romanian team are presented in Figure 36.

Karelino PCB manufacturing in 10 easy steps:

1. Print the copper layer on paper using a laser printer.


2. Prepare the single sided board using a sandpaper.
3. Clean the surface with a cloth. Do not touch the surface once the cleaning is done!

Page 25 of 66
Karel User’s Manual

Figure 36 Karelino PCB Manufacturing

4. Use a laminator to transfer the toner from paper to the board.


5. Remove the paper from the board using water. The copper layer is transferred to the board.
6. Use green foil to seal the toner.
7. Remove easily the green foil.
8. Etch the board using ammonium persulfate. The uncovered copper was removed.
9. Remove the toner from the board using thinner.
10. Drill the holes.
Page 26 of 66
Karel User’s Manual
3.3.1.4 Karelino PCBA Assembling & Testing
Once the PCB is ready, it is the time to assemble the components on the Karelino PCB (Figure 37).

It is a very good practice to test the PCB traces for continuity and short circuits using a multimeter
because the fixing of a PCBA it is very hard if there are errors in the PCB. As you can see in the Figure 37,
we forgot to check the PCB before starting components assembly. We remembered to do it after the
microcontroller was already soldered on the board. During the PCB traces test, Veli (Velibor
Mladenovici) discovered some short circuits caused by a PCB design mistake: the distance between two
traces was so small in the PCB design that on the real board the traces touched each other. We
continued our work after we removed the short circuits.

We used a soldering iron station to solder the components. The soldering station has a hot air gun, and
a soldering iron. We soldered most of the components using the soldering iron. The motor driver IC was
the only one we soldered on the board using the hot air gun.

We first soldered the jumper wires on the board. Next, we added the electronic components and we
soldered them (SMD first & THD last). Because some SMD components are real small (e.g. 0.5 mm x 1
mm), a magnifier is very helpful.

Figure 37 Karelino PCBA Assembling

Of course we did some mistakes during the Karelino design and assembly. There was 2 types of
mistakes: design mistakes, and manufacturing mistakes. We already told you about the short circuits
between traces, caused by a design mistake. Next we describe other problems we met during the
Karelino manufacturing.

One short circuit between two traces (caused by etching) was not discovered during the PCB traces test.
It was a really challenge to discover this short circuit after we assembled all the components on the
board. The fixing process was also hard because we knew that the board was checked and there are not
short circuits between traces.

We had a problem with USB connector assembly, because it was not placed near the edge of the board,
and we couldn’t insert the USB plug. The problem was solved by cutting a small part of the board in the
Page 27 of 66
Karel User’s Manual
front of the USB connector (Figure 38). Unfortunately, on the removed board part were routed two
traces. We used jumper wires to make missing connections.

We made also some mistakes during the components assembly, when we placed some SMD
components in the wrong positions. In order to understand that sometimes can be difficult to find the
problem, we challenge you to test your attention to detail: identify the two resistors placed wrong on
the PCB in Figure 38. Use as reference the PCB drawings available online at http://1drv.ms/1jet3ci.

Figure 38 Karelino first prototype errors: USB and some components wrong placed

We finally identified and fixed all the mistakes related to PCBA and most of the blocks (voltage
regulators, microcontroller, and driver motor) functioned well. The last problem was related to the
wireless communication.

The problem related to the Bluetooth module took us a lot of time to solve it. We initially used the
Rayson BTM-110 Bluetooth module for wireless communication between platform and laptop. We
chose it because it is cheap and we can procure it. We tested but it didn’t function at all and we didn’t
find any explanation for this in the datasheet. We decided to contact the producer, who explained us
that the BTM-110 is not programmed in the factory (for us is hard to understand why this information is
not written in the datasheet). After that we replaced BTM-110 with BTM-112, tested and it functioned
very well. In the final design we chose BTM-182, which is similar to BTM-112, but includes also an
antenna on the board.

After we solved the last problem related to the Bluetooth module, first Karelino prototype (Figure 39)
functioned according the specifications.

If you want to manufacture the Karelino controller presented here, you can use the documentation we
posted on Github [23].

Page 28 of 66
Karel User’s Manual

Figure 39 Karelino prototype (top & bottom sides)

3.3.1.5 Karelino platform


The prototype of the Karelino platform (Figure 40) was assembled, and tested during the first Rybnik
project meeting. The Karelino controller, motors, and wheels were assembled on one of the chassis
manufactured by Romanian team. We didn’t use one of the chassis manufactured by the Turkish team
because they didn’t fit specifications, being too large. We didn’t integrate the peripherals, which were
the task of the Polish team, because weren’t ready at that moment.

After successful testing of the first Karelino platform prototype during the first Rybnik project meeting,
we proposed next improvements:

- Integrate new blocks (e.g. Motor voltage regulator, UART connector, Battery management
system)
- Make changes to the initial design (e.g. replace USB micro B connector with an USB mini B
connector)
- Redesign the PCB (components places and traces) according to the chassis shape
- Add LEDs to show the state of Bluetooth module

-
- Figure 40 Karelino platform prototype

As you can see next, all of these were included in the second prototype of the Karel platform.

Page 29 of 66
Karel User’s Manual
3.3.2 Second Karel Prototype
In this subsection we will present on short the design of the second prototype.

3.3.2.1 Second Karel Prototype Design


The Karel second prototype was designed with some new requirements:

1. Use two PCBs (lower board, and upper board), the lower board also being the chassis of the
robot.
2. Implement all the improvements proposed during the first Rybnik project meeting.
3. Use single sided PCB laminate for lower board, and double sided PCB laminate for upper board.

The dimensions of the lower board are showed in Figure 41.

Figure 41 Second Karel prototype – lower board dimensions

In the second designed the software for the PCB design played an important role, as you will see later.
Let’s say just that we used Target3001! Light version, which is limited at 400 pins / pads for each design.

Figure 42 Second Karel prototype lower board – top & bottom 3D views

Page 30 of 66
Karel User’s Manual
On the lower board of the second Karel prototype (Figure 42) we have two electronic modules: the
battery protection circuit, and the battery charger.

We were surprised when we tried to save our design of lower board, and we the software displayed the
next message “The limitation of this version is exceeded” (Figure 43).

Figure 43 Reaching the limitations of the PCB design software Target3001! Light version

The images in Figure 42, and Figure 43 are print screens, but we couldn’t generate the files for
manufacturing lower board of the second Karel prototype. We continue our work after we bought the
Smart version of the Target3001! Software, whose limitation is higher, 700 pins / pads per PCB.

After the lower board unsuccessful design we focused on the upper board, which contains next
electronic modules: controller, voltage regulators (5 V, 3.3 V, and 7 V), I/O devices (four pushbuttons,
one trimmer potentiometer, and four LEDs), and motor driver (Figure 44).

Figure 44 Second Karel prototype upper board – top & bottom 3D views

We succeeded to finish the design but what electronic module do you think is missing from it? If you
answer the power switch than you are right. But could you guess why? If you answer the limitations of
the Target3001! Light version you are right again. As you can see in Figure 45 we were very close to the
PCB software limitation without including the power switch. This is why we decided to not include the
power switch on the upper board of the second Karel prototype.

Page 31 of 66
Karel User’s Manual

Figure 45 Second Karel prototype upper board design – very close to the limitations

3.3.2.2 Second Karel Prototype Manufacturing


We manufactured the PCB for the upper board after we made some changes in our manufacturing
process, in order to increase the quality of the PCBs. We changed our old Samsung printer (600 dpi
resolution) with a new HP printer (1200 dpi resolution. Even the HP printer had better resolution was
also quite old, and we had some problems with the drivers for Windows 7, but we succeeded to solve it.

After some trials we succeeded to have a good alignment between top and bottom sides of the board
(Figure 46).

Figure 46 Second Karel prototype lower board PCB

The second Karel prototype was presented during the Katerini project meeting [24].

The conclusions for the second prototypes were:

- Some circuits (e.g. battery management) were not tested


- Some integrated circuits are not so easy to procure (e.g. the ones made by Seiko)
- Possible new changes in the design to use new integrated circuits (e.g. boost regulator
supplied from one LiPo cell with high output current capabilities).

If you want to manufacture Karel we recommend the last design of the platform.

Page 32 of 66
Karel User’s Manual
3.3.3 Third Karel Prototype
The third and the last prototype of the Karel robot will be described in detail in the “Hardware” section
of this manual. Here we present just the changes we made from the second prototype, and show you
how it looks. We redesigned both Karel boards after we bought the Smart version of the Target3001!
PCB design software.

3.3.3.1 Last Karel Prototype – Lower Board


Because there was some free space on the front of the previous version of the lower board, we decided
to add four reflective optical sensors to be used as line sensor. You can see the lower board PCBA in
Figure 47. The lower board passed all the tests.

Figure 47 Last Karel prototype lower board

You can find more information related to lower board in the presentations used during two workshops
organized in second Rybnik project meeting, related to the designing, manufacturing, and testing of the
lower board [25], [26].

The documentation for manufacturing the last prototype of Karel lower board is posted on Github [27].

3.3.3.2 Last Karel Prototype – Upper Board


In the last upper board prototype we added an electronic power switch based on a previous design of
Cristina-Maria Agape [2]. You can see the upper board PCBA in Figure 48. The upper board passed all the
tests.

Figure 48 Last Karel prototype upper board

You can find more information related to the upper board in the presentations used during two
workshops organized in second Rybnik project meeting, related to the designing, testing, and
programming the lower board [28], [29].

The documentation for manufacturing the last prototype of Karel upper board is posted on Github [30].

Page 33 of 66
Karel User’s Manual
4 Hardware
In this section we will present the mechanical parts (chassis, wheels, brackets, motors), and the
electronics (lower and upper boards) of the Karel platform.

4.1 Mechanical Components


In this subsection we will present mechanical components of the Karel platform.

4.1.1 Chassis
The chassis of the final prototype of the Karel robotic platform is the one of the two PCBs of the
platform (the lower one). This way, the chassis (Figure 49) accommodates the mechanical parts of the
robot, and some of the electrical subsystems of the robot.

Figure 49 The chassis of the Karel platform is the lower board

4.1.2 Wheels
We decided to use wheels with circumference around 10 cm, which means that if the robot goes
straight, the wheels has to turn 10 times in order to advance 1 m. From this condition results the
diameter of the wheel with tire:
10 𝑐𝑚 (2)
𝐷= ≅ 3.2 𝑐𝑚
𝜋
Because the diameter of the wheel produced by Turkish partner is larger than 32 mm, we chose a wheel
(Figure 50) produced by Pololu, which has silicone tire, a diameter of 32 mm and fits with the motor we
use.

Figure 50 Wheel used in the Karel platform

Page 34 of 66
Karel User’s Manual
As third wheel we also chose the Pololu ball caster with 9.5 mm ball (Figure 51). There are two different
versions: with plastic ball [31] or with metal ball [32]. You can choose the one is better for you.

Figure 51 Ball casters with 9.5 mm plastic ball (left) and metal ball (right)

4.1.3 Brackets
Because the mounting holes of the brackets designed by Turkish team didn’t matched the holes on the
chassis (lower board) we use Pololu brackets (Figure 52) to fix the motors on the chassis.

Figure 52 Pololu brackets used to mount the motors

4.1.4 Motors
Karel platform uses 2 micro gear motors. In order to satisfy the specifications related to speed and torque,
we chose an HP 50:1 gear motor with extended shaft.

The parameters of the motor are:

- Free-run speed @ 6V: 630 rpm


- Gear ratio: 51.45:1
- Free-run current @ 6V: 120 mA
- Stall current @ 6V: 1600 mA
- Stall torque @ 6V: 15 kg x cm

With these two motors the speed of the robot on a horizontal surface is higher than 0.5 m/s, and the
robot can climb a 30% ramp.

The motors are mounted on the chassis with Pololu brackets.

4.2 Electronics
The last prototype of Karel platform has two PCBAs which we will detail in this subsection.

Page 35 of 66
Karel User’s Manual
4.2.1 Lower Board
In this subsection we will describe the lower board of the Karel robotic platform. As you can see in
Figure 53, the board has next electronic modules: battery protection circuit, battery charger, and line
sensor.

Figure 53 Karel lower board – bottom view

Figure 54 Karel low board – top view

Page 36 of 66
Karel User’s Manual
The lower board is also the chassis of the robot. The battery, the motors, and the ball caster are mounted
on the low board (Figure 54).

The documentation for manufacturing lower board was created by Mihai Agape, and is available in “Karel
Lower Board” Github repository [27].

4.2.1.1 Battery
Robotic platform Karel is powered by a 2 LiPo battery (Lithium Polymer battery consisting of 2 cells in
series) with next parameters:

- Nominal voltage, U = 7.4 V


- Maximum discharge current, Imax = 15 A
- Electrical capacity, C = 850 mAh

-
Figure 55 Karel Lithium Polymer battery

The LiPo battery (Figure 55) has two connectors: one for charging, and discharging the battery; one for
monitoring, and balancing the battery. The voltage supplied by the battery changes during the operation
from 8.4 V (when the battery is fully charged) to 6 V (when the battery is fully discharged).

A battery protection circuit protects the battery in case of overvoltage, overcurrent, overtemperature,
and balance the two LiPo cells. The battery protection circuit also limits the current supplied by battery at
4 A, and disconnects the battery if the voltage across the battery is less than 6 V.

The using of Lithium Polymer (LiPo) batteries could be dangerous, and you must follow all the safety
precautions related to the LiPo batteries using. It is out of the scope of this manual to present all the safety
rules for using LiPo batteries.

4.2.1.2 Battery Charger Circuit


The battery charger circuit is based on BQ24103RHLR IC manufactured by Texas Instruments, as you can
see in the schematic of circuit (Figure 56). The BQ24103RHLR [33] is a highly integrated switch mode
charger for 1s (single cell) or 2s (2 cells in series) LiPo battery.

A 12 V / 0.5 A DC voltage source, connected on J6 DC jack, supplies the battery charger circuit. You can
use a wall adapter whose output voltage is 12 V, and output current is higher than 0.5 A. The B1 diode
bridge “rectifies” the supply voltage applied at the input of the charger. We added B1 in order to prevent
the destruction of the charger if we use a voltage source with wrong polarity. After the B1 rectifier bridge,
the voltage has good polarity, regardless the polarity of voltage applied to the input.

Page 37 of 66
Karel User’s Manual

Figure 56 Battery charger schematic

The 2s LiPo battery that has to be charged must be connected between P+ and Cha- terminals. The battery
charging has three phases, shown in Figure 57.

4.2.1.2.1 Precharge Phase


If the battery voltage is below the short circuit voltage 𝑉𝑆𝐻𝑂𝑅𝑇 (around 4 V), the battery is charged with a
constant current of 35 – 60 mA. This is named the precharge phase (or battery preconditioning) and is
useful for deeply discharged cells. If the voltage is higher than the 𝑉𝑆𝐻𝑂𝑅𝑇 threshold, the charging is
charged with a constant current, named precharge current. The precharge current is the same as the
termination current, therefore these are renamed as precharge-termination current. The R33 resistor
connected on ISET2 pin sets the precharge-termination current, which is computed with next formulae:
𝑲𝑰𝑺𝑬𝑻𝟐 × 𝑽𝑻𝑬𝑹𝑴
𝑰𝑻𝑬𝑹𝑴 = (3)
𝑹𝑰𝑺𝑬𝑻𝟐 × 𝑹𝑺𝑵𝑺

where 𝐼𝑇𝐸𝑅𝑀 is the precharge-termination current, 𝐾𝐼𝑆𝐸𝑇2 = 1000 𝑉/𝐴, 𝑅𝐼𝑆𝐸𝑇2 = 𝑅33 = 10 𝑘Ω,
𝑉𝑇𝐸𝑅𝑀 = 100 𝑚𝑉 and 𝑅𝑆𝑁𝑆 = 𝑅34 = 100 𝑚Ω.

For given values, it results 𝐼𝑇𝐸𝑅𝑀 = 100 𝑚𝐴.

If 𝑅𝐼𝑆𝐸𝑇2 = 𝑅33 = 4,7 𝑘Ω and 𝑅𝑆𝑁𝑆 = 𝑅34 = 200 𝑚Ω results 𝐼𝑇𝐸𝑅𝑀 = 106 𝑚𝐴.

4.2.1.2.2 Current Regulation Phase


Current regulation phase starts if the voltage across battery is higher than the 𝑉𝐿𝑂𝑊 threshold, which is
around 71 % of the regulation (termination) voltage 𝑉𝑂𝑅𝐸𝐺 = 8,4 𝑉. This means that 𝑉𝐿𝑂𝑊 = 71 % ∗
8,4 𝑉 = 6𝑉.

The value of regulation current is computed with next formulae:


𝑲𝑰𝑺𝑬𝑻𝟏 × 𝑽𝑰𝑺𝑬𝑻𝟏
𝑰𝑶𝑪𝑯𝑨𝑹 = (4)
𝑹𝑰𝑺𝑬𝑻𝟏 × 𝑹𝑺𝑵𝑺

where 𝐼𝑂𝐶𝐻𝐴𝑅 is the regulation current, 𝐾𝐼𝑆𝐸𝑇1 = 1000 𝑉/𝐴, 𝑉𝐼𝑆𝐸𝑇1 = 1 𝑉, 𝑅𝐼𝑆𝐸𝑇1 = 𝑅32 = 10 𝑘Ω and
𝑅𝑆𝑁𝑆 = 𝑅34 = 100 𝑚Ω.

For given values, it results 𝐼𝑂𝐶𝐻𝐴𝑅 = 1 𝐴.

For 𝑅𝐼𝑆𝐸𝑇1 = 𝑅34 = 10 𝑘Ω and 𝑅𝑆𝑁𝑆 = 𝑅34 = 200 𝑚Ω it results 𝐼𝑂𝐶𝐻𝐴𝑅 = 500 𝑚𝐴.

Regulation current phase ends if the voltage across the battery is higher than the regulation voltage
threshold 𝑉𝑂𝑅𝐸𝐺 = 8,4 𝑉.

Page 38 of 66
Karel User’s Manual
4.2.1.2.3 Voltage Regulation Phase
The voltage regulation phase starts when the voltage across the battery equals the regulation voltage
𝑉𝑂𝑅𝐸𝐺 = 8,4 𝑉. The charging current decrease, and the battery voltage is constant.

The charging is finished when the charging current decrease below the precharge-termination current
threshold 𝐼𝑇𝐸𝑅𝑀 .

Figure 57 Typical charge profile

4.2.1.2.4 Charge Status


The D3, D4, and D5 LEDs indicate various charger operations.

The D3 LED (red) is on if a power supply with the correct value is connected on the input of the charger.

The D4 (green), and D5 (yellow) LEDs give information related to the charge status, according to Table 1.

Charge state D5 (yellow) D4 (green)


Charge-in-progress ON OFF
ON OFF
Charge complete
OFF ON
Charge suspend, timer fault, overvoltage, sleep mode, battery
OFF OFF
absent
Table 1 Chare status indicated by D4 and D5 LEDs

4.2.1.3 Battery Protection Circuit


First, I remind you that the using of Lithium Polymer (LiPo) batteries could be dangerous, and you have to
follow all the safety precautions related to the LiPo batteries using.

The battery protection circuit (Figure 58) assure the battery operation in safety zone. The two S-8290A
Seiko ICs, protect the battery against overcharge, overdischarge, and balance the two cells. The S-8239A
Seiko IC protect the battery against overcurrent.

Page 39 of 66
Karel User’s Manual
LiPo batteries have two connectors: one for charging, and discharging the battery; one for monitoring,
and balancing your battery. The 2s LiPo battery charging – discharging connector is connected on J2. The
connector for monitoring and balancing is connected on J1.

The load supplied by the battery is connected between P+, and Dis-. The battery is connected to the load
if the T5 MOSFET transistor conducts. If T5 is blocked, the battery and the load are disconnected.

The power supply for charging the battery has to be connected between P+ și Cha-. The battery is
connected to the charging power supply if both MOSFET transistors T5 and T6 conduct. If one of the
transistors T5 and T6 is blocked, the battery and the charging power supply are disconnected.

The T5 transistor is controlled by T3 BJT transistor, which is controlled by IC1, IC2, and IC3.

The T6 transistor is controlled by T4 BJT transistor, which is controlled by IC1, and IC2.

The voltage across each battery cell is measured by the corresponding S-8209 [34] circuit. So, the IC1 and
IC2 can protect the two cells if they detect cells overcharge or overdischarge conditions. In these two
cases, the T3 and T4 transistors are blocked, and also the T5, and T6 transistors are blocked (due of the
resistors connected between source and gate of each transistor). So, the battery is disconnected from
both source, and load. IC1, and IC2 balance the two cells via T1, and T2 transistors they control. The cell
balance starts when the cell voltage is higher than a specific voltage threshold, and is made by discharging
the cell with a certain current. The current flows through the series circuit of the T1 (T2) transistor, and of
the resistor R27 || R3 (R28 || R6). For the component values in Figure 58, it results R27 || R3 = 200 Ω / 2
= 100 Ω, and the balancing current is 40 mA = 4V / 100 Ω.

Figure 58 Battery protection circuit schematic

The S-8239A [35] IC protects the battery against the overcurrent. The current through battery is measured
with parallel resistors R17 – R20. The current threshold which activates overcurrent protection is 100 mV
/ 25 mΩ = 4A. When the voltage across R17 – R20 resistors is 100 mV, the IC3 blocks the T5 transistor, and
this way, the battery is isolated from both source, and load.

Page 40 of 66
Karel User’s Manual
4.2.1.4 Line Sensor
The second prototype of the Karel platform, didn’t contain a line sensor on the lower board. This was
added on the last prototype, because there was some free space on the board.

The line sensor (Figure 59) has four reflective optical sensors KTIR0711S [15]. The LEDs of two sensors
are connected in series, in order to reduce the current consumed.

The power for the line sensor is supplied between VCC and GND. The output signal A0 – A3 are
transmitted to the microcontroller through 4 wires cable.

The output voltage of each sensor (A0 – A3) depends on the reflectivity of the surface under the sensors:

- If the surface is black, the amount of reflected light is small, the phototransistor resistance is high,
and the sensor output voltage is close to the power supply voltage, VCC;
- If the surface is white, the amount of reflected light is high, the resistance of the phototransistor
is small, and the sensor output voltage is close to the GND.

The sensor output voltage is inversely proportional to the value of the surface reflectivity coefficient.

Figure 59 Line sensor schematic

4.2.2 Upper Board


In this subsection we will describe the upper board of the robotic platform Karel. As you can see in Figure
60, the upper board contains next electronic modules:

- Electronic switch.
- +5 V voltage regulator with LM2940CS to power the microcontroller and other digital circuits.
- +3.3 V voltage regulator with LM1117IMP to power the Bluetooth, and other digital circuits that
operate on this voltage.
- +7 V voltage regulator with TPS63060 to provide a regulated voltage to the motors.
- ATmega 32U4 microcontroller, the brain of the Karel platform.
- Bluetooth BTM-182 module for communication between microcontroller, and laptop.
- Level shifter circuit between 3.3 V and 5 V to allow the communication between Bluetooth
module (powered at 3.3 V) and the microcontroller (powered at 5 V).
- Motor driver with DRV8833PWP.
Page 41 of 66
Karel User’s Manual
The upper board is powered through JST connector with the voltage across the output of the battery
protection circuit.

Figure 60 Karel upper board – bottom view

As you can see in Figure 61, the user has easy access to the next components placed on the top side of
the upper board:

- The electronic power switch switches power on and off, and is controlled by a micro-switch. A
SMD LED (power LED) on the board is on when the board is powered.
- The +3.3 V, +5 V, and +7 V voltages are available on certain 2 pins connectors placed near the
edge of the board. For all the connectors, the GND pin is placed to the outside, and the positive
pin is placed to the inside.
- On board +7 V voltage regulator could be used if you power it by connecting a jumper between
dedicated pins placed on left down side of the board (“Jumper to Supply the +7 V Voltage
Regulator”).
- Motor driver can be powered with the battery unregulated voltage, or with +7 V regulated
voltage. The selection of one of the two voltages is made by connecting a jumper on proper pins
(“Pins for Motor Power Supply Selection”). If the motors are supplied with regulated voltage, the
motors behave the same way, regardless the battery charge state.
- The two motor drivers are controlled by four PWM outputs of the microcontroller. If there is a
problem related to driver functioning (e.g. output short circuit) a SMD led indicate this (“Motor
Driver State LED”). The motors are connected to the driver through pin connectors.
- 16 pins of the microcontroller named A0 – A11, and D12 – D15 are available to user. As you
already, guessed the A0 – A11 are connected to the 12 analogic inputs of the microcontroller. D12
– D15 are digital I/O.
- The reset button resets your microcontroller if it is pushed.
- The ISP programming connector allows microcontroller’s programming with a programmer (e.g.
AVRISP MKII).

Page 42 of 66
Karel User’s Manual
- The mini USB connector is used to program the microcontroller without using a programmer,
which is possible if the right bootloader is loaded in the microcontroller memory. If you want to
enter programming mode, you have to release the left pushbutton in the four pushbuttons line
(“Hardware Bootloader Pushbutton) after the reset of the microcontroller.

Figure 61 Karel upper board – top view

- The trimmer potentiometer is power across the end terminals with +5V, and GND. On the wiper
there is a variable voltage in range of 0 – 5 V, which can be applied to the A0 analogic input
through a jumper.
- Four THD LEDs (red, yellow, green, and blue) are available to the user. Each of them can be
connected through a jumper to one of the D12 – D15 pins.
- Four pushbuttons available to the user are connected to the HWB, MISO, MOSI, and SCK pins of
the microcontroller, which are also used for entering the USB programming mode or
microcontroller programming via ISP.
- The Bluetooth module provide wireless communication between microcontroller between
microcontroller and other device (e.g. laptop). The Bluetooth module communicates with the
microcontroller via UART interface. The signals RX, and TX are adapted between +5 V, and +3.3 V
with a level shifter converter. For Bluetooth communication, we have to connect through a
jumper, the TX signal of the Bluetooth module to the RX signal of the microcontroller which is
available on a pin of the UART interface connector.
- Three SMD LEDs placed on the bottom right side of the upper board indicate the state of the
Bluetooth module. The left LED indicate if the connection is established, and the other two
indicate when the Bluetooth module transmits or receives information.
- UART interface connecter provide the access to the UART interface of the microcontroller. If the
UART interface is used, the bidirectional communication between microcontroller and Bluetooth
module cannot be done.

The documentation for the Karel board manufacturing was created by Mihai Agape, and it is available
on the Github repository „Karel Upper Board” [36].

Page 43 of 66
Karel User’s Manual
4.2.2.1 Karel Power Supply
Robotic platform Karel is powered by 2s LiPo battery (2 cells in series) with a capacity of 850 mAh (Figure
55). The voltage supplied by the battery changes during operation from 8.4 V (when the battery is fully
charged) to 6 V (when the battery is fully discharged).

The battery voltage is regulated by three voltage regulators in order to obtain 5 V, 3.3 V, and 7 V voltages.
Most of the logical circuits on the platform are powered at +5 V. The Bluetooth module is powered at 3.3
V. The motors can be powered directly from the battery or at +7 V regulated voltage.

4.2.2.1.1 Upper Board Power Switch


Most of the robots we built previously didn’t have a power switch; that means that every time when we
used the robot we had to connect / disconnect the battery connector. Sometimes we connected the
battery reverse way, because we used unpolarised connectors and we were quite nervous during some
contests. In fact, the first two prototypes of the Karel platform didn’t include a power switch. We included
in the last Karel design a power switch (Figure 62) which is based on the electronic power switch designed
by Maria-Cristina Agape [37].

The power switch works as it follows: if we switch the S6 micro-switch the T3 transistor is on or off and
therefore the upper board is connected or disconnected from the power supply. In the initial design there
was also a battery reverse protection circuit. We didn’t use because the battery voltage is supplied to the
board through a polarised JST connector.

Figure 62 Power switch schematic

4.2.2.1.2 +5 V Voltage Regulator


Most of the circuits—microcontroller, inputs circuits, LEDs, driver logic—is powered with 5 V voltage. As
you can see in Figure 63, the 5 V voltage is provided by the voltage regulator made with IC2 integrated
circuit of type LM2940CS [38].

Page 44 of 66
Karel User’s Manual

Figure 63 +5 V voltage regulator schematic

4.2.2.1.3 +3.3 V Voltage Regulator


The supply voltage of the Bluetooth module is +3.3 V. As you can see in Figure 64 the +3.3 V voltage is
provided by the voltage regulator made with IC3 integrated circuit of type LM1117IMP-3.3 [39]. The
voltage regulator is powered with +5 V voltage provided by the IC2.

Figure 64 +3.3 V voltage regulator schematic

The voltage regulator can also provide 3.3 V voltage to other circuits added to the platform because the
output current is higher than the current consumed by Bluetooth module.

4.2.2.1.4 +7 V Voltage Regulator


The supply voltage provided by 2s LiPo battery can changes between 6 V and 8.4 V. This means that the
motor speed is affected by the battery charge state. In order to solve this, we can use encoders to regulate
the motor speed or the power the motors with a regulated voltage. As you can see in Figure 65, we
included a switching voltage regulator made with IC5 integrated circuit of type TPS63060DSCR [40].

The voltage regulator is powered with battery voltage (6 – 8.4 V) and provide an output voltage of +7 V.
Depending on the voltage applied to the input of the TPS63060 integrated circuit, it can function as buck
or boost convertor, in order to maintain a constant value for the output voltage.

Figure 65 +7 V voltage regulator schematic

Page 45 of 66
Karel User’s Manual
4.2.2.1.5 Microcontroller Supply Voltages
The microcontroller is powered with digital supply voltage between VCC and GND pins. The capacitors we
connected between VCC and GND filters the voltage.

The analogic supply voltage AVCC is obtained from digital supply voltage with a LC filter.

The reference voltage on AREF pin is filtered with a capacitor connected between AREF and AGND.

4.2.2.2 The microcontroller


In this subsection we will present different aspects related to the microcontroller ATmega32u4 [41],
which is used in Karel robotic platform.

The Karel platform kept some specifications from the first prototype, Karelino. One of it was to have all
the analogic inputs of the microcontroller available to the user (Figure 66). We designed with this
feature in mind in order to be possible to make a line follower with a 12 sensor array. We also tried to
offer access to the user to a larger number of I/O microcontroller pins. In order to do that, we
connected the pushbuttons to the same pins used by ISP interface, and the user LEDs can be connected
to microcontroller outputs just when is necessary, using some jumpers.

The microcontroller pins are allocated according to the Table 2.

Pin Pin
Alternative Functions Karel
No Name

D12 (Digital I/O)


1 PE6 INT.6/AIN0
LdR (Red LED connected through jumper)

2 UVCC VCC (Digital supply voltage)

D- (USB Full speed / Low Speed Negative Data


3 D-
Upstream Port)

D+ (USB Full speed / Low Speed Positive Data


4 D+
Upstream Port)

5 UGND GND (Ground)

UCAP (USB Pads Internal Regulator Output supply


6 UCAP
voltage)

7 VBUS VBUS (USB VBUS monitor input)

D13 (Digital I/O)


8 PB0 SS/PCINT0
LdY (Yellow LED connected through jumper)

SCK (SPI)
9 PB1 PCINT1/SCLK
S4 (Pushbutton active low)

MOSI (SPI)
10 PB2 PDI/PCINT2/MOSI
S3 (Pushbutton active low)

MISO (SPI)
11 PB3 PDO/PCINT3/MISO
S5 (Pushbutton active low)

12 PB7 PCINT7/OC0A/OC1C/!RTS AIN2 (OC0A = Right Motor Control 2)

13 !RESET |RESET| (Reset input)

Page 46 of 66
Karel User’s Manual

Pin Pin
Alternative Functions Karel
No Name

14 VCC VCC (Digital supply voltage)

15 GND GND (Ground)

16 XTAL2 XTAL2 (Output from the inverting Oscillator amplifier)

XTAL1 (5 XTAL1 Input to the inverting Oscillator


17 XTAL1
amplifier)

18 PD0 OC0B/SCL/INT0 AIN1 (OC0B = Right Motor Control 1)

D15 (Digital I/O)


19 PD1 SDA/INT1
LdB (Blue LED connected through jumper)

RX (uC RX)
20 PD2 RXD1/INT2
Bluetooth TX (Connected through jumper)

21 PD3 TXD1/INT3 TX (uC TX)

D14 (Digital I/O)


22 PD5 XCK1/!CTS
LdG (Green LED connected through jumper)

23 GND GND (Ground)

24 AVCC AVCC (Supply voltage pin for all the ADC channels)

25 PD4 ICP1/ADC8 A0/D0 (Analogic I / Digital I/O)

A1/D1 (Analogic I / Digital I/O)


26 PD6 T1/!OC4D/ADC9
|OC4D| (PWM)

A2/D2 (Analogic I / Digital I/O)


27 PD7 T0/OC4D/ADC10
OC4D (PWM)

28 PB4 PCINT4/ADC11 A3/D3 (Analogic I / Digital I/O)

A4/D4 (Analogic I / Digital I/O)


29 PB5 PCINT5/OC1A/!OC4B/ADC12
OC1A/|OC4B| (PWM)

A5/D5 (Analogic I / Digital I/O)


30 PB6 PCINT6/OC1B/OC4B/ADC13
OC1B/OC4B (PWM)

31 PC6 OC3A/!OC4A BIN2 (OC3A = Left Motor Control 2)

32 PC7 ICP3/CLK0/OC4A BIN1 (OC4A = Left Motor Control 1)

|HWB| (Hardware Bootloader)


33 PE2 !HWB
S2 (Pushbutton active low)

34 VCC VCC (Digital supply voltage)

35 GND GND (Ground)

36 PF7 ADC7/TDI A6/D6 (Analogic I / Digital I/O)

37 PF6 ADC6/TDO A7/D7 (Analogic I / Digital I/O)

Page 47 of 66
Karel User’s Manual

Pin Pin
Alternative Functions Karel
No Name

38 PF5 ADC5/TMS A8/D8 (Analogic I / Digital I/O)

39 PF4 ADC4/TCK A9/D9 (Analogic I / Digital I/O)

40 PF1 ADC1 A10/D10 (Analogic I / Digital I/O)

41 PF0 ADC0 A11/D11 (Analogic I / Digital I/O)

42 AREF AREF (Analog reference pin for the ADC)

43 GND AGND (Analog ground)

44 AVCC AVCC (Supply voltage pin for all the ADC channels)
Table 2 ATmega32U4 pins allocation

4.2.2.3 Communication Interfaces


Compared with other previous projects developed at Filiala Orsova, Karel platform has more ways to
communicate with the computer: SPI, USB, UART, and Bluetooth (Figure 66). In the first prototype we
didn’t have connectors for serial interface (RX, TX), but during the testing they proved to be very useful,
therefore we added a UART interface connector in the last platform design.

4.2.2.3.1 SPI Interface


The Serial Peripheral Interface (SPI) allows high-speed synchronous data transfer between the
ATmega32U4 and peripheral devices or between several devices.

Because we can program the microcontroller via USB, we didn’t intend to include on the board a SPI
connector for ISP programming. The decision to include SPI connector (J2) was very good, because we use
it to program the microcontroller fuses. For example, the microcontroller comes out from the factory with
the CKDIV8 (Divide clock by 8) fuse set. This means that if we use a 16 MHz crystal, the microcontroller
clock frequency will be 2 MHz. We disabled CKDIV8 using ISP programming. Also the JTAGEN (Enable JTAG)
is enabled by default. This means that the four of the microcontroller pins are reserved for the JTAG
interface, and cannot be used by the user for other purposes. The user can use these pins as he want after
disabling the JTAGEN fuse via ISP programming.

4.2.2.3.2 USB Interface


The ATmega32U4 has an USB interface. The microcontroller can be programmed by computer through a
USB cable connected on J8 connector. So, we eliminate the programmer but the number of the pins for
user decrease.

Next, we provide a short description of the USB interface.

 UVCC is the input of 3 V voltage regulator for USB module, and is connected to VCC. It also can be
connected to VBUS.
 UCAP is the output of the 3 V voltage regulator for the USB module, and it is connected to UGND
trough a 1µF capacitor.
 D- and D+ pins of micro USB connector are connected to the D- and D+ pins of the microcontroller
through some 22 Ohm resistors. We use two CG0603MLC-05E varistors to prevent USB pads to
be damaged by external disturbances.
 UGND is the ground of USB module.
 VBUS is the input which monitor the supply voltage on the USB connector. For protection of the
5 V supply source we are use a 500 mA resettable fuse. The VBUS pin of the USB connector is

Page 48 of 66
Karel User’s Manual
decoupled to the ground through a 10µF / 6.3V capacitor. It is a good practice to use also a coil in
series in order to increase voltage filtering.

Figure 66 Microcontroller and communication interfaces

4.2.2.3.3 UART Interface


We can communicate with the microcontroller through an UART interface, which can is accessible on
the J5 connector. First prototype, Karelino, didn’t have a connector for UART interface. We decided to
add a connector for UART interface after we didn’t succeed to establish communication via Bluetooth
module.

4.2.2.3.4 Bluetooth Communication


One of the great feature of the Karel platform is the wireless communication with computer via
Bluetooth module. Using the Bluetooth is very easy to send the data acquired by Karel sensors to the
computer, and to receive information from a computer. Because of the wireless communication, we
decided not to include a LCD (Liquid Crystal Display).

Due to financial constraints we chose a cheap Bluetooth module, produced by Rayson. Unfortunately,
there is a disadvantage: the documentation provided by manufacturer is not enough detailed. First, we
tried to use the BTM-110 module. After our tests failed, we contacted the producer, which told us that

Page 49 of 66
Karel User’s Manual
the BTM-110 doesn’t have firmware inside, and this is the reason it doesn’t function. We successfully
integrated a BTM-112 module produced by the same company. In the final prototype we used the BTM-
182 module which is similar to BTM-112, but also has a built in antenna. The BTM-182 communicates
with the microcontroller through RX and TX pins of the microcontroller. Because the Bluetooth module
is power at 3.3 V voltage, and the microcontroller is powered at 5 V we use a level shifter to adapt the
signals.

4.2.2.4 Motor Driver


As you can see in Figure 67, we control the motors with a dual motor driver made with IC4 integrated
circuit of type DRV8833PWP [42]. This driver provide on each channel 1.2 A. The driver package is small
and it is quite hard to solder it on the PCB, but we chose this driver because each channel is control with
just two signal, and not three as other drivers. Each driver is controlled by two PWM outputs of the
microcontroller, as follows:

 Motor 1 (pin 12 – OC0A = AIN2, pin 18 – OC0B = AIN1)


 Motor 2 (pin 31 – OC3A = BIN2, pin 32 – OC4A = BIN1)

Considering the type of the outputs, the resolution is limited to 8 bits. The limitation is due to T/C0 timer
/ counter.

Figure 67 Motor driver

4.2.2.4.1 Motor Power Supply Selection


The motors can be powered by the battery unregulated supply voltage or by the +7 V regulated voltage.
If we connect a jumper between J26, and J25 pins, the +7 V source is selected (Figure 68). If this case don’t
forget to connect a jumper between J27 and J29 pins, in order to power the +7 V voltage regulator.

Figure 68 Motor power supply selection

Page 50 of 66
Karel User’s Manual
4.2.2.5 User Pushbuttons
We can use the pushbuttons S2 – S5, connected at the PE2, PB3, PB2 and PB1 pins (Figure 69) in order
to send commands to the microcontroller. As you can see, the S2 button is also used to enter the
programming mode via USB. The buttons S3 – S5 are connected to the SPI interface pins (SCK, MOSI,
and MISO) through 1kΩ resistor, which assure the separation from SPI signals. Because of the
pushbuttons connection mode, the functioning of the SPI it is not affected if is used to program the
microcontroller. The signals generated by the S2 – S5 pushbuttons are active on 0.

Figure 69 User LEDs and pushbuttons schematic

4.2.2.6 User LEDs


We can use D6 – D9 LEDs (Figure 69) to send information from the microcontroller to the user. The LEDs
can be connected to the pins D15 = PD1, D14 = PD5, D13 = PB0 and D12 = PE6. The LEDs are active on 0.

4.2.2.7 Trimmer Resistor


On the board is mounted the variable resistor R24 (Figure 70). The end terminals are connected
between +5 V and ground. Between wiper and ground there is a variable voltage which can be applied
to A0 microcontroller input by connecting a jumper between J9 pin, and pin 1 of the J12 pin (this pin is
connected to A0).

4.2.2.8 Microcontroller Pins Connector


As you can see in Figure 71, the user can access the A0 – A11 analogic inputs, and D12 – D15 digital I/O
through the pins of the connectors J10, and J12.

Figure 70 Trimmer potentiometer used to generate a


variable voltage Figure 71 Connectors to access microcontroller pins

The way that the connectors are placed on the board makes very easy to connect a usual peripheral,
which use a single row 3 pins row female header (Signal, VCC, and GND).

Page 51 of 66
Karel User’s Manual
4.2.3 Input / Output Peripherals
4.2.3.1 Overview
The Karel platform has a J12 connector with 12 lines going to the A0-A11 ports of microcontroller
(Figure 71), which can be used both as analog / digital inputs and as digital outputs. There is also an
additional J10 connector with digital inputs / outputs lines D12-D15. These two connectors allows to
connect a dedicated module for KAREL.

The Polish contribution to the project was to design two sensor modules for the platform: a line sensor
module and a distance sensor module.

4.2.3.2 Designing and Manufacturing Custom I/O module


The first thing to do in designing process of new sensors module for the KAREL platform is decide what
must be accomplished. With proper idea and a plan there is nothing left to do than to start designing
PCB. For example purposes, whole process of creating a new part will be shown on the line sensor
module.

There been used 10 reflective sensors KTIR0711S for the line sensor module. Leaving 2 lines unused
there is a possibility to connect another modules alongside with the line sensor. This allows to use Karel
platform as line follower robot, which is able of detecting and avoiding obstacles.

Use the specially CAD software for designing electricity circuits to draw a schematics (Figure 72). Take
closer look for symbols and wire them with caution.

Figure 72 Schematics of the line sensor module

The next step is drawing a PCB schematics, with a reminder of montage features provided by holes in
the Karel unit’s main boards. In this case (Figure 73) the strips with holes for assembly procure will be
glued to sensors board.

Figure 73 PCB schematics with handles for assembly process

Page 52 of 66
Karel User’s Manual
When the schematic of PCB is done the next thing is to export circuits to graphic file. To save on foil,
there is a need to copy schematics as many times as it possible on an A4 paper sheet (Figure 74).

Figure 74 PCB schematics ready to be printed

Before printing PCB schematics on foil, the printer options must be set to best quality. In Figure 75 there
is an example of foil with PCB schematics of the KAREL mainboard printed onto it.

After printing, the next thing to do is to transfer the toner from the foil to copper laminate. It can be
done using the laminator (Figure 76). To get better quality, this procedure should be done at least two
times.

Figure 75 PCB schematics printed on the foil, ready to be Figure 76 Transferring the toner from the foil to a copper
transferred onto laminate laminate

When the last step is completed, remove the foil and correct any imperfections using waterproof
marker (Figure 77).

The PCBs are ready to be etched in sodium persulfate solution (Figure 78).

Figure 77 PCBs without foils Figure 78 Etching a PCB

Page 53 of 66
Karel User’s Manual
When all uncovered copper is etched, the board is ready to be washed in water. After that, use a
dissolvent such as acetone to remove the toner (Figure 79). To get a better surface for soldering there is
the possibility to abrade the whole board with a fine-grained sandpaper.

Figure 79 Etched PCBs Figure 80 Boards with soldered components

The next step is drilling holes and cutting the excess of laminate. After that procedure the PCB is ready
for soldering. Begin with integrated circuits, through passive elements and end with wires and gold pins
(Figure 80).

Figure 81 The line sensor module installed Figure 82 Testing of the line sensor module with the KAREL
platform

Assembly all parts and mount the new module to the KAREL unit (Figure 81).

The final step is to write a diagnostic program and test the module (Figure 82).

Page 54 of 66
Karel User’s Manual
5 Manufacturing
We intended to detail in this chapter the steps for manufacturing the Karel platform but we change our
mind. In this manual there three different subsections which include information related to the PCBA
manufacturing:

- 3.3.1.3 Karelino PCB Manufacturing (page 25)


- 3.3.1.4 Karelino PCBA Assembling & Testing (page 27)
- 4.2.3.2 Designing and Manufacturing Custom I/O module (page 52)

You can see that the Romanian and Polish teams use the same method to manufacture PCB, Transfer
Toner System (TTS). There are small differences due to the materials used. The best method is the one
you know better, if gives you the desired result.

We gather in this section some information related to the manufacturing of electronic modules
developed by Karel project.

1. Information about how to manufacturing PCBs using PulsarProFX kit “PCB Fab in A Box” on the
manufacturer website [21].
http://www.pcbfx.com/main_site/pages/start_here/overview.html
2. “Karel controller manufacturing” presentation [22].
http://1drv.ms/1iNc1qx
3. Electronic switch manufacturing documentation [5].
https://github.com/magape/KarelSwitch
4. Single cell LiPo manufacturing documentation [8].
https://github.com/magape/KarelCharger
5. Single motor driver manufacturing documentation [10].
http://1drv.ms/1OFONi0
6. Dual motor driver on single sided PCB manufacturing documentation [11].
http://1drv.ms/1WagtxM
7. Dual motor driver on a double sided PCB manufacturing documentation [12].
http://1drv.ms/1LoT0FI
8. +7 V voltage regulator manufacturing documentation [14].
http://1drv.ms/1VTje6j
9. Line sensor (12) manufacturing documentation [16].
https://github.com/magape/KarelLiFo12Sensor
10. Karelino controller documentation [23].
https://github.com/magape/KarelController
11. “Karel Lower Board Testing – Workshop” manufacturing presentation [25].
http://1drv.ms/1bubNRm
12. “How to Assemble Karel Lower Board - Workshop” manufacturing presentation [26].
http://1drv.ms/18Z4cZf
13. “Karel Upper Board Testing - Workshop” manufacturing presentation [28].
http://1drv.ms/18Z4nnn
14. Karel lower board last prototype manufacturing documentation [27].
https://github.com/magape/Karel-Lower-Board
15. Karel upper board last prototype manufacturing documentation [30].
https://github.com/magape/Karel-Upper-Board

Some of the resources above, also have links to other valuable resources.

Page 55 of 66
Karel User’s Manual
6 Programming
We intended to have a detailed section related to the programming of the Karel platform. This doesn’t
happened because human resources involved in this task were less than we expected. We will just
present on short how to write a C program for Karel, and how to program Karel using SPI, and USB
interfaces.

During the Karel project we organized few workshops related to programming [29], [43].

6.1 Karel Code Writing


In this subsection we will show you how to create a C program for Karel platform using Atmel Studio 6.2
free IDE (Integrated Development Environment). In order to do that, you need to have Atmel Studio 6.2
installed on your computer. If you don’t have it, install the program following the instruction provided
on the producer webpage http://www.atmel.com/tools/ATMELSTUDIO.aspx.

Now it’s time to write a program that will blink the D9 red user led on the upper board. LED has to be
connected to D12 through a jumper (connected between J15 and J10-pin1). This way, the red LED is
connected to the microcontroller pin PE6.

Open Atmel Studio 6.2 and click New Project. In the New Project dialog, select GCC C Executable Project
(Figure 83). Enter the project name and location. Click OK.

In this example we chose the name RedLedBlink, and the location is C:\Users\Misu\Dropbox\___Karel
Software\RedLedBlink\RedLedBlink\RedLedBlink.c. The program created a folder for the solution. If
you don’t want this you should uncheck the Create directory for solution box.

Figure 83 Creating new GCC C executable project in Atmel Studio 6.2

In the Device Selection window will be displayed all devices that can be programmed with Atmel Studio
6.2. Select ATmega32U4, the microcontroller used in Karel platform, by writing its name in the text box
placed in upper right side of the window. Click OK to create the project (Figure 84).

Page 56 of 66
Karel User’s Manual

Figure 84 Device selection for a new project in Atmel Studio 6.2

Delete the template code placed automatically in RedLedBlink.c and add the code in Figure 85.

Is not necessary to type the green text because are just comments and don’t affect the code. Instead
will affect you because after few months you want understand your own code.

Figure 85 Code for blinking the red led D9 on the Karel upper board

Page 57 of 66
Karel User’s Manual
Click the Build Solution (F7) button on the Build menu, or press F7 to compile the code (Figure 86).

Figure 86 Compile the code written in Atmel Studio 6.2

If everything is OK, you should receive good news from the program (Figure 87).

Figure 87 Message displayed by Atmel Studio 6.2 after the code compilation

Don’t close Atmel Studio, because in next subsection we will burn the program you just wrote in the
flash memory of Karel microcontroller, using SPI interface.

6.2 SPI Programming


Next we show you how to write the program you just created in the Karel microcontroller flash memory,
using an AVRISP MKII programmer connected to the SPI interface of the microcontroller.

First you need to prepare Karel platform. In order to test Karel platform you just need the upper board
of the Karel platform, because the platform works without electronic modules on the lower board.

Connect the battery to the Karel platform. Pay attention to the battery connection because there is not
protection circuit on the upper board for battery reverse connection. The connectors are polarised and
therefore you shouldn’t be able to connect the battery connector in the wrong way, but if you are
strong and very insistent you can create some smoke. Don’t do it!

Connect the AVRISP MKII programmer to the SPI port on the upper board (). The red wire is connected
to the pin no 1 of the SPI connector (2x3 pin header). The pin no 1 is placed toward the outside of the
board. Connect the programmer to the computer through the USB cable.

Now you are prepared to bring to life your Karel platform.

Page 58 of 66
Karel User’s Manual

Figure 88 Programming Karel upper board with AVRISP MKII programmer

After the hardware preparation you’ve made, it’s time to come back to the program you wrote in Atmel
Studio 6.2.

In Atmel Studio 6.2 go to Tools menu and select Device Programming (Ctrl+Shift+P). Of course you can
use the Ctrl+Shift+P key combination (Figure 89).

Figure 89 Device programming in Atmel Studio 6.2

In the Device Programming window make selections showed in Figure 90: Tool = AVRISP mkII, Device =
ATmega32U4, and click Apply button.

Figure 90 Selecting tool & device for device programming in Atmel Studio 6.2

Page 59 of 66
Karel User’s Manual
Click the two Read buttons in the right upper side of the Device Programming window in order to check
if that everything is OK. The program should display the Device signature, which for Atmega32U4 is
0x1E9587 and the Target Voltage, which has to be around 5 V.

Figure 91 Checking device signature and target voltage in Atmel Studio 6.2

In the Device Programming window select Memories button on the left side of the window (Figure 92).
Under Flash (32 kB) there is a text box (Flash text box) which contains the path to the ELF file generated
when you compiled the RedLedBlink program. If it is not there, you have to search for it using the …
button placed to the right side of the Flash text box. The file is in a folder named Debug placed in the
folder of your solution (project). Click the Program button under Flash text box.

Figure 92 Writing the program in the flash memory of Karel microcontroller

You probably are very happy because the red LED already started to blink! Congratulations for the first
program for Karel platform that you wrote and tested!

If the LED didn’t blink we welcome you in the debugging world.

6.3 Debugging
Debugging is the process of finding and fixing bugs (errors) in computer program code or defects of a
hardware device. If you will involve in CS field, probably you will spent a lot of time debugging the
programs / hardware you will develop.

Why previous program didn’t function? It could be a lot of answers, but I give just three examples
introduced as questions.

Page 60 of 66
Karel User’s Manual
Q1. Did you place the jumper for connecting the red LED in the right place? If the answer is affirmative
connect the jumper and check if the red LED is blinking. If this was the problem, you just debugged your
project. Of course, there a lot of hardware faults which can be the cause of your bug.

Q2. Are you sure that you your code doesn’t have typo errors? If everything is OK with the hardware,
probably you made a mistake in the code you wrote. Sometimes is not so easy to identify the mistake.
We present in Figure 93 the program we wrote in the beginning of this section, but we inserted a bug.
Could you find it?

Figure 93 Wrong blinking red LED code

Of course you found it: on the line which modifies the state of the output pin PE6 we changed the
operator from “^” to ”|”. That means that the PE6 will not be complemented anymore and will stay all
the time in 1. Therefore the red LED is off because it is active on 0.

Of course you also noticed that in the same line, PE6 was replaced by PD6, but this doesn’t affect the
code because it is part of a comment.

Q3. Your red LED is blinking but at a slower rate than you expected? For sure you have this problem if it
first time when the microcontroller is used. That’s because the microcontroller comes out from the
factory with CKDIV8 fuse set, and the clock is divided by 8.

6.4 Fuses Programming


Because we you didn’t disconnected yet your programmer it is time to solve the last bug of the previous
section. As I said, the microcontroller comes out from the factory with the CKDIV8 (Divide clock by 8)
fuse set. This means that if we use a 16 MHz crystal, the microcontroller clock frequency will be 2 MHz.
This means that if we want to have a 16 MHz clock, we have to disable the CKDIV8 fuse. We can do that
using ISP programming.

In left side of the Device Programming window there is a button named Fuses. If you click on it you will
see a window like in Figure 94. The green fuses were not changed, and the yellow fuses were changed
but were not programmed yet. As you can see we changed three fuses: JTAGEN, CKDIV8, and
SUT_CKSEL. We changed SUT_CKSEL fuse to match the crystal quartz we use to generate the clock. We
changed the CKDIV8 fuse (initially was checked) because we don’t want the clock to be divided by 8. We
also changed JTAGEN (Enable JTAG) fuse, which is enabled by default. This means that the four of the
microcontroller pins are reserved for the JTAG interface, and cannot be used by the user for other
purposes. Because we want to use the four pins, we unchecked the JTAGEN fuse.

Before programming fuses I remind you don’t uncheck the SPIEN (SPI Enable) fuse. If you do that you
won’t be able to program the microcontroller using SPI interface.

Page 61 of 66
Karel User’s Manual
Your SPIEN fuse has to be always CHECKED!

Now click on Program button to program the new fuses values.

Figure 94 Fuses settings

You can see now that your red LED is blinking at the right rate.

6.5 USB Programming


One of the most important features of the Karel platform is that it can be programmed through USB
interface, without using a programmer. In this subsection will show you how to do it.

First, if you want to program your Karel platform via USB you have to program a special program named
bootloader, on your microcontroller. In order to do that, first go the Atmel website and download Atmel
bootloaders from http://www.atmel.com/Images/megaUSB_DFU_Bootloaders.zip. Extract from the
downloaded archive the ATmega32U4 bootloader HEX file and program it on Karel microcontroller using
the AVRISP MKII programmer. Now, you can program Karel via USB because the bootloader is written in
the flash memory.

Second, you cannot program the ATmega32U4 via USB, using Atmel Studio. For USB programming we
need a software named FLIP 3.4.7. Go to the Atmel webpage http://www.atmel.com/tools/FLIP.aspx and
use the information to install FLIP 3.4.7 on your computer.

Third, power your Karel platform and connect the microcontroller and the computer through a USB
cable. As you can see in Figure 95, Karel uses a mini B USB connector.

Page 62 of 66
Karel User’s Manual

Figure 95 Karel USB programming

Now open FLIP and program the microcontroller with the HEX files hosted at http://1drv.ms/1VdcEWi.
The three files are: “Flashing LEDs”, “Motors Test”, and “Bluetooth communication”.

Figure 96 Using FLIP software to program Karel via USB

If you have problems using FLIP, you should check the documentation on the producer website.

Page 63 of 66
Karel User’s Manual
7 Bibliography

[1] M. Agape and M.-G. Agape, “KAREL Specifications,” 12 November 2013. [Online]. Available:
http://sdrv.ms/170NTak. [Accessed 04 May 2015].

[2] C.-M. Agape, “Intrerupator electronic cu protectie la conectarea inversa a bateriei,” 26 May 2014.
[Online]. Available: http://1drv.ms/1gu6KCh. [Accessed 1 July 2015].

[3] Fairchild Semiconductor, “FDC6329L,” 14 September 2000. [Online]. Available:


http://www.fairchildsemi.com/ds/FD/FDC6329L.pdf. [Accessed 27 January 2014].

[4] International Rectifier, “IRLML6401 Datasheet,” 11 September 2004. [Online]. Available:


http://www.irf.com/product-info/datasheets/data/irlml6401.pdf. [Accessed 3 February 2014].

[5] C.-M. Agape, “Karel Load Switch,” 17 June 2014. [Online]. Available:
https://github.com/magape/KarelSwitch/. [Accessed 25 March 2015].

[6] M.-C. Agape, “Intrerupator electronic cu protectie la conectarea inversa a bateriei,” 6 June 2014.
[Online]. Available: http://1drv.ms/1W5kinN. [Accessed 8 March 2015].

[7] Microchip Technology Inc., “MCP73833/4 Datasheet,” 30 May 2009. [Online]. Available:
http://ww1.microchip.com/downloads/en/DeviceDoc/22005b.pdf. [Accessed 15 August 2015].

[8] M. Agape, “Single Cell Lithium Polymer Charger with MCP73833,” 18 June 2014. [Online].
Available: https://github.com/magape/KarelCharger. [Accessed 2 September 2015].

[9] Texas Instruments, “DRV8833 Dual H-Bridge Motor Driver,” 15 January 2011. [Online]. Available:
http://www.ti.com/lit/ds/symlink/drv8833.pdf. [Accessed 24 August 2015].

[10] M. Agape, “Single Motor Driver with DRV8833,” 19 September 2015. [Online]. Available:
http://1drv.ms/1OFONi0. [Accessed 19 September 2015].

[11] M. Agape, “Dual Motor Driver with DRV8833 on Single Sided PCB,” 19 09 2015. [Online]. Available:
http://1drv.ms/1WagtxM. [Accessed 19 09 2015].

[12] M. Agape, “Dual Motor Driver with DRV8833 - Double Sided PCB Design,” 19 09 2015. [Online].
Available: http://1drv.ms/1LoT0FI. [Accessed 19 09 2015].

[13] Texas Instruments, “TPS6306x High Input Voltage, Buck-Boost Converter With 2-A Switch Current,”
15 December 2011. [Online]. Available: http://www.ti.com/lit/ds/symlink/tps63060.pdf. [Accessed
12 September 2015].

[14] M. Agape, “7 V Switching Voltage Regulator,” 14 January 2014. [Online]. Available:


http://1drv.ms/1VTje6j. [Accessed 3 September 2015].

[15] Kingbright, “KTIR0711S - Subminiature, High Sensitivity Photointerrupter,” 17 January 2013.


[Online]. Available:
http://www.kingbright.com/attachments/file/psearch/000/00/00/KTIR0711S(Ver.13).pdf.
[Accessed 18 September 2015].

[16] M. Agape, “12 Reflective Optical Sensors Array,” 18 June 2014. [Online]. Available:
https://github.com/magape/KarelLiFo12Sensor. [Accessed 12 September 2015].

Page 64 of 66
Karel User’s Manual
[17] Karel Turkish Team, “Karel Chassis Manufacturing,” 9 May 2014. [Online]. Available:
https://youtu.be/1riwV2lX90E. [Accessed 20 September 2015].

[18] Solarbotics, “28 mm Traction Wheels RW2,” 19 March 2012. [Online]. Available:
https://solarbotics.com/product/rw2/. [Accessed 25 June 2015].

[19] Pololu Robotics & Electronics, “Micro Metal Gearmotors,” 3 November 2013. [Online]. Available:
https://www.pololu.com/category/60/micro-metal-gearmotors. [Accessed 10 July 2015].

[20] Pololu Robotics & Electronics, “50:1 Micro Metal Gearmotor HP with Extended Motor Shaft,” 17
November 2013. [Online]. Available: https://www.pololu.com/product/2213. [Accessed 12 July
2015].

[21] PulsarProFX, “PCB Fab in a Box - Starter Kit,” PulsarProFX, 24 March 2011. [Online]. Available:
http://www.pcbfx.com/main_site/pages/start_here/overview.html. [Accessed 2 September 2015].

[22] C.-M. Agape, “Karel Controlller Manufacturing,” 10 April 2014. [Online]. Available:
http://1drv.ms/1iNc1qx. [Accessed 16 September 2015].

[23] M. Agape, “Karelino Controller,” 18 June 2014. [Online]. Available:


https://github.com/magape/KarelController. [Accessed 18 September 2015].

[24] M. Agape, “Karel - Second Platform Design,” 13 October 2014. [Online]. Available:
http://1drv.ms/1tbxTKI. [Accessed 28 August 2014].

[25] M. Agape, “Karel Lower Board Testing - Workshop,” 29 March 2015. [Online]. Available:
http://1drv.ms/1bubNRm. [Accessed 2 September 2015].

[26] C.-M. Agape, “How to Assemble Karel Lower Board - Workshop,” 29 March 2015. [Online].
Available: http://1drv.ms/18Z4cZf. [Accessed 28 August 2015].

[27] M. Agape, “Karel Lower Board Documentation,” 25 March 2015. [Online]. Available:
https://github.com/magape/Karel-Lower-Board. [Accessed 19 July 2015].

[28] M. Agape, “Karel Upper Board Testing - Workshop,” 25 March 2015. [Online]. Available:
http://1drv.ms/18Z4nnn. [Accessed 29 July 2015].

[29] M. Agape, “Karel Programming Workshop,” 27 March 2015. [Online]. Available:


http://1drv.ms/1MctFjX. [Accessed 29 July 2015].

[30] M. Agape, “Karel Upper Board Documentation,” 25 March 2015. [Online]. Available:
https://github.com/magape/Karel-Upper-Board. [Accessed 28 July 2015].

[31] Pololu Robotics & Electronics, “Pololu Ball Caster with 3/8'' Plastic Ball,” 4 November 2013.
[Online]. Available: https://www.pololu.com/product/950. [Accessed 10 June 2015].

[32] Pololu Robotics & Electronics, “Pololu Ball Caster with 3/8'' Metal Ball,” 4 November 2013.
[Online]. Available: https://www.pololu.com/product/951. [Accessed 12 June 2015].

[33] Texas Instruments, “BQ241XX Datasheet,” 15 March 2010. [Online]. Available:


http://www.ti.com/lit/ds/symlink/bq24100.pdf. [Accessed 12 August 2015].

Page 65 of 66
Karel User’s Manual
[34] Seiko Instruments Inc., “S-8209A Series - Battery Protection IC with Cell Balance Function,” 15
February 2010. [Online]. Available: http://datasheet.sii-
ic.com/en/battery_protection/S8209A_E.pdf. [Accessed 18 September 2015].

[35] Seiko Instruments Inc., “S-8239A Series - Overcurrent Monitoring IC for Multi Serial Cell Pack,” 15
February 2010. [Online]. Available: http://datasheet.sii-
ic.com/en/battery_protection/S8239A_E.pdf. [Accessed 16 September 2015].

[36] M. Agape, “Karel Upper Board,” Karel project, 25 March 2015. [Online]. Available:
https://github.com/magape/Karel-Upper-Board. [Accessed 6 June 2015].

[37] M.-C. Agape, “Intrerupator Electronic,” 13 March 2014. [Online]. Available:


http://1drv.ms/1OQIXKO. [Accessed 24 August 2015].

[38] Texas Instruments, “LM2940x 1-A Low Dropout Regulator,” December 2014. [Online]. Available:
http://www.ti.com/lit/ds/symlink/lm2940c.pdf. [Accessed 18 September 2015].

[39] Texas Instruments, “LM1117-N/LM1117I 800 mA Low-Dropout Linear Regulator,” March 2013.
[Online]. Available: http://www.ti.com/lit/ds/symlink/lm1117-n.pdf. [Accessed 14 September
2015].

[40] Texas Instruments, “TPS6306X High Input Voltage, Buck-Boost Converter with 2 A Switch Current,”
December 2014. [Online]. Available: http://www.ti.com/lit/ds/symlink/tps63060.pdf. [Accessed 15
September 2015].

[41] Atmel, “Atmega16U4/ATmega32U4 - 8 bit Microcontroller with 16/32 kBytes of ISP Flash and USB
Controller,” July 2015. [Online]. Available: http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-
ATmega16U4-32U4_Datasheet.pdf. [Accessed 18 September 2015].

[42] Texas Instruments, “DRV8833 Dual H,” July 2015. [Online]. Available:
http://www.ti.com/lit/ds/symlink/drv8833.pdf. [Accessed 14 September 2015].

[43] M. Agape, “Karel and Robotics Contests - Workshop,” 3 March 2015. [Online]. Available:
http://1drv.ms/1E9IIGZ. [Accessed 29 July 2015].

[44] M. Agape, “Karel Lower Board,” KAREL project, 25 March 2015. [Online]. Available:
https://github.com/magape/Karel-Lower-Board. [Accessed 6 June 2015].

Page 66 of 66

You might also like