New zoomier controller software preview

If you think I’ve been quiet for a while, it’s because I’ve been busy rewriting the controller.  Almost done.  In fact, I think I’ve got it back to the functionality that it had before.  Have a look: 

The reason for this all is primarily to decouple the machine size from the display size.  It was previously fixed at 1mm = 1 pixel, which is fine for people with small machines and big screens, but not really for anyone else.  So the major innovation here is a zoomable / draggable machine. Use the scroll wheel or pgup / pgdn to zoom, and middle button drag (or arrow keys) to move the machine around.  This changable machine, alongside the buttons panel that adjusts to the screen size means this will even squeeze onto little diddy screens like netbooks.

While I was getting my drag on, I also changed the select topleft/botright to be a plain drag to select.  Row size is now grid size, and there’s a number spinner thing to change it with the mouse.

I’ve used the ControlP5 GUI library to make it easier to write and script, and it’s really good, I’m impressed.  The downside to this is that you need to download that library and put it into your Processing libraries folder.  I might start making a binaries distribution of this, for this reason.

This code is currently in a branch in SVN called polargraphcontroller_zoom and you’ll notice it’s now a bunch of files, not just one.  You need them all.  There’s been a fair bit of extra code written to support these new features, and splitting them up this way makes it much easier to read and maintain, given the limitations of the Processing IDE.

I’m holding off merging the branch into the development trunk until I’ve got the SVG importing cracked.  Now I’ve got straight lines working nicely, SVG is worth doing.  Oh, that and support for multiple properties files with a save as/load feature.

If you have a chance, please have a shot with this new code, see what you think and let me know if there’s things that it get’s wrong – particularly if you’re using a huge machine, or a tiny screen.  Your regular polargraph properties file should work in it.

Happy scribbling!

10 thoughts on “New zoomier controller software preview

  1. Looks great! Thanks for the work you’re putting into this.

    It’s hard to tell from the pic, but are the pixels in the preview now diamond shaped, or are they still round? Seeing a more accurate diamond shape would be very helpful. I’ve done a few portraits that have turned out somewhat sinister because the subjects have been rendered with vampire teeth or weird eyes, which I hadn’t been able to tell from the preview.

    Now that I’ve done many drawings, I find myself wishing for a “select whole image” button, as well as one to “center image” since I do those steps manually for each project. Then again, no one wants too many buttons crowding the screen.

    Thanks again! Get back to it!

    • Cheers! The density preview is still only circles – I know what you mean about the unexpected jaggedness – it would be nice to have some warning of it. My reason for not making this too representative was because it might give a false sense of accuracy – might give the impression that the machine is an output device for the software, rather than that the software is a preview of the machine. If you see what I mean. It’s an idealogical difference! I also struggle a bit with the maths of working out the right shapes too, but I’ll have another go at it – it would be useful.

      In my experience vampire teeth and weird eyes are a result of too much contrast between pixels, and can be improved by increasing the sample area. Only works up to a point of course, and it’s at the expense of overall “sharpness”.

      Select image, or centre image are both doable, but I admit I probably won’t. I have a set of guides that I can overlay and turn on or off, and they include the pictureframe corners, and a centre line – what I could do is move the centre line to on top of the page, so that when you do “move image” the mouse will designate the centre of the image, and all you’d need to do is line it up with the centreline. In retrospect, not having too many automatic layout options was a deliberate choice – it’s to avoid giving the impression that there’s a “proper” way to do things, and you won’t get good results if you deviate from The Way. I’m much more interested in suggesting that you crop and place images according to what looks good rather than what’s in the original file, and encouraging users to experiment with the effects of drawing in different areas of the machine – or rather, to discourage a standardised, automatic approach. All part of my war on standardisation! Of course it makes me feel good to make people happy too, so if it becomes a serious impediment, I’ll do it, I’m a sucker.

    • Hi Jay, great to hear you’re about to be a-scribbling too.

      Motors: look at rated current, it needs to be 600mA or less for each one. That’s the limit for the L293D driver chips in the motorshield. The voltage doesn’t really matter much, mine are 4v or so. Avoid very low voltage ones as they will tend to be high amperage ones. The first I got were 3v, but drew 2amps so fried the motorshield. Ooops.

      Steps should be probably at least 200 steps per rev (1.8 degree per step) unless you’re using a geared motor.

      The power supply should supply your motor power, so if you have two 600mA motors, you should, in theory have a 1200mA power supply. I used a 600mA supply for ages with mine, and it only died after some bad behaviour, I use 1000mA ones now, no problems in reality. I also use variable voltage supplies because it lets me turn the voltage up if I feel like I need some more power, and if I can handle the extra heat. I usually run at 6v, and usually have a separate supply for the motorshield, while the logic and the arduino run straight off the USB cable.

      The servo I use is just a generic mini servo, nothing special about it, just use the standard control horn to lift it off the page.

      I’ll follow your page to see how you get on!

      • I ended up going with a 9V 1000mA power supply and two 12V 350mA steppers on the advice of a friend. This should be low enough that it doesn’t fry the board, but I have no idea if the power supply is going to be too much for the motors themselves. I hope not!

        The variable voltage supply is a great idea – once I get this off the ground I’d like to try that. What does the extra power get you? More speed, a steadier pen line?

        Thanks again for sharing your work on this project!

        • Yep, give it a shot. Upping the voltage just makes for a more “positive” movement, a spot noisier, but more torque and less likely to drop steps. When I put an extra bit of weight on my gondola, it still tends to drop steps when it gets upto it’s top speed – at least when it’s up at the top and it’s weight isn’t evenly shared between the two motors. I could probably reduce that if I increased my voltage, but I found 6v was a fair balance between heat and power for my motors. I also have little DIP-16 heatsinks on my driver chips, but before that I had a little computer case fan blowing at them because they seem to get awful hot. I wonder if either really made a difference to how it worked in reality, but it made me feel much better about leaving it running for long drawings, especially unattended.

            • No, very non-invasive changes. The breakouts are nice if you’re chopping and changing the cables a lot, but they are a luxury. I added a couple of extra pins to most of mine for hooking up the fan, though I never use it any more.

  2. hi there!

    first off; Nice work & thanks for sharing!

    I’ve tried your older version (older Arduino and controller software) and I decided to upgrade into your new package. (arduino UNO firmware and new zoom controller).

    After I’ve installed all the P5 libraries I get a NullPointerException error – in the polargraphcontroller_zoom file – in the lines :

    loadedShape = RG.loadShape(“test2.svg”);

    I have absolutely no Processing skills,,,do you know where could be the problem?

    thanks again!!

    greetings from Argentina!

Comments are closed.