Project ScratchDuinoRobotKit blackline

From scratchduino
(Difference between revisions)
Jump to: navigation, search
 
(50 intermediate revisions by one user not shown)
Line 3: Line 3:
  
 
==Description of the ROBBO Scratch project ==
 
==Description of the ROBBO Scratch project ==
 +
 +
[https://yadi.sk/d/GbsoeO923YVCda тест датчиков]
 +
 +
[https://yadi.sk/d/H8jsL67k3YVDX9 тест датчиков. Файл INO]
  
 
{| class="standard" border=1  
 
{| class="standard" border=1  
Line 12: Line 16:
 
|--  
 
|--  
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 1. </font>''' The robot uses '''ONE''' numerical value of the line sensor — the AVERAGE between  <br> two extreme values, obtained when the sensor is positioned above the white area and above the black line.  <br> If the sensor shows a value greater than the average, then the robot turns to the left during 0.1 second <br> and goes forward during 0.1 second. <br> If the sensor shows a value less than the average,  <br> then the robot turns to the right during 0.1 second and goes forward during 0.1 second. <br> The trajectory the robot follows is a zigzag. <br> [[File:Zigzag.png]] <br></center>
+
|colspan=6| <center>'''<font color="red">Algorithm 1.</font>''' The robot uses '''ONE''' numerical value of the line sensor — the AVERAGE of <br>two extreme values, obtained when the sensor is positioned above the white area and above the black line.  <br> If the sensor shows a value greater than the average, then the robot turns to the left during 0.1 second <br>and goes forward during 0.1 second. <br>If the sensor shows a value less than the average,  <br> then the robot turns to the right during 0.1 second and goes forward during 0.1 second. <br>The trajectory the robot follows is a zigzag. <br><br>[[File:Zigzag.png]] <br></center>
 
|-
 
|-
 
|38 seconds  
 
|38 seconds  
Line 19: Line 23:
 
||[https://youtu.be/Mvm1UxDkF-A ROBBO Scratch Video] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Project_Black_line_analog1_code1.sb2 Download the sketch]  
 
||[https://youtu.be/Mvm1UxDkF-A ROBBO Scratch Video] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Project_Black_line_analog1_code1.sb2 Download the sketch]  
 
||30  seconds
 
||30  seconds
||To turn the robot on and off, <br> two touch sensors are used: <br>analogRead(A3) – right-hand rear sensor — ON, <br> analogRead(A1) — left-hand rear sensor — OFF <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black_line_analog1_zigzag.ino Download the sketch]
+
||To turn the robot on and off, two touch sensors are used: <br>analogRead(A3) – right-hand rear sensor — ON, <br> analogRead(A1) — left-hand rear sensor — OFF <br> [https://yadi.sk/d/h7YJVH2a3YRS5d Download the sketch]
 
|--  
 
|--  
 
|13 seconds
 
|13 seconds
||The high speed causes numerous errors. <br>At a high speed, <br>the robot cuts off the corners <br>in half the cases.
+
||The high speed causes numerous errors. <br>At a high speed, the robot misses the turns in half the cases.
 
||Battery 7.4V
 
||Battery 7.4V
 
||[https://youtu.be/0X8lQPaMAsU ROBBO Scratch Video] <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Project_Black_line_analog1_code1.sb2 Download the sketch]
 
||[https://youtu.be/0X8lQPaMAsU ROBBO Scratch Video] <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Project_Black_line_analog1_code1.sb2 Download the sketch]
 
||11 seconds
 
||11 seconds
||[https://youtu.be/1VJxK9uEw7A Arduino IDE Video] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black_line_analog1_zigzag.ino Download the sketch]
+
||[https://youtu.be/1VJxK9uEw7A Arduino IDE Video] <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black_line_analog1_zigzag.ino Download the sketch]
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 2 </font>''' The robot uses '''SEVEN (FIVE, in case of USB)''' numerical values of the line sensor — these are values between <br> two extreme values, obtained when the sensor is positioned above the white area and above the black line. <br> The readings of the sensor are as follows: <br> '''» 0''' means the position above the white area. Both motors are on and in full swing (255), the left-hand motor is rotating forward, the right-hand motor is rotating backward. The robot turns in place during 0.1 second. <br>'''» 1''' means the position над белым полем, ближе к чёрной линии. The left-hand motor is on and in full swing (255), rotating forward, while the right-hand motor is стоит. The robot поворачивается в движении during 0.1 second <br> '''» 2''' means the position на границе белого и черного полей, еще ближе к чёрной линии. The left-hand motor включен на полную мощность (255) и крутится вперед, а правый  включен на половине  мощности (120) и тоже крутится вперед. The robot едет прямо и немного поворачивается в движении в течение 0,1 секунды <br> '''» 3''' means the position на границе белого и черного полей, уже на  чёрной линии. The left-hand and правые motors включены на полную мощность (255) и оба крутятся вперед. The robot едет прямо в течение 0,1 секунды <br> Остальные значения (4,5 и 6) являются зеркальными по отношению к 0,1 и 2. <br> The trajectory the robot follows is a smooth curve with long tangent sections, so the robot can travel without slowing down all along. <br> [[File:Line.png]]<br></center>
+
|colspan=6| <center>'''<font color="red">Algorithm 2.</font>''' The robot uses '''SEVEN (FIVE, in case of USB)''' numerical values of the line sensor — these are values between <br> two extreme values, obtained when the sensor is positioned above the white area and above the black line. <br><br>The readings of the line sensor are as follows: </center>'''» 0''' means the position above the white area. Both motors are on and in full swing (255), the left-hand motor is rotating forward, the right-hand motor is rotating backward. The robot turns in place during 0.1 second. <br>'''» 1''' means the position above the white area, closer to the black line. The left-hand motor is on and in full swing (255), rotating forward, while the right-hand motor is off. The robot turns on the fly during 0.1 second. <br>'''» 2''' means the position at the border of the white and black areas, even more closer to the black line. The left-hand motor is on and in full swing (255), rotating forward, while the right-hand motor is at its half power (120), rotating forward, too. The robot goes ahead and turns a bit, on the fly, during 0.1 second. <br>'''» 3''' means the position at the border of the white and black areas, already above the black line. The left-hand and the right-hand motors are on and in full swing (255), both rotating forward. The robot goes ahead during 0.1 second. <br>'''»''' The rest of the values ('''4''', '''5''', and '''6''') are mirroring the '''0''', '''1''', and '''2''' options, respectively. <center><br> The trajectory the robot follows is a smooth curve with long tangent sections, so the robot can travel all along without slowing down.<br><br> [[File:Line.png]]<br></center>
 
|-
 
|-
 
|25–26 seconds
 
|25–26 seconds
|ROBBO Scratch хуже, чем ArduiniIDE <br> обрабатывает время движения, поэтому <br> количество диапазонов мы сократили до 5 <br> и упростили движение моторов.<br>  Они все время двигаются вперед с<br> разной мощностью
+
|ROBBO Scratch handles the timing data with worse quality than Arduino IDE, therefore we have reduced the number of the ranges to 5 and simplified the action of motors.<br> The motors are rotating forward all the time, with varying power.
 
||USB
 
||USB
 
|| [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog1-RSalgoritm2.sb2 Download the sketch]
 
|| [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog1-RSalgoritm2.sb2 Download the sketch]
Line 38: Line 42:
 
|--
 
|--
 
|12 seconds
 
|12 seconds
||<br>At a high speed, <br>the robot проскакивает поворот <br> in 4 of 5 cases.
+
||<br>At a high speed, the robot misses the turn in 4 of 5 cases.
||Battery 7.4 V
+
||Battery 7.4V
||It is important to modify the sketch <br>coded for USB, because at a high speed, <br> the in-between values of the sensor <br>cannot be handled. Объединяем все<br> промежуточные значения <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog1-RSalgoritm2.sb2 Download the sketch]
+
||It is important to modify the sketch coded for USB, because at a high speed, the intermediate values of the sensor cannot be handled. <br>We join all the intermediate values. <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog1-RSalgoritm2.sb2 Download the sketch]
 
||9.5 seconds
 
||9.5 seconds
||It is important to immediately modify the sketch, <br> coded for a 5V power supply (USB). Заменить <br>время движения робота в поворотах со 100 до <br>10 milliseconds. А время движения прямо<br> увеличить до  200 milliseconds. <br> It is necessary because <br> at a high speed, the robot rushes too fast <br>along the path section, where the values of the sensors are changing<br>
+
||It is important to immediately modify the sketch, coded for a 5V power supply (USB). <br>Replace the robot's turning time of 0.1 seconds by 0.01 seconds. And increase the time of going ahead up to 0.2 seconds. <br>It is necessary because at a high speed, the robot rushes too fast along the path section where the values of the sensors are changing.<br>
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 3 </font>''' The robot uses '''EIGHT''' numerical values of the line sensor — these are values between  
+
|colspan=6| <center>'''<font color="red">Algorithm 3.</font>''' The robot uses '''EIGHT''' numerical values of the line sensor — these are values between  
two extreme values, obtained when the sensor is positioned above the white area and above the black line. <br> The trajectory the robot follows is a  line with long straight sections, and the robot can travel without slowing down all along. <br> [[File:Line-line.png]]<br></center>
+
two extreme values, obtained when the sensor <br>is positioned above the white area and above the black line. <br>The trajectory the robot follows is a  line with long straight sections, and the robot can travel all along without slowing down.<br><br> [[File:Line-line.png]]<br></center>
 
|-
 
|-
 
|XX seconds  
 
|XX seconds  
Line 58: Line 62:
 
||
 
||
 
||
 
||
|| <font color="red">8.5 seconds (рекорд трассы!)</font>
+
|| <font color="red">8.5 seconds (track record!)</font>
 
||  [https://youtu.be/GO4fXPLDF1k Arduino IDE Video] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black_line_analog1_Speed-7-4-var2.ino Download the sketch]  
 
||  [https://youtu.be/GO4fXPLDF1k Arduino IDE Video] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black_line_analog1_Speed-7-4-var2.ino Download the sketch]  
 
|}
 
|}
  
==Описание проезда по чёрной линии с ДВУМЯ датчиками==
+
==Description of travelling along the black line with TWO sensors==
Сложную трассу с перекрестками, ответвлениями, "зебрами" и инверсными участками с одним датчиком проехать невозможно. При подключении двух датчиков требуется использовани специальных алгоритмов, которые автоматизируют движение робота.
+
<center>It is impossible to travel along a complicated track with crossings, forks, "zebras", and inverted sections using only one sensor. <br>When two sensors are used, special algorithms are needed to automate the robot's motion.
 +
</center>
  
  
 
+
{| class="standard" border=1
{| class="standard" border=1  
+
  
 
|--  
 
|--  
Line 75: Line 79:
 
|--  
 
|--  
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 4. - Релейный регулятор  </font>''' Задача этого алгоритма - удерживать робота в положении "Оба датчика робота находятся над белой линией", т.е. слева и справа от чёрной линии. Если оба датчика попадают на черную линию, the robot останавливается  <br> [[File:2line.png]] </center>
+
|colspan=6| <center>'''<font color="red">Algorithm 4.</font> Relay controller.''' This algorithm is intended to keep the robot in the position "Both sensors of the robot are above the white area", <br>that is, to the left and to the right from the black line. If both sensors are above the black line, the robot stops.<br> [[File:2line.png]] </center>
 
|-
 
|-
 
|XX seconds  
 
|XX seconds  
 
||[[File:Eng-relay-controller-RS.png]]
 
||[[File:Eng-relay-controller-RS.png]]
 
||USB
 
||USB
||При питании от USB робот <br>останавливается на повороте, <br>т.к. оба датчика оказываются<br> на черной линии [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog2_and_analog5-RS.sb2 Download the sketch]
+
||When powered by USB, the robot stops at the turn, because both sensors get above the black line. [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog2_and_analog5-RS.sb2 Download the sketch]
 
||XX seconds  
 
||XX seconds  
 
||
 
||
Line 107: Line 111:
 
|'''10 seconds'''  
 
|'''10 seconds'''  
 
||
 
||
||7.4 V
+
||7.4V
|| When extra powered <br>from the battery, the robot <br>cuts the sharp turning off, <br>because at a speed, <br>the sensors cannot be <br>above the black line both at the same time [https://youtu.be/9rBbZvaQ1FE ROBBO Scratch Video] <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog2_and_analog5-RS.sb2 Download the sketch]  
+
|| When extra powered from the battery, the robot misses the sharp turns, because at a speed, the sensors cannot be above the black line both at the same time. [https://youtu.be/9rBbZvaQ1FE ROBBO Scratch Video] <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Black-Line-USB-analog2_and_analog5-RS.sb2 Download the sketch]  
 
||XX seconds  
 
||XX seconds  
||[https://youtu.be/Dv97KMJkuF0 Arduino IDE Video]. If the battery is run down, the robot stops at the turn. <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Test_analog0-analog4.ino Download the sketch - sensor readings] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Relay-controller-2-5.ino Download the sketch - простой релейный регулятор + ON/OFF by touch sensors]  
+
||[https://youtu.be/Dv97KMJkuF0] Arduino IDE Video]. If the battery charge is low, the robot stops at the turn. <br>[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Test_analog0-analog4.ino Download the sketch - sensor readings] <br> [http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Relay-controller-2-5.ino Download the sketch - relay controller + ON/OFF by touch sensors]  
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 5 Пропорциональный регулятор </font>''' Пропорциональный̆ регулятор is a device that оказывающее управляющее воздействие на объект ''пропорционально'' его отклонению от заданного состояния. Принцип действия П-регулятора основывается на том, что мы находим значение отклонения от заданного состояния, которое назовем '''error''' и обозначим буквой E. Ошибка – это разница между показаниями датчиков линии:
+
|colspan=6| <center>'''<font color="red">Algorithm 5.</font> Proportional controller.''' Proportional controller is a device whose controlling action over an object depends on the object's deflection from a certain state. <br>Such deflection is called '''error''' and we denote it with a letter E. In our case, the error is the difference between the readings of two line sensors: E = S1 – S2. <br>To obtain the value of controlling action '''U''', we multiply the E value by a chosen factor '''kp''': U = kp⋅E. U is the momentum that we have to '''add''' to one motor and '''extract''' from other motor. <br>Thus, the robot will control its position '''itself''' — that is, for turning or taxing to the required direction.<br>  
E = S1 – S2. To obtain the value of controlling action '''U''', we multiply this value by a chosen ratio '''kp''': U = kp⋅E. U is the momentum that we have to '''add''' to one motor and '''extract''' from other motor. Thus, the robot will control its position '''itself''' — that is, for turning or taxing to the required direction.
+
 
+
 
+
</center>
+
 
|-
 
|-
|XX seconds.
+
XX seconds
 
||
 
||
 
||USB
 
||USB
 
||ROBBO Scratch Video <br>
 
||ROBBO Scratch Video <br>
||XX seconds  
+
|-
 +
|XX seconds
 +
||
 
||[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Relay_scratchduino.ino Download the sketch]
 
||[http://wiki.robbo.ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Relay_scratchduino.ino Download the sketch]
 
|-
 
|-
 
XX seconds  
 
XX seconds  
 
||
 
||
||7.4 V
+
||7.4V
||ROBBO Scratch Video <br>Download the sketch
+
||[ROBBO Scratch Video <br>Download the sketch]
 
||XX seconds  
 
||XX seconds  
||Arduino IDE Video <br>Download the sketch
+
||[Arduino IDE Video <br>Download the sketch]
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 6 Пропорционально-дифференциальный регулятор</font>''' </center>
+
|colspan=6| '''<font color="red">Algorithm 6.</font> Proportional-plus-differential controller.''' </center>
 
|-
 
|-
 
XX seconds  
 
XX seconds  
Line 143: Line 145:
 
XX seconds
 
XX seconds
 
||
 
||
||7.4 V
+
||7.4V
||ROBBO Scratch Video <br>Download the sketch
+
||[ROBBO Scratch Video <br>Download the sketch]
 
|XX seconds  
 
|XX seconds  
||Arduino IDE Video <br>Download the sketch
+
||[Arduino IDE Video <br>Download the sketch]
 
|-
 
|-
|colspan=6| <center>'''<font color="red">Algorithm 7 ПИД-регулятор</font>''' </center>
+
|colspan=6| <center>'''<font color="red">Algorithm 7.</font> Proportional-integral-differential controller.'''<br> </center>
 
|-
 
|-
 
|XX seconds  
 
|XX seconds  
Line 159: Line 161:
 
|XX seconds  
 
|XX seconds  
 
||
 
||
||Battery 7.4 V
+
||Battery 7.4V
||ROBBO Scratch Video <br>Download the sketch
+
||[ROBBO Scratch Video <br>Download the sketch]
 
||XX seconds  
 
||XX seconds  
||Arduino IDE Video <br>Download the sketch
+
||[Arduino IDE Video <br>Download the sketch]
 
|}
 
|}
  

Latest revision as of 19:46, 27 June 2018

[edit] Name of author (s)

User:Elena Vostrikova

[edit] Description of the ROBBO Scratch project

тест датчиков

тест датчиков. Файл INO

Trip time Sketch Power supply ROBBO Scratch Trip time Arduino IDE
Algorithm 1. The robot uses ONE numerical value of the line sensor — the AVERAGE of
two extreme values, obtained when the sensor is positioned above the white area and above the black line.
If the sensor shows a value greater than the average, then the robot turns to the left during 0.1 second
and goes forward during 0.1 second.
If the sensor shows a value less than the average,
then the robot turns to the right during 0.1 second and goes forward during 0.1 second.
The trajectory the robot follows is a zigzag.

Zigzag.png
38 seconds Black line analog1 code1.png USB ROBBO Scratch Video
Download the sketch
30 seconds To turn the robot on and off, two touch sensors are used:
analogRead(A3) – right-hand rear sensor — ON,
analogRead(A1) — left-hand rear sensor — OFF
Download the sketch
13 seconds The high speed causes numerous errors.
At a high speed, the robot misses the turns in half the cases.
Battery 7.4V ROBBO Scratch Video
Download the sketch
11 seconds Arduino IDE Video
Download the sketch
Algorithm 2. The robot uses SEVEN (FIVE, in case of USB) numerical values of the line sensor — these are values between
two extreme values, obtained when the sensor is positioned above the white area and above the black line.

The readings of the line sensor are as follows:
» 0 means the position above the white area. Both motors are on and in full swing (255), the left-hand motor is rotating forward, the right-hand motor is rotating backward. The robot turns in place during 0.1 second.
» 1 means the position above the white area, closer to the black line. The left-hand motor is on and in full swing (255), rotating forward, while the right-hand motor is off. The robot turns on the fly during 0.1 second.
» 2 means the position at the border of the white and black areas, even more closer to the black line. The left-hand motor is on and in full swing (255), rotating forward, while the right-hand motor is at its half power (120), rotating forward, too. The robot goes ahead and turns a bit, on the fly, during 0.1 second.
» 3 means the position at the border of the white and black areas, already above the black line. The left-hand and the right-hand motors are on and in full swing (255), both rotating forward. The robot goes ahead during 0.1 second.
» The rest of the values (4, 5, and 6) are mirroring the 0, 1, and 2 options, respectively.

The trajectory the robot follows is a smooth curve with long tangent sections, so the robot can travel all along without slowing down.

Line.png
25–26 seconds ROBBO Scratch handles the timing data with worse quality than Arduino IDE, therefore we have reduced the number of the ranges to 5 and simplified the action of motors.
The motors are rotating forward all the time, with varying power.
USB Download the sketch 18 seconds Arduino IDE Video
Download the sketch
12 seconds
At a high speed, the robot misses the turn in 4 of 5 cases.
Battery 7.4V It is important to modify the sketch coded for USB, because at a high speed, the intermediate values of the sensor cannot be handled.
We join all the intermediate values.
Download the sketch
9.5 seconds It is important to immediately modify the sketch, coded for a 5V power supply (USB).
Replace the robot's turning time of 0.1 seconds by 0.01 seconds. And increase the time of going ahead up to 0.2 seconds.
It is necessary because at a high speed, the robot rushes too fast along the path section where the values of the sensors are changing.
Algorithm 3. The robot uses EIGHT numerical values of the line sensor — these are values between two extreme values, obtained when the sensor
is positioned above the white area and above the black line.
The trajectory the robot follows is a line with long straight sections, and the robot can travel all along without slowing down.

Line-line.png
XX seconds
XX seconds 8.5 seconds (track record!) Arduino IDE Video
Download the sketch

[edit] Description of travelling along the black line with TWO sensors

It is impossible to travel along a complicated track with crossings, forks, "zebras", and inverted sections using only one sensor.
When two sensors are used, special algorithms are needed to automate the robot's motion.


XX seconds XX seconds XX seconds XX seconds
Trip time Sketch Power supply ROBBO Scratch Trip time Arduino IDE
Algorithm 4. Relay controller. This algorithm is intended to keep the robot in the position "Both sensors of the robot are above the white area",
that is, to the left and to the right from the black line. If both sensors are above the black line, the robot stops.
2line.png
XX seconds Eng-relay-controller-RS.png USB When powered by USB, the robot stops at the turn, because both sensors get above the black line. Download the sketch XX seconds
analog0 = analogRead(A0); // Got a value from the sensor analog1
analog4 = analogRead(A4); // Got a value from the sensor analog4
limit = 50;
time1 = 200;
power = 255;

//if both sensors "see" white, the robot moves straight:
if (analog0 < limit && analog4 < limit) {
move_robbo (power, power, 0, 0, time1);
}
//if the left sensor "sees" black, the robot turns to the left:
if (analog0 > limit && analog4 < limit) {
move_robbo (0, power, 0, 0, time1);
}
//if the right sensor "sees" black, the robot turns to the right:
if (analog0 < limit && analog4 > limit) {
move_robbo (power, 0, 0, 0, time1);
}
10 seconds 7.4V When extra powered from the battery, the robot misses the sharp turns, because at a speed, the sensors cannot be above the black line both at the same time. ROBBO Scratch Video
Download the sketch
XX seconds [1] Arduino IDE Video]. If the battery charge is low, the robot stops at the turn.
Download the sketch - sensor readings
Download the sketch - relay controller + ON/OFF by touch sensors
Algorithm 5. Proportional controller. Proportional controller is a device whose controlling action over an object depends on the object's deflection from a certain state.
Such deflection is called error and we denote it with a letter E. In our case, the error is the difference between the readings of two line sensors: E = S1 – S2.
To obtain the value of controlling action U, we multiply the E value by a chosen factor kp: U = kp⋅E. U is the momentum that we have to add to one motor and extract from other motor.
Thus, the robot will control its position itself — that is, for turning or taxing to the required direction.
USB ROBBO Scratch Video
XX seconds Download the sketch
7.4V [ROBBO Scratch Video
Download the sketch]
XX seconds [Arduino IDE Video
Download the sketch]
Algorithm 6. Proportional-plus-differential controller.
USB
7.4V [ROBBO Scratch Video
Download the sketch]
XX seconds [Arduino IDE Video
Download the sketch]
Algorithm 7. Proportional-integral-differential controller.
XX seconds USB
XX seconds Battery 7.4V [ROBBO Scratch Video
Download the sketch]
XX seconds [Arduino IDE Video
Download the sketch]
Personal tools
Namespaces

Variants
Actions
Navigation
Tools
Print/export