EV3 Painter Robot Print3rbot
I really liked the EV3 Print3rbot artist robot project, which, unfortunately, uses non-standard parts that need to be printed on a 3D printer. I decided to build the same robot, but using parts only from the LEGO Mindstorms EV3 educational set (45544). And I did it, however, I had to add more rubber bands.
You can see how the robot draws the ProgHouse website logo in the following video:
The author of the project is Christophe Avenel. You can find the project page here. The original design of the robot uses parts from a home kit, plus two gears from an educational kit, and three parts printed on a 3D printer. My design is the same, but I built this robot using only parts from the basic educational kit. At the same time, the sizes of the hands are the same and you can use the original author’s control program without changes.
Assembling the EV3 Print3rbot Artist Robot
First, I will immediately give an assembly diagram for the EV3 Print3rbot artist robot, and then I will write how to animate it. In addition to the LEGO Mindstorms EV3 Basic Education Set (45544), you will also need a 8mm marker pen and 4 rubber bands. A thinner felt-tip pen will not work, because. it will stand unevenly, and will dangle. So, here is the assembly diagram of the robot:
Insert the felt-tip pen from top to bottom, and after you have inserted it a sufficient distance, pull it back up a little so that it is firmly fixed. After that, fix it with rubber bands, as shown in the picture, so that it does not hang out. The rubber bands that hold the felt-tip pen should be well stretched.
Two other elastic bands are needed so that the robot’s arms do not play. These two elastic bands should also be well stretched. If you pull back on the robot’s arms, these rubber bands should bring them back.
The daemon runs on ev3dev firmware, so you need to install that firmware on your EV3 first. How to do this is described in the article “ev3dev – install and configure Debian Linux on LEGO Mindstorms EV3”. It also says how to execute commands on EV3 and how to copy files on EV3, so be sure to read this article.
Note that the ev3dev version must be ev3dev-jessie-ev3-generic-2017-02-11 or later.
Installation of the control program
The control program is written in the Python programming language (Python). To install the program, you just need to copy the necessary files to EV3. There are two ways here.
1. If the EV3 is connected to the internet, then you can run the following command:
This will copy the latest version of the required files to your EV3 directly from the project repository. After copying, the files will be in the /home/robot/ev3-print3rbot folder.
Copying over HTTPS didn’t work for me when I connected the EV3 to my computer via a USB cable. And when connected to the Internet via Wi-Fi, everything was copied without problems. Therefore, if for some reason the command failed, use the second method.
2. You can download the ev3-print3rbot folder with all the necessary files from the project page (to do this, click on the “Clone or download” button and select the “Download ZIP” item) to your computer.
Or download a slightly older version of the files that I used from the link below.
Once downloaded, unzip the ev3-print3rbot-master.zip archive, rename the “ev3-print3rbot-master” folder to “ev3-print3rbot” and copy it to the /home/robot directory on the EV3.
The control program works only with vector drawings in the SVG format, and only with those SVG files that do not contain transformations. To convert any SVG file, you can use the Inkscape program. To do this, download and install Inkscape on your computer. Then run the program, select the menu “Edit -> Options”, in the settings dialog find “Behavior -> Transform” and make sure that the save mode of transformations is “With optimization”. After that, close the options window and close the Inkscape program.
Now you can convert the file with the following command:
where “C:Program FilesInkscapeinkscape.exe” is the path to the Inkscape program on your computer, image1.svg is the path to your file, and everything else is what Inscape will do. After executing the command, the file will be prepared so that the artist robot can use it.
Before drawing begins, the size of the drawing will be adjusted to the dimensions of the drawing area, so the actual size of the image does not matter.
Copy the finished file to the EV3 folder /home/robot/ev3-print3rbot/images.
Starting the control program
Before starting the program, change the current folder, if you have not already done so, using the command:
Then open the writer.py file in the editor, find the line at the end:
Here test.svg is the file that the artist robot will draw. The test.svg file is already in the images folder, so without changing anything, you can immediately run the program and see what the artist robot draws. To have the robot draw another drawing using your SVG file, replace the name test.svg with the name of your file, for example, image1.svg. Please note that before starting the program, your SVG file must be prepared and copied to the images folder, as described above.
The file that the robot draws on the video can be downloaded here:
Run the control program with the command:
After that, the robot will raise its hands up, then fold them and start drawing.
Launching the daemon from the ev3dev menu
In addition to the method described above, you can run the daemon directly from the ev3dev menu. To do this, use Explorer to find the writer.py file and select it (i.e. press the EV3 Center Button). After that, the control program will start.