Lego mindstorms ev3 laboratory pdf

Wednesday, March 13, 2019 admin Comments(0)

In The LEGO MINDSTORMS EV3 Laboratory, author Daniele Benedettelli, robotics expert PDF compressed ayofoto.info without password, MB - The LEGO. FREE PDF Download The LEGO MINDSTORMS EV3 Laboratory: Build, Program , and Experiment with Five Wicked Cool Robots! For Kindle. The LEGO MINDSTORMS EV3 Laboratory book contains projects for the retail set The robots are being redesigned for the Education set

Language: English, Spanish, French
Country: Israel
Genre: Environment
Pages: 216
Published (Last): 15.12.2015
ISBN: 809-2-53965-927-4
ePub File Size: 19.73 MB
PDF File Size: 9.11 MB
Distribution: Free* [*Regsitration Required]
Downloads: 27876
Uploaded by: JANEAN

Download Now: ayofoto.info?book= Audiobook The LEGO MINDSTORMS EV3 Laboratory: Build, Program, and. lego ® mindstorms ® eV3 laboratory build, program, and experiment with He was selected as one of 12 experts to test the LEGO MINDSTORMS EV3, This is a welcome screen that provided in digital format (PDF) with the EV3 Software. The LEGO MINDSTORMS EV3 Laboratory covers the essentials of making robots with LEGO's latest and greatest Ebook (PDF, Mobi, and ePub), $

Log log log a computes the base 10 logarithm of a. N Import Brick Program: Thanks to John Hansen, for his early EV3 screen capture tool. The The companion website, http: Negate — —a adds a minus sign, like Subtract Floor floor floor a brings the real number a to the greatest integer smaller than a. For resulting logic array. No computer required!

These blocks can drive either the Large or Medium Remember from Chapter 3 that when using the Brick Program Motors and allow you to control the power separately. You can see the improved Brick Program for get it to react to different sensor readings in a fast loop? You set the robot to turn right until not if it sees the As you can see, instead of using a single Move block to line edge, and then you switch it to turn left until it sees the steer right, we use two Motor blocks.

The left motor port A light ground, and so on, in a loop. You can use Wait blocks to is set to turn faster than the right one port D , which makes detect the change in the sensor reading and Action blocks to the robot proceed forward while steering slightly to the right. The program repeats forever, using the Similarly, we replace the second Move block that steers left infinite repetitions setting in the final Loop block as shown in with two Motor blocks that drive the right motor D faster Figure and described below.

Four blocks do all the work! The Wait blocks remain the same as in the previous program. The resulting motion is smoother N O T E For this program, the right motor should be because the motors are driven at different speeds and they attached to port C and the left motor to port B. N The first Move block makes the robot steer right. When it does, the program continues. By making it follow walls! As you can see in Figure , the robot can explore any environment your room, your house, your school by trying to keep a constant distance from walls or any other objects such a b c d as furniture, shoes, cats, and so on that it sees with the IR Sensor.

The IR Sensor placed diagonally on the right side of your robot will see objects ahead of it. For the program, just replace the Wait Reflected Light Sensor blocks used in the line-following program Figure with Wait IR Sensor blocks to produce a program that looks like the one in Figure ROV3R can explore a space and return to its starting point if its abrupt. As in the program in Figure , you can use separate blocks to set the motors on ports A and D to run at slower speeds and thereby avoid stopping one wheel in order The method for wall following is similar to the method to turn.

As long as the robot keeps a objects, which will smooth out its travel around corners, but it good distance from the wall, it can deal with corners and edges could end up traveling through the middle of a room and may without getting stuck d. If you use a smartphone with video chat software for example, Skype , you can even transmit the live video of ROV3R exploring its environment! A wall-following robot can explore any environment autonomously, transmit video back to D the base, and even help get you out of trouble.

What trouble? A Read on! The motor cables should be attached to ports B and C or A and D, depending on your program.

The wall-following program. The motor cables should be attached to ports B and C. Alternative wall-following program. The motor cables should be attached to ports A and D. The official EV3 User Guide, which gives you a basic Every time you launch the software, you should see and understanding of the EV3 Brick interface and software, is unfortunately hear the Lobby.

Since lets you access the main working features quickly, as you can I think it is very useful to have a printed manual and to make see in Figure Menu bar: This includes File, Edit, Tools, and Help items. Lobby tab: Click here to return to the Lobby at any time. Add Project tab: Here you can learn more about the five official models that come with the set.

This area is interactive: Click the robots to access more information and to get started with their tutorials. Before you begin, make sure that your Windows or Macintosh computer meets the minimum system requirements listed 5. Open Recent: Click here to quickly open your recent on the back of the EV3 set box. The EV3 Software does not projects.

The LEGO MINDSTORMS EV3 Laboratory: Build, Program, and Experiment wi…

Quick Start, News, and More Robots tabs: Once the download is finished, ials, the guide, and documentation. The News and More double-click the installer file to begin installation, and then follow Robots tabs give you access to online content from the the onscreen instructions. User Guide: Once the software has been installed, double-click its icon 8. EV3 Help: The Lobby welcomes you every time you open the EV3 Software.

Programming Palettes: These contain all the blocks for detailed documentation. Hardware Page: Use this to manage the connection to To get started, create a new project by clicking the Add your EV3 Brick, see sensor and motor readings in real time, Project tab [see Figure 3 ].

Even when col- gramming Interface, and an empty program called Program is lapsed, this still shows the Controller Figure , allowing created automatically. When a program is running, the 2 button changes to Stop. The Download command sends The Programming Interface shown in Figure a is where all project data including other programs, images, and you build the programs for your robots. Using of its various controls below. Download and Run sends all the project data and runs the 1. Programming Canvas: This is where you build your program you are currently working on.

Using Download and programs by adding programming blocks. Run Selected is quicker because it allows you to download and run only the selected chunk of a program.

When a 2. Content Editor: This is like a workbook built into your project gets large, downloads can become time consuming, project where you can document your projects with descrip- especially if you just need to test a couple of blocks! Hide it by clicking the EV3 icon to the right of the Edit icon a 6. Click here to return to the Lobby. When collapsed, this tab shows a book icon. Project Properties: Click here to see Project Properties 3.

Programming Toolbar: Click here to create a new project. Add Program tab: Click here to add a new program to magnification. The Controller is shown when the Hardware Page is collapsed. To be understood by a computer, programs must the hardware page be compiled. A compiler is software that translates human-readable programming code into binary digits. When no EV3 Brick is connected, most of happens behind the scenes. The Hardware Page has three tabs: N Available Bricks tab Figure When the EV3 Brick is con- nected, use this tab to check the readings of all the sensors a and motors attached to it in real time.

This feature is really useful when you need to set thresholds in your programs for Wait blocks or when you need to measure how much a Connected motor shaft should rotate.

When you connect a sensor or a motor to an input or an output port on the EV3 Brick, the EV3 Brick recognizes the type of device automatically, thanks b to the Auto-ID feature.

You can change the mode of the sen- sors for example, the Color, Reflected Light Intensity, and Ambient Light modes for the Color Sensor by clicking the related icons. You can also reset the Motor Rotation sensor values by clicking the port names.

Connected a Figure The Available Bricks tab of the Hardware Page: When the EV3 Brick is connected, use this tab to check the battery level, the amount of memory available, and the firmware version of the EV3 Brick. Brick name Battery level the tools menu The Tools menu is located in the menu bar [see Figure 1 ].

N Sound Editor: Collapse bar setup browser N Image Editor: This allows you to create, import, or edit an image and save it to your project. Images can be shown on Figure N My Block Builder: This allows you to create custom blocks called My Blocks that contain small subprograms.

Grouping blocks into a single My Block is useful for creating a small sequence that can be used as a module in many parts of a project or to make your programs look tidier. This allows you to update the firmware programs.

They rotate motors, display text and images on the of your EV3 Brick. N Wireless Setup: You The Flow Control blocks Figure control the flow of the can access the same tool from the Brick Information tab of program. Every program sequence begins with a Start block. This allows you to import new programming blocks to run in parallel by placing more than one Start block blocks made by the LEGO Group or third-party developers in a program.

As in the Brick Program App, here you find a for example, to program your robot to work with a new Wait block and a Loop block. There is also a Switch block that sensor. This allows you to manage the files stored specify. You can access the same tool from block even if some blocks inside the loop are still running; the the Brick Information tab of the Hardware Page. You can N Download as App: Using this tool, you can download a set the Loop Interrupt block to interrupt a specific Loop by program as an app, making it appear in the Brick Apps name, as every Loop block has a name label on top.

N Import Brick Program: The Action blocks palette robots. You may recall from Chapter 3 that the basic structures that make every computer program work are sequences of actions, choices, and loops. Each palette has a different color, and all the programming blocks belonging to the same palette have headers of the same color. For example, all Start Wait Loop Switch Loop the Action blocks have green headers, and all the Interrupt Flow blocks—like loops and switches—have orange headers.

The Flow Control blocks palette The programming blocks will be described as soon as you use them in the following chapters. To find information about a particular block, look it up by name in the index. We will variables and arrays, manipulate data with Math and Logic learn about these blocks when programming the robots in Operations blocks, compare values, combine strings of text, and Chapters 10, 12, 14, and Each of these will be explained in You can download additional Sensor blocks from the the following chapters.

Project Content: Here is a list of all assets included in the project, grouped in categories—Programs, Images, An EV3 project file is actually an archive that contains all the Sounds, My Blocks, and Variables.

Project Properties features the following: Project Description: Here you can document your project by giving it a name and adding a main picture, a video, and EV3 brick to 2. Share Project button: Daisy-Chain Mode: Check this box to enable the software Bricks tab in the Hardware Page refer to Figure EV3 Bricks connected together.

Project Properties is available at any time by clicking the wrench icon at the top-left portion of the screen. The entire Bluetooth scanning, pairing, and connection process is handled by the EV3 Software, not by your operating system.

Alter- natively, close and reopen the EV3 Software. Right after the Start block, you have a Loop block, which includes all the other programming blocks. This is the Mode Selector, set to Count mode.

The blocks. Brick Program in Chapter 3. Inside the Loop block are Move Steering blocks and Wait blocks. The Move Steering blocks can be set to many modes: Here the Move Steering blocks are in On mode: The blocks turn on the motors attached to the specified Motor Ports, and then the program continues.

In On mode, the block shows two inputs, Steering and Figure Now power. The second Move Steering block has the Steering input select Tools4 Import Brick Program, and you should see set to 45 and the Power input set to 50, which makes the a dialog similar to Figure The Steering input accepts values from — to The imported Brick Program in EV3 language form is from 0, the tighter the curve will be. A value of or N O T E Blocks that have multiple modes might change their — will make the robot spin in place.

The Wait blocks are in Time mode, so their inputs let you The EV3 graphical language is designed so that you can specify how many seconds they should pause the program check the configuration of the blocks at a glance. When you flow before the program continues. The time is expressed in place the mouse over the blocks or buttons, corresponding seconds, but you can specify values as fractions of a second, hints will pop up to guide you. For details, see EV3 Help like 0.

Help4Show EV3 Help. Select the Chapter 3. When blocks are not connected to the Start block, they appear faded out. In this mode, the Seconds and Brake at End inputs are also shown. Alternatively, drag them the Wait blocks right after it, and then delete the Wait block. The remaining blocks should move stop when the motion is complete. In this mode, the Move together to fill the space left by the deleted block.

Steering blocks pause the program flow until the duration has elapsed. You can see the complete program in Figure You can also enter a new value from reset the port.

Now should show about degrees for each motor. In order to make ROV3R travel and turn by block. Their inputs should change again, as the selecting it and clicking Download and Run Selected [Fig- Seconds input is replaced by the Degrees input. Now tweak the ure 3 ]. With a ruler, measure the distance traveled, and Degrees parameter of the second Move Steering block to make adjust the Degrees parameter as necessary.

To travel X millimeters, you should use error? The Use the arrow buttons to select the degrees. To reset the rotation lated value a bit to allow for uncertainties in your mea- reading, just unplug the motor and plug it in again or close the surements or even wheel slippage.

Port View App and open it again. In the EV3 Software, open Figure The program to drive ROV3R in a square by turning the motors a precise number of degrees values in real time. Using Figure as your guide, Move Steering block shown in Figure Next, drag and drop a Display block to the the motor rotation count.

While pivoting the robot in place on sequence 2. Hold down the left mouse button while dragging its right wheel which must not rotate , measure the number the block; when the block is in almost in place, a gray shadow of degrees the left motor needs to turn in order to change the should appear.

Use the number of into place automatically. To input of the second Move Steering block, with the Steering change the image it displays, click the File Selection field 3 parameter set to 50 to keep one wheel still. The Move Steering and choose from the available images. Text turned by the number of degrees specified by the Degrees input.

The EV3 Brick executes only the Move Steering Now, following the procedure outlined above, add pro- block that is responsible for making the robot turn. Check the gramming blocks from the Action blocks palette, from left to angle turned by the robot, and adjust the Degrees parameter right, to produce the program in Figure Because the as necessary to achieve the degree heading change.

This is called snaking. R of the wheel. Adding and configuring blocks: The mouse cursor should change the Zoom control buttons in the Programming Toolbar into a spool while performing this action.

You can move [Figure a 3 ]. To move the Canvas, you can pan by the straight pieces of wire by clicking and dragging them dragging the mouse in an empty area while holding down [Figure d ].

When a program is Sequence Exit Plugs of the blocks connected side by side to large, the Programming Canvas will show small triangular make a short, straight Sequence Wire appear between them, arrows near its edges. Click these arrows to shift the pro- as shown in Figure e.

Click the Block Exit Plug again to gram in the corresponding direction so you can view it in collapse the wire and move the blocks close together again. Click the end plug of a Sequence Wire to disconnect the blocks. How to connect blocks with a Sequence Wire a, b, c, d and how to expand, contract, delete, or update a Sequence Wire e controlling the In the program in Figure , the first Move block is a Move Tank block, not a Move Steering block. These two blocks program flow have slightly different properties: The Move Tank block allows you to configure the power of the two driving motors sepa- rately, but for the Move Steering block, you must set the power and the amount of steering for both motors together.

The Move The Flow blocks in the Palette with the orange tab can control Steering block computes the power of each motor for you.

Laboratory ev3 lego pdf mindstorms

To show this preview, click tion. In Figure , a preview of the EV3 icon is shown. The imported program What does this collection of Action blocks do?

To find out, is shown in Figure The Wait blocks color, change the displayed image, or change the sound file are in Infrared Sensor Compare Proximity mode. Their played by the Sound block. The imported wall-following program or Equal To 3 , while their Threshold inputs are set to To allow an EV3 program 50, like 45 or Keep experimenting to see how the to choose between two different actions, we use a Switch block.

How Build the program shown in Figure as follows: Place a Loop block from the Flow Control blocks palette and leave it set to its default mode, Unlimited repeat forever. Place a Switch block inside the loop. Drag a Move Steering block into the True case of the Switch block at the top, indicated by a check mark. Add another Move Steering block inside the False case of the Switch block at the bottom, indicated by an x.

In the imported line- Software features, tools, and work areas. You learned how following program, notice how the Wait blocks are the programming blocks are organized in the Programming configured to wait for certain Color Sensor readings Palettes and, by importing Brick Programs, you took your first in Compare Reflected Light Intensity mode. Try to steps toward proper EV3 programming. You also learned how create a line-following program using a Loop block and to use Action and Flow Control blocks.

The Switch block is shown in Flat view by default, which means that every case is visible. If only one case contains programming blocks, you can keep it in Tabbed view, showing only the case filled with blocks. Otherwise, Flat view should be fine. To fit all the blocks inside them, resize the Loop blocks and the Switch blocks by dragging their Resize Handles, as shown in Figure In the Switch block, each case can be resized independently.

The Resize Handles are shown when the block or case is selected. In addition to measuring the proximity of objects, the IR Sensor can detect infrared signals from the Remote IR Beacon, allowing you to send commands to your robot just as you send commands to a television with a remote control.

The IR Sensor can also estimate its distance and orientation with respect to the Remote IR Beacon; this cool feature will allow you do fun things with your robots like play 6 tag, chase prey, or locate and reach a mission base.

As you can see in Figure , it has four 7 12 small buttons labeled 1, 2, 3, and 4 , a large button 9 , and a 10 11 red Channel Selector switch A number engraved in red plastic in the Figure The Remote IR Beacon small circular window shows the current channel.

The large button 9 turns on Beacon Mode. When in 1 Button 1 Beacon Mode, the device transmits a continuous signal until any 2 Button 2 button is pressed or until one hour has elapsed. This feature allows a robot to follow a moving 5 Buttons 1 and 3 beacon or find its distance and heading relative to a fixed beacon. The plastic that houses these LEDs is a dark blue filter that 10 Buttons 1 and 2 lets only infrared light pass through it.

You should be able to use the small buttons on the remote to drive ROV3R around. In the EV3 Brick menu, go to the table There are two modes to choose from, as shown in Fig- Buttons pressed Motion ure To switch between modes, press the Enter button on the EV3 Brick. In the first mode, with the Remote Channel Selector 1 Turn right by pivoting on the right wheel.

While in the same mode, you can 4 Turn right by going backward and pivoting on control motors connected to ports A and D with another remote the left wheel. The second mode works similarly but receives commands from remotes set on channels 3 or 4. This same setup works for real-world vehicles, such as tanks or tracked vehicles like excavators. The human driver controls these vehicles by moving two levers, and each lever controls the motor that drives the track on the corresponding side.

The IR Control App. To switch between controlling channels 1 and 2 a and channels 3 and 4 b , press the Enter button on the EV3 Brick. When you place the blocks and mouse cursor on an output, its shape should change into a wire spool. When you click an output, a wire plug appears. Place the plug on your desired input, and release the left mouse button.

A robot uses the data provided by its sensors to perceive the world around itself. In Chapters 3, 4, and 5, we compared sen- sor readings against thresholds to trigger Wait blocks or Switch blocks.

[PDF Download] The LEGO MINDSTORMS EV3 Laboratory: Build Program and Experiment with Five Wicked

To directly access sensor readings, we can use the Sensor blocks found in the Programming Palette with the yellow tab. Each Sensor block has several modes that serve different functions. In Measure mode, Sensor blocks provide measure- ments as numeric values to other blocks.

Some Sensor blocks like the Motor Rotation block and the Timer block also have a Reset mode, which resets their measured values to 0. The key idea of this simple program is to take the Proximity value provided by the IR Sensor Figure To add a Data Wire, click a block output. A plug block and send it to the Move block for use as a Steering input. The wire automatically follows the plug on the screen. This simple program makes ROV3R spin in place until you place your hand in front of the IR Sensor; then it will follow your hand, going straight until you remove your hand.

Data Wires carry values from one block To delete a Data Wire, click and drag its end slightly to another. To create the Data Wire, use your mouse to click away from the input the reverse of what we did in the last two steps shown in Figure To move a Data Wire, just click and drag it. To make the EV3 software rearrange and compact the wire in case things are getting messy , double-click the wire.

Remember that the block that provides the output value must precede the block that receives the value in its input and that the blocks are executed in sequence from left to right: The output block where the wire begins must be to the left of the input block where it ends.

However, a Data Wire can skip over many blocks Figure This program makes the robot steer according to the distance and connect distant blocks. What happens? ROV3R should spin until you put your hand near the sensor. Once your hand is near, ROV3R should go toward your hand and follow it as you slowly pull it away.

How does this all work? When the IR Sensor measures a large distance when no object is near , its Proximity output sends a high value, around 80 to 90 percent. When you place your hand in front of the sensor, its Proximity output drops closer to 0 percent. The Proximity value is carried by the Data Wire into the Steering input of the Move Steering block, which accepts values from — to percentage of steering. Place the mouse pointer over a Data Wire to display a pop-up almost straight.

The blocks currently being executed are highlighted with animated diagonal stripes. N O T E The origin of the terms bug and debugging is curious and controversial. Back then, real bugs moths and roaches sometimes EV3 software snuck into those huge relay-based computers, causing elec- trical and mechanical problems. Engineers had to literally features for remove the bugs to get the computer to work correctly! But the EV3 Software allows you to do even more!

Place the mouse pointer robot follows a hand. Using Figure as reference, add a Text over a Data Wire, and a small window pops up displaying the block Data Operations palette, red header and a Display block current value, as shown in Figure The number in the pop- to the program.

Note that this feature bines strings of text provided by its inputs a, b, and c. A string works only if you run the program from the EV3 Software is just a bit of text with any combination of letters, numbers, using the Controller Figure on page To if you run the program from the EV3 Brick menu, even if the enter characters into the Text block, you can either type text Brick is connected to the EV3 Software.

These If we had connected the IR Sensor output directly to animated stripes indicate the blocks currently being executed. However, when many numeric Wire pop-up display really help with debugging programs that values are displayed, what they mean is not always clear. You is, finding and fixing errors, or bugs in programming jargon. You can display meaningful messages on the EV3 Brick screen using the Text block. This program is similar to the one in Figure Set the Display block to Text Grid to a single input.

Then select Wired instead of static text by clicking the Text field in the header as shown in Figure The Display block should show a new Text input, where you will provide the variable text data to be displayed. Set the Clear Screen input to understanding True as indicated by the check mark under the eraser icon so that the block will clear the screen every time it is executed. To help differentiate the data types, Numeric, Text, Logic, Numeric Array, and Logic Array inputs have different plug shapes, and the corresponding Data Wires have different colors.

These are shown in Figure Font The plug shapes and colors are as follows: Configure the Display block to show text on orange. A character set in Large font 2 is two rows and two columns wide. Download and run the program. Also, a logic value can be converted to a numeric value —but not the other way around. Computers like the EV3 Brick represent all kinds of data using only the binary digits 0 and 1, which are equivalent to the truth states False and True, respectively.

In fact, there could be several options. For example, should any nonzero number be converted to True? Or should any number less than a certain threshold be converted to False? With some programming effort, we can overcome the limits of direct data conversion: Text output to a Numeric input with a Data Wire. For example, because the triangular point arithmetic operations, such as dividing 3 by 10, shape can fit into the round or square shape, we know that a the result of which is 0.

If you did the same opera- logic value can be converted into a number or text. Table lists all possible conversions. Array first and only element of the You can reuse this concept in many creative ways. For resulting logic array. Or you could put the beacon in the corner of a room and Array first and only element of the have the robot return to it, even after a long exploration, like resulting numeric array.

Switch block is in Tabbed View. To disable Beacon Mode, press any other button. To pass values through Switch blocks in Flat View, you need to use variables. First of all, the entire Move Steering block. For example, in the program shown in sequence is set to repeat forever by using a Loop block in Figure , the robot will steer toward the beacon with steering Unlimited mode. When the heading is Channel input set to 1.

It has three outputs: The values range from a low of —25 tance from the beacon. This the right. A value of 0 says that the beacon is directly ahead program would be clearer if the Switch block was in Flat View, of the sensor. Its values range from 0 the nearest position to the farthest. True case Math block False case Figure The beacon-following program. Both the True and False cases of the Tabbed Switch block contain blocks. Data Wires can go in and out of a switch only in Tabbed View.

When and it is True when the Beacon Mode signal is detected. To solve this The Move Steering block has the Brake at End input set problem, we use a Math block in Multiply mode to multiply the to False, so the robot will glide to a stop when the beacon value coming from the IR Sensor block Heading output by 4 disappears or when Beacon Mode is turned off.

Next, we want to send the Proximity output to the Power input of the Move Steering block. Since the ranges of the values are the same, we use a Data Wire to connect them directly. Depending on its through an environment is one of the most interesting mode, it performs mathematical operations on numeric inputs, and challenging topics in mobile robotics research.

Why producing the result as an output. The Math block can handle not take up the challenge with EV3? The available operations are listed in Table In Advanced mode, you can enter a formula in the proprioceptive internal measurements of the distance Block Equation field that involves up to four operands.

If you compute the square root of a negative EV3 Brick screen. To display more lines of text without having the Display block. Errors are still sent Row input of the Display blocks the input with the red through Data Wires connected to the output. Y icon. Experiment with various ways to display the messages using the fonts Normal, Bold, and Large and conclusion colors. And because you will probably use more than one Display block, remember to set the Clear Screen input to False in any Display block that follows.

Otherwise, that block will clear the text displayed by the preceding one.

Mindstorms laboratory lego pdf ev3

You learned how the Remote IR Beacon can be used ously contained a longer string, the old string will not with the IR Sensor to build a remote-controlled robot, and you be cleared completely. Any characters from the old discovered how to make your robot follow the beacon. You also string that are beyond the length of the new string will learned how to read sensor data and how to transmit data remain displayed, and the screen will look messy.

To between blocks using Data Wires. For example, if one of the the EV3 screen. Along the way, you learned how to carrying the data from the Proximity output of the IR drive a tracked excavator! Sensor block as input b, enter a few blank spaces as input c. Try a frequency range from to Hz. Astonishingly, your measurements —Prof. Calculating the mean is Compare block and the Advanced mode of the Math block.

We can implement this filtering technique in a dealing with wall-following program, as shown in Figure In this program, three IR Sensor blocks provide three Proximity noise measurements that are fed into a Math block in Advanced mode. This block averages the measurements using the following for- mula the output is called Result: This is normal: We call the interference noise because input b.

One good way to reduce, or filter, measurement by a Data Wire into the input of a Switch block shown in Flat noise is to take multiple measurements of the distance to View , is used to choose between the logic cases True or False.

Build, download, and run this program on your ROV3R to For example, imagine you are measuring the length of a test it. You should find that ROV3R, by averaging the sensor corridor with a measuring tape. You repeat the procedure a few readings, becomes less sensitive to random sensor noise and times, trying to do everything the same way you stretch the thus moves more smoothly.

This wall-following program uses an average of three IR Sensor readings. The Floor function We saw above that by setting a Math block in Advanced is equivalent to using the Round block in Round Down mode, mode, we could use just one Math block to compute several the Ceil ceiling function is equivalent to using the Round block math operations by entering a formula into its Formula field. In in Round Up mode, and Round is equivalent to using the Round Advanced mode, the Math block has four numeric inputs: The Round block also has the Trun- c, and d.

You can use these inputs as operands in either lower- cate mode, which truncates the value, keeping only the number or uppercase.

Other books: LEGO BOOK PDF

The EV3 Software will give the operands the of digits after the decimal point specified by the Number of actual numeric values from the inputs and then compute the Decimals parameter. For example, truncating 3. In returns 3, and truncating —3. Negate — —a adds a minus sign, like Subtract Floor floor floor a brings the real number a to the greatest integer smaller than a. For example, floor 3. Ceil ceil ceil a brings the real number a to the smallest integer greater than a.

For example, ceil 3. Round round round a brings the real number a to its nearest integer, with a half unit as the decision point. For example, round 3. The result is always positive. Log log log a computes the base 10 logarithm of a. Ln ln ln a computes the natural logarithm of a. Sin sin sin a computes the sine of angle a where a is given in degrees. Cos cos cos a computes the cosine of angle a where a is given in degrees. Tan tan tan a computes the tangent of angle a where a is given in degrees.

Asin asin asin a computes the arcsine of a result in degrees. Acos acos acos a computes the arccosine of a result in degrees. Atan atan atan a computes the arctangent of a result in degrees. Square Root sqrt sqrt a computes the square root of a. Also, the result of log 0 and ln 0 is —Inf.

MaTh BLOckS As another example, if you compute the square root of a negative number or you make a syntax error in a Some operations will produce errors as output when the formula by misspelling a function name or using an inputs are not legal. All error values propagate through unbalanced parenthesis , the output will be an error dis- Data Wires and will affect the results of other Math blocks. Such errors will be You can track down which Math block produced an invalid interpreted as zero by other inputs.

Also, be careful with value by connecting a Data Wire from a Math block output the results of functions that are usually implemented as to a Display block in Text mode. For example, the result of tan 90 should One potential error situation occurs when you divide be Inf, but it turns out to be a huge negative number by zero. The result will be an error value displayed as Inf, —22,, In fact, some programming blocks embed the comparison functionality.

The result of the comparison is a logic value that can execute by comparing the sensor value against a threshold. Table lists the six comparisons you can This is equivalent to a Sensor block in Compare mode that perform by changing the mode. Similarly, a Wait block d is equivalent to a Loop block compare block that checks for the exit condition with a comparison e.

The Loops in f and g function equivalently to d , with g showing Mode Result the Compare block explicitly. Depending on its mode, a Constant block can provide all kinds of data types, numbers, logic values, strings of text, and arrays.

However, you program can perform that computa- tion with the Compare block Figure by setting it to Not Equal To mode and set- Now to improve our wall-following program to make it ting input b to zero. In this Figure Converting a numeric value smoother and more intelligent than ever! Our current wall- way, any number provided to to a logic value using a Compare block following program from Figure on page 82 switches input a other than zero will rigidly between two steering directions if the proximity read by be converted to True.

Any the IR Sensor is greater or less than a threshold. The result is number equal to zero will be a jerky motion, even after we try to reduce the jerkiness with converted to False. Equivalent programming examples using Compare blocks the desired distance R from the wall and the actual distance difference E will be bigger, and the Steering control will have a measured by the sensor Y. This formula will do the trick: The two Constant blocks are there to show the value of the desired distance from the wall, R 50 , and the gain, N O T E We need the minus sign in front of the gain to make K 2.

The the robot react properly: A gain of 2 works well in this program. The greater the difference between distance values, the This wall-following method has some limitations; for stronger the steering input will be!

For example, when the robot example, the robot can only follow walls on its right. However, is at about the desired distance from a wall, the difference E you can modify the sensor assembly and the program to allow will be small, as will the Steering control U: The robot will move the robot to follow walls on its left. Also, this relatively minimal almost straight ahead, making only small adjustments to its program will fail if the robot is too far from the wall; in that case, trajectory.

However, when the robot is very near a wall, the it will spin in place, with no chance of finding the wall again. A controller is a device a program that monitors and changes the behavior of a system your robot. In the case of wall following, we want to keep the robot at a constant distance from a wall. Our first Brick Programs Modify the wall-following program shown in Figure for line and wall following in Chapter 4, and the EV3 so that you can set the reference distance from the programs derived from them in Chapter 5, imple- wall before starting the loop that controls the robot.

The press Enter again, the robot should stop and return to controller discussed in this chapter is a proportional setup mode. Put the wall-following loop inside an feedback controller, where the control command U is external loop.

In particular, you learned how to egy to overcome this limitation. For example, the pro- compute the arithmetic mean of a set of numbers using a single gram could detect that the robot is spinning in place by block. You met the Compare block and realized that it was an checking whether the distance from a wall is too great old acquaintance, as it is embedded in Switch blocks and Wait for a long period of time; then it could make the robot go blocks.

Finally, you saw how to build a proportional controller as straight for a while, hopefully getting closer to a wall. The angular beams are no exception. But what about the other angular beams? The story is that the ancient Egyptians knew this trick long before Pythagoras and that they used knotted ropes to make right triangles in order to set land boundaries. You may have seen this number before, perhaps in the name of the angular beams in LDraw computer-aided design CAD elements.

Now you know where it comes from! A triangular structure can resist applied force without being rectangles deformed. If you and triangular structures. On the sure as a triangular one, just add a diagonal beam, as shown in other hand, a triangular structure, like the one in Figure , Figure By doing this, you effectively create two triangles.

Now for some examples of assemblies that show how to use angular beams and triangular structures to build solid assemblies. Have a look! You can easily squash a parallelogram by applying force to it. Figure shows various ways to extend beams and strengthen structures. These two beams are connected with black pins and with an overlap of just two holes. Notice that the assembly is straight but still flexible.

Increasing the overlap of the beams to five holes makes the resulting structure more rigid. You can use long blue pins to strengthen the assembly by making it thicker. Increasing the amount of overlap makes the structure more rigid.

You when subjected to pulling forces. To increase resistance, add another bracing beam using long friction pins. Use cross blocks to create half- module offsets.

Torque is a twisting force applied to an object that tends to make it rotate. Put another way, torque We first met gears in Chapter 1 Figure on page Here are some basic things Aside from changing how fast the driven axle turns, gears to remember about gears: N You measure a gear by counting its teeth. Now try turning the 36z gear with the crank for one com- N You combine gears according to radius and thickness.

To sum things up, if the input gear is smaller than the output gear, the speed of the output gear will be decreased and Build the assembly shown at the top of Figure On the other hand, if the input gear is the double-bevel gear meshing with a 36z double-bevel gear. If bigger one, the speed of the output gear will be increased but you rotate the 12z gear three times, how many times will the its torque decreased. The illustrations below the gears in Fig- 36z gear rotate? When ure show how gears change the speed and torque of axles.

In this example, the ratio is This is a question that nags the novice LEGO 1: Thus, the 36z gear goes one-third as fast as the 12z gear. Table lists the radii plural of radius of the gears, expressed in LEGO units.

To verify these values, you can measure the radius of gear wheels by using a beam as a reference. Gears change the speed and the torque of rotating axles. Examples of perfect combinations are 8z with 24z 0. But bending and breaking LEGO design rules is my passion, so give imperfect 24? Of course, before bending the rules, you need to know what 36?

As you can see in Table , there are 28 possible combinations of these gears. Think 20 and N A question mark? See if you can find the missing solution! The axle pins might pop out if you apply too much torque. The 3M axle with stop is useful for holding gears because its built-in stop saves you from having to use a bush.

Use a red bush to hold a 3M axle. Two yellow thin bushes offer more friction than one red bush. This is the most resistant assembly shown here: The gear is locked by the 4M axle with a stop on one side and two yellow bushes on the other. An idler gear is one that is inserted between two or more gears to change the direction of rotation of the output axle without affecting the ratio of the gear train.

The ratio depends only on the number of teeth of the input and output gears, as you can see in Figures and In Figure you can see a gear train with a 1: Idler gear Gear train resulting in a 1: The worm gear is self-locking. See Figure Notice how bracing prevents the worm gear from being pushed away when resisting torque is applied to the output axle.

The worm gear is a self-locking gear. You cannot make it turn by driving the other gear. An eccentric mechanism transforms circular motion 6M into reciprocating motion—that is, a repetitive up-and-down or back-and- forth motion. If you position the assembly verti- cally, it looks kind of like a leg. This mechanism transforms rotation into pure linear motion, the same way the steam pistons of an old train do. Placed vertically, it reminds me of a sewing- machine needle. Since these motors are the core of your robots, this section lists some useful modules and assemblies to build motors inside your robots.

This robot is inspired by a cre- nects the center of mass to its projection on the ground. When ation of Bruno Zarokian. The mechanics of this robot are designed so that you can program the robot to walk, turn, and avoid obstacles with just the Brick Program App see Chapter No computer required! In Quack! A creature that walks on two legs is called a biped. Humans are bipeds, and so are kangaroos, some primates, dinosaurs like Tyrannosaurus rex and velociraptors, and birds like ostriches all the time and geese when not flying.

For the biped to maintain static equilibrium while walking on two legs that is, to avoid falling , the projection of its center of mass COM must always lie inside the support area the feet. An imaginary Figure As you can see, it shifts the weight of the EV3 Brick to the foot that remains on the ground a ; then the swinging frame touches a rolling wheel b , unloading the other foot and lifting it with a parallel linkage.

The robot takes steps by turning its feet, pivoting on the foot on the ground c. In fact, the foot on the ground keeps turning until the object is no longer in its sight, at which point the robot shifts its weight to the other side so it can con- tinue walking straight.

The workings of a weight-shifting biped robot right leg assembly 1: Then push the O-frame to lock the connector to the axle. The weight of the EV3 Brick will lift the opposite leg from the ground. This limit switch assembly is key to simplifying the programming for this robot. You can change your ad preferences anytime. Upcoming SlideShare. Like this presentation? Why not share! An annual anal Embed Size px. Start on. Show related SlideShares at end.

WordPress Shortcode. Published in: Full Name Comment goes here. Are you sure you want to Yes No. Be the first to like this. No Downloads. Views Total views. Actions Shares. Embeds 0 No embeds. No notes for slide. Book details Author: