A Better Line Follower - MIND-STORMS.COM The line follower suggested in the official 'Robot Educator' exercises (called 'Switch', in the 'Beyond Basics' section) works very badly (because it's designed for simplicity rather than efficiency). Here's my improved version. Line following is a nice little robot challenge, making use of both a sensor and motors. it is especially challenging if you only have one colour sensor, which is the case with the standard EV3 sets. Think about it. A better solution is not to try to follow 'the line' but to try to follow one side of the line. You might be thinking that the sensor were directly over the edge of the line then it would see the black and white areas at the same time so the measured light intensity would be 'medium' - this would be very useful information but it's very unlikely that the sensor will actually see this if it is placed very close to the mat - the sensor is much more likely to detect pure white or pure black.
Week TechVideo, 2008 #12 - Theo Jansen (Kinetic Sculptor) creations, made with LEGO Too much in the sense of previous post... A lot about Kinetic Sculptures, based on the developments from Theo Jansen, and LEGO TECHNIC implementations of his models. Theo Jansen is a Dutch artist born in 1948 and a Kinetic Sculptor. He builds large works which resemble skeletons of animals and are able to walk using the wind, on the beaches of the Netherlands. Essentially these sculptures are like robots powered by the wind only. Chris presented his creation, last October at LUGNET, and have several photos at his Brickshelf folder with instructions, for his implementation of TJ's leg. From left to right: Chris Magno's TJ walker; Philo's TJ walker; The wind moving version (once the author doesn't have parts enough, it has legs at one side and wheels on the other). Interesting are also the simulations made on the TJ's leg geometry and parts proportion to make it move smoothly and without significant balance. And finally some other videos of Theo Jansen's creations.
EV3 Tutorial This tutorial for LEGO Mindstorms EV3 is divided in two sections. The “Essentials” are things every EV3 programmer should know. Some of these movies have exercises directly under them. It’s important to do these exercises, not just assume you “get it.” The “Advanced” section is for reference purposes. These lessons assume you have a basic robot with two drive motors, a touch sensor and a light sensor. If you need to run this tutorial at a location with poor internet service, you can download a special copy here. This tutorial was designed, and maintained by Dale Yocum, Engineering Program Director at Catlin Gabel School. LEGO®, the LEGO logo, Mindstorms and the Mindstorms logo are trademarks of the LEGO Group, which did not create and does not sponsor or endorse this tutorial.
Proportional line follower (Advanced) Exclusive offer: get 50% off this eBook here Instant LEGO MINDSTORMS EV3 [Instant] — Save 50% Your guide to building and programming your very own advanced robot using LEGO MINDSTORMS EV3 with this book and ebook by Gary Garber | September 2013 | Open Source In this article, written by Gary Garber, the author of Instant LEGO Mindstorm EV3, you will make a robot that will track a line quickly. (For more resources related to this topic, see here.) First, you will need to build an attachment to hold the color sensor onto the robot. Insert an axle that is five modules long into the color sensor. Attach the two-pin one-axle cross blocks onto the axle outside the bushings. Insert 3-module pins into the cross blocks as shown in the following figure: The pins will attach to the robot just in front of the castor. How to do it... We are going to write a proportional line following code similar to the code used for the ultrasonic motion sensor. How it works... Resources for Article : About the Author :
LEGO Mindstorms EV3 Programmable Brick Overview The Display shows you what is going on inside the EV3 Brick and enables you to use the Brick Interface. It also allows you to add text and numerical or graphic responses into your programming or experiments. The Brick Buttons allow you to navigate inside the EV3 Brick Interface. EV3 Brick The Brick Status Light that surrounds the Brick Buttons tells you the current status of the EV3 Brick. Red = Startup, Updating, Shutdown Red pulsing = Busy Orange = Alert, Ready Orange pulsing = Alert, Running Green = Ready Green pulsing = Running program You can also program the Brick Status Light to show different colors and to pulse when different conditions are met (learn more about using the Brick Status Light Block in the EV3 Software Help). Installing Batteries in the EV3 Brick The EV3 Brick requires six AA/LR6 batteries. To install the AA batteries, remove the battery cover on the back of the EV3 Brick by pressing the two plastic tabs on the side. Power-Saving Practices USB Cable
Connecting the Arduino and LEGO MINDSTORMS NXT In this HowTo, we’ll show you how to get your LEGO MINDSTORMS NXT and your Arduino to talk. In the demonstration, we use an Arduino Uno, but the example we’ve written can be used for just about any of the versions of Arduino. This example can be extended to use the Arduino as a sensor for the NXT, and to develop your own sensors for the LEGO MINDSTORMS NXT system. This is probably the fastest way to free your NXT and add your own sensors and devices: when you connect the NXT and the Arduino and the world is yours! The NXT and the Arduino can be made to talk over I2C. In this example, we show you how to send commands to the Arduino from the NXT and how to write a program that requests data from the Arduino. A little background on I2C and the NXT. Diagram of the Pullup Resistors used to connect an I2C line to the NXT. I2C on the NXT requires a pullup resistor. Typically resistor values of 82k are used. Setting up the Hardware. First, a schematic of what we’re aiming for. The Arduino Side
Line Follower using EV3 Ahhh the classic challenge of following a black line! Of course this can be achieve quite simply by using the zig zag method but if you want a high performance line following robot you're going to need a little more math! Luckily Miguel the guy behind The Technic Gear blog has recently published a fantastic tutorial explaining in details how to create a PID controller line following robot using LEGO MINDSTORMS EV3. I invite you to follow his tutorial found here With the help of his pseudo code you can write your own line following program or try his program thanks to the supplied EV3 source code. Remember to give credit to his work if you use part or all of his code in a program for one of your competition or school work. Another cool proportional control robot made by Miguel is a Wall Following robot shown here: Miguel has many other project in mind.
Fuzzy Line Following NXT Robot Stefan Bracher One of the tutorials within the Lego Mindstorms NXT Software shows how to program a robot that follows a line using Boolean Logic. In the following, an improved version, based on Fuzzy-Logic, is presented. Although a little bit more complex, the program is still implemented using NXT-G Code. Video Original "Boolean Logic"-Version by Lego The original version by Lego uses the reflected light to distinguish between black (the line) and white (the floor). The approach is very simple and effective. Fuzzy Logic variant The idea behind the new version is, not only to distinguish between black and white, but to consider various degrees of grey. Now we are not limited anymore to turn only left and right, but can turn more right (blacker colour) or more left (whiter colour). To achieve this, the left and right motors are controlled according to the diagram below: Implementation in NXT-G Code Implemented in NXT-G Code that looks as follows: Fine-tuning
NXT Tutorial This tutorial for LEGO Mindstorms NXT is divided in two sections. The “Essentials” are things every NXT programmer should know. Some of these movies have exercises directly under them. The “Advanced” section is for reference purposes. These lessons assume you have a basic robot with two drive motors, a touch sensor and a light sensor. If you need to run this tutorial at a location with poor internet service, you can download a special copy here. This tutorial was designed, and maintained by Dale Yocum, Engineering Program Director at Catlin Gabel School. LEGO®, the LEGO logo, Mindstorms and the Mindstorms logo are trademarks of the LEGO Group, which did not create and does not sponsor or endorse this tutorial. Using NXT Components with a Micro Controller : The Motor The NXT motor is a very nice piece of hardware and is also fairly easy to use. It features a 9V DC motor with a gearbox and a double encoder with a resolution of approximately 1 degree. Pins 1 and 2 are the leads for the DC motor. Apply a potential, and the motor turns. Switch pins and the motor turns the other way. The encoder is almost as simple. Attached to the motor gearbox somewhere is an encoder wheel which has a bunch of radial slots in it. Coding the basic stamp to use the encoder: To determine the speed of the motor, I use the count function. COUNT Pin5, 100, speed To wait for a certain number of cycles, I use a PULSIN command inside a for loop. FOR i = 1 to n PULSIN Pin5, 1, variable NEXT Determining direction is a little trickier. It is also possible to use this method to passively measure the absolute displacement of the motor. pin5 PIN 1 pin6 PIN 0 disp VAR Word loop1: IF pin5=1 AND pin6=1 THEN direction 'wait for 11 encoder step GOTO loop1 ccw: disp=disp-1 DEBUG ?
Hacking the LEGO NXT If you are a millionaire and able to buy a LEGO Mindstorms NXT, you may find kind of difficult to hack it or create homemade sensors. I believe you already noticed the particular jack that comes with the NXT. It looks like a telephone jack, but the latch is located in one side, making difficult to connect any other cable. That is not a big problem; filling off the latch from a 6-wires telephone connector (RJ-12) may do the job. Once I was able to connect a telephone cable to the NXT, I started to test the signals. Holding the connector as the picture shows. White wire - Used with the black wire, this pin provides power to the motor. EV3 Robot Educator: Beyond Basics, Ex. 1-6 - MIND-STORMS.COM 1. Multitasking The interest of the exercise is of course that it demonstrates multitasking i.e. the ability of an EV3 program to run multiple branches or 'threads' simultaneously. This program splits into two branches after the start block, so both branches will run simultaneously. The lower branch contains a 'sound' block in 'play file' mode. The block header indicates that the sound file 'Motor idle' has been selected. The upper branch contains a 'move steering' block in 'rotations' mode. So this program will continuously play the 'motor idle' sound until the robot has moved forward two rotations of the wheel. 2. Pay attention! Now the program spits into two branches or 'threads' which will run simultaneously. Let's not forget about the lower loop, which is running simultaneously with the upper loop. 3. Pay attention! This program is in fact a simple form of 'line follower' program. 4. Within the loop block is a switch block in mode 'colour sensor>measure>colour'. 5. 6.
Free Lego NXT MindStorms NXT-G Robotics Challenges Tutorials At the request of Tasmanian teachers Miss Clare Neilson and recently retired Mrs. Juanita Airey, activities using Lego's NXT 1 MindStorms Robots have been developed for use in School-based 2-hour sessions. Some, but not all, will work with the new NXT 2 kit (click here for more information). The tutorials are presented as a series of Challenges, which are gradually being converted for Web use. Challenges with an "M" after the challenge number include mentor notes. Challenge numbers greater than 100 use components that are not in the NXT 1.0 Retail or Educational Lego kits, but are available for separate purchase. First Challenge (NXT 1) - Building Robot 1.1 "TuftsBot" - click here. First Challenge (NXT 2) - Building Robot 1.2 "MiniBot" - click here. First Challenge (Apple videos) - Building Robot 1.2 "MiniBot" - click here. Challenge 2M - Teaching your Robot (NXT 1 & NXT 2) - click here. Challenge 2M (Apple videos) - Teaching your Robot (NXT 1 & NXT 2) - click here.
Home - Using Arrays with EV3-G At a recent conference I ran an advanced EV3 workshop where one activity concentrated specifically on the use of arrays. Arrays are a new edition the MINDSTORMS software that the previous NXT-G software didn't support (at least not cleanly). Arrays allow us to store multiple bits of data all in the one 'thing', which makes it easier to access. If you think of Variables as being a suitcase where you can read and write some information, then Arrays can be thought of as a suitcase that has lots of smaller folders inside. While you can do the same thing with lots and lots of Variables, Arrays make it far cleaner. The Project: Create a game of Memory. The whole project can be broken down into 2 distinct stages 1. (click for full size) Create the Sequence array To start, we initialise an array and call it 'colours'. We then generate a random number between 1-4 (I'm only using 4 colours at the moment). If the number is a 1, the EV3 will say 'Black'. Checking the colours Added bonus