CNC Plotter
By Rob Zwetsloot. Posted
One of the reasons we highlight cool projects is because we hope they inspire others. Stratos Botsaris is one of those people that got inspired.
“I had seen people on the internet creating and using CNC plotters and always wondered how these machines work,” he explains. “I was mainly interested in way the CNC machine translates the G-code instructions into movement that drives the stepper motors. I wanted to find out the internal workings of this.”
Advertisement
Christmas is coming – keep Santa on the right track with our Raspberry Pi gift guide!
That’s just what he did, creating his own CNC plotter in the process. “It is controlled by Raspberry Pi and can draw an image on a surface the size of a piece of A4 paper,” he tells us. “I have designed and built both the hardware and the software myself. I have assembled its hardware by using recycled parts from an old scanner and a printer.”
He also wrote the Python software which runs on Raspberry Pi. “It is an interpreter which reads and executes the G-code from a text file and drives the stepper motors.”
Switching to Raspberry Pi
According to Stratos, a lot of the projects he’d seen were made with Arduino, so he decided to see if it was possible with Raspberry Pi.

“I started experimenting with one stepper motor with a Raspberry Pi,” he says. “Fortunately, I was lucky enough to have salvaged one stepper motor from an old printer and another one from an old scanner. In the beginning I had to find out how stepper motors work and how to connect one to Raspberry Pi. Then I tried to drive the stepper motor by writing a small program in Python and run it on Raspberry Pi. Once I managed to make this work, I got very excited and this gave me the push to continue with controlling two stepper motors at the same time. This was the most tricky part because I had to find a way to move the two stepper motors in parallel if I ever wanted the CNC plotter to draw a diagonal line. I had been trying several algorithms in Python for a long time, but eventually the simplest one worked how I wanted.”
Recycling to work
The end result is a little robot that can draw – exactly as planned. You can see it in action on YouTube.

We’re big fans of recycling and upcycling for projects here, and recycling was always part of Stratos’s plan. “I wanted to minimise the cost of the project as much as possible in order to find out how cheap it can be,” he says. “That is the reason that I reused parts from an old scanner and a printer for the hardware part. Also, I used L293D chips instead of the [more expensive] L298D motor driver board, so the only cost was actually a Raspberry Pi and its accessories, which I owned anyway.
“Moreover, I implemented the software program myself because I wanted to find out the internal working of a CNC plotter. “So I would say the only thing that it cost me mainly was my time, which I enjoyed spending while doing this project!”
Rob is amazing. He’s also the Features Editor of Raspberry Pi Official Magazine, a hobbyist maker, cosplayer, comic book writer, and extremely modest.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Christmas Gift Guide in Raspberry Pi Official Magazine 160
There’s a ton of great stuff in issue 160, including the incredible motion scanner, inspired by the film Aliens. It’s beautiful, it uses Raspberry Pi technology and makes a satisfying ping sound, and the best thing about it is that it actually works, thanks to a DreamHAT+ radar board. Yes, you too can join the […]
Read more →
Win a Raspberry Pi 500+ and Raspberry Pi Monitor!
Fancy getting the most powerful Raspberry Pi desktop setup? Raspberry Pi 500+ and Raspberry Pi monitor pair perfectly together for a portable – and fixed – desktop computer, powered by Raspberry Pi. We have a set to give away, and you can enter below. A Raspberry Pi 500+ & Raspberry Pi Monitor
Read more →
All right all right!! Artificial Intelligence, Hollywood style
When we get AI right, odds on it’ll be thanks to small firms, motivated individuals, and Raspberry Pi
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.