Лего робот для сборки кубика рубика

Обновлено: 28.03.2024

  • Инструкция по сборке v1.0 (Набор EV3 31313): загрузить
  • Инструкция по сборке v1.1 (Набор EV3 Education 45544+45560): загрузить
  • EV3 Программа для Color Sensor RGB Block v1.00: смотреть далее
  • EV3 Основная программа: смотреть далее

1. Описание

MindCub3r – робот, которого можно собрать из одного набора LEGO MINDSTORMS EV3 Обычная версия (31313) или из наборов EV3 Education Core и Expansion sets (45544+45560).
Этот робот способен полностью решить и правильно собрать известную головоломку Кубик Рубика (Rubik’s Cube puzzle).

Все программы для MindCub3r будут правильно работать с прошивкой LEGO firmware v1.06H (home) или v1.06E (Education), а также с последующими новыми версиями прошивок.
Рекомендуется всегда обновлять программное обеспечение центрального блока EV3 ( прошивку) до самой последней официальной версии от LEGO.

Аккуратно соберите робота по инструкции Инструкция по сборке (Обычная версия EV3 31313) или Инструкция по сборке (Образовательная версия EV3 Education 45544) , затем загрузите и установите программное обеспечение, как описано далее.

Программное обеспечение MindCub3r состоит из трех частей:

  1. Файл проекта: MindCub3r-v1p8.ev3 or MindCub3r-Ed-v1p8.ev3, который содержит программу управления моторами и сенсорами.
    Она создана в стандартном визуальном редакторе программ и проектов LEGO MINDSTORMS EV3
  2. Дополнительная запускаемая программа: mc3solver-v1p8.rtf, которая написана на C++ и реализует более эффективный и быстрый алгоритм решения головоломки, чем тот, который использовался для предыдущей версии NXT MindCuber ( для набора LEGO NXT)
  3. Приложение для EV3: “MC3 Solver v1p8”, которое используется для запуска программы mc3solver-v1p8.rtf

The main program and mc3solver-v1p8.rtf executable program communicate with each other via shared files on the EV3.
Примечаниеe: Файл v1p8 использует расширение .rtf для возможности загрузки его в блок EV3 с помощью стандартного программного обеспечения LEGO MINDSTORMS EV3 для персонального компьютера.
Расширение .rtf , которое обычно используется для текстовых файлов, в данном случае применяется к запускаемой программе, в качестве альтернативы.
Пожалуйста, не открывайте этот файл с помощью обычного текстового редактора.

MindCub3r использует датчик EV3 color sensor (сенсор цвета) в режиме RGB, чтобы сделать возможным распознавание тех оттенков цветов, которые обычно не определяются в стандартном режиме сенсора, по умолчанию используемом в программном обеспечении LEGO MINDSTORMS EV3 .
Программа Color Sensor RGB Block должна быть импортирована в программное обеспечение LEGO MINDSTORMS EV3 для персонального компьютера, чтобы поддерживать режим RGB для сенсора.

2. Программное обеспечение

Примечание: Используйте ссылки Загрузить следующим образом:

    • На Windows – клик правой кнопкой мыши на ссылке Загрузить
    • На Mac – при нажатой клавише control(ctrl), кликните на ссылку Загрузить

    В появившемся меню выберите один вариант:

    • Сохранить ссылку как…
    • Сохранить содержимое как…
    • Загрузить содержимое ссылки как…

    Затем выберите папку на вашем компьютере, куда вы собираетесь сохранить файл.

    2.1 Установка Color Sensor RGB Block

        блок, ColorSensorRGB-v1.00.ev3b, на ваш компьютер.
        Иногда при загрузке этот файлe может быть переименован в ColorSensorRGB-v1.00.zip . В этом случае после загрузки, переименуйте его снова в ColorSensorRGB-v1.00.ev3b
      1. Запустите программное обеспечение LEGO MINDSTORMS EV3 на персональном компьютере и создайте новый пустой проект.


        1. Найдите загруженный ранее файл ColorSensorRGB-v1.00.ev3b на вашем компьютере и нажмите Open(Открыть).


          1. Выберите ColorSensorRGB-v1.00.ev3b из списка Select Blocks to Import( Выбрать Блоки для Импорта) и нажмите Import(Импорт).

            1. Чтобы правильно завершить установку , нажмите Сlose (Закрыть) , а после этого также закройте программное обеспечение LEGO MINDSTORMS EV3 полностью.

            2.2 Загрузка проекта MindCub3r

                  Загрузите соответствующий вашей системе файл на ваш компьютерe:
                    (Обычный набор EV3 31313) (Education набор EV3 45544+45560)
                • Файл проекта с основной программой MindCub3r-v1p8.ev3 или MindCub3r-Ed-v1p8.ev3 project file with the main program
                • Запускаемый файл программы mc3solver-v1p8.rtf
                • InstallMC3-v1p8.rbf – приложение для запуска файла mc3solver-v1p8.rtf


                  1. Запустите программное обеспечение LEGO MINDSTORMS EV3 для персонального компьютера, выберите в меню команду File(Файл)
                    и затем выберите пункт Open Project( Открыть проект ).


                    1. Найдите файл проекта MindCub3r-v1p8.ev3 или MindCub3r-Ed-v1p8.ev3 и нажмите кнопку Open(Открыть).


                      1. Download (Загрузить) – с помощью этой кнопки загрузите программу MindCub3r в блок EV3 (но пока не запускайте ее).


                        1. Find the folder on the computer where the files were extracted from MindCub3r-v1p8.zip or MindCub3r-Ed-v1p8.zip. Select mc3solver-v1p8.rtf and Open to download this program to the EV3.


                          1. Find the folder on the computer where the files were extracted from MindCub3r-v1p8.zip or MindCub3r-Ed-v1p8.zip. Select InstallMC3-v1p8.rbf and Open to download this file to the EV3.

                          2.3 Install the MC3 Solver Application

                            1. Press the right button on the EV3 to move to the File Navigation screen. Select the MindCub3r-v1p8 or MindCub3r-Ed-v1p8 folder and press the center button to open it. If there is a micro-SD card in the EV3, select and open the SD_Card folder first.

                              1. Use the down button to Select InstallMC3-v1p8 and press the center button to run it. The EV3 will make a short beep.

                                This installs “MC3 Solver v1p8” application on the Brick Apps screen.

                                1. Turn off the EV3 brick to ensure all the files are saved to the flash memory and then turn it on again.

                                MindCub3r is now ready to use!

                                3. Operation


                                  1. Run the “MC3 Solver v1p8” application on the EV3 from the Brick Apps screen to start the mc3solver-v1p8.rtf executable program.

                                    This is only necessary once each time the EV3 is turned on as the program will continue to run in the background until the EV3 is turned off.

                                    1. Run the MindCub3r program on the EV3 from the Run Recent screen or from the File Navigation screen if it is the first time it has been run.


                                      The program first resets the position of the scan arm (holding the color sensor) and then the tilt arm. If the turntable starts to rotate or the two arms do not move in this order, please carefully check that cables have been connected to the correct ports on the EV3 as shown by the color coding in the build instructions. During this period, the EV3 buttons flashes red.The program then connects to the mc3solver-v1p8.rtf program that was downloaded to the EV3. If the program is found, the EV3 makes a short beep and continues. If the solver program is not running, the buttons continues to flash red and the message “Find solver” is displayed on the EV3 screen. If this happens, please check that the “mc3solver-v1p8.rtf” program has been downloaded to the MindCub3r-v1p8 or MindCub3r-Ed-v1p8 project folder on the EV3 and that the “MC3 Solver v1p8” application has been installed and run once.When MindCub3r is ready to start, the EV3 buttons turn orange and the message “Insert cube…” is displayed on the screen.

                                      1. Gently turn the turntable in each direction with your finger so that it moves slightly because of “play” in the gears connecting it to the motor. If necessary, adjust the position of the motor so that there is an equal mount of play in each direction. Use the left and right buttons on the EV3 to do this. A short press nudges the motor by a small angle. Holding the button for longer moves it by larger angles more quickly.
                                        1. Insert a scambled Rubik’s Cube into the turntable tray and MindCub3r will start to scan and solve the cube.MindCub3r may scan the cube up to three times if it is unable to determine the colors at first. If the scanned colors do not result in a valid pattern, MindCub3r will stop after the third attempt and display the message “Scan error” on the EV3 display. If this happens, there may be a number of possible causes. See the troubleshooting section.If there is a cube present before MindCub3r is ready, the buttons will stay red and the message “Remove cube…” is displayed for you to remove the cube. If this happens even when no cube is present or if MindCub3r does not start to scan the cube when it is inserted, please check that the cables to the infra red or ultrasonic and color sensors are connected to the correct ports on the EV3 as shown in by the color coding in the build instructions.

                                        4. Troubleshooting Tips

                                        4.1 Scanning

                                        If MindCub3r attempts to scan the cube 3 times and displays the message “Scan error” the following tips may help.

                                        1. MindCub3r is designed to work with an official Rubik’s Cube branded by Rubik’s. However, it should work with most cubes provided one set of stickers is white and the others are distinct colors. It is optimized to work with white, yellow, red, orange, green and blue stickers.
                                        2. Cubes with a white plastic body may scan less reliably that those with a black body but may work reasonably well if there are no other issues.
                                        3. A standard cube is about 57mm along each edge. MindCub3r will work most reliably with a cube this size although cubes that are only slightly larger or smaller may work. It has been known to solve some cubes as small as 55mm but not all.
                                        4. Make sure latest release of the MindCub3r software is installed including the latest enhanced firmware. Version v1p8 has some improvements in the position of the scan arm and the underlying algorithm for discriminating the colors.
                                        5. Check that the scan arm has been built exactly as shown in the build instructions. Small differences such as how the black 5-hole beams on either side of the scan arm are connected can alter the position of the color sensor during the scan or even jam the scan arm so it stops during the scan. In particular, if the color sensor looks as though it is over the edge of the cube or too close to the middle while scanning the corner or edge, please check the build instructions again.
                                        6. Make sure that the turntable is carefully aligned before inserting the cube as described here. This is required to ensure that the cube is positioned correcetly under the color sensor during the scan.
                                        7. Use new or well charged batteries as the reset position of the scan arm can be affected by low battery levels.
                                        8. Try the scan in dim lighting conditions as the color sensor can become saturated in bright lights.
                                        9. Try to bend the cable connecting the color sensor to the EV3 in its most natural direction (swap the two ends if necessary) and through the clip at the bottom of the scan arm to minimize any force that the cable applies to the position of the color sensor during the scan.

                                        If this does not help, please upload a video showing a failing scan with close up views of the scan arm from different angles and the position of the color sensor over the cube as the scan arm moves and post a link on the MindCuber Facebook pageand I will try to help.

                                        Like MindCuber on Facebook to share your experiences and help each other with troubleshooting.

                                        Copyright © 2013-2015 David Gilday

                                        LEGO and MINDSTORMS are trademarks of the LEGO Group
                                        Rubik’s Cube is a trademark of Seven Towns Limited

                                        Disclaimer: thoughts and opinions expressed here are my own (David Gilday)

                                        Не так давно обзавелся набором LEGO MINDSTORMS EV3 (31313) и с удивлением обнаружил, что в русскоязычном сегменте интернета довольно мало интересных материалов и инструкций по сборке и настройке роботов из этого набора. Решил, что нужно это дело исправлять.

                                        Эта инструкция представляет собой вольный перевод материалов с официального сайта проекта MindCub3r и дополнена опытом самостоятельной сборки этого робота, способного собрать кубик Рубика меньше чем за 2 минуты.

                                        Подробнее о LEGO MINDSTORMS EV3 можно почитать на этом сайте.

                                        Вот, что у нас должно получится в итоге:

                                        image

                                        MindCub3r можно построить из одного комплекта Lego Mindstorms EV3 (31313, Home Edition).

                                        Также вам понадобится инструкция по сборке и программное обеспечение, разработанное авторами проекта.

                                        Буквально позавчера автор проекта объявил в своем ФБ, что подправил программное обеспечение для своего робота, и теперь оно работает со «штатной» прошивкой «кирпича» 1.06Н. На главной странице проекта эта информация также уже появилась, архив MindCub3r-v1p1a.zip, содержащий, среди прочего, и обновленную версию программы, уже доступен для загрузки. Загрузка и установка блока для датчика цвета по-прежнему необходима.

                                        Дальнейший текст статьи исправлен с учетом последних изменений на сайте проекта!

                                        Инструкцию по сборке MindCub3r смотрим или скачиваем здесь.
                                        Прошивку (на момент написания статьи EV3-Firmware-V1.06H.bin) для кирпича скачиваем с официального сайта LEGO MINDSTORMS здесь.
                                        Архив MindCub3r-v1p1a.zip с файлами проекта (MindCuber-v1p1.ev3, autorun.rtf и mc3solver-v1p1.rtf) качаем тут.
                                        Еще нам понадобится прошивка для датчика цвета, которую берем здесь. Все дело в том, что стандартные настройки этого датчика не корректно определяют цвета в режиме RGB.

                                        После того, как вы соберете робота и скачаете себе на компьютер все необходимое, можно приступать к настройке.

                                        Если вы еще не обновили прошивку «кирпича» первым делом устанавливаем новую версию ПО для главного блока Mindstorms EV3:

                                        1. Запускаем программное обеспечение LEGO MINDSTORMS EV3;
                                        2. Выбираем Инструменты — Обновление встроенного ПО;

                                        image

                                        3. В появившемся диалоговом окне нажимаем «Просмотреть», находим предварительно закаченный файл EV3-Firmware-V1.06H.bin и жмем «Открыть»;

                                        image


                                        4. В диалоговом окне в таблице «Доступные файлы встроенного ПО» выбираем EV3-Firmware-V1.06H и жмем «Загрузить». Ждем окончания загрузки;


                                        5. Перезагружаем главный блок (выключаем и снова включаем).

                                        Далее устанавливаем прошивку для датчика цвета:
                                        1. В ПО LEGO MINDSTORMS EV3 открываем новый пустой проект;
                                        2. Выбираем Инструменты — Мастер импорта блоков;

                                        image

                                        3. В появившемся диалоговом окне нажимаем «Просмотреть», находим предварительно загруженный файл ColorSensorRGB-v1.00.ev3b и жмем «Открыть»;

                                        image

                                        image

                                        4. В диалоговом окне в таблице «Выбрать блоки для импорта» выбираем ColorSensorRGB-v1.00.ev3b и жмем «Импорт».

                                        image

                                        5. Для завершения установки закройте диалоговое окно и выйдите из программного обеспечения LEGO MINDSTORMS EV3.

                                        Теперь самый ответственный момент — загрузка программы робота в кирпич:
                                        1. Распаковываем предварительно загруженный архив MindCub3r-v1p1a.zip;


                                        2. Запускаем ПО LEGO MINDSTORMS EV3;
                                        3. Выбираем Файл — Открыть проект, ищем файл MindCub3r-v1p1.ev3, распакованный из архива MindCub3r-v1p1.zip и жмем «Открыть»;

                                        image

                                        4. После открытия проекта загружаем его в «кирпич». Загружаем, но НЕ ЗАПУСКАЕМ.

                                        image

                                        5. Идем в Инструменты — Обозреватель памяти (Ctrl+I);

                                        image

                                        6. Выбираем (выделяем) во вкладке «Модуль» или «SD-карта» папку проекта «MindCub3r-v1p1»;
                                        7. Нажимаем «Загрузить»;

                                        image

                                        8. Находим файл mc3solver-v1p1.rtf, распакованный из архива MindCub3r-v1p1a.zip и нажимаем «Открыть»;
                                        9. Еще раз нажимаем «Загрузить», предварительно убедившись, что папка проекта «MindCub3r-v1p1» все еще выделена;
                                        10. Находим файл InstallMC3-v1p1.rbf, распакованный из архива MindCub3r-v1p1a.zip и нажимаем «Открыть»;

                                        Примечание: файл mc3solver-v1p1.rtf имеет текстовое расширение .rtf. Пожалуйста, не пытайтесь открыть этот файл с помощью текстового редактора.

                                        11. Закройте диалоговое окно, выйдите из программы и перезагрузите модуль.

                                        Последний этап — устанавливаем приложение MC3 Solver на главном модуле:

                                        1. Включаем блок:


                                        2. Находим во второй вкладке папку проекта MindCub3r-v1p1 (в памяти блока или на SD-карте):


                                        3. Выбираем файл InstallMC3-v1p1 и нажимаем на центральную кнопку модуля для установки:


                                        4. В третьей вкладке проверяем наличие установленного приложения MC3 Solver v1p1:



                                        5. Перезагружаем блок.

                                        6. В третьей вкладке блока запускаем приложение «MC3 Solver v1p1» для начала работы программы mc3solver-v1p1.rtf:


                                        Всё! MindCub3r готов к использованию!

                                        7. Запускаем программу в первой или во второй вкладке блока:


                                        После запуска программы робот попросит вложить кубик («Insert cube») и начнет его сканировать датчиком цвета.
                                        После сканирования робот ненадолго задумается и начнет сборку.
                                        Удачное решение задачи ознаменуется радостным вращением кубика.

                                        Вот, собственно, процесс работы робота:

                                        Выше описан идеальный сценарий, на практике же все немного хуже — датчик может не правильно определить цвета — всего робот может провести 3 (три) цикла сканирования до того, как выдаст ошибку (Scan error). После этого нужно изъять кубик и снова вложить в робота. Причиной этому может быть или низкий заряд батареи модуля или «неправильный» кубик.
                                        У меня иногда проходило по 3-5 повторов (3 цикла сканирования и одно изъятие) прежде чем робот принимался за сборку, но результат того однозначно стоит.

                                        Если у вас остались вопросы, задавайте их в комментариях к статье, с удовольствием на них отвечу.

                                        10626342_498293940309318_2959390588190050098_o

                                        MindCuber ( Миндкубер ) – семейство из нескольких роботов, которые могут решать и собирать известную головоломку “Кубик Рубика”.

                                        Инструкция по сборке и программированию
                                        робота ЛЕГО EV3 на русском языке
                                        ( полный перевод с английского языка )

                                        Для этого робота нужен только набор LEGO MINDSTORMS EV3 и Кубик Рубика



                                        Далее здесь представлен краткий перевод на русский язык этой инструкции.

                                        Как сделать робота, собирающего “Кубик Рубика”, с помощью набора LEGO MINDSTORMS EV3 (Home set 31313) ?

                                        Роботы EV3 и инструкции по сборке.
                                        Инструкция по сборке и программированию робота из наборов LEGO TECHNICS, LEGO MINDSTORMS EV3.

                                        2. Установить необходимое программное обеспечение:

                                        Убедитесь, что версия прошивки вычислительного блока EV3 – v1.06H или более свежая.

                                        Всегда рекомендуется обновлять прошивку до последней версии на официальном сайте LEGO.

                                        При необходимости скачиваем новую прошивку (встроенное ПО EV3 MIDSTORMS),

                                        а также программное обеспечение LEGO EV3 MINDSTORMS ( PC или MAC ) ссылка.

                                        Затем необходимо установить модифицированную поддержку Сенсора RGB (Color Sensor RGB Block) – датчика, который определяет цвет объекта.

                                        Скачиваем файл нового блока ColorSensorRGB-v1.00.ev3b. И устанавливаем новый блок в оболочку программы LEGO EV3 MINDSTORMS на компьютере.

                                        Для этого используем в программе меню Tools и Block Import.

                                        Следующий этап – установка самой программы для робота, которая считает, решает головоломку и управляет механизмом для вращения граней “Кубика Рубика”.

                                        Закачиваем версию для LEGO MINDSTORMS EV3 (Home set 31313 – домашняя версия, именно она продается в магазинах LEGO) ссылка для загрузки.

                                        Распаковываем архив. Мы имеем три файла.

                                        Первый файл MindCub3r-v1p6.ev3 – файл проекта для программного обеспечения на компьютере.

                                        Второй файл mc3solver-v1p6.rtf – запускаемая на центральном блоке EV3 программа для робота,
                                        выполняет поиск решения для Кубика Рубика.

                                        Третий файл InstallMC3-v1p6.rbf – установщик для предыдущей программы.

                                        Теперь открываем файл проекта MindCub3r-v1p6.ev3 в программном обеспечении на компьютере с помощью меню File и Open Project.



                                        Продолжение следует…

                                        Перевод инструкции по сборке
                                        EV3 MINDSTORMS MindCuber на русский язык.

                                        Перевод на русский язык инструкции по сборке робота MindCuber LEGO EV3 MINDSTORMS. Based on mindcuber.com

                                        Примечание:
                                        Если MindCub3r собирает кубик неправильно, ошибки следует искать в механической части (провороты, пропуски движения)
                                        или в ошибке распознавания цветов граней Кубика Рубика.
                                        Грани должны быть стандартных цветов, кубик должен крутиться, поворачиваться очень легко, без торможения и заеданий.

                                        MindCub3r использует стандартный алгоритм сборки Кубика Рубика.
                                        После определения цвета каждого элемента всех граней, значения цветов заносятся в многомерный массив и производится вычисление кратчайшего решения головоломки.
                                        Затем в дело вступает чистая механика.

                                        • Building instructions v1.0 (Home set 31313): download
                                        • Building instructions v1.1 (Education sets 45544+45560): download
                                        • EV3 Color Sensor RGB Block v1.00: see here
                                        • EV3 Program: see here

                                        1. Description

                                        MindCub3r is a robot that can be built from a single LEGO MINDSTORMS EV3 home set (31313) or from EV3 Education Core and Expansion sets (45544+45560) to solve the well known Rubik's Cube puzzle.

                                        All MindCub3r software releases should work with LEGO EV3 firmware versions from v1.06H (home) and v1.06E (Education) onwards. It is recommended that the EV3 firmware is always updated to the latest version released from LEGO.

                                        Construct the robot by carefully following the build instructions (Home) or build instructions (Education) and then download and install the software described below.

                                        a project file: MindCub3r-v2p2.ev3 or MindCub3r-Ed-v2p2.ev3, containing the motor and sensor control program created using the standard LEGO MINDSTORMS EV3 graphical programming environment

                                        an executable program: mc3solver-v2p2.rtf, compiled from C++ that implements an efficient solving algorithm that can find much shorter solutions than the NXT MindCuber variants

                                        an EV3 application: "MC3 Solver v2p2", that is used to launch the mc3solver-v2p2.rtf program

                                        Note: release v2p2 uses the .rtf extension to enable the files to be downloaded using the standard LEGO MINDSTORMS EV3 software. The .rtf extension is intended to be used for files containing text so using if for the executable program is a work-around. Please do not try to open this file with a text editor.

                                        MindCub3r uses the EV3 color sensor in RGB mode to enable it to measure colors that cannot be distingished by the standard color mode provided by the standard LEGO MINDSTORMS EV3 software. The Color Sensor RGB Block must be imported into the LEGO MINDSTORMS EV3 software to support this mode.

                                        NOTE: LEGO MINDSTORMS EV3 software for Mac OS from version 1.4.0 no longer supports importing blocks such as the ColorSensorRGB block. In this case there is an alternative method to download the MindCub3r software to the EV3 using a micro-SD card.

                                        2. Software

                                        • On Windows - right click on the link
                                        • On Mac - click on the link while holding the control(ctrl) key
                                        • Save link as.
                                        • Save Target As.
                                        • Download Linked File As.

                                        2.1 Install Color Sensor RGB Block

                                        Extract the file from this archive.

                                        On a computer running Windows, find the file in Windows Explorer, click with the right mouse button and select Extract all.

                                        • the ColorSensorRGB-v1.00.ev3b file with the ColorSensorRGB block.

                                        Start the LEGO MINDSTORMS EV3 software and create a new, empty project.

                                        Select the Tools menu and then Block Import.

                                        In the Block Import and Export dialog, select Browse.

                                        Find the file ColorSensorRGB-v1.00.ev3b on your computer and Open it.

                                        Select ColorSensorRGB-v1.00.ev3b from Select Blocks to Import and then select Import.

                                        To complete the installation, close the dialogs and exit from LEGO MINDSTORMS EV3 software.

                                        2.2 Download MindCub3r Program

                                        • download MindCub3r-v2p2.zip (Home set 31313)
                                        • download MindCub3r-Ed-v2p2.zip (Education sets 45544+45560)

                                        Note: previous versions are still available here

                                        Extract all the files from this archive.

                                        On a computer running Windows, find the file in Windows Explorer, click with the right mouse button and select Extract all.

                                        • the MindCub3r-v2p2.ev3 or MindCub3r-Ed-v2p2.ev3 project file with the main program
                                        • the mc3solver-v2p2.rtf executable program
                                        • InstallMC3-v2p2.rbf to install an application to launch mc3solver-v2p2.rtf

                                        Start the LEGO MINDSTORMS EV3 software and select the File menu then Open Project.

                                        Find the MindCub3r-v2p2.ev3 or MindCub3r-Ed-v2p2.ev3 project file and Open it.

                                        Download the MindCub3r program to the EV3 (but do not run it yet).

                                        Select the Tools menu and then Memory Browser.

                                        Select Brick (or SD Card if there is a micro-SD card in the EV3) and find and select MindCub3r-v2p2 or MindCub3r-Ed-v2p2 in the Projects folder and then select Download.

                                        Find the folder on the computer where the files were extracted from MindCub3r-v2p2.zip or MindCub3r-Ed-v2p2.zip. Select mc3solver-v2p2.rtf and Open to download this program to the EV3.

                                        Select Download again from the Memory Browser dialog.

                                        Find the folder on the computer where the files were extracted from MindCub3r-v2p2.zip or MindCub3r-Ed-v2p2.zip. Select InstallMC3-v2p2.rbf and Open to download this file to the EV3.

                                        Close the Memory Browser dialog.

                                        2.3 Install the MC3 Solver Application

                                        Go to the Run Recent screen on the EV3.

                                        Press the right button on the EV3 to move to the File Navigation screen. Select the MindCub3r-v2p2 or MindCub3r-Ed-v2p2 folder and press the center button to open it. If there is a micro-SD card in the EV3, select and open the SD_Card folder first.

                                        Use the down button to Select InstallMC3-v2p2 and press the center button to run it. The EV3 will make a short beep.


                                        This installs "MC3 Solver v2p2" application on the Brick Apps screen.

                                        Turn off the EV3 brick to ensure all the files are saved to the flash memory and then turn it on again.

                                        MindCub3r is now ready to use!

                                        3. Operation

                                        Run the "MC3 Solver v2p2" application on the EV3 from the Brick Apps screen to start the mc3solver-v2p2.rtf executable program.


                                        This is only necessary once each time the EV3 is turned on as the program will continue to run in the background until the EV3 is turned off.

                                        Run the MindCub3r program on the EV3 from the Run Recent screen or from the File Navigation screen if it is the first time it has been run.



                                        The program first resets the position of the scan arm (holding the color sensor) and then the tilt arm. If the turntable starts to rotate or the two arms do not move in this order, please carefully check that cables have been connected to the correct ports on the EV3 as shown by the color coding in the build instructions. During this period, the EV3 buttons flashes red.

                                        The program then connects to the mc3solver-v2p2.rtf program that was downloaded to the EV3. If the program is found, the EV3 makes a short beep and continues. If the solver program is not running, the buttons continues to flash red and the message "Find solver" is displayed on the EV3 screen. If this happens, please check that the "mc3solver-v2p2.rtf" program has been downloaded to the MindCub3r-v2p2 or MindCub3r-Ed-v2p2 project folder on the EV3 and that the "MC3 Solver v2p2" application has been installed and run once.

                                        When MindCub3r is ready to start, the EV3 buttons turn orange and the message "Insert cube. " is displayed on the screen.

                                        Gently turn the turntable in each direction with your finger so that it moves slightly because of "play" in the gears connecting it to the motor. If necessary, adjust the position of the motor so that there is an equal mount of play in each direction. Use the left and right buttons on the EV3 to do this. A short press nudges the motor by a small angle. Holding the button for longer moves it by larger angles more quickly.

                                        Insert a scrambled Rubik's Cube into the turntable tray and MindCub3r will start to scan and solve the cube.

                                        MindCub3r may scan the cube up to three times if it is unable to determine the colors at first. If the scanned colors do not result in a valid pattern, MindCub3r will stop after the third attempt and display the message "Scan error" on the EV3 display. If this happens, there may be a number of possible causes. See the troubleshooting section.

                                        MindCub3r can solve the cube directly into patterns or scramble it. Before inserting the cube, use the up and down buttons on the EV3 to select a specific pattern, "All" to create each pattern in turn or "Random" to cause MindCub3r to solve normally and occasionally generate a random pattern. Selecting "Scramble" will make MindCub3r scramble the cube without scanning it.

                                        If there is a cube present before MindCub3r is ready, the buttons will stay red and the message "Remove cube. " is displayed for you to remove the cube. If this happens even when no cube is present or if MindCub3r does not start to scan the cube when it is inserted, please check that the cables to the infra red or ultrasonic and color sensors are connected to the correct ports on the EV3 as shown in by the color coding in the build instructions.

                                        4. Troubleshooting Tips

                                        4.1 General

                                        NOTE: LEGO MINDSTORMS EV3 software for Mac OS from version 1.4.0 no longer supports importing blocks such as the ColorSensorRGB block. In this case there is an alternative method to download the MindCub3r software to the EV3 using a micro-SD card.

                                        The video of the home variant of MindCub3r shows a prototype. The scan arm support was improved before the build instructions were published so do not worry if your MindCub3r does not look quite like the video. There are many other videos of MindCub3r built by other people in this playlist

                                        If MindCub3r stops with the message "Reset scan" and no motors are turning the following tips may help:

                                        Check that the scan arm mechanism is built exactly as shown in the build instructions. If not, it may cause the motor to jam during the reset.

                                        Check that the cable connecting the medium motor under the scan arm to the EV3 is plugged in firmly at both ends. If not, the EV3 may not be able to sense the position of the motor correctly during the reset.

                                        If none of the above help then try connecting the medium motor to port D in the EV3 instead of port C (which is the port shown in the build instructions). Then re-run the program. The MindCub3r program from v2p2 onwards will detect whether a motor is connected to either port C or port D and use whichever it detects for the scan arm. Some people have found that there can be a problem with port C not being able to sense the motor position. If the software gets past the "Reset scan" message with the motor connected to port B then it is highly recommended to contact LEGO Customer Services as this may indicate there is a fault with port C of the EV3.

                                        If this does not help, please upload a video showing how how the mechanism moves when the program is started and post a link on the MindCuber Facebook page for further help.

                                        4.2 Tilting

                                        If MindCub3r fails to tilt the cube correctly the following tip may help:

                                        Check that the tilt arm has been built exactly as shown in the build instructions. In particular, carefully check the position of the grey connectors and pegs that connect the tilt arm to the levers from the tilt motor.

                                        4.3 Scanning

                                        If MindCub3r attempts to scan the cube 3 times and displays the message "Scan error" the following tips may help.

                                        MindCub3r is designed to work with an official Rubik's Cube branded by Rubik's. However, it should work with most cubes provided one set of stickers is white and the others are distinct colors. It is optimized to work with white, yellow, red, orange, green and blue stickers.

                                        NOTE: cubes with very bright, vivid, "fluorescent" stickers may not scan reliably because the LEGO color sensor can return similar values for colors that look different to us. If none of the other tips help and you think this may be an issue, please consider replacing the stickers with more conventional colors or try an alternative cube.

                                        Cubes with a white plastic body may scan less reliably that those with a black body but may work reasonably well if there are no other issues.

                                        A standard cube is about 57mm along each edge. MindCub3r will work most reliably with a cube this size although cubes that are only slightly larger or smaller may work. It has been known to solve some cubes as small as 55mm but not all.

                                        Make sure latest version of the EV3 firmware from LEGO is installed on the EV3.

                                        Make sure latest release of the MindCub3r software is installed.

                                        Check that the scan arm has been built exactly as shown in the build instructions. Small differences such as how the black 5-hole beams on either side of the scan arm are connected can alter the position of the color sensor during the scan or even jam the scan arm so it stops during the scan. In particular, if the color sensor looks as though it is over the edge of the cube or too close to the middle while scanning the corner or edge, please check the build instructions again.

                                        Even if the cube appears to tilt each time during the scan, it may be that the cube is being pushed too far across the turntable affecting its position under the color sensor. Check that the tilt arm has been built exactly as shown in the build instructions. In particular, carefully check the position of the grey connectors and pegs that connect the tilt arm to the levers from the tilt motor.

                                        If the EV3 is positioned one hole too far towards the turntable, the corner of the turntable may catch on the edge of the screen causing it to "jump" a little as the turntable rotates. Check that the EV3 is positioned exactly as shown in the build instructions.

                                        Make sure that the turntable is carefully aligned before inserting the cube as described here. This is required to ensure that the cube is positioned correcetly under the color sensor during the scan.

                                        Use new or well charged batteries as the reset position of the scan arm can be affected by low battery levels.

                                        Try the scan in dim lighting conditions as the color sensor can become saturated in bright lights.

                                        Try to bend the cable connecting the color sensor to the EV3 in its most natural direction (swap the two ends if necessary) and through the clip at the bottom of the scan arm to minimize any force that the cable applies to the position of the color sensor during the scan.

                                        If this does not help, please upload a video showing a failing scan with close up views of the scan arm from different angles and the position of the color sensor over the cube as the scan arm moves and post a link on the MindCuber Facebook page for further help.

                                        Like MindCuber on Facebook to share your experiences and help each other with troubleshooting.

                                        Copyright © 2013-2020 David Gilday

                                        LEGO and MINDSTORMS are trademarks of the LEGO Group
                                        Rubik's Cube is a trademark of Rubiks Brand Limited


                                        • Building instructions v1p0 (set 51515): download
                                        • MINDSTORMS Robot Inventor Program: see here

                                        1. Description

                                        MindCuber-RI is a robot that can be built from a single LEGO MINDSTORMS Robot Inventor set (51515) to solve the well known Rubik's Cube puzzle.

                                        MindCuber-RI software version v1p0 should work with any version of the LEGO MINDSTORMS Robot Inventor software. However, it is recommended that the MINDSTORMS Robot Inventor software is always updated to the latest version released by LEGO.

                                        Construct the robot by carefully following the build instructions and then follow the instructions in the next section to download and install the software described below.

                                        • python classes for discriminating colors: mcricolors_v1p0.py
                                        • python classes for mapping pieces on a Rubik's Cube: mcrimaps_v1p0.py
                                        • python classes for solving a Rubik's Cube: mcrisolver_v1p0.py
                                        • small lookup tables used by mcrisolver_v1p0: mcrimtab1_v1p0.bin

                                        With these components, MindCuber-RI will solve the Rubik's Cube in an average of about 42 moves.

                                        An optional python project, MCRIMTab4-v1p0, that contains a large data file:

                                        • large lookup tables for mcrisolver_v1p0: mcrimtab4_v1p0.bin

                                        With this large lookup table installed, MindCuber-RI will solve the Rubik's Cube more quickly in an average of about 31 moves.

                                        NOTE: This program takes a long time (around 30 minutes) to download and install on the Robot Inventor hub so it may be desirable to just use the small tables initially to get MindCuber-RI working.

                                        A python project, MCRIInstall-v1p0, that installs any MindCuber-RI files, from the MCRISolver-v1p0 and MCRIMTab4-v1p0 projects, that have been downladed to other slots on the Robot Inventor hub.

                                        The main python program, MindCuber-RI-v1p0, that uses the modules and data files installed by the previos projects to control the MindCuber-RI mechanism and solve the Rubik's Cube.

                                        2. Software

                                        • On Windows - right click on the link
                                        • On Mac - click on the link while holding the control(ctrl) key
                                        • Save link as.
                                        • Save Target As.
                                        • Download Linked File As.

                                        2.1 Download MindCuber-RI Program

                                        Download the file to your computer:

                                        Extract the files from this archive.

                                        On a computer running Windows, find the file in Windows Explorer, click with the right mouse button and select Extract all.

                                        On a Mac computer, locate the file in the Finder and double-click on it to extract the contents.

                                        • MCRISolver-v1p0.lms
                                        • MCRIMTab4-v1p0.lms
                                        • MCRIInstall-v1p0.lms
                                        • MindCuber-RI-v1p0.lms

                                        Start the LEGO MINDSTORMS Robot Inventor software and select the File menu then Open. .

                                        Find the MCRISolver-v1p0.lms project file and Open it.

                                        Connect to the Robot Inventor hub using either a USB cable or via bluetooth.

                                        Expand the Console to see progress information about the software installation during the next step.

                                        Download and Run the MCRISolver-v1p0 program in an unused slot, e.g. 19, on the Robot Inventor hub.


                                        NOTE: This program may take up to a minute to download so please be patient. The LEGO MINDSTORMS Robot Inventor software stops showing progress after a few seconds even though the download continues.

                                        NOTE: Owing to limitations of the current version of the LEGO MINDSTORMS Robot Inventor software, running this program will result in a python SyntaxError. This is deliberate and should be ignored.


                                        Once downloaded, the MCRISolver-v1p0 program should be left on the hub until the installation has been completed in the following steps.

                                        Select the File menu then Open. as step 3. Then find the MCRIInstall-v1p0.lms project file and Open it.

                                        Expand the Console to see progress information about the software installation during the next step.

                                        Download and Run the MCRIInstall-v1p0 program in an unused slot on the Robot Inventor hub. Do not overwrite MCRISolver-v1p0 in slot 19 (or MCRIMTab4-v1p0 in slot 18).


                                        The hub LED display shows progress:

                                        And the console shows download information:


                                        This installs mcricolors_v1p0.py, mcrimaps_v1p0.py, mcrisolver_v1p0.py and mcrimtab1_v1p0.bin on the hub for use by the main program.

                                        The hub will restart when the installation has finished. If the hub was not connected via a USB cable, it may turn off and be necessary to turn it back on manually. If the hub was connected via Bluetooth it may be necessary to re-connect.

                                        NOTE: The LEGO MINDSTORMS Robot Inventor software may indicate that "The hub OS needs to be updated" when it is not necessary. If this happens, do not press the UPDATE button as this will delete the programs that have just been installed. Instead, power off the hub and if the hub is connected via a USB cable, disconnect the cable.

                                        MCRISolver-v1p0 (optionally MCRIMTab4-v1p0) and MCRIInstall-v1p0 may now be removed from the hub to free the space and slots for other programs.

                                        Open the connection to the Robot Inventor hub.


                                        Then open Programs the view all the programs on the hub.


                                        If necessary, scroll down to see all slots. Then delete the programs used in previous steps.

                                        Select the File menu then Open. as step 3. Then find the MindCuber-RI-v1p0.lms project file and Open it.

                                        Download and Run the MindCuber-RI-v1p0 program in an unused slot on the Robot Inventor hub.

                                        MindCuber-RI is now ready to solve a Rubik's Cube!

                                        3. Operation

                                        Run the MindCuber-RI program, if it is not already running, using the buttons on the MINDSTORMS Robot Inventor hub. Press the right button to select the slot number to which the program was downloaded. Then press the center button to run the program.

                                        Gently use your finger to rotate the turntable in each direction to determine if it is aligned. It moves slightly because of "play" in the gears connecting it to the motor. There should be an equal amount of movement in each direction. If necessary, use the left and right buttons on the hub to adjust the position of the motor position. Each press nudges the motor by a small angle.

                                        Insert a scrambled Rubik's Cube into the turntable tray and MindCuber-RI will start to scan and solve the cube.

                                        MindCuber-RI may scan the cube up to three times if it is unable to determine the colors at first. If the scanned colors do not result in a valid pattern, MindCuber-RI will stop after the third attempt with the middle buttont colored orange. If this happens, there may be a number of possible causes. See the troubleshooting section.

                                        4. Faster Solution

                                        The method used to calculate a solution for the cube is based on some pre-calculated lookup tables containintg sequences of moves that solve groups of pieces in stages. The default, small tables included in the MCRISolver-v1p0 download result in solutions averaging about 42 moves. By using a larger set of lookup tables with more entries, shorter solutions can be caltulated with an average only about 31 moves. With fewer moves, the overall time to solve the cube is reduced. These large tables are contained in the MCRIMTab4-v1p0.lms project and can be downloaded in the same way as those in MCRISolver-v1p0.

                                        Select the File menu then Open. as before. Then find the MCRIMTab4-v1p0.lms project file and Open it.

                                        Expand the Console to see progress information about the software installation during the next step.

                                        Download and Run the MCRIMTab4-v1p0 program in an unused slot, e.g. 18, on the Robot Inventor hub.


                                        NOTE: This large program will take a long time (around 30 minutes) to download so please be patient. The LEGO MINDSTORMS Robot Inventor software stops showing progress after a few seconds even though the download continues.

                                        If the connection to the hub is via Bluetooth then please attach the hub to a USB charger to ensure it does not time out and shutdown during the download.

                                        A message will appear in the Console when the download is complete.

                                        NOTE: Owing to limitations of the current version of the LEGO MINDSTORMS Robot Inventor software, running this program will result in a python SyntaxError. This is deliberate and should be ignored.


                                        Once downloaded, the MCRIMTab4-v1p0 program should be left on the hub until the installation has been completed.

                                        Continue, or repeat from 2.1 Download MindCuber-RI Program, step 9 to complete the installation.

                                        5. Troubleshooting Tips

                                        5.1 General

                                        Under development.

                                        Please post a comment or message on the MindCuber Facebook page for help.

                                        5.2 Tilting

                                        Under development.

                                        5.3 Scanning

                                        Under development.

                                        Like MindCuber on Facebook to share your experiences and help each other with troubleshooting.

                                        Copyright © 2013-2021 Mike Dobson and David Gilday

                                        LEGO and MINDSTORMS are trademarks of the LEGO Group
                                        Rubik's Cube is a trademark of Rubiks Brand Limited

                                        Читайте также: