LEGO Mindstorms Education EV3 - Review of the designer. Read the latest news from the world of Lego – EduCube. Connecting two or more EV3 bricks How to add additional lego ev3 bricks

The idea of ​​​​replacing the microcomputer in the designer with a Beaglebone, or another is not new. But with the release of EV3, it became possible not only to get a 100% analogue, but also to increase the performance of your legorobot.

Video presentation of the project:

E VB fully supports Lego Mindstorms Ev3 system at both hardware and software levels, 100% compatible with all Lego sensors and motors. The block works the same as the Lego Mindstorms EV3 block:

BeagleBone Black— single-board Linux computer. It is a competitor to Raspberry Pi. Has powerful processor processor AM335x 720MHz ARM®, large number of inputs/outputs, capabilities can be expanded with additional boards.

Lego Mindstorms EV3 has ARM processor 9 (TI Sitara AM180x) 300MHz, so switch to ARM Cortex-A8 processor (TI Sitara AM335x) 1GHz BeagleBone Black increases productivity, plus it becomes possible to connect additional expansion cards!

The most important thing is that Lego Mindstorms EV3 has an open description of all software and hardware!

For example, the famous Rubik's cube solving robot has been assembled and demonstrated. Only instead of EV3 they installed the developed EVB. We invite you to watch the video:

The authors of the project are already producing and selling EVB. They plan to significantly expand production by the end of April 2015. In addition, they have developed and are producing several compatible sensors.

If you, like us, lack the capabilities of standard EV3 sensors, 4 ports for sensors in your robots are not enough, or you want to connect some exotic peripherals to your robot - this article is for you. Believe me, a homemade sensor for EV3 is easier than it seems. A “volume knob” from an old radio or a couple of nails stuck into the ground in a flower pot as a soil moisture sensor are perfect for the experiment.

Surprisingly, each EV3 sensor port hides a whole series various protocols, this is mainly done for compatibility with NXT sensors and third-party sensors. Let's look at how the EV3 cable works


It’s strange, but the red wire is ground (GND), the green wire is the plus of the 4.3V power supply. The blue wire is both SDA for the I2C bus and TX for the UART protocol. In addition, the blue wire is the input of the analog-to-digital converter for EV3. The yellow wire is both SCL for the I2C bus and RX for the UART protocol. The white wire is the input of the analog-to-digital converter for NXT sensors. Black - digital input, for sensors compatible with NXT - it duplicates GND. Not easy, isn't it? Let's go in order.

EV3 analog input

Each sensor port has an analog-to-digital converter channel. It is used for sensors such as Touch Sensor (button), NXT Light Sensor and Color Sensor in reflected light and ambient light mode, NXT Sound Sensor and NXT Thermometer.

A resistance of 910 Ohms, connected according to the diagram, tells the controller that this port must be switched to analog input mode. In this mode, you can connect any analog sensor to EV3, for example from Arduino. The exchange rate with such a sensor can reach several thousand polls per second; this is the fastest type of sensor.

Light sensor

Thermometer

Soil moisture sensor

You can also connect: a microphone, a button, an IR rangefinder and many other common sensors. If 4.3V power is not sufficient for the sensor, you can power it with 5V from the USB port located on the side of the EV3 controller.

The above-mentioned “volume knob” (also known as a variable resistor or potentiometer) is an excellent example of an analog sensor - it can be connected like this:

To read values ​​from such a sensor in the standard LEGO programming environment, you must use the blue RAW block

I2C protocol

This is a digital protocol; for example, the NXT ultrasonic sensor and many Hitechnic sensors, such as IR Seeker or Color Sensor V2, work on it. For other platforms, for example for Arduino, there are a lot of i2c sensors, you can also connect them. The scheme is as follows:

A resistance of 82 ohms is recommended by the LEGO Group, but various sources mention 43 ohms or less. In fact, we tried to abandon these resistances altogether and everything works, at least “on the table”. In a real robot operating in conditions of various kinds of interference, the SCL and SDA lines should still be connected to the power supply through resistances, as indicated in the diagram above. The i2c operating speed in EV3 is quite low, approximately 10,000 kbps, which is why everyone’s favorite Hitechnic Color Sensor V2 is so slow :)

Unfortunately, for the standard EV3-G from LEGO there is no full-fledged block for two-way communication with an i2c sensor, but using third-party programming environments such as RobotC, LeJOS or EV3 Basic you can interact with almost any i2c sensors.

The EV3's ability to operate using the i2c protocol opens up an interesting possibility for connecting multiple sensors to one port. The I2C protocol allows you to connect up to 127 slave devices to one bus. Can you imagine? 127 sensors for each of the EV3 ports :) Moreover, often a bunch of i2c sensors are combined in one device, for example in the photo below there is a 10 in 1 sensor (contains a compass, gyroscope, accelerometer, barometer, etc.)

UART

Almost all standard non-EV3 sensors, with the exception of Touch Sensor, operate using the UART protocol and that is why they are not compatible with the NXT controller, which, although it has the same connectors, does not have UART implemented on its sensor ports. Take a look at the diagram, it is a little simpler than in previous cases:

UART sensors automatically match the speed of their operation with EV3. Initially connecting at a speed of 2400 kbit/s, they agree on operating modes and exchange rates, then switching to increased speed. Typical exchange rates for different sensors are 38400 and 115200 kbit/s.
LEGO has implemented a rather complicated protocol in its UART sensors, so there are no third-party sensors that were not originally intended for this platform, but are compatible with it. Nevertheless, this protocol is very convenient for connecting “homemade”
sensors based on microcontrollers.
There is a wonderful library for Arduino called EV3UARTEmulation, written by famous LeJOS developer Lawrie Griffiths, which allows this board to pretend to be a UART-LEGO-compatible sensor. His LeJOS News blog has a lot of examples of connecting gas sensors, an IMU sensor and a digital compass using this library.

Below in the video is an example of using a homemade sensor. We don't have enough original LEGO distance sensors, so we use a homemade one on the robot:


The robot's task is to start from the green cell, find a way out of the maze (red cell) and return to the starting point by the shortest route, without going into dead ends.
- Who would you like - a son or a daughter?
- Son!
- Why?
- I want a radio-controlled helicopter!!!
An unfunny and accordion-laden joke, but you can’t just start this publication with something other than him - he’s in at its best reflects the essence of what will be discussed further. However, from the title you already understand what we are talking about.

Carefully! The publication may cause an irresistible desire to have a son.

History lesson

The LEGO company (the name comes from the Danish phrase “leg godt”, “Play with pleasure”) needs no introduction - it was founded back in 1932, although the first familiar plastic bricks appeared much later, in 1947. It is noteworthy that LEGO bricks , produced in those years, are fully compatible with those produced now.

Pixar's LEGO 80th Anniversary Creation Story:

The company now produces about 20 billion parts per year, that is, more than 630 pieces per second. In the current model range more than 600 different construction sets and it just so happens that the Mindstorms series is a kind of pinnacle of technical thought, the most sophisticated construction set. In short, it allows you to make fully-fledged robots.

According to Wikipedia, the LEGO Mindstorms series was first introduced in 1998. 8 years later (in 2006) the LEGO set was born Mindstorms NXT 1.0, and already in 2009 - the LEGO Mindstorms NXT 2.0 set. Today we will talk about LEGO Mindstorms EV3– the last (third) generation of the terminator designer, which was presented almost a year ago, on January 4, 2013 (it went on sale only six months later).

Differences between EV3 and NXT 2.0

In principle, the main idea remains the same - the series is intended for assembling programmable robots. Therefore, the first question that arises is, what has changed since the release of the previous designer and is it worth buying a new one? The main difference is the updated sensors/motors and, most importantly, the EV3 Smart Brick (EV stands for EVolution):
As you can see, the difference is quite significant - it would be strange if in 4 years only the screen resolution and the set of stickers were changed.

Another difference is that the NXT series was sold in several versions (in different years) and represented different sets, basic and resource. The new EV3 has it easier with this - for now it is sold in the basic version - (601 parts), from which you can make a bunch of things. But you can buy more if you want basic set(541 parts) with additional sensors and parts (no one bothers to use parts from ordinary designers either). By the way, pay attention to five-digit article numbers - the company switched to this numbering in 2013.

As for compatibility, everything possible has been done here. All NXT sensors and motors are compatible with EV3 and are recognized as NXT. EV3 sensors do not work with NXT, but EV3 motors seem to be compatible. An NXT brick can be programmed with EV3 software, but some functions may not be available, but you can program an EV3 brick with NXT software without third party solutions it won't work.

Inside the box

Even when I was little and went with my parents to the central Children’s World (when it was still there), to Lubyanka - even then I couldn’t take my eyes off the boxes of LEGO. Then there was no Giktimes, or even Habr, but since then the boxes have remained just as bright and juicy, even in adulthood they activate the process of salivation) In this regard, other manufacturers have a lot to learn.

Part of the box is actually (if you cut it) a track with different color zones that can be used for color sensor robots.

All the parts are neatly placed in bags, the kit includes instructions and a set of stickers. Let's take a quick look at what's included in the kit.

Myself EV3, aka an intellectual block, aka the heart of the system, aka a “brick” or a “cube”. Serves as a control center and power station for your robot and has the following functional elements:

– Multifunctional monochrome display with a resolution of 178x128
– Six-button control interface with backlight changing function (3 colors) to indicate operating mode
– 4 input ports (1, 2, 3, 4) for connecting sensors
– 4 output ports (A, B, C, D) for executing commands
– 1 miniUSB connector for connecting EV3 to a computer
– 1 USB host port (for connecting several EV3 in one chain, for example)
– 1 slot for microSD memory cards (up to 32GB) – to increase the capacity available memory EV3
– Built-in speaker

The EV3 Brick also supports Bluetooth, WiFi (via the NETGEAR WNA1100 Wireless-N 150 USB adapter), and has software interface, allowing you to create programs and configure data logging directly on the EV3 Brick.

» Large EV3 servomotor (2 pieces). Designed to work with the EV3 microcomputer and has a built-in rotation sensor with measurement accuracy up to 1 degree. Using this sensor, a motor can be coupled with other motors, allowing the robot to move at a constant speed. In addition, the rotation sensor can also be used in various experiments to accurately read distance and speed data.

– Built-in rotation sensor with measurement accuracy up to 1 degree
– Maximum speed up to 160-170 rpm
– Maximum torque of 40 Ncm

» Medium EV3 servomotor. Ideal for tasks where speed and responsiveness, as well as the size of the robot, are more important than its carrying capacity.

– Built-in rotation sensor with measurement accuracy up to 1 degree
– Maximum speed up to 240-250 rpm
– Maximum torque of 12 Ncm
– Automatic identification by EV3 software

» Color sensor (EV3). Capable of detecting 8 different colors, although it can also be used as a light sensor.

– Measures reflected red light and ambient ambient light, from complete darkness to bright sunlight
– Captures and identifies 8 colors
– Polling rate up to 1 kHz
– Automatic identification by EV3 software

» Touch sensor (EV3). Allows the robot to respond to touches, recognizes three situations: touch, click and release. It is also able to determine the number of clicks, both single and multiple.

» Digital IR sensor (EV3). To detect the approach of a robot. Also capable of picking up IR signals from an IR beacon, allowing you to create remotely controlled robots, navigation systems to overcome obstacles.

– Approximation/removal measurements within a radius of 50-70 cm
– IR signal detection radius up to 2 meters
– Up to 4 individual signal reception channels
– Receive remote IR control commands
– Automatic identification by EV3 software

» Remote infrared beacon. Designed for use with the EV3 IR Sensor. The beacon emits an IR signal that is picked up by a sensor - can be used as a remote control remote control EV3 microcomputer, transmitting signals to the IR sensor.

– Up to 4 individual signal transmission channels (switch directly on the body)
– Has a button and toggle switch to turn on/off
– When the IR beacon is operating, the green LED lights up
Automatic shutdown when idle for more than 1 hour
– Range up to 2 meters

A separate bag contains wires for connecting sensors and motors to the cube, as well as a USB cable for connecting the cube to a computer.

It is worth noting two important points. Firstly, there are other Lego sensors such as:

» Gyroscopic sensor (EV3). The EV3 Digital Gyro Sensor can measure the robot's rotational motion, as well as detect changes in its movement and position. Angle measurement mode with an accuracy of ± 3 degrees; the built-in gyroscope detects rotations with a torque of up to 440 degrees/s; polling frequency up to 1 kHz.

» Ultrasonic sensor (EV3). Generates sound waves and records their reflections from objects, thereby measuring the distance to objects. Can also be used in sonar mode, emitting single waves. It can pick up sound waves, which will be triggers for running programs. Measures distances ranging from 1 to 250 cm, and the measurement accuracy is ± 1 cm.

And secondly, it supports sensors and other accessories from third-party manufacturers, such as HiTechnic and Mindsensors - they offer all kinds of joysticks, infrared distance sensors, magnetic sensors, compasses, gyroscopes, accelerometers, timers, multiplexers, ball joints, etc. So, if you ask yourself, you can find a lot of interesting things.

In general, as you already understand, LEGO is for real boys!

First model

The kit comes with paper instructions, which can be used to assemble one single model - a kind of tracked self-propelled vehicle.

At first I was surprised, because even the simplest sets (series like LEGO Creator) always come with several instructions, but then suddenly the paper was spared or there was no space in the box. It turned out... that only on the official website it is proposed to assemble 17 different robots from a set of parts! Therefore, 17 instructions in a box would be really redundant (both for logistics and for nature’s forests). Here are the names of the robots: EV3RSTORM, GRIPP3R, R3PTAR, SPIK3R, and TRACK3R. ROBODOZ3R, BANNER PRINT3R, EV3MEG, BOBB3, MR-B3AM, RAC3 TRUCK, KRAZ3, EV3D4, EL3CTRIC GUITAR, DINOR3X, WACK3M, and EV3GAME - instructions for them will have to be downloaded from the Internet, as well as software for connecting EV3 to a computer.

The instructions are very detailed, it’s difficult to mess up. The son said that the parts in the bags are not packaged very well - on the first page you may need to open 3 different bags, but these are also minor things.

The EV3 cube needs to be powered, for which you can use a battery (not included) or 6 AA batteries. Looking ahead, 2 more batteries (but pinky ones) will be needed to power the IR beacon (aka remote control).

A child (7 years old) assembled the first model in about 30 minutes.

The process turned out to be not as exciting as, for example, assembling LEGO Technics models - the instructions suggest assembling a robot that is far from the most interesting: it only contains large parts, among which were almost all sensors and motors - apparently to demonstrate the operation of each of them.

But the result exceeded all children’s expectations - for the first time he assembled a model that could move on its own: forward and backward, turn, turn on the spot, twist with tentacles...

The launch is carried out from the EV3 brick, for which you need to press a couple of buttons on the front panel. Some actions can be programmed directly on the cube: select the number of iterations, adjust the feed sound signal and so on - you can’t tell everything in one article, smoke manuals.

Software

There was no need to program the model assembled above via a computer. Nevertheless, there is such a possibility, at different levels of hardcore.

The easiest way for a child to start is with the software offered by the manufacturer, which is available for both Windows and OS X. In the second case, the distribution weighs 666 MB, and installed application will take up a gigabyte. It's called LEGO Mindstorms EV3 Home Edition and was developed in collaboration with the well-known company LabView. There are quite a lot of educational programming materials on the LEGO website.

Immediately after launch, an interactive “garage” of robots appears in front of us, which can be assembled from a set:




We choose the one we like and start assembling: we will see interactive assembly instructions, videos, as well as a selection of various missions that can be completed with assembled robot. That's why the distribution weighed so much.








I don’t see the point in describing everything in detail: you’ll quickly download the application yourself and see what’s there and at what level. I’ll just mention one of the shortcomings that I remember most: the interface is not the most friendly (especially for children) - the application smells like some kind of bank client.

It should be noted once again that the EV3 brick can be controlled from a smartphone on operating systems Android or iOS, for which there are separate applications.

If all this was not enough, you can increase the degree of hardcore. There are various firmwares for the EV3 brick that allow you to expand its capabilities, speed, etc. Here, for example, is the alternative firmware leJOS EV3 - firmware with jvm, which allows you to program EV3 in Java. Do you want it in another language? Okay, Google - you have almost 60 options to choose from: ASM/C/C++/Perl/Python/Ruby/VB/Haskell/Lisp/Matlab/LabVIEW and much, much more.

I won’t talk about this in more detail for several reasons: firstly, I’m a complete false programmer (all my hopes are in my son), secondly, so far we’ve only managed to assemble one model (and we’ll take on the second one this weekend), and - thirdly - you have already placed an order for this designer and will soon find out everything for yourself;) But seriously, the article is already huge - it’s better to study two links: once and twice.

Well, another big plus is LEGO communities, of which there are plenty all over the world. You can be sure that at any stage of experiments with robots you will always be able to find like-minded people and those who can help with solving the problem. In addition to friendly communities, there are a huge variety of different instructions, models, sources, videos and training materials posted on the Internet. All this means one thing: with Mindstorms you won't get bored.

Pros and cons

LEGO products have been famous for their quality for many years, so there are no complaints in this regard: an impressive box, parts, stickers, instructions - everything is worked out to the smallest detail. Therefore, I will allow myself to close my eyes to all the “small advantages” in comparison with one big one: diversity possible combinations designs that can be made even from a standard set of parts (there’s no need to talk about additional sets) are limited only by your imagination. The ability to program the assembled model in different ways is another plus, which, in fact, is much more than it seems at first glance.

But I found only one really significant disadvantage: the price. Back in the summer, LEGO Mindstorms EV3 could be bought for 14-15 thousand, but the rapid growth of the evergreen president’s exchange rate increased the price to 17 thousand. Someone will say: " yes, a cool designer... BUT EXPENSIVE!"And he will be right. While studying the kit and its capabilities, I was blown away by the amount of resources that were invested in its creation; I understand that there is a lot of electronics and everything else... but I still can’t come to terms with the cost of the designer. For this money you can get a person out of prison (with) choose many other gifts: a quadcopter, a radio-controlled internal combustion engine model, a full-size electric motorcycle, a year of classes in the sports section, a tablet... and a lot of things! But you can go to sports at any time and this seems to be not exactly a gift, but the same quadcopter will buzz until the first serious breakdown. In this regard, Lego is a much more long-lasting gift, combining business with pleasure, with unrealistically great potential. Yes, you can also learn to program on the same tablet, but when you don’t have the opportunity to actually touch the result of your work with your hands, it’s not so exciting. So decide for yourself.

Oh yes. The manufacturer positions this set for children from 10 years old, but even a 7-year-old child was interested in playing - the process of rapid development has begun. How much do you think these guys and when will they buy their first Porsche?)

The end

Each of us associates the New Year with snow maidens, a Christmas tree, tangerines, a bowl of Olivier and, of course, gifts. And if we talk about children, then their gifts are far from the last place on this list. And if it so happens that you have a son, then you can have no doubt that this constructor under the tree will bring him to pig squeals of joy. And considering that after the New Year's fireworks you will have almost another week to tinker with the cubes and wires with your child... you are buying it for your child, right?

Happy New Year!

Description of the presentation by individual slides:

1 slide

Slide description:

2 slide

Slide description:

EV3 Brick Interface The EV3 Brick is the control center that powers your robots. With the screen, Brick control buttons, and EV3 Brick interface containing four main windows, you have access to an incredible variety of unique features EV3 module. These can be simple functions, such as starting and stopping a program, or complex, like writing the program itself.

3 slide

Slide description:

Interface: The EV3 Menu has a menu that consists of 4 parts: Recent Programs File Navigation Brick Applications Brick Settings

4 slide

Slide description:

Recent Programs Launch programs recently downloaded from your desktop PC. This window will remain blank until you start downloading and running programs. This window will display the programs you have launched recently. The program at the top of the list, which is selected by default, is the program that was launched last.

5 slide

Slide description:

File Manager Access and manage all files stored in the microcomputer memory, as well as on the memory card. From this window you will access and manage all files in your EV3 Brick, including files stored on the SD card. The files are organized into project folders, which, in addition to the actual program files also contain sounds and images used in each project. Files can be moved or deleted using the file navigator. Programs created using the module programming environment and module data logging applications are stored separately in the BrkProg_SAVE and BrkDL_SAVE folders.

6 slide

Slide description:

EV3 Control Box Applications has 4 pre-installed applications: A. Port View. B. Motor control. B. IR control. D. Module programming environment.

7 slide

Slide description:

A. Port View In the first window of the Port View application, you can quickly see which ports have sensors or motors connected to them. Use the EV3 Brick control buttons to navigate to one of the occupied ports and you will see the current readings from the sensor or motor. Install several sensors and motors and experiment with different settings. To view or change the current settings for installed motors and sensors, press the center button. To return to the main application window of the module, click the “Back” button.

8 slide

Slide description:

B. Motor Control Control the forward or reverse movement of any motor connected to one of the four output ports. There are two different modes. In one mode, you will be able to control motors connected to port A (using the Up and Down buttons) and to port D (using the Left and Right buttons). In the other mode, you control motors connected to port B (using the Up and Down buttons) and port C (using the Left and Right buttons). Switching between these two modes is done using the central button. To return to the main application window of the module, click the “Back” button.

Slide 9

Slide description:

IR Control Control the forward or reverse motion of any motor connected to one of the four output ports using the remote infrared beacon as the remote control and the infrared sensor as the receiver (the infrared sensor must be connected to port 4 on the EV3 Brick). There are two different modes. In one mode you will use channels 1 and 2 on the remote infrared beacon. On channel 1, you will be able to control motors connected to port B (using buttons 1 and 2 on the remote IR beacon) and port C (using buttons 3 and 4 on the remote IR beacon). On channel 2 you will be able to control the motors connected to port A (using buttons 1 and 2) and to port D (using buttons 3 and 4). In another mode, you can control the motors in the same way, using channels 3 and 4 on the remote infrared beacon instead. Switching between these two modes is done using the central button. To return to the main application window of the module, click the “Back” button.

10 slide

Slide description:

Brick Programming Environment The EV3 Brick comes with software installed on it. Similar to the application software installed on your computer. These instructions contain the basic information you need to get started.

11 slide

Slide description:

EV3 Brick Settings This window allows you to view and adjust various general settings in the EV3 Brick.

12 slide

Slide description:

Adjusting Volume You can increase or decrease Volume in the Settings tab in EV3.

Slide 13