Recently I got Lego Mindstorms EV3 and started exploring the world of robotics and I must say it absolutely amazed me. For those of you who are not familiar with Lego Mindstorms – its a kit of software and hardware that allows you create customizable and programmable robots. There are several kits you can buy, but the basic one includes intelligent brick which is a computer that controls the whole robot, a set of sensors and motors, and usual Lego parts that allow you to build robots of different shapes, sizes, and for different purposes. Interesting fact is that the roots of Mindstorms go to MIT Media Lab. Mindstorms kits are also very often used as educational tools under the special series called Mindstorms Education.
Today I want to share with you a video of segway robot (called Gyroboy) that I built recently.
It’s actually quite simple to build this self-balancing robot. As I mentioned earlier, Lego offers two series of Mindstorms, regular Mindstorms and Mindstorms Education. Gyroboy can be build with both of them, but the requirements slightly differ.
So in case you have LEGO MINDSTORMS EV3 Education Core Set #45544ego, you are totally fine and have all the necessary hardware and lego parts.
In case you have Lego Mindstorms EV3 31313 Basic Set you need to buy EV3 Gyro Sensor. I would also recommend you to get EV3 Rechargeable DC Battery and appropriate charger (doesn’t go together) which makes building and programming robot more convenient. While building robot with the basic set, you will find out that you are missing a couple of lego parts. It’s not a big deal, just try to improvise with the parts you have.
Building Instructions
In case you have Lego MINDSTORMS Education EV3 Software, the building instructions are included in the software. Otherwise you can download the building instructions here: http://robotsquare.com/wp-content/uploads/2013/10/45544_gyroboy.pdf.
Programming Instructions
If you have LEGO MINDSTORMS EV3 Home Edition Software, you will first need to install the EV3 Gyro Sensor block (driver) before you can program your robot. Here is a manual how to do it. If you have Education Software version, the Gyro Sensor block is already installed.
Here you can download a project that contains 4 programs: BALANC3R-Basics, BALANC3R-RemoteControl, GyroBoy-Basics, and GyroBoy-AvoidObstacles. You are particularly interested in GyroBoy-Basics and GyroBoy-AvoidObstacles. GyroBoy-Basics balances the robot in place, turns right, and turns left. GyroBoy-AvoidObstacles drives the robot around the room while trying to avoid obstacles. To run one of these programs, just open the .ev3 file in your EV3 programming software.
If you need more details about how the programs work and how to make them run, I recommend you to visit Tutorial: Self-Balancing EV3 Robot at Robot Square.
Further Possibilities
Would you like to program your own balancing program in Java? Then I recommend you to mount LejOS onto your intelligent brick and check this building instructions and java code for balancing algorithm written by Steven Witzand.
There are several interesting projects that go beyond balancing. For example check EV3 Segway line folower: a modification of Gyro Boy.