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).

IMG_7035

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).

IMG_7028

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.

IMG_7034

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).

coordinates

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

IMG_7037

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

IMG_7032

A Kandinsky part way through rendering with multiple colour separations.

IMG_7029

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.

 

29 Feb

Polargraphs

MakeBmth has manged to get 3 Polargraphs working! (Technically 2 v-plotters running the Polargraph.co.uk software and 1 running a Gocupi/Python mashup)

IMG_20160225_210934

The one on the left is running the Gocupi firmware and is being run with Pycupi a Python port/rewrite of the Gocupi ‘Go‘ control software.

The other two are running the Polargraph.co.uk  a1_server firmware variant modified to run on our electronics.

The one in the middle is running with Pylargraph which is a Python script to control the original firmware with the intention of plotting or graphing the result of a regular twitter search.

The other is running with the Polargraph.co.uk control software.

The various 3d printed parts are our own designs or modified versions of existing designs.

My own designs are available on github and thingiverse but not everything is finished.

20 Dec

Lazy Christmas lights

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

IMG_20151220_171150

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.

IMG_20151220_153555

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.

IMG_20151220_153751IMG_20151220_153833

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.

IMG_20151220_154038

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:

IMG_20151021_194450

To this:

IMG_20151115_193011

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

And from the other side:

IMG_20151115_192359

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

IMG_20151115_191527

Electronics up close:

IMG_20151117_213401

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):

IMG_20151104_212741

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

12 Oct

Delta Vases

WP_20151004_23_39_57_Pro

One of the finished models.

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

WP_20151004_20_11_46_Pro

Close up of the print in action.

WP_20151004_19_38_03_Pro

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

WP_20151004_23_40_26_Pro

Finished, with MM to spare!

WP_20151005_19_13_08_Pro

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.

WP_20151005_18_00_08_Pro

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 🙂

IMG_20150924_210054

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.

WP_20150920_19_41_19_Pro

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.

 

WP_20150920_15_47_05_Pro

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.

WP_20150920_15_47_11_Pro

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!

WP_20150920_15_47_17_Pro

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.

WP_20150920_17_06_51_Pro

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!

WP_20150920_18_11_14_Pro

The money shot

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

WP_20150920_19_40_00_Pro

 

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.

IMG_20150917_132445

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

15 Sep

Polargraph Einstein

The latest plot from the Polargraph. Tweaked the pixel scaling here (0.98), but I think it is slightly too much for the chosen grid size as there are gaps between some of the pixels. This was grid size 16, sample size 18 and pen tip size 0.35 on the usual 0.4mm Stabilo.IMG_20150914_212112

Try looking at the picture from a distance or squinting and see how much detail your brain adds to the image!

 

09 Sep

Polargraph prints

Some more recent prints from the Polargraph. This is still running with the original PCB. I haven’t yet updated the software to account for the pin out changes on v2.1.

IMG_20150905_121604

I’ve seen the Bruce Lee picture plotted on other Polargraphs and it comes out really well, so wanted to see how it compares when plotted on my Polargraph. This was plotted with grid size @ 18 and sample area @ 20 with a Stabilo Point 88 Fineliner 0.4mm with pen tip size set to 0.35mm in software.

IMG_20150905_121536

Sir Terry Pratchett plotted from a colour photo with grid size @ 12, sample area @ 18 and the same pen and pen tip size as above.

The new gondola design seems to be working really well now.

IMG_20150905_124106

New Gondola design plotting Albert Einstein.

IMG_20150905_124128

All three points of force are acting (more or less) around the centre of the pen. Two of the arms require support when printed and were rough when they came of the printer and even after cleaning up they would get stuck from time to time which cause glitches in the plot. The parts were assembled and spun on a drill and manually manipulated for a while and with the addition of some silicone grease they seem to work well now.

The removable pen holder thread dimensions are still wrong. I need to get my 3d printer running again so I can test any changes I make. In the mean time I turned the pen holder down on a lathe and it is currently a press fit, which seems to work really well. I’m tempted to get rid of the thread and redesign both parts to be press fit. That would make them quicker and easier to print.

This design also uses a lot less plastic than my previous version and also allows visibility of the pen tip so you can see exactly what is being plotted. Previously I had to wait a while for the gondola to move on to see if the pen was plotting correctly.

One additional part I need to design is the pen depth setting tool. The idea of the removable pen holder was that I could load it into a jig, drop in a pen which would then correctly set the depth of the pen in the pen holder. Tighten the screw and fit to gondola! That would allow me to do quick pen changes which would be handy if I ever get round to trying plots with multiple colours.