Controller update for countries that use commas as decimal points.

I’ve just committed a couple of very minor code changes to the controller in response to a query on the forum. Turns out I misunderstood how Java’s DecimalFormat class worked, and allowing the locale of the user to change how decimal numbers were formatted for transmission to the board. So the number (for instance) 0.25 was being formatted as 0,25 with a comma. And since I’m using commas to separate parameters, this made it look like 0 and 25 are two separate parameters.

And that made things behave oddly, and anything that has a decimal point in the parameters didn’t work properly.

So, updated code here: http://code.google.com/p/polargraph/source/browse/controller/trunk/polargraphcontroller.pde?spec=svn116&r=116.

Not urgent unless you’re having a problem, but anyone in much of Europe who might have been having problems with certain commands, should get this.

Changed pixel drawing direction algorithm again

Hello, when testing these most recent machines, I decided I really didn’t like the new drawing direction algorithm.  Because when you’re drawing left to right, and then get to the end of the row, and jump to the next one, it tends to draw the first pixel in the new row in the same direction as the previous row.  And I don’t like that. 

So I’ve reinstated the C08 command, that is “change draw direction”, except now it has two parameters, the first is direction mode, which can be 1 (AUTO – where it will choose the direction itself, based on the pen’s current location), 2 (PRESET – where it’ll just draw in the direction you’ve set in the second parameter until you tell it otherwise) or 3 (RANDOM – guess).

The second parameter only really makes sense for the PRESET mode, and it’s the actual direction to draw in, values are 1 to 4, NE, SE, SW, NW.

This looks like a bit of a retrograde step, but in fact it’s only partly that.  It’s an acceptance that unless I load a whole row at a time, or otherwise implement a pixel look-ahead, the machine can’t properly figure out the best direction to draw in, at least not if it takes into account the pixels that are already drawn.  It needs a memory for that, and it’s not getting one til next year.

The good part of this is that the machine’s ability to draw in all four directions is preserved.  It’s up to the controller to tell it what to do.

Controller source code

Embedded source code

Waiting for sprockets, but still moving

Hi everyone, just wanted to apologise for this pause in shipping machines – I had a bit of a miscalculation about how many sprockets I had in stock, so I’m currently waiting for a big batch of new ones.  Orders that were placed on or later than the 2nd of November will be delayed until at least the extra sprockets arrive (hopefully next week).  Outstanding orders for before then will go out this weekend.

I’ve been unexpectedly busy recently too, so that’s my other excuse for my general slowness.  Sorry about that everyone.  You will have your machines for Christmas though.

Multi-directional pixel drawing and configurable sprocket sizes

I have a couple of minor updates to the controller and the embedded code, but there are a couple of things to be aware of if you’re updating.

Thing 1:
This might be a gotcha if you’re updating your embedded code.  The value for mmPerRev (essentially the amount of string that gets extended in one revolution of the sprocket) has previously been hard-coded. That is, the arduinos you all got from me already had a program installed that said the mmPerRev was 84, and it couldn’t be changed without reloading the firmware.
That value can now be modified from the controller, using the properties file key
machine.motors.mmPerRev=84.0
and restarting and clicking “upload machine spec” on F3-Details page.
The rub is that for those of you who ordered the machine from me, this value should be explicitly set to 84.0 if it isn’t already.  The default value is actually 95mm because that’s the mmPerRev on my main home one here.  The difference is because although the sprockets are the exact same size everywhere, the cord I supplied with your machines had a slightly different bead pitch, so what we’re really measuring is the length of 8 beads-worth of cord.  It might even change over time if it’s hanging up for ages, who knows.
The other thing:
The old embedded code had this concept of row direction.  So I’d use a command to set rows to go from left-to-right, then all the pixels I drew would be drawn in that direction, regardless of whether that fit the sequence of the pixels.  When I got to the end of the row, I’d send a command to say “now switch to right-to-left mode”, and start sending the pixels for the opposite direction.  What sometimes happened is that the first row was drawn backwards because its initial direction setting had been missed.  Particularly if you’re stopping and starting the drawing, or do some practice drawings first.
So I’ve got rid of this global row direction setting, and the embedded code is now “smart”, ha ha.  This means it will try to figure out the best direction to draw a pixel in, based on where the pen currently is.  So if the pen is up in the top right corner, and you ask it to draw  a pixel down at the bottom right of the page, it’ll start drawing on the north-east (top-left) edge of the pixel, and draw in a south-westerly direction.
I think this seems to work, but I haven’t exhaustively tested it.  I think if there are differences, then it will probably be on the ends of rows, when the direction needs to change.
Please let me know if it’s going mental and it needs more work.
Get the updated code at

Polargraph build tutorial entered into Instructables contest

Once again I’m chancing my arm with Instructables laser cutter competition.  I’ve written up a guide to building a polargraph machine, that actually is probably a bit better in many ways that the various pieces of instructions I have left scattered in my wake during this project so far.

Please take a look, and if you like it, consider voting for me in the contest.  I don’t know if I’ve got half a chance of winning, but just think what extra shenanigans I’d get up to with a laser cutter!  I mean, after I got thrown out the flat for making bad smells. I MEANT BURNING SMELLS.

I’m also on the front page! (sell-out or proud, I can’t tell the difference any more.)

Instructables Polargraph Drawing Machine

Thanks everyone!

 

 

 

Power supplies, spare parts, and double-sided sticky tape

Two double-sided sticky tapes malfunctions in one week!  These motors are a bit heavy, so they come down with a bang if they fall off, and break their plywood mounts.

I have (one or two) spares, but that’s literally it for a couple of weeks, so please do be careful and use something very adhesive to mount your motor brackets.

I think it’s important to use some adhesive with a bit of “give”, because the bracket face, and usually your surface are not completely flat and it’s subject to a bit of vibration in use.

I usually use this double-sided sticky foam tape which is very tenacious indeed, but I have also used some temporary “no more nails” tape strips with great success.

Just be careful, I have a few spares, but that’s it!

Power supplies

I just want to remind everyone who hasn’t already got past this bit that it’s very important that you fit the tip for the power supply the right way round.  It should be centre-positive.  Because the motorshield power supply can, if required, supply the power for the arduino too, there isn’t any reverse voltage protection on the power input, so if it goes in the wrong way round, it might damage either the shield, the arduino, or both.

good luck!

 

String panic and making progress

Hello, well I’ve just discovered that the new batch of beaded cord I have has a slightly different pitch than the old batch.  This means that the distance per revolution will be different.  I am expecting a whole lot of this new stuff (expecting it days ago actually), so I am probably going to switch to this pitch entirely.

In other news, I can report that I am almost finished making up cables for the motors.  But that I’d underestimated (again) how long it takes to make the breakout boards for the motorshields, so that’s still to break the back of.

And, as I say, this beaded cord is missing en route anyway, so maybe my hopes about shipping kits tomorrow was folly.  Disappointed.

Matt Venn’s drawbot energy monitor looks good

Matt Venn has got a drawing machine that is rigged as an energy monitor, it looks neat, is in a nice case and works.  Click on this image to see some more.

framed energy monitor

He has also designed and made all the gear that drives it, it’s an excellent project, and he’s a good guy to talk to about it too.  A continuous monitor of some sort was exactly the kind of thing that I wanted to do with the machine when I started, so I’m excited by seeing this project, and I think my current polargraph software kit is probably open enough to be used for this kind of thing too.

via mattvenn.net

Makerbots and polargraphs

John Abella‘s made this cracking drawbot running polargraph software – brilliant and incredibly gratifying to see that I’ve done something that other folks can use, using parts printed on a makerbot.  He says he’ll be releasing the part models at some point too.

Polargraph working

Polargraph Motor Bracket

Also very envious of the ability to 3d print stuff on demand, and extra excited because I’ve got one of them repraps coming soon.  SOON!