Lego — A Proportional LineFollower Robot

Advanced Math To Improve Your Robot’s Steering — Episode #12

J3
KidsTronics

--

Now it’s time to deal with the proportional controller. This changes a steering control variable based on a Target and an Input Values.

Wanna Jump Right to see my Lego’s youtube playlist? — click here;D

In this case, the input value is the Color Sensor reading. The Target, or setpoint, is 35 between the black and white color.

The difference between the Target value and the input value is called Error value.

The part of a line-follower program that adjusts the steering based on sensor readings is called a control algorithm.

Improving the control algorithm makes the Trobot v1 move more smoothly and follow lines with tighter turns:)

The control algorithm developed in Episode #7 is called the three-state controller because the program does one of three things based on the sensor reading: go Straight, turn left, or turn right.

In Episode #11 we implement a five-state controller.

Let’s do it proportionally to our development, right?

The main problem with the previous approaches is that when the robot needs to turn, it always turns the same amount (or two); whether the robot encounters a sharp or gentle turn, it uses the same independent fixed Steering value.

It would be great if the steering of the wheels was proportional to the curve. The sharp curve line is, the greater is the correction; In case of the softer curve lines, the lower the is correction. This approach is called proportional controller because the change made to the steering is proportional to, or directly related to, the Tribot’s distance from the edge of the line.

The code is all commented. Feel free to download it and understand.

Take your time!

The next step is PID!

Do not miss the next episode!…

Bye!

Download All Files For This Project

Related Posts:

01º Lego Episode — Our Startup’s Journey — Invaders and Invasions?

02º Lego Episode — Timmyton Lego-Learning-By-Playing — L2BP Series

04º Lego Episode — Lego MotionsTribot v 1.0Seeing Your Creation Move — Move Steering Block

05º Lego Episode — Lego Motions Move Tribot Around — And Backward…Five Programs Files

06º Lego Episode — Lego SensorsTouch N Color — Two out of five human senses — Touch N Sight

07º Lego Episode — Lego Sensor LineFollower — Line Follower Tribot v1.0

08º Lego Episode — Maze Solving Robot v1 — Lego Solution Right-Wall-Follower-Robot

09° Lego Episode — Gettle_&_Sound_Bots — How gentle can a robot be? What is the audible range of the human ear? How deep can we dive?

10° Lego Episode — Data Logging — Data Collection and the EV3

11º Lego Episode — Binning the LineFollower Code — Binning: Arithmetic To Map Sensor Reading

12º Lego Episode — A Proportional LineFollower Robot — Advanced Math To Improve Your Robot’s Steering

8th KidSeries— J3 Follower Line Robot v1.0 — The Simplest Follower Line Robot

13º LEGO Theory — Theory of Multitasking — A very Useful Programming Technique

14º LEGO formula — Normalizing Data — Converting Data to Use The Same Range

15º Lego Episode — PID — The Ultimate Line Follower — Algorithm for your EV3 PID Line Follower Robot

16° Lego Meets Pixy Episode — How to Connect Your Inexpensive Camera Module to Lego

18° Lego Episode — GEARS & WORMS — Geartrains & Worm & Clutch Gears

23° Lego Episode — Differential Explained — How Differential Works?

24° Lego Episode — PitBot — A Star Is Born — Working at The First Structure in Our Sparring Robot

25° Lego Episode — PitBot Is Agressive? Well, No Worries! — Making PitBot bite!

26° Lego Episode — Dancing Good w/ PitBot — All The Secret for Replicate This Awesome Robot

27 ° LEGO Episode — Sumo Arena is Ready! — Here is the playing arena for Arduino x Lego

28 ° LEGO Episode — Pick Pitbot Up! — Our Robot Are Leaving Body & Paint Shop

28 ° LEGO — B — Episode — Pitbot Battery & Sensor Setup — Preparing The infrastructure for running Arduino code

29 ° LEGO Episode — Bridging All Sensors Together — Pitbot — Collecting All Codes for the Final Act of Giving Behaviors to Robot

Credits & References

Book: The Art of Lego Mindstorms EV3 Programming by Terry Griffin

EV3 Large and NXT Motors — The Differences Explained

Building Instructions & Program Descriptions

LEGO® 9V Technic Motors compared characteristics

Robotics for Children (& Parents (& Grandparents))

Tribot v 1.0 .pdf File

Introducing LEGO Digital Designer

--

--

J3
KidsTronics

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Ruby, Rails, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!