A sophisticated exercise in mechanical economy that translates complex inverse kinematics into a remarkably compact form. It elegantly proves that high-level engineering is defined by clever constraints rather than sheer scale.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
This Pocket Sized Robot Can Draw Any Image!Added:
Building a robot that can draw is harder than you might think. Well, it's harder if you don't follow the rules. Most drawing robots work basically the same way a 3D printer does. Two motors, two axes. One moves the pen left and right, and one moves it forward and back.
Simple, reliable, and wellroven. But what if the robot didn't work like this?
What if it used some kind of mechanism instead of belts and motors to move the pen around? Well, a few years ago, I had that exact question, and I tried solving it with my first revision of Penbot.
Instead of moving the pen directly, two motors drive a five bar linkage. That's a chain of arms that positions the pen anywhere in its workspace. The upside is that both the motors stay stationary, which means less moving mass and a more compact design in theory. The downside is that the math gets a lot weirder. So, let's go back and take a look at how I even figured out this original version.
The original goal was a little unusual.
I wanted to sign my senior yearbook with a robot. I figured it was the perfect sendoff for all the crazy stuff I was doing in high school. And so I got in touch with some smarter people to figure out how I could actually calculate this linkage and turn it into a robot. One of those smart people happened to be my friend Wandian. The moment this guy learned about the project, he wanted to help and saw it as a challenge. So he figured out how to calculate the coordinate system in Desmos. Built an entire simulator and then overnight learned C++ to code it into Arduino code. Both Wian and my dad were crucial for this step. And surprisingly, we actually finished before graduation, but after the project fulfilled its initial goal, it ended up doing a lot more.
So, this is the Penbot drawing system.
It'll convert your face into a vector.
Um, it'll automatically put the text next to it. Then, you click enter again to convert it to robot code. Our machine operator will press S to confirm it's ready for drawing.
at OpenSauce last year. It drew portraits of over 50 people and it worked semi-reliably for such a prototype and experimental linkage and software system. I was shocked. And I say it worked with a heavy grain of salt because when Code Mo tried it, it literally crashed right in front of her.
>> There you go. Oh, you crashed the program.
>> Along with scope creep and how big the original robot was, there was a lot of room for improvement. So, naturally, I had to keep working on it.
This is Penbot Mini. It's the same kind of idea using a linkage to drive the pen, but it's slightly different. The idea was to compact this tech all the way down to a credit card footprint. I wanted to see how small the whole thing could actually go without completely falling apart. So, here's what actually changed. The larger PenBBot used Ender 3 components from a 3D printer, so stepper motors and printed parts and aluminum extrusion. It also used a Raspberry Pi as the processor. Look, the original Penbot was the size of a toaster, and I don't even know how much it weighed.
Maybe 5 lb. But you're probably noticing a bigger difference. The print quality on the Penbot Mini is incredible. And that's because this video is sponsored by Eligu. They sent me the Centuri Carbon 2 to use on this project, and honestly, the timing worked out super well because this little robot lives or dies by the precision of its printed parts. The linkage arms on the Mini are small enough that any slop in the print translates directly into slop where the pen ends up. So, the print quality actually really matters here. The Centuri Carbon 2 is an enclosed Corxy printer, which means it's faster and more dimensionally accurate than a bedslinger style. The enclosed chamber means that keeping temperature consistent is easy, which makes a real difference with anything with tight tolerances. It also features fourcolor printing through their canvas system, which I ended up using for this project to add really cool multiolor details that let me have an awesome color scheme for PenBBOT and a bunch of my other projects. One of my favorite features is that it runs at just 45 dB, which in my workspace is basically silent. I genuinely forgot it was running a few times. And I thought it would be funny if I asked Eligu to send me some super fancy engineering filaments, and they actually did. So, some of the parts here on Penbot Mini are printed from highquality engineering grade materials that you can get from Elgu. If you want to check it out, make sure to click my affiliate link in the description. And let's get back to the video. The mechanical side of things was the first challenge. At this scale, the five bar linkage leaves almost no room for slop.
Any looseness in any joint, flex in any arm, or the pen position, and it just drifts away from the right coordinates.
On the Big Robot, you can tune a lot of that out in software. On this one, every millimeter of imprecision matters. The motors are these tiny, precise servo motors from Pettoy. They're precise enough to get the job done and have more than enough power. And they're directly linked to the linkage using servo horns.
The linkage itself has miniature bearings in it so that it can move smoothly. And the body of the robot is designed to fit all of the components snugly. In the CAD file, I have replica models of all of the electronics that I'm using for the project. Generally, I always try to source accurate CAD models to use as reference in my designs when I'm creating robotics projects. I usually source these from GrabCAD, which has a large database of user contributed CAD files for tons of components. If I can't find the designs for the parts I'm using there, I'll usually check the data sheets. With most components, like components that are available on Waveshare, the 3D models are available publicly under their open- source licenses. And using these scale accurate models, I can base my entire design. For this one, I took the dimensions of a credit card and then used that as my footprint. Then I place the components all around and I built the base around them. We've got those two fancy motors at the front, but there's also a cheaper MG90S at the back that's running the up and down movement. This is important for drawings that use multiple lines. On the back is a switch, which I might end up switching out for a button that starts the drawing. And then obviously the USB port, which is just the port of the ESP32 dev board. The specific ESP32 I'm using for this project is the Shiao ESP32C6.
It's a very tiny but capable ESP board that has just enough processing power to interpret commands. Once I have everything designed, I start printing prototype after prototype until I have the fitment right and everything looks good. Then everything snaps together and I use magnets to close the lid on top.
It's not battery powered or anything, but it's not too complicated to just plug it into a device. And that's how you control it. Anyway, speaking of interpreting commands, let's take a look at how I wrote the software for this specific robot. I started with the math.
Mechanically, the robot uses what's called a five bar linkage system. Moving the pen in a straight line isn't as simple as just telling the motor to turn forwards or backwards. To draw anything, the brain uses inverse kinematics. And because the pen tip actually extends 3/4 of an inch past the pivot points, the math gets a little tricky. The code actually runs an iterative solver, refining the position up to five times per coordinate. This lets it figure out the exact angles required for the left and right servo motors to hit the exact specific X and Y target. Once those coordinates are mapped, the firmware takes over. This is written in C++ and runs on the ESP microcontroller inside.
It doesn't just violently snap the motors to their targets. Instead, it uses a 200 command drawing Q. And this Q buffers incoming coordinates and executes them within a 30 millisecond rate limit. This tiny delay is a lifesaver, and it completely prevents the pen from tearing up the paper or glitching out. The firmware also pushes the servos beyond their standard limits and gives them a much wider, more precise range of motion. Finally, feeding the whole system is a custom Python desktop app that talks over the hardware USB serial connection. In my previous robots, I've used Wi-Fi connections, but that proved too slow for this application. And since I wanted real-time control of PenBBot Mini, I went ahead and used USB serial. In this app, you can freeraw or type out words with a custom singlestroke font. But it doesn't actually send your raw messy mouse movements directly to the robot.
The Python script actually resamples your lines into perfectly spaced chunks.
You can even hit test to see a ghost simulation that verifies the arms won't crash into each other or twist out of bounds. So, when you draw a simple smiley face, you're actually triggering a massive chain of curve resampling, iterative kinematics, and high-speed servo cues just to put ink on the paper.
The only way I had any idea to do any of that was because I had already kind of built a similar system for the larger penbot, but it was a little bit different with the serial communication and various other factors. So, does all this software work? Well, kind of. The thing is, the precision of these servo motors is within about a half a degree.
But when you're working at a smaller scale, a half a degree means a lot. It adds up when you're using a linkage.
That means the results aren't exactly perfect.
I look so bad.
Hold on. Hold on a second.
>> The reference pl.
>> All right, I'll admit it's not smooth and it's not particularly good at drawing, but neither am I. And quite frankly, for a robot the size of a credit card, it's pretty good. So, sitting next to the original, the Mini is obviously a little more limited, and it's not drawing portraits at a convention, but the original Penbot went through five major revisions before it could do that. This is still version one. And the thing about shrinking a robot is that you're not just scaling down the parts, you're scaling up every tolerance problem, every calibration headache, and every bit of slop in the system. There's just nowhere to hide.
So, it doesn't necessarily work perfectly, but it's still pretty cool.
I've got a couple ideas on how I can make this project even better. and expand it so that it can really draw some interesting images, maybe even sign pieces of paper. Something like a reduction or gear ratio is kind of what I used on the original large penot. And I think that could apply pretty well here as long as I can stick within the space constraints. So yeah, the plan from here is to tighten up the calibration, maybe revisit the linkage geometry, and whatever happens, I'll keep building. If you like this project and want to see more, go ahead and subscribe. I'm doing cool stuff like this all the time. This entire project is public on my GitHub repository if you want to download it and try it out or maybe even improve the project and make it better. Huge shout out to Aligu for sponsoring this video. I really appreciate their support and without them I wouldn't have been able to print such amazing parts. Comment down below if you enjoyed and I'll see you in the next one.
Hey, hey,
Related Videos
Beyond Robotics | European Rover Challenge 2026
beyondrobotics
189 views•2026-06-01
Beatbot Sora70: JetPulse Technology and AI obstacle avoidance and navigation!
DroidModderX
26K views•2026-06-02
Tesla FSD 14.3.3 Hits Phoenix Streets - FIRST LOOK
anthonystesla
114 views•2026-05-29
Elon Musk Just Revealed Fremont Line for Optimus Gen 3 Mass Production
TheAINexusOfficial
180 views•2026-05-30
人機一体「零式人機 ver.2」 子ども企画【おもしろ発見!モビリティー】 #乗り物 #automobile #robot #shorts
KyodoNews
1K views•2026-05-28
China’s New Luna AI Robot Looks Shockingly Human...
NextGenHumanoids
850 views•2026-05-28
Reachy Mini: the $300 open source robot you can actually hack — Andres Marafioti, Hugging Face
aiDotEngineer
662 views•2026-05-29
柔軟指×AI画像処理食品の仕分け作業システム!#柔軟指 #ロボット #自動化 #製造業をもっと盛り上げたい
KiQ_Robotics_Corp.
113 views•2026-05-28











