IR communication bidirectional

Two devices which both can send as well as receive information is what we needed in order to let our robot communicate with a station. cover iphone This station will make a user able te set parameters from a distance.

In an earlier post the transceiver devices were discussed. cover samsung custodia Now there's also a suiting program that has been developped.


This movie shows that the two devices are working. iphone custodia outlet A user, that controls the station connected to the first trancsceiving device, is able to prompt commands. cover shop online By fabricating useful commands he can control parameters used by the second device. iphone cover outlet In this example the user sends commands that make one LED turn on or off. iphone 8 plus custodia outlet Also the brightness of the other LEDs (red, green, yellow) can be controlled. Furthermore data are sended back to the first device and are shown to the user.

In the future robot commands will imply setting Kp, Ki and Kd values, needed for the
PID regulation. samsung custodia These parameters match with setting the brightness of the red, yellow and green LED that we now used in the test.

Interpolation and sensors: Linear deviation?

Since we figured out a way to obtain a deviation by interpolation and the intention is to apply PID regulation on this deviation, we now want to know that it works properly. cover iphone outlet In this respect it's important that the deviation changes linear when the robot would be shifted perpendicular to the line. samsung custodia outlet This is what we tested:

Linear deviation after interpolating between sensor values








The fact that the deviation calculated by the microcontroller is linear is important because the PID principle expects this kind of input. custodia huawei p smart In case that the change of deviation wouldn't be linear we wouldn't get a effective PID regulation.

An other possibility to improve the working of the whole sensor was to vary the height of the sensors opposite to the subsoil. custodia samsung s7 edge At first the sensors stood very near to the subsoil.

List of components

We present a provisionally list of components we intend to use in the robot we want to build. cover shop online These are not always the components we used in our tests. custodia samsung s8 Now we particularly want SMD components which are easy to use. cover per huawei p10 lite These components can be mounted directly onto the surface of printed circuit boards.

List of components
# Commodity Quantity Unit price ($) Subtotal ($) Unit price (€) Subotal (€) Webshop
1 Pololu Micro Metal Gear motor HP 30:1 2 15.95 31.90 12.26 24.53 Pololu
2 Pololu Wheel 42x19mm, cover shop online pair 1 6.98 6.98 5.37 5.37 Pololu
3 Pololu Ball Caster 1 3.99 3.99 3.07 3.07 Pololu
4 Pololu Micro Metal Gearmotor Bracket Extended Pair 1 4.99 4.99 3.84 3.84 Pololu
5 DRV8833 Dual Motor Driver Carrier 1 6.95 6.95 5.34 5.34 Pololu
6 Photodiode 6 0.170 1.02 0.13 0.78 Allied Electronics
7 LED White 6 0.370 2.22 0.28 1.71 Allied Electronics
8 SMD LED Green 2 0.290 0.58 0.22 0.45 Allied Electronics
9 IR LED TSAL4400 1 0.342 0.342 0.263 0.263 Allied Electronics
10 IR Emitter TSOP2240 1 0.535 0.535 0.411 0.411 Allied Electronics
11 ATMEGA168-20AU TQFP 32 1 6.45 6.45 4.96 4.96 Conrad
12 Crystal 9C - 20.000 MEEJ-T 1 0.91 0.91 0.70 0.70 Farnell
13 Battery holder 1 1.17 1.17 0.90 0.90 Gotron
14 Resistor (10 Ω) 1 0.004 0.004 0.003 0.003 Allied Electronics
15 Resistor (68 Ω) 1 0.041 0.041 0.032 0.032 Allied Electronics
16 Resistor (1k Ω) 7 0.046 0.322 0.035 0.245 Allied Electronics
17 Resistor (220 Ω) 6 0.025 0.150 0.019 0.114 Allied Electronics
18 Capacitor (0.100 µF) 3 0.100 0.300 0.077 0.231 Allied Electronics
19 Capacitor (22.0 µF) 1 0.075 0.075 0.058 0.058 Allied Electronics
20 Capacitor (12.00 µF) 1 0.065 0.065 0.050 0.050 Allied Electronics

In order to convert Euros into US Dollars we consulted the rate of exchange
on Oktober 23.
1.00 EUR.

Voltage regulators and DC-to-DC converters

Because we don't want the precision of the sensors or the efficiency of the steering part of the robot influanced by a decreasing voltage from the batteries, a constant voltage to feed the sensors and the microcontroller is desired.

In order to obtain this we have several options.

Steering part with 3.3V obtained with a voltage regulator:

The voltage we intended to work with was 5V coming from four AA batteries. The main problem is that when the batteries approach their expiration, the voltage will sink under 5V and the risk of deranging the sensors and the matching program is probable. cover iphone 6 plus custodia That's why it's designated to regulate the voltage to a lower voltage, 3.3V, and adapt the steering part and the sensors to this voltage in order not to be exposed to that kind of problems again.

Up to now we always tested with a voltage of 5V. samsung custodia outlet Ofcourse multiple changes are to be made when the voltage over the sensors and the microcontroller is changed. For instance the resistance to go with the sensors will be changed to get the optimum result.

The resistors replacing 10kΩ resistors, placed together with the photodiodes, will now hold a value of 5.6 kΩ. cover iphone custodia outlet With this resistance again clear differences will be measured.

Also the resistance to go with the LEDs of the sensors will change because now a lower voltage is available. custodia huawei shop Because those LEDs have a forward voltage from 3.2V to 4V no resistor is needed.

The IR emitter and the green LED have together a forward voltage of ± 3.3V. custodia samsung s7 edge Also here the resister can be left out.

Fortunately all the features are working when 3.3V is used, this makes a voltage of 3.3V for the steering of our robot a reasonable solution.

Steering part with 5V coming from 9V and a voltage regulator:

By using a battery holder fit for six AA batteries a voltage of 9 Volt is obtained. iphone cover original The voltage will never sink under 5V. cover iphone 8 plus custodia outlet So by using a voltage regulator the voltage can be set on a constant 5V voltage.

An inconvenient disadavantage is that a big battery holder is harder to install on our rather small robot.

On the other hand earlier tests showed that all features work perfectly with 5V.

Steering part with 5V coming from 6V and a DC-to-DC converter:

Some DC-to-DC converters, like the SEPIC or the buck-boost converter, can convert a voltage up or down. These converters are used to convert voltages to a constant voltage, like the voltage coming from a battery which can be set on a constant voltage even though the input voltage drops beneath the wanted output.

This means using this kind of converters it would be possible to work with a constant 5V voltage when using four AA batteries (6V) without the functionality of the robot endangered near the expiration point of the batteries.

These converters are quite expensive and are not really necessary when we're going with one of the previous options.


Because the robot we are constructing ought to be small, we want to use a small battery holder. We opt for the simplest and the most inexpensive posibility.

We present: Cannix

We're glad to present Cannix, samsung custodia outlet the line following robot:

Cannix is a line follower with PID regulation implemented in the software. cover shop online Arised from an assignment for school, iphone cover outlet this project took shape. covero iphone This compact robot is steered by an ATMEGA168-20AU and is able to communicate through infrared technology.

Meanwhile our team is busy writing some kind of manual on how to rebuild this robot or one that can possibly help you build your own line follower. custodia samsung This manual is expected soon on this blog.

Still it's possible that some slight adjustments are to be made with this robot.

Microcontroller found

The 'ATMEGA48-20AU TQFP32' is an 8-bit microcontroller from Atmel. custodia samsung s7 edge This component is SMD, cover samsung custodia 20 MHz clock speed, samsung custodia a 16-bit timer and two 8-bit timers.







It looks like the features of this microcontroller will be sufficient and thus this microcontroller would fit in our project.