Robot Arm Tic-Tac-Toe: Wrapping Up the Project (For Now)

Prussian-blue cyanotype still-life of a tic-tac-toe board and physical ring and cross game pieces

It’s time to put a full stop on my tic-tac-toe robot arm project, at least for now. Over the last few weeks it has grown from “can I get the arm to touch nine squares?” into a working game. An Arduino drives the arm, an AI picks the moves, a camera watches the board, and a set of 3D-printed pieces is designed to be gripped and recognised by colour. Everything now lives in two projects in my GitHub repo, 44-tic-tac-toe-arm and 45-board-camera, along with the board and piece models.

This post wraps the whole thing up in one place. I’ll cover what was built, how it fits together end to end, how it was wired, what I learned and what’s still unfinished. If you want to build your own, every file I mention links straight to the source.

Catching up on the series

If you’re new to the project, here’s the trail of earlier posts on CIAOPS Labs:

The arm itself goes back further. I covered building it in Building a 6DOF Programmable Robot Arm and Robot Arm with Multi Motor Movement.

What was built

At the highest level there are three pieces, and the top-level README lays them out the same way:

  • The arm (project 44). An Arduino UNO R4 WiFi drives six servos directly. It runs the game, hosts its own web pages and talks to Gemini.
  • The camera (project 45). An AI-Thinker ESP32-CAM looks down on the board, works out which cells hold a red X, a yellow O or nothing, and serves that as a nine-character string.
  • The playing field (3d-models/tictactoe). A 180×180 mm printed board and weighted counters designed for the gripper and the camera.

The human always plays yellow O and the robot always plays red X. That isn’t just a style choice. The camera tells the pieces apart by colour, so it matters.

How it was assembled: the component layout

The diagram below is the full layout and connection map, drawn only from what the published firmware and READMEs actually state. Click it for the full-resolution version.

Component layout and connection diagram for the tic-tac-toe robot arm
Component layout and connections, drawn from 44/src/main.cpp, 45/src/main.cpp and the project READMEs. Click for full size.

There are really two kinds of connection here. The first is physical. Six servo signal wires run from the UNO, plus an optional test servo. A USB cable connects the PC to the UNO, and a USB-to-serial adapter is used to program the ESP32-CAM. The second is over the network. The UNO and the camera join the same Wi-Fi, and the UNO asks the camera for the board with a plain HTTP request. There are no signal wires between the UNO and the camera at all.

Here is the servo wiring as it is defined in src/main.cpp (motorPins[] = {0, 1, 2, 3, 4, 5}, auxPin = 11):

MotorUNO R4 pinRole in the firmwareNotes
M0D0Gripper (gripMotor)Home pose = gripper open; closed = open − gripAmount (15°)
M1D1Wrist (wristMotor)Per-square wrist compensation applied at clearance height
M2D2Arm jointName not given in the source
M3D3Lift (liftMotor)Clearance angle 90°; lifts first, lowers last
M4D4Arm jointName not given in the source
M5D5Arm jointName not given in the source
AuxD11Stand-alone test servoNot part of the arm poses; jog it from /calibrate
Servo-to-pin map from the arm firmware.

And the camera side. These are the AI-Thinker module’s own on-board camera connections, set in 45-board-camera/src/main.cpp. You don’t wire them yourself, but they’re worth knowing if you swap boards:

SignalGPIOSignalGPIO
D0 / D15 / 18XCLK (20 MHz)0
D2 / D319 / 21PCLK22
D4 / D536 / 39VSYNC / HREF25 / 23
D6 / D734 / 35SCCB SDA / SCL26 / 27
PWDN32RESETnot used (−1)
AI-Thinker ESP32-CAM pin map used by the camera firmware.

One thing to be upfront about: the repo doesn’t document the servo power supply. It doesn’t say how the servos get their power, whether a shield or external supply sits between the UNO and the servos, or how the camera is mounted above the board. I’ve deliberately left those off the diagram rather than guess. My earlier arm builds used a Keyestudio sensor shield, but this project’s source doesn’t confirm that, so treat power as something you’ll need to size for your own servos.

How it works end to end

A robot turn runs through a fixed sequence, and each step lives in a specific file:

  • Park and look. After the human places a yellow O, the arm moves to its home pose so it’s out of the camera’s view. It waits about 500 ms to settle, then calls GET /board on the ESP32-CAM using board_camera.h. It tries up to three times and needs two identical readings in a row before it trusts the result.
  • Check what changed. camera_board_diff.h compares the camera’s view with the board the arm already knows about. Exactly one new O is accepted as the human’s move. A missing X, no change, or several changes are rejected with a message rather than guessed at.
  • Minimax finds the best moves. tic_tac_toe_rules.h runs a full minimax search and returns every square that is equally best for X, not just one.
  • Gemini picks one. gemini_connection.h sends the board and that list of equal-best squares to Gemini over HTTPS and asks for JSON back, in the form {"square":N}. If Gemini returns a square that isn’t in the minimax set, the firmware rejects it and the arm doesn’t move. The AI adds variety, but it can never make a bad move.
  • The arm moves. It opens the gripper at home, goes to the off-board pickup point and grabs the piece. Then it lifts to clearance, travels, sets the wrist angle for that square, lowers straight down, releases and goes home. If it wins, there’s a victory jig.

The bit I’m happiest with is how the motion is timed. Servo positions are recalculated in a 200 Hz FspTimer interrupt, so a slow Wi-Fi call to Gemini or the camera never freezes the arm halfway through a move. Calibrated poses are stored in EEPROM, so the arm remembers them through a power cycle.

The UNO also serves two web pages. The game page at / is where you play and watch the live output. At /calibrate you can jog each servo, test poses and store the 11 targets: cells 1 to 9, the pickup point and home. The serial commands from the earlier tic_tac_toe.cpp still work too.

The camera

The camera firmware is compact, and you can read the whole thing in one sitting. It captures a 320×240 JPEG, decodes it and averages the colour over the middle half of each of the nine cells, which keeps the grid lines out of the sample. It then sorts each cell into one of three groups:

  • Empty when red minus blue is under 30.
  • Yellow O when green is more than 0.8 times red.
  • Red X otherwise.

It exposes /capture (the photo), /debug (the photo with sample boxes drawn on), /cells (JSON with the colour values) and /board (the nine characters the arm reads, for example X...O....).

Two hardware quirks cost me time and are now written into the code. First, fmt2rgb888 on this board writes bytes in blue-green-red order, not red-green-blue, so byte 2 is red. That was checked on the actual hardware. Second, the camera sees the board rotated 180 degrees, so image index 0 is reported as cell 9. Get either one wrong and the arm will confidently respond to a game nobody is playing.

The printed board and pieces

Repository render of the board with flat counters
Board with flat counters. Repo render: preview.png.

The models README has the details. The board is board.stl / board.3mf at 180×180 mm with 54.67 mm cells. tictactoe_all.3mf packs the board with one X and one O. The one-piece counters (counter_X.stl, counter_O.stl) have a sealed pocket for an M8 washer. You pause the print at Z 5.4 mm, drop the washer in and resume. The extra weight helps the pieces sit flat and release cleanly from the gripper.

Board with tower counters
Tower counters give the gripper something taller to hold. Repo render: preview_tower.png. Files: counter_X_tower.stl, counter_O_tower.stl.
Counters as coloured parts
Print X in red and O in yellow. Repo render: counters_parts.png.

If you’d rather not pause mid-print, the two_part folder has glue-together base and cap versions, including ones sized for a 10 mm washer. The editable source is tictactoe.solidcraft.

Exploded two-part counter
Two-part counter: base, M8 washer and cap. Repo render: preview_exploded.png.

Building it yourself

Both projects are PlatformIO projects with their own platformio.ini (arm, camera). The short version:

  • Copy the templates in 44-tic-tac-toe-arm/include: wifi_secrets_example.h, gemini_config_example.h and camera_config_example.h. Fill in your own Wi-Fi details, Gemini key and URL, and the camera’s address. None of these are committed to the repo.
  • Build and upload the arm with pio run -e uno_r4_wifi -t upload.
  • Copy wifi_secrets_example.h in 45-board-camera/include, then build and upload the camera with pio run -e esp32cam -t upload. The module has no USB port, so use a USB-to-serial adapter and hold IO0 low while resetting.
  • Open /capture and adjust the crop values boardX, boardY, boardW and boardH until the board fills the frame. Then put the camera’s IP address into camera_config.h.
  • Calibrate the 11 poses on /calibrate. This is the step that takes the most patience.

The arm project also has smaller test environments: cell_sequence for a motion-only demo, plus mapping, gemini and tictactoe. They’re handy for testing one layer at a time (cell_sequence.cpp, mapping.cpp, gemini_test.cpp).

What got finished in projects 44 and 45

  • A camera-integrated game firmware, built from main.cpp by default, with a web game page and a calibration page.
  • Motion driven by a timer interrupt, so network calls don’t stall the servos.
  • Minimax as a guard on Gemini’s choices, with a built-in self-test covering wins, draws, invalid moves, openings, forced wins and blocks, and fork defence.
  • Wrist compensation for each square, so pieces arrive straight instead of rotated. README_WRIST_COMPENSATION.md and CALIBRATION_GUIDE.md explain it.
  • Perpendicular descent, so the arm lowers straight down onto a square instead of swinging in at an angle (PERPENDICULAR_DESCENT_FIXED.md).
  • A camera that reads the board, debounced readings and a strict rule for accepting a move.
  • Print-ready board and counters, plus the editable SolidCraft source.
  • A clean public release, with secrets moved into gitignored local headers.

Lessons learned

  • The logic is the easy part. Minimax for tic-tac-toe is a few dozen lines. Getting a hobby servo arm to grab a small piece the same way every time is where most of the hours went.
  • Let the AI choose, but check its answer. Giving Gemini a list of moves minimax has already approved, and rejecting anything outside it, keeps the game interesting without trusting a language model to play perfectly.
  • Keep timing-critical work away from the network. Moving servo updates into a timer interrupt was what made Wi-Fi and the arm work together.
  • Write down your hardware quirks. The BGR byte order and the 180-degree rotation are each one line in the code, and each one would have broken the game without anyone noticing.
  • Small bugs hide in plain sight. For a while the wrist compensation never ran, because the code reset a variable to zero before checking it (CRITICAL_BUG_FOUND_AND_FIXED.md).
  • Never assume the camera is right. Requiring two identical readings and exactly one new piece stops a shadow or a bumped piece from being taken as a move.

What’s left

I said this wraps the project up “for now”, and I meant it. A few things are still open:

  • The camera is still a work in progress. The firmware reads the board, but the colour thresholds and crop are tuned for my lighting and my mount. It needs more testing before I’d call it reliable.
  • Piece holders. The arm currently picks every X from a single pickup point outside the board. The next step is a set of fixed holders off the board, so the arm can collect from several slots in turn without me reloading it.
  • Calibration polish. The wrist compensation values in the code are a calibrated estimate. Each square could be fine-tuned further, and gripper settings are still the main cause of the occasional missed pickup.
  • Power and mounting notes. The repo should eventually document the servo supply and the camera mount, so someone else can reproduce the build without guessing.

What could come next

A few ideas I’d like to try when I come back to it. One is letting the arm clear the board itself at the end of a game. Another is moving from fixed colour thresholds to something that adapts to the lighting. I’d also like to use the camera to check that the arm actually dropped its piece in the right square. And I want to try the same arm, camera and game-logic pattern on a different game. The structure is general: a camera that turns the physical board into a string, a rules engine that defines what’s legal, an AI that chooses within those rules, and an arm that makes it happen.

That’s the real takeaway for me. Each layer is simple on its own. The value comes from joining them up carefully, with checks between each step. If you build your own version, I’d love to see it. Grab the code from my tic-tac-toe folder on GitHub and let me know how you go.

Tic-Tac-Toe Robot Arm Update: Board, Pieces and the Next Pickup Step

Repository render of the board and X/O pieces
Repository render of the board and X/O pieces. This is a model preview, not a photograph of the printed build. Full-resolution image.

The board and playing-piece models are now included in my tic-tac-toe robot arm project on GitHub. The project brings together the arm firmware, the ESP32-CAM companion and the printable game components. The camera is still a work in progress. My next step is to give the arm a set of fixed off-board positions from which it can collect its pieces and place them on the board.

What is in the project

The top-level README groups the work into three folders:

  • 44-tic-tac-toe-arm/ — PlatformIO project for an Arduino UNO R4 WiFi. Six arm servos, with motor 0 as the gripper, drive the poses. Motion is updated on a timer so Wi-Fi and camera HTTP calls do not freeze the servo plan mid-move. The sketch serves game and calibrate pages on the board, and it can ask the camera for a board reading.
  • 45-board-camera/ — Separate PlatformIO project for an AI-Thinker ESP32-CAM with PSRAM. It is meant to serve the board state the arm consumes, including GET /board and related paths such as /capture, /debug and /cells.
  • 3d-models/tictactoe/ — Board and piece meshes, preview images and the SolidCraft source. The print files live here rather than inside the arm firmware folder.

Open the arm and camera folders as separate PlatformIO projects — each has its own platformio.ini. Wi-Fi details, API keys and the camera address stay on the machine as local copies of the *_example.h templates. Those filled-in headers are gitignored.

Board and piece models

The models folder README names the print files and how they fit together:

  • Board: board.3mf and board.stl — 180×180 mm. The 3MF has Board_Base and Board_Grid. Each cell is 54.67 mm square. tictactoe_all.3mf packs the board with one flat X and one flat O.
  • One-piece counters: counter_X.stl and counter_O.stl for the flat pieces, plus tower variants counter_X_tower.stl and counter_O_tower.stl, and matching *_tower_parts.3mf files. The one-piece counters include a sealed pocket for an M8 washer; the README says to pause at Z 5.4 mm, drop the washer, then resume so the top layers close the pocket.
  • Two-part counters: under two_part/, glue-together base and cap STLs and 3MFs, including versions sized for a 10 mm washer.
  • Editable source and previews: tictactoe.solidcraft, plus preview.png (board with flat counters — the image above), preview_tower.png, counters.png, counters_parts.png and the exploded two-part previews.

Print colour matches the game roles in the firmware: the human plays yellow O, the robot plays red X. The camera sketch is written to tell those colours apart, so printing in the right colours matters even while vision is unfinished.

How the current software plays a move

The default arm environment builds src/main.cpp, the camera-integrated game. Other environments in the same project cover a cell-sequence motion demo, board mapping, a Gemini connectivity test and a serial-only tic-tac-toe sketch without the camera client.

For each robot X, the documented sequence is: open the gripper at home, move to the pickup pose, close on the piece, lift clear, travel above the chosen square, orient the wrist while raised, lower, open to drop, lift clear and return home.

Move choice works in two stages. On-device minimax evaluates every legal X move and lists the equally best squares. Gemini then chooses among that list. If the returned square is not in the optimal set, or is occupied or invalid, the firmware rejects it and no motion runs. That check is about which square the robot is allowed to play. It does not, on its own, guarantee gripper grip, wrist calibration or a clean physical place.

Supply is still simple. Alongside the nine cell poses and the home/rest pose, the firmware keeps a single outside-board pickup pose. Before each robot move you need to have an X piece ready at that spot by hand. That is enough to exercise pick-and-place onto the board. It is not yet a set of fixed holders the arm can work through on its own.

Camera: still unfinished

The ESP32-CAM companion is in the tree with an AI-Thinker pinout, documented BGR colour handling, a 180-degree cell remap so image index 0 reports as cell 9, and the endpoints above. When the arm reads the board it parks first, waits briefly, then calls GET /board.

That path is still unfinished. Crop values (boardX, boardY, boardW, boardH) need adjusting after looking at /capture, and the game UI still lets you tap a square yourself if the camera reading is unsure. Treat vision as a work in progress, not a finished autonomous board reader.

Next: fixed off-board piece holders

The next mechanical step is to create designated piece holders at fixed positions off the board. Those holders are not in the models folder yet. The idea is that during play the arm collects each red X from one of those known off-board locations and places it on the relevant board square.

The nine board poses stay for dropping pieces into cells. The new holder poses are separate supply locations. With fixed holders, each robot move can come from a repeatable place: hover above a stocked holder, descend, close the gripper, lift with clearance, travel to the target cell hover pose, descend, open and retreat. Stock is no longer a single manually replenished spot.

When I build that stage I will need to work through the practical details:

  • Keep the board and holders physically fixed relative to the arm base so calibrated poses stay meaningful.
  • Define repeatable poses for each holder and each cell — approach and hover, grasp or drop height, and a lift height that clears the grid walls and other pieces.
  • Calibrate gripper open and close for the printed counters (flat or tower) so the jaws clear both the holder and the board grid.
  • Check reach and collision paths from each holder to each cell, not only the easy square in front of the arm.
  • Track which holders still contain pieces so the next robot move uses a stocked slot.
  • Keep the human’s yellow O pieces out of the robot’s red X supply.

I have not settled holder count or exact geometry yet. A sensible build-and-test order, once the holders exist on the bench, would be: mount the board and holders, extend the calibrate path so each holder pose can be configured, dry-run open and close at each holder without a piece, run real pick-and-place into empty cells from each holder, and only then fold multi-holder supply into a full game. Until that work lands, the single outside-board pickup remains the supply model in firmware, and the camera remains unfinished.

Earlier Labs posts

This sits on top of the earlier series: announcing the tic-tac-toe project, teaching the arm where the board is, playing with minimax and Gemini, and a worked minimax guide.

Links

With the board and piece models in the repo, the next bench job is those fixed holders — so the arm can collect its red Xs from known off-board positions and place them on the board while it plays.

Clearing a Blocked Snapmaker Artisan Nozzle: When You Have to Take the Hot End Apart

A maker carefully disassembling a 3D printer hot end on a workbench

There’s a particular sinking feeling when the Snapmaker Artisan starts a print, the nozzle moves happily across the bed, and nothing comes out. I’ve had it happen, and the temptation is to grab tools and start pulling things apart straight away. Don’t. Disassembly is the last resort, and Snapmaker says so itself. But when you genuinely need to go inside the hot end, you want the official steps, in the right order, without improvising. That’s what this post covers.

As I wrote in Why Everyone Needs Basic Technology Troubleshooting Skills, the simple checks come first. That applies to a 3D printer just as much as a laptop.

Symptoms of a blocked nozzle

Snapmaker’s How to replace the nozzle page lists the situations where the nozzle needs attention:

  • The nozzle is clogged and filament can’t be extruded.
  • Filament has leaked and filled the space between the nozzle and the heating block.
  • The nozzle is wrapped in a blob of filament that can’t be cleaned off.

Try the simple fixes first

Before reaching for a screwdriver, try unloading and reloading the filament. The official Dual Extrusion Module quick start guide describes the process: tap Control > Nozzle, select the nozzle, set the temperature and tap Heat. When it’s heated, tap Unload and pull the filament out, then insert the filament again and tap Load until it extrudes.

If filament has wrapped the heating block, Snapmaker’s Remove extruder blob guide says to heat the hot end, remove the blob with tweezers, wipe the block with a clean cloth and replace the silicone sleeve. A note of honesty: I couldn’t find an official Snapmaker cold pull procedure for the Artisan, so I won’t give you one here.

When disassembly is needed

Snapmaker’s How to disassemble the hot end of Dual Extrusion Module guide is for when filament is stuck in the nozzle, heat break or heat sink of the Artisan standard hot end and normal methods won’t clear it. Snapmaker rates it Difficult and warns that delicate parts can be damaged if you get the procedure wrong. Take your time.

Tools you’ll need

  • H1.5 screwdriver (the gray handled wrench provided by Artisan worked well for me) handled
  • 4″ adjustable wrench
  • 8″ adjustable wrench
  • A lighter (used in step 6 of the official guide)
  • High-temperature protective gloves, which the extruder blob guide recommends

Before you start

  1. Power off the machine before removing or refitting anything on the Dual Extruder. The official top cover kit guide says not to plug or unplug anything while the machine is on.
  2. Unload and pull the filament out of the module.
  3. Detach the hot end from the module. According to the extruder blob guide, you remove the print head bottom cover and front door panel, then loosen the bolts securing the lower hot end throat.

Disassembly: the hot side (heat break, heat block and nozzle)

  1. Remove the thermal insulating casing.
  2. Unplug the wires.
  3. Use the H1.5 screwdriver to loosen the two set screws on the heat block.
  4. Pull the heating rod and the thermistor sensor out of the heat block.
  5. Use the H1.5 screwdriver to loosen the set screw on the heat sink, then pull out the heat break.
  6. Clamp the heat block with the 8″ wrench and heat the nozzle with a lighter to melt any filament inside. If you skip this, Snapmaker warns the nozzle may be damaged when you unscrew it.
  7. Keep the heat block clamped with the 8″ wrench and use the 4″ wrench to unscrew the nozzle counterclockwise.
  8. Keep the heat block clamped with the 8″ wrench and use the 4″ wrench to unscrew the heat break counterclockwise.

Disassembly: the cold side (heat sink)

Only go this far if the blockage is higher up.

  1. Use the H1.5 screwdriver to loosen the set screw shown in the official guide.
  2. Clamp with the 8″ wrench and use the 4″ wrench to unscrew the upper throat tube counterclockwise.

The official page has photos for every step, and it’s worth keeping it open on a tablet beside you as you work.

Clearing the blockage

Snapmaker’s guide just says to carefully clean away the blockage once the parts are apart. It doesn’t specify any cleaning tools or methods, so I’d be careful and avoid forcing anything through the delicate parts. If a part is worn or damaged, the blob guide says to contact Snapmaker Support for a replacement rather than refitting it.

Reassembly

Snapmaker doesn’t publish separate reassembly steps for this guide. Its other module guides simply say to reinstall each part following the disassembly steps, so work backwards. For the nozzle itself, the nozzle replacement page (dual extruder method) does give specifics:

  1. Refit the upper throat tube and tighten its set screw, if you removed it.
  2. Screw the heat break back into the heat block.
  3. Point the heat block upwards. Align the nozzle with the hole in the heating block and tighten it clockwise.
  4. Clamp the heat block with one adjustable wrench and the nozzle with the other, then tighten the nozzle again.
  5. Slide the heat break back into the heat sink and tighten its set screw with the H1.5 screwdriver.
  6. Insert the heating rod and thermistor into the heat block and tighten the two set screws.
  7. Plug the wires back in, refit the thermal insulating casing, and refit the silicone cover.
  8. Refit the hot end in the module, tighten the lower throat bolts, and replace the bottom cover and front door panel. Then power on.

Snapmaker doesn’t publish torque values. Its official nozzle replacement video is a useful visual reference.

Testing and calibration afterwards

Don’t skip this step. The quick start guide says that every time you replace the hot end, you should redo the XY Offset Calibration and Z Offset Calibration. After reassembling the module, you should also redo Leveling. Swipe left on the Home Screen and tap Calibration. If the calibration model won’t print, Snapmaker’s Calibration Model printing failed page walks you through what to check. Load filament and confirm it extrudes cleanly before you trust it with a real job.

Prevention tips

  • Snapmaker’s replacement kit includes an upgraded front cover with ventilation holes. Snapmaker says it improves cooling around the hot end and reduces clogs.
  • Make sure the first layer sticks. Snapmaker lists poor first-layer adhesion as a cause of filament build-up around the nozzle.
  • Check that the nozzle and heat break are snug, because Snapmaker notes that a loose fit causes leaks.
  • Keep the Artisan troubleshooting hub bookmarked.

The lesson is the same one I keep coming back to in troubleshooting in general. Follow the documented process, change one thing at a time and verify the result. A little patience with the hot end saves a lot of grief, and a lot of spare parts.

References (official Snapmaker sources)

Print head and included tool used to allow disassembly

X-Wing with Snapmaker U1

Screenshot 2026-01-24 100857

After getting my new Snapmaker U1 and printing my first item I was looking for another project to print and found this:

https://galacticarmory.net/collections/3d-files/products/x-wing-vehicle-kit-card-3d-print-files

a cool Star Wars X-Wing fighter. You can see the result above.

The model was great but when I pulled it into the Snapmaker Orca slicer it wasn’t set up with the right colours. This meant that my first attempt was all in white. Once I had worked out the colour mapping I ended up with the desired result but I am still not happy with the process and need to spend more time with the Snapmaker Orca slicer to understand how it work and to make remapping colours easier.

However, I am super happy with the result and am now looking for my next project.

I have my Snapmaker U1

blog

My new Snapmaker U1 recently arrived. This allows multi colour printing of up to 4 different colours at once. You can see the test figure i was able to make.

The printer is high quality and easy to assemble.

image

Device Calibration (1/3)

Homing Anomaly

Error Code: 0002-0528-0000-0011

Check if timing belts are tensioned properly, X

and Y axes move smoothly, and there are no

obstructions at the X and Y homing positions.

Retry after troubleshooting. If issue persists,

contact technical support.

I did get the above error when initially setting it up but the following help article:

https://wiki.snapmaker.com/en/snapmaker_u1/troubleshooting/U1_homing_failure

helped. I basically loosened the print head, moved it through its range or travels a few times, tightened teh screws back up a little less tightly and it all worked.

There are plenty of review out there on YouTube if you want to go and take a look but so far everything I have printed has worked flawlessly and I am very happy. Given that the printer has an open top, where an eventual cover that I have also bought, it is louder than I expected. The cover should solve the problem when it arrive but it is nothing I can’t deal with in the mean time.

So far so good then with the U1 and I’ll report back my progress as I grow mor familiar.

My stuff 2026

blog

Over on the CIAOPS Blog I do a number of annual posts on a range of items I use in my business. I thought therefore I should start doing one here. So here goes:

Snapmaker Artisan – My 3D printer of choice. I have had this for a few years and use it to create everything I need. Love the quality of the device as well as the results that I get. I can do laser cutting and CNC as well if you change the print head but for me, most of time is spent printing.

Snap Make U1 – After supporting this on Kickstarter earlier this year I have only just received my unit this week. I’ll be posting more about this printer once I have it all working. In essence, where it differs from the Snapmaker Artisan is that the U1 allows you to print four (4) different colours without having to change filament. Looking forward to what I can get from this.

Visual Studio code – my software development environment. Free from Microsoft. I use this to managed and develop all the code for my IoT projects.

PlatformIO – I use this extension in my coding environment to actually managed my IoT projects. It allows me to select the right controller board, manage the driver libraries as well as upload the code to the actual controller boards. A must. Many other use the Arduno IDE and even though PlatformIO does take a little to get used to, for me it is the way to go and allows to to develop and test things easily.

Github Copilot – starts with a free version but I’m using the Pro version for $10 per month and would recommend that as it just makes life so easy. Code is the real secret to getting IoT projects working and I am not a developer and my C programming is pretty rusty so the number of times AI has allowed to create what I want is amazing. It also deals with compile and syntax errors, missing driivers, commenting code and so much more. I’d still be battling away with the basics if I wasn’t using this and for free so should you!

Github – where I publish all my code and documentation for my projects. Hopefully what I create can help others as they have helped me. Also a great place to file projects for the time you need to go back and find out how do did something. Again, there is no cost to get started using GitHub.

Core Electronics – My primary source for components. Great range, easy purchasing and quick delivery. Highly recommended.

Little Bird Electronics – My backup source for components. Again, great range, easy purchasing and quick delivery. Highly recommended.

Acebott controllers – My current choice when it comes to controller boards and projects. Their stuff is the way I shoudl have started my IoT journey.

Keyestudio – Another great controller and kit seller I use regularly.

Amazon – Always a great source for anything I need, whether controller or sensor boards, tools, etc. Easy ordering and quick delivery. This is where I got my Robot Arm from.

That’s probably enough to give you an idea of the main things I use in the lab. Hopefully, it you can take a look at these if you have any interest and let me know if you have any questions on anything here.

The challenges of 3D printing

I’ve been working on a phone holder for a car that sits in a cup holder. The reason for this is that I don’t like things blocking my view when I’m driving. Thus, I want to ‘move’ the phone away from the windscreen and down towards the centre console.

Rather than completely re-inventing the wheel here, I decided to use a motorcycle mount from Quadlock to actually hold the phone. The other end needed to grip onto something like a tube.

The starting point for mounting the Quadlock was to create something that would sit in the cup holder and then attach to the Quadlock. Creating a solution to do that is easy enough, but the challenge comes when trying to print that.

Why? Because, basically you can’t print in thin air. You need each layer of the print to be supported but something underneath it. This means you have to think carefully about your design.

image

What I ended up doing was splitting the mount into two parts. The first part, as you see above, fits inside the cupholder in the car. That means basically using a cylinder design. However, to stop this rotating in car’s cupholder I added a key since the cupholder has a bridge to another holder nearby.

I then put a table top onto the cylinder to stop the structure tipping side to side and potentially jumping out of the holder in the car. This is where I had to start thinking about how I was going to print this because, in the long run, there would need to be a structure on the top of the table to connect to the Quadlock, but if I made it a single object to print I’d have trouble printing it as much of it wouldn’t have support during printing.

So, I broke the holder in two pieces, the insert with the table top (above), that I could flip and easily print and have everything supported and then an insert (below) to hold the Quadlock and slide inside the holder.

image

If I had tried to print these tow items as a combined object I would have struggled. But breaking them into two separate interlocking parts allows both to have full support when printed.

You will also notice that I added four key slots for the insert to prevent it from rotating when in the printed holder. The Quadlock then securely fastens to the cylinder at the top of the insert.

image

The end result looks like the above and works well. The tabletop of the holder also prevents the Quadlock from scratching the trim if it does move around when the car is travelling. It also takes some weight off the cylinder that mounts the Quadlock as well reducing the chance of it snapping when the car is in motion as the phone bounces around.

The key is that, not only do you need to design an object to solve your problem but you need to work out a way to print it using a 3D printer that can’t print on just thin air!

Robot with distance

As I detailed in a previous post:

Mecanum motion

I had my robot moving and taking commands from an Internet based dashboard. The missing piece was to get the distance sensor operational, which I have now achieved.

I firstly need to print a mount to allow the distance sensor to be mounted to the buggy frame. I have uploaded that to the CIAOPSLabs repo here:

https://github.com/directorcia/ciaopslabs/blob/main/3dprint/mounts/VL53L0X-distance.stl

image

With the VL53L0X sensor now mounted and connected to the processor the layout now looked like the above image.

Basically, the motor controller, distance sensor and LCD display all communicate with the ESP32-S2 processor via the SDA/SCL bus. They achieve this by all being on a different address.

It was also important to ensure that I connected up the wheel in a know sequence because to drive the mecanum motion I needed to turn different wheels to make it move in certain directions per:

I’ve uploaded the initial code with it all working here:

https://github.com/directorcia/ciaopslabs/blob/main/Projects/14/moveanddistance-v1.c

The commands on the keyboard are:

image

1 = Left forward 45

2 = Forward

3 = Right forward 45

4 = Left 90

5 = Stop/Start

6 = Right 90

7 = Left back 45

8 = Back

9 = Right back 45

* = Slower

0 = Spin on the spot

# = Faster

As the robot moves it displays the distance on the LCD display like so:

image

The robot starts with speed = 0 (i.e. stationery). You press 5 to set the speed to 100 but it will not yet move until you give it a direction. If you now press 2, the robot will move forward at a speed of 100. You can then happy go along changing directions via the keypad. If you press 5 again, the robot will stop moving.

With all this now working, the next update will be for the robot to use the distance sensor to determine how far away it is from object (at the front), slow and stop if necessary to avoid hitting these objects.

I want to also optimise the code to make it more responsive if I can and I’ll post the updates here and to the CIAOPSLabs repo when I get it all working.

Beyond that I’m still trying to decide what to get the robot to do? If you have any suggestions, let me know but I’m kind of thinking that the robot needs to have ‘vision’ next!

DFRobot 1602 LCD display mount

image

Part of recent Mecanum motion project required me to design and print a frame for the DFRobot 1602 LCD display as shown above. It is basically a right angle bracket that allows it to be mounted onto the frame.

I’ve uploaded the STL model to:

https://github.com/directorcia/ciaopslabs/blob/main/3dprint/mounts/DFRobot-1602-LCD-disp.stl

so you can grab a copy and print it out for yourself. If you don’t have access to a 3D printer then send me a donation via:

https://ko-fi.com/ciaops

to cover the postage at least and I’ll send you a print.