Drawing from Inskcape using Bluetooth connection

Some time ago I developed 4xiDraw, a 2D drawing machine using a single belt, a 3D printable clone of AxiDraw(tm) pen plotter. Instead of the EBB board they used, I opted for an Arduino-based solution, with a CNC shield and regular Pololu-like stepper motor drivers.

Initially, I started using various Inkscape plug-ins that will convert the drawing into a G-code file. Once the G-code was created, I would use the UniversalGcodeSender program to stream it to the drawing machine. That worked ok, both wired and wirelessly (using Bluetooth).

But later, a kind user named Torsten Martinsen migrated the existing AxiDraw plug-in to the 4xiDraw hardware controller. This way, plotting happened right inside Inkscape program without the need to messing with external files or other additional software. Very cool indeed!

I left the project living its own life, with a lot of users creating their own version of it and doing all kinds of interesting hacks, till I received an awkward request from a fellow artist: He wanted to make a larger version to be placed vertically on a wall. That was not my original plan and I warned him against the idea but we did it anyway and it worked!

However, the idea of making a larger version never left me as it was a common request from users online. But the problem was one of balance. The contraption is basically a cross were one of the beams can move in two axes. Once the beam is fully extended into one side, it creates some torque that tries to tilt the whole thing. If the arm is made larger, then the base cannot hold it anymore and it will yield (causing a failed plot).

But when we needed to do another exhibit with our larger version of 4xiDraw hanging from a wall I did some effort to create a more balanced contraption that would work better. So I did and I shared it on Thingiverse too. And I was so pleased with the result that I thought it could be a good platform to work horizontally too, so I built a test machine for A3 paper size.


And it turns out it seems to work as well if not better than the previous version. But willing to have more freedom to place it around, I wanted it to work wirelessly. But there was a problem, the plug-in expects a given message every time it connects to the plotter. When using USB that works no problem, but when using Bluetooth that did not happen so it was a no go.

Fixing it was not a big deal, but I hardcoded the identifier of my Bluetooth to serial adapter (an HC-06 board) on the code. That works for me but it might need to be changed for other adapters. The code is available here.


Comments

Popular posts from this blog

VFD control with Arduino using RS485 link

How to get sinusoidal s-curve for a stepper motor

Importing OpenSCAD designs into Onshape