Andrea Favero
Easy DS3231 calibration: On-Demand Sync Clock (OSC)
updated
Setup:
Controller:
- Raspberry Pi Zero 2
Responders:
- Raspberry Pi Pico
- RP2040-Zero
- RP2350-Zero
Connections (for video recording only):
- RPi Zero 2 connected via WiFi
- Picos connected via USB
Data Transmission:
- Data fields are encapsulated in dataframes with a checksum for validation at the receiver.
- Structure: STX + Field1 + Field2 + ... + Checksum + ETX (with escape characters if needed).
- Each transmission includes up to four 16-bit fields.
- The responder returns an 8-bit response: 1 if the checksum is correct, 0 otherwise.
I2C Bus:
- 4.7kΩ pull-up resistors on SDA & SCL.
- 470Ω series resistors on SDA & SCL (at Raspberry Pi Zero).
Code & Examples: github.com/AndreaFavero71/i2c_pico_responder
One example demonstrates using one Pico as the Controller and others as Responders.
The StallGuard feature is used for homing detection, while the PIO's are used for steps counting and for stepper centering: The stepper is stopped in the middle of the 2 detected homes.
Setup:
- 1 NEMA 17 stepper motors.
- 1 RP2040-Zero board.
- 1 Trinamic TMC2209 driver.
- the stepper is 200 pulses/rev, set to 1/8 microstep, therefore 1600 pulses/rev.
- the stepper is controlled by the RP2040-Zero board, running MicroPython.
- the range in between the hard-stops (homes) is varied along the video.
- each time the push button is pressed, a new homing & centering cycle is started.
- the stepper speed is alternated between 400Hz and 1200Hz.
- UART comunication between RP2040 and TMC2209.
This control method is part of a larger project, but it can be adapted for other applications requiring sensorless homing.
Code & Examples: github.com/AndreaFavero71/stepper_sensorless_homing
Code tested on RP2040-Zero, and it's expected to also work on RP2350-Zero (both having the RGB led onboard).
Steppers runs for a predefined number of steps, at speed (info sent to the PIO).
Setup:
• 3 NEMA 17 stepper motors.
• Each motor is controlled by an RP2040-Zero board.
• Commands (speed, direction, steps) sent via I2C, from a Raspberry Pi to the 3 RP2040-Zero boards.
• Stepper class built on PIO for efficient step generation and accurate positioning.
This control method is part of a larger project, but it can be adapted for other applications requiring precise stepper motor movement.
Code & Examples: github.com/AndreaFavero71/pio_stepper_control
Code tested on Raspberry Pi Pico, Pico W, Pico 2, RP2040-Zero and RP2350-Zero.
With RP2350 the accuracy extends to a broader range of steps frequency (info at GitHub).
For the code: github.com/AndreaFavero71/cubotino
The latest code update uses the k-means clustering system to determine the dominant colors, extending the range of cubes this tiny bot can handle.
The project is open source: instructables.com/CUBOTino-Autonomous-Small-3D-Printed-Rubiks-Cube-R or github.com/AndreaFavero71/cubotino
In this instance, it's employed to estimate the value of pi, using a Raspberry Pi :-)
While not the most efficient method for calculating pi, it serves as a valuable tool for comprehending the Monte Carlo method.
For more information about this project, check out: instructables.com/Pi-Approximation-With-Raspberry-Pi-Monte-Carlo-Met
This robot is part of the CUBOTino series, more info at instructables.com/CUBOTino-Pocket-Optimal-Solver-Robot-for-Rubiks-Cu
CUBOTino Pocket, aftert physically solving the cube, shows on the tiny display the solving animation: youtu.be/5abZdfyHW4g).
It also incorporates a virtual solver, which can be plot on a PC screen, to test the state of the randomly generated cubes: youtu.be/ZorUd1qCAnw
Project details at instructables.com/Timelapse-With-Raspberry-Pi-4b-and-PiCamera-V3-wid
Code at github.com/AndreaFavero71/timelapse
The robot works with a 30mm Rubik's cube keychain.
It tipically takes less than 50 seconds to solve a scrambled cube, additionally to 20 seconds to adjust the camera and read the cube status.
The robot is based on a Raspberry Pi Zero and Picamera; All coded in Python.
Used the clever Rubik TwoPhase solver library by Mr. Kociemba.
All the project details, to make your own robot, are available at: instructables.com/CUBOTtino-Micro-the-Worlds-Smallest-Rubiks-Cube-So
A big thank to PCBWay (pcbway.com) who has sponsored the "Connections_board" of this project; The received PCBs are well made, and integrating now the Raspberry Pi ACT led on a visible position.
The robot works with a 30mm Rubik's cube keychain.
It tipically takes less than 50 seconds to solve a scrambled cube, additionally to 20 seconds to adjust the camera and read the cube status (a little longer when it shares graphical info via WiFi).
The robot is based on a Raspberry Pi Zero2W (ZeroW also ok) and Picamera; All coded in Python.
Used the clever Rubik TwoPhase solver library by Mr. Kociemba.
All the project details, to make your own robot, are available at: instructables.com/CUBOTtino-Micro-the-Worlds-Smallest-Rubiks-Cube-So
A big thank to PCBWay (pcbway.com) who has sponsored the "Connections_board" of this project; The received PCBs are well made, and integrating now the Raspberry Pi ACT led on a visible position.
0:00 Read and solve
1:22 Dimensions
1:51 Other robots
The cube status is detected via a camera and a vision system, based on a Raspberry Pi ZeroW. Kociemba solver is used to generate the solution (again very grateful to use Mr. Kociemba solver).
A double touch to the touch-sensor activates a scrambling function.
This is the Top version of the CUBOTino series; The Base version is visible at youtu.be/ZVbVmCKwYnQ.
Via a Webcam, or a mouse, the cube status is entered on a PC; Kociemba solver is used to generate the solution that is sent to the robot.
A GUI, coded in python, interacts with the robot that is based on an ESP32 coded in micropython.
This is the Base version, as this robot has been develloped to be scalable; The self-enclosed version is visible at: youtu.be/dEOLhvVMcUg
Once all the facelets are detected, and the cube status interpreted, a pictures collage is saved.
On this short clip a set of these collage are shown
An idea of this robot: youtube.com/watch?v=oYRXe4NyJqs
The robot works autonomously, or by sharing some graphical information via SSH (when a PC is connected).
All coded in Python; The same script works either on raspberry Pi or Laptop.
The cube's solver, in Python, is made available by Mr. Kociemba (speedsolving.com/threads/3x3x3-solver-in-python.64887 ); I am very very very grateful to use his solver.
All parts made by 3D printing, except the box made in playwood; Movements carried out by a stepper motor and two servos, a photocell is used to synchronize the rotation position of the cube.
On 2nd February 2022, this project got unexpectedely described on Hackday: hackaday.com/2022/02/02/forget-sudoku-build-yourself-a-minimalist-rubiks-solver-robot
00:20 cube scan & solution at PC (same robot code)
02:08 fully automated robot (same PC code)
03:28 robot development
04:15 cube flipping mechanism
Got inspired few years ago from a demostrator, at Cité des sciences et de l'industrie de Paris, and once the first Arduino board arrived in our home ... the project started :-)
I tried to re-use as much as possible the printer's parts, and to make a clean design: All the signals to the car are integrated in the printer's ribbon, and the power supply is also from the printer.
Control via Arduino Mega 2560 and LM298.
Very good reference is the clip from kevin: youtube.com/watch?v=_kBZzQOslTc
Groningen 13 - Zoetermeer 3
Recorded only during lines with Luca
Utrecht 7 - Groningen 4


