13 Mar

Pycupi v-plotter control software

MakeBmth held its regular monthly meeting at Eagle Labs Bournemouth on Thursday 10th March 2016. We plan to meet there once a month (the second regular monthly meeting will be held at the Uni or under the new Hilton Hotel – check the meetup group or forum for details).


We spent the evening learning about Brians Python port/rewrite of Gocupi, called Pycupi.

Pycupi (and Gocupi) is a cut down firmware that implements a command queue, stepper motor and servo control functions. Along with a control application written in Python (or ‘Go’ in Gocupis case). The who thing is meant to be run on a Raspberry Pi (though you could in theory run it on any computer).


Pycupi does the image processing on the Raspberry Pi and can (currently) generate simulations (jpeg images) of the expected output or it can plot that using a suitable stepper controller. The firmware in the Pycupi github repository is currently configured to work with my Eggbot/Polargraph electronics.


We learned about the multiple co-ordinate systems that are working together to produce a drawing.

Native: The co-ordinate system that works in motor steps.

System: The co-ordinate system that Pycupi maps to the native co-ordinates.

Image: The drawing co-ordinates which defines the drawing area.

We looked at how the native co-ordinates are not Polar (Angle and distance) but is a position triangulated based on the length of the two motor strings or chains. To calculate the position we need to know the machine width and how many mm of string or chain each step of the motor represents and finally a we need a reference or starting point (home).


A bit of trigonometry gives us the lengths of the strings/chains for a given position.


We looked at the different renderers currently avilalbe in Pycupi.

Spiral Arc: Renders an image using tiny spirals of varying size & density and the whole thing plots in on an Arc path from a corner (Defaults to top left (NW)).

renderSpiralArc(filename, x, y, image_width, pixel_size, drawing_object)

  • filename = the image to render (jpg/png/bmp)
  • x = the horizontal position of the top left of the image (bottom left if rotated)
  • y = the vertical position of the top left of the image (bottom left if rotated)
  • image_width = how many pixels wide the render should be
  • pixel_size = how big (in pixels) the spiral elements will be (bigger = less detail)
  • drawing_object = the python object you created to represent the machine

Norwegian Spiral: Renders an image using amplitude modulation along a spiral path from the centre of the image.

renderNorwegianSpiral(filename, x, y,image_width, density, maximum_density,pixel_size, drawing_object)

  • filename = the image to render (jpg/png/bmp)
  • x = the horizontal position of the top left of the image (bottom left if rotated)
  • y = the vertical position of the top left of the image (bottom left if rotated)
  • image_width = how many pixels wide the render should be
  • density = how densely packed the pixels will be
  • maximum_density = pixels will never be more densely packed than this (Need clarification on how these relate)
  • pixel_size = how big (in pixels) the spiral elements will be (bigger = less detail)
  • drawing_object = the python object you created to represent the machine

SVG: Draws vector images. Currently implements paths but not stroke or fill. Will cope with most elements of the SVG specification so it will happily draw curved paths.

renderSVG(filename, x, y, image_width, p)

  • filename = the vector image to render (svg)
  • x = the horizontal position of the top left of the image (bottom left if rotated)
  • y = the vertical position of the top left of the image (bottom left if rotated)
  • image_width = how many pixels wide the render should be
  • drawing_object = the python object you created to represent the machine


A Kandinsky part way through rendering with multiple colour separations.


The machine on the left is running Pycupi and has an example vector plot bottom right. The vector on the machine on the right was plotted with the Polargraph.co.uk software.


19 Mar

New control electronics for Pycupi

Here are two new PCBs for controlling a v-plotter. These were designed with Pycupi in mind but should be adaptable for other drawing machines.

The first is an add-on board for a Raspberry Pi 2 or 3.


The second is a kinda mini motherboard for a Pi Zero (the Pi Zero plugs into this board).


Both boards are currently untested and will require additional software modifications to work (either modifying the Linux install to free up the serial port or to enable comms over I2C).

A caveat with the Pi Zero board… we haven’t yet run Pycupi on a Pi Zero. It should work, but it might be slow rendering jpg representations of plots.

Both boards also supply power to their respective Raspberry Pis via the 12v DC connector using a DC to DC converter module.

Also the Arduinos on these boards are 3.3v and run at 8MHz so there may be timing issues to address.

I’ve included a ‘Master’ power switch that kills power to the Pi/Steppers and Arduino. I’ve also included a single push button that doesn’t have any specific purpose yet other than it might be useful as a shutdown button for the Pi. Or it could potentially be used as a pause button to pause a drawing.

Before getting PCBs made, I need to wait for samples of the additional components, print off a paper copy of the PCB and test for fit. If everything looks good i’ll get some sample boards manufactured and post an update.

20 Dec

Lazy Christmas lights

While digging out the Christmas decos I found the WS2811 addressable RGB LED Xmas lights from an old workshop.


They were missing the Arduino that was controlling them (probably been pinched for another project) so I decided to hook them up to an Arduino Pro Mini that I could leave permanently attached. I uploaded the FastLED librarys DemoReel100 example and strung the lights up in the porch.


All nice and xmasy – except I now have to remember to turn the lights on and off… I figured I could get the Arduino to do that for me. Sure I could plug the whole thing into a mains timer but where’s the fun in that. I had a few DS3231 I2C real time clock modules that I have been meaning to play with so this seemed like a reasonable excuse for a quick and dirty project. It also gave me an excuse to try interrupts on the Arduino as the DS3231 has two settable alarms that generate an ‘interrupt’ signal.


After testing the RTC and interrupts on their own to prove it worked (using JChristensens DS3232RTC library) , I was able to connect the DS3231 to pins A4 & A5 on the Pro Mini (These analogue pins double up as the I2C bus on this board) and the interrupt output from the DS3231 to pin 3 on the Pro Mini (the Pro Mini supports hardware interrupts on pins 2 & 3) and hacking together the fastLED demo code with the RTC demo code with some horrible glue code (its so bad I’m not going to include to here) I had a working set of Xmas lights that turn themselves on and off at predefined times, plus the Arduino now knows the time even after a power off.


28 Nov

Minions Operation – Finished!

The Minions Operation with Minions audio samples is finally finished. Finishing a project completely (like making enclosures and making sure things are nicely finished) is really time consuming. Still, its done now and in time for Christmas. Hopefully the Nieces and Nephews will find it amusing because I have endured hours of Minions samples doing this…

So i’ve gone from this:


To this:


With the electronics tucked neatly away in the 3d printed orange box.

And from the other side:


Lid off, electronics exposed. Holes drilled for speaker which was glued in place with epoxy.


Electronics up close:


I’ve replaced the original light bulb with an LED (fore ground), the motor with a mobile phone buzzer motor (the little metal disk with the black top, middle left), a prototyping board with the Arduino Pro clone (middle) and WT588D audio board (top) and some resistors, a transistor, diode and cap.

Originally I had intended to use the buzzer motor that came with the game. It all worked perfectly when running from a power supply but as soon as I tried to run it all from 3 x AA batteries, the Arduino would reset as soon as the motor was triggered.

Testing the electronics worked (little green speaker was too quiet and was replaced with 0.5w 8ohm speaker):


I added the capacitor to try and smooth out the current, but it wasn’t enough. I tried reducing the current through the transistor by increasing the resistance of the resistors feeding the transistor base, but that didn’t work until the resistance was enough to stop the motor powering up. In the end I swapped the original buzzer for a tiny version from a mobile phone (these can be found for less than a quid on ebay) and that worked happily from battery power.

More recently I have had problems with the WT588D not working after power on. It takes a few power-off/power-on attempts before it will start playing samples. The Arduino is working because the buzzer and the LED work. I plan to add a power on delay and then play a sample to confirm it is working. It should be possible to have the Arduino detect if a sample is playing by reading the ‘busy’ signal from the WT588D and resetting it if not detected during a startup routine.

Code is available from github

04 Sep

Kossel – some months in

I think a holiday was what I needed to get my head in the right place for this stupid printer!


Turns out the current Marlin forks have removed the probe feature, as its being reworked. I figured this out in the longest way possible – after around two days of calibrating my z offsets with software. I go to probe, nothing happens. I re compile my old firmware, i get the probe, but no soft end stops. Two weeks later, I just accept that, and use my screws as end stop offsets, and I have the probe back.

Other mods have been a new fan bracket thing for the hot end – it kept colliding into the X and Y towers – now they’re at an offset and fits well – what it hits now though, is the probe pillar, the little thing that puts the probe away after it completes its 22 point calibration!

Maybe I should go to FSRs, but that would mean that I have to undo / redo a lot of work – not happening anytime soon!

The fans are too good though, and my stupid heater cannot manage to keep temps. it got to around 180 despite the target being 210. I reached for my e – z fuse tape, and applied it – now its lovely and insulated, looks pretty decent also.


I’m running new filament, after printing a new spool holder, the thing can be left, I’ve gone shopping to return home to completed prints, its a good feeling! The filament looks good, I have printed around a third of the spool so far, and its been trouble free.




I did have some prints go bad, what looks like the z axis got some skipped steps (on a delta that looks like steps skipped in x / y), not sure why, I did some oiling, and then decided its due to the belts being a bit too tight. When the effector was dancing around doing small infills, it would be quite graunchy, so I slackened off the belts a little and that appears to make it nice and smooth. I ran some prints very slowly last night and the loudest thing was the fan on the hot end – its a very quiet machine.

I also got around to printing and installing the LCD cover – which makes things nice and tidy – it isn’t the nicest of models though…


I also had a go at using meshmixer to generate some rather intelligent support structures – unfortunately it fall off mid way through the structure – but due to the wonders of reprap, it somehow fixed itself when it counted!WP_20150831_17_13_42_Pro WP_20150831_17_38_46_Pro

I doubt i’ll get time for many more mods to be honest, but the list is still there


I know Mark uses this model on his i3 so thought i’d do the same.


IMG_3047 IMG_3048

Some more Grasshopper generate forms  – using the same two profile rails, I was able to modify the amount of divisions of the curve, then draw an arc between the two curves along the sub division. Data MAtching Arc with loft



These guys were printed flat, at 0.2mm and 0.3mm

IMG_3050  IMG_3049

I then re oriented them vertically – spiral vase mode. 0.2mm approx 10mm/s!

IMG_3067 IMG_3069 IMG_3070

Grasshopper vase, worked really well – apart from the undersides of the wibbly bits. I think I will re print, but at a much slower speed – you can see the errors just building up from a previous blip.



12 Oct

Delta Vases


One of the finished models.

Approx. 3.5 hrs each – running on spiral vase mode, at around 15mm/s in Cura.


Close up of the print in action.


Each scaled to ‘fit max’ in Cura, so its capped at height in this case, so each vase has the same height.


Finished, with MM to spare!


First go with LayBrick – no calibration or anything, so rather pleased with the outcome. Some strings, and odd bits, but maybe room for improvement down the line.


A closer, in process shot. The material shows a few blemishes, but overall smooths out the layers really well!

30 Sep

Polargraph @ The Old School House

On the 24th Sept 2015, we met for the first time at the Old School House in Boscombe. I brought along my Polargraph and did a short ‘Show and tell’ on connecting and setting up the software and hardware, image calibration and the various plotting options (at least that’s how it went in my head, I was probably rambling and jumping from topic to topic without explaining anything properly 🙂


We plotted Donald Duck and some vector shapes on the night.

IMG_20150924_205727IMG_20150924_210107  IMG_20150924_205908IMG_20150924_205811

Some of my previous Polargraph plots hastily hung around the room.

IMG_20150924_210027 IMG_20150924_205946 IMG_20150924_205926   IMG_20150924_205753

20 Sep

Measure twice, cut once!

ahhhh…the power of hindsight!

I could have hidden this and pretended that my next job was my first. But no. The job was to cut a pocket into one side of the ply, and then a profile cut, to cut the shape from the stock. This was going to be a wireless charging dock (thanks Mark!).

I had to cut it fine to get the power to pass through the stock, it will lose voltage / amps or whatever as it passes through the material, so keeping it thing was important.


The less; Don’t use a crap ruler, then assume what your looking at is 18mm as that’s what it said on the listing! A tolerance of +/- 0.5mm is enough to ruin your project, and render your stock useless!

I have since re-measured, and it is 17.5mm in thickness. So that, along with something I must have done wrong with the setup (ahem!) I managed to cut through this block.



I’ve had tools fly out of collets before, and certainly had endmills snap and fly across the room before (well it would have, had it not been for the cages around the machine).  So looking at this crap thing, I thought a make shift guard was in order, queue a useful box lid and clamp.


OMG its doing it! I ran the job cutting at 1mm passes, a combination of reasonable depth without putting to much strain on the machine / our ears having to listen to it for a few hours as the thing cuts out!


Another shot of the process, running the pocket . The feed rate has been a bit of a chore – I think I set the firmware to go as fast as 1500mm/s, which is pretty decent! but the web has said it tops out and binds at around 400mm/s, 400mm/s is very slow. I’m sure I have seen vids on youtube of it running faster.


Lots of dust. I wont be running this machine frequently! I think I have to create a cage to go over it, but that will take up more desk space, which I don’t have! I look forward to a nice workshop or something for it to go in. The air was rather smelly, I liked it, but the woman was moaning – a lot! I filled the vacuum twice!


The money shot

It has completed the profile and now  is the time I see the nice scar in the pocket! Nooo!



Maybe I can convince the other half to let me have another go at running the same job in the house, again.

I have to figure out how to set the endstops and home settings. Its pretty straight forward without the endstops but it would allow me to set a basic start position for most jobs, and in the future to let me cut on both sides of the stock. I also need to get the thing cutting faster, it took around 2.5 hrs to cut this job, I’m confident I could cut this in 1, that being said, it would be rather loud – and also requiring more, or any, extraction!

I also need a slot cutting for a cable to come out the side…

18 Sep

Polargraph Los Dios Muertos

All the cool kids dig the Mexican Day of the Dead festival make up these days… and what with Halloween just around the corner this seemed apt.


If I remember rightly, this was plotted with grid size 12, sample size 18, pixel scaling @ 1 and the usual 0.35mm pen tip for a 0.4mm Stabilo Point 88. This took over 24hrs!

The original image can be found here