A three-order Rubik's Cube restoration robot based on the Raspberry Pi RP2040 microcontroller

Publisher:平和宽容Latest update time:2024-01-12 Source: 合宙LuatOSAuthor: Lemontree Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

3x3 Rubik's Cube Restoration

- Open Source Sharing -

This is a 3x3 Rubik's Cube restoration robot designed based on RP2040 . Both control and Rubik's Cube solving are done using a single-chip microcomputer. For a randomly shuffled 3x3 Rubik's Cube, the average number of restoration steps is about 21.

The current V2.0 version can restore a 3x3 Rubik's Cube in 7 seconds.

All are now open source, including schematics and MCU source code (), structure diagram (openSCAD format/STL format), main component BOM, etc.

1

Project implementation principle

This project does not require a camera. Use two colors to scan the colors of all edge blocks and corner blocks, use the group reduction method to find a solution within 22 steps, and then restore it according to the solution.

Watch it in slow motion:

Note: Rotate the Rubik's Cube in a certain pattern so that all faces pass through the color sensor at least once. In addition to the edge blocks and corner blocks, the color of the blocks is also required. The structure of the current project cannot scan the center block, so the direction of the center block needs to be fixed when installing the Rubik's Cube .

2

Key points of project implementation

Design : Connect the GPIO of RP2040 MCU to any of the color sensor and Hall sensor. Except SPI, other pins are only used as GPIO without using other multiplexing functions.

Note: Hall sensor can only support 5V, RP2040 MCU IO is 3.3V, so level conversion design is required. FLASH is optional. If FLASH is not used, the average number of restoration steps is about 32 steps.

Structural design - 3D printing using ABS material, nozzle 0.4mm, layer height 0.2mm, 5 top layers, 5 bottom layers, 4 outer shell circles, filling 20%-40%, and generating supports.

Firmware compilation - It is recommended to use the system for development. You can build the development environment according to the scripts in the RP2040 official document. For related source code and files, see the open source data link.

3

Project cost reference

Excluding processing costs, the material cost alone is about 200 yuan per unit.

Main materials on the motherboard:

There are free ways to buy PCBs in small quantities, and it is estimated to cost one or two yuan for large quantities; three heat sinks are about 1.5 yuan, crystal oscillators are about 0.3 yuan, sockets are 0.38 yuan, RP2040 microcontrollers are 3.91 yuan, three HR4988s are 6.24 yuan, W25Q16 is 0.9 yuan, 1117 is 0.3 yuan, CH224K is 1.1 yuan, and W25N01 is 5.5 yuan. Other materials are very cheap, but you can't buy only a small amount, and there will be a lot left in the end. The total cost should be within 30 yuan.

Machine materials:

Three stepper motors cost 72 yuan, a magic cube with magnetic force costs about 20 yuan, two square pot magnets cost 9.4 yuan, a 4010 fan costs 7 yuan, three Halls cost one or two yuan, two color sensor modules cost 27 yuan, a flange coupling costs 2.8 yuan, and aluminum bars cost a few yuan (very cheap if you can process them yourself, but it may be very expensive if you don’t have the conditions to customize them, so it’s better to 3D print more). ABS consumables are about 280g, and the consumables themselves cost about 10 yuan. If you don’t have a 3D printer to customize them, it’s about 0.2 yuan/g. Other small items are hard to calculate, but they are not expensive. The total cost should be within 170 yuan.

Accessories:

Just pick any one, between 12-20V, 2A or above is recommended, basically all of them are available. If it is a Type-C charger that supports PD, you can plug it in and use it directly. Pay attention to the positive and negative when wiring other devices.

4

Latest open source information

All the information of the three-order Rubik's Cube restoration robot project is open source - structure diagram, circuit board schematic, circuit board PCB, program source code, whole machine BOM, assembly and debugging are all included.








Review editor: Liu Qing

Reference address:A three-order Rubik's Cube restoration robot based on the Raspberry Pi RP2040 microcontroller

Previous article:What is the difficulty in commercializing humanoid robots?
Next article:Painless oral delivery of biopharmaceuticals using microneedle robots driven by intestinal peristalsis

Latest robot Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号