owfullscreen="" frameborder="0" height="480" width="854">
</div>
</div>
</figure></iframe></div></div></figure><p id="97ff"><a href="https://drive.google.com/open?id=1IyKIv0LIUJaB8bXAtJ-FR14vx1I0CmHU">Download All Files For This Project</a></p><h1 id="a55f">Related Posts:</h1><p id="eed4">01º Lego Episode — <a href="https://readmedium.com/lego-our-startups-journey-2db83f9e92a4"><b>Our Startup’s Journey</b> </a>— Invaders and Invasions?</p><p id="da00">02º Lego Episode — <a href="https://readmedium.com/timmyton-lego-adventures-02-faae7d8c6fea"><b>Timmyton </b>— <b>Lego-Learning-By-Playing — L2BP Series</b></a></p><p id="b1d2">04º Lego Episode — <a href="https://readmedium.com/lego-motions-episode-04-41dff47e8834"><b>Lego Motions</b> — <b>Tribot v 1.0</b> — <b>Seeing Your Creation Move</b> </a>— Move Steering Block</p><p id="0d41">05º Lego Episode — <a href="https://readmedium.com/lego-motions-move-tribot-around-deb227946425"><b>Lego Motions </b>— <b>Move Tribot Around</b> </a>— And Backward…Five Programs Files</p><p id="98f9">06º Lego Episode — <a href="https://readmedium.com/lego-sensors-touch-n-color-edbe0f6642f"><b>Lego Sensors</b> — <b>Touch N Color</b></a> — Two out of five human senses — Touch N Sight</p><p id="3976">07º Lego Episode — <a href="https://readmedium.com/lego-sensor-color-5db4d42e0203"><b>Lego Sensor </b>— <b>LineFollower</b> </a>— Line Follower Tribot v1.0</p><p id="5939">08º Lego Episode — <a href="https://readmedium.com/maze-solving-tribot-v1-0-a29963f8742a"><b>Maze Solving Robot v1</b></a><b> </b>— Lego Solution Right-Wall-Follower-Robot</p><p id="b7c2">09° Lego Episode — <a href="https://readmedium.com/lego-gettle-sound-bots-5fb40f6d84df"><b>Gettle_&_Sound_Bots</b></a> — How gentle can a robot be? What is the audible range of the human ear? How deep can we dive?</p><p id="9a96">10° Lego Episode — <a href="https://readmedium.com/lego-data-logging-a2fd59dd7933"><b>Data Logging</b></a> — Data Collection and the EV3</p><p id="14df">11º Lego Episode — <a href="https://readmedium.com/lego-binning-the-linefollower-code-5562e059237e"><b>Binning the LineFollower Code </b></a>— Binning: Arithmetic To Map Sensor Reading</p><p id="2380">12º Lego Episode — <a href="https://readmedium.com/lego-a-proportional-linefollower-robot-d9a951debbef"><b>A Proportional LineFollower Robot </b></a>— Advanced Math To Improve Your Robot’s Steering</p><p id="854e">8th KidSeries— <a href="https://readmedium.com/j3-folower-line-robot-v1-0-7ad68256de83"><b>J3 Follower Line Robot v1.0</b></a> — The Simplest Follower Line Robot</p><p id="93ab">13º LEGO Theory — <a href="https://readmedium.com/lego-theory-multitasking-2f060d2e3678"><b>Theory of Multitasking</b></a> — A very Useful Programming Technique</p><p id="0013">14º LEGO formula — <a href="https://readmedium.com/lego-formula-normalizing-data-66fefd9eb90e?postPublishedType=repub"><b>Normalizing Data</b></a> — Converting Data to Use The Same Range</p><p id="1725">15º Lego Episode — <a href="https://readmedium.com/lego-pid-the-ultimate-line-follower-45d4e517572b"><b>PID — The Ultimate Line
Options
Follower </b></a>— Algorithm for your EV3 PID Line Follower Robot</p><p id="a727">16° <a href="https://readmedium.com/lego-meets-pixy-8f8ea7677114?postPublishedType=repub"><b>Lego Meets Pixy Episode</b></a> — How to Connect Your Inexpensive Camera Module to Lego</p><p id="ec0d">18° Lego Episode — <a href="https://readmedium.com/lego-gears-worms-bf8ef3280d0e"><b>GEARS & WORMS</b></a> — Geartrains & Worm & Clutch Gears</p><p id="8a42">23° Lego Episode — <a href="https://readmedium.com/lego-differential-explained-12fa1865f3db"><b>Differential Explained</b></a><b> </b>— How Differential Works?</p><p id="e94c">24° Lego Episode — <a href="https://readmedium.com/pitbot-a-star-is-born-e04a0f305fb6?source=post_page---------------------------"><b>PitBot — A Star Is Born </b></a>— Working at The First Structure in Our Sparring Robot</p><p id="824f">25° Lego Episode — <a href="https://readmedium.com/pitbot-is-agressive-well-no-worries-c801adba4b4c?source=post_page---------------------------"><b>PitBot Is Agressive? Well, No Worries! </b></a>— Making PitBot bite!</p><p id="dffa">26° Lego Episode — <a href="https://readmedium.com/dancing-good-w-pitbot-16b5ef035077"><b>Dancing Good w/ PitBot</b></a> — All The Secret for Replicate This Awesome Robot</p><p id="f82e">27 ° LEGO Episode — <a href="https://readmedium.com/lego-sumo-arena-is-ready-64a59e8bf987"><b>Sumo Arena is Ready! </b></a>— Here is the playing arena for Arduino x Lego</p><p id="1d05">28 ° LEGO Episode — <a href="https://readmedium.com/pick-pitbot-up-7dbfa4edc12e"><b>Pick Pitbot Up!</b></a> — Our Robot Are Leaving Body & Paint Shop</p><p id="c9b2">28 ° LEGO — B — Episode — <a href="https://readmedium.com/pitbot-battery-sensor-setup-4f572fedfe20"><b>Pitbot Battery & Sensor Setup</b></a> — Preparing The infrastructure for running Arduino code</p><p id="709e">29 ° LEGO Episode — <a href="https://readmedium.com/bridging-all-sensors-together-pitbot-ca8803bf9cb"><b>Bridging All Sensors Together</b></a> — Pitbot — Collecting All Codes for the Final Act of Giving Behaviors to Robot</p><h1 id="546a">Credits & References</h1><p id="6376"><a href="https://g.co/kgs/6kLgmu">Book: The Art of Lego Mindstorms EV3 Programming by Terry Griffin</a></p><p id="cc47"><a href="https://youtu.be/tscYgpD3m7g">EV3 Large and NXT Motors — The Differences Explained</a></p><p id="1240"><a href="https://education.lego.com/en-au/support/mindstorms-ev3/building-instructions">Building Instructions & Program Descriptions</a></p><p id="7e3d"><a href="http://www.philohome.com/motors/motorcomp.htm">LEGO® 9V Technic Motors compared characteristics</a></p><p id="061a"><a href="https://robotics4children.blogspot.com/">Robotics for Children (& Parents (& Grandparents))</a></p><p id="87c2"><a href="https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-rem-driving-base-79bebfc16bd491186ea9c9069842155e.pdf">Tribot v 1.0 .pdf File</a></p><p id="12c5"><a href="https://www.virtualroboticstoolkit.com/documentation/sections/9/articles/39">Introducing LEGO Digital Designer</a></p></article></body>
Lego — A Proportional LineFollower Robot
Advanced Math To Improve Your Robot’s Steering — Episode #12
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.