In case anyone’s interested, here’s my current brain.
This is the jalopy currently running my standalone drawings. The circuit is shown a little better here:
Running commands off the SD card eliminates the pause in between commands completely, it’s brilliant. Currently no way to interrupt it once it’s started, but I plan to add a rudimentary physical interface, a pause/run button at least. Will will be testing various endstop / limit detectors at some point.
I also have a sanguino and a couple of stepstick drivers to test out this weekend. I think that hardware combo is likely to be the basis of future polargraph machines – the chip in the mega is awful expensive.
-EDIT – Firmware
I realised I didn’t mention anything about the firmware I’m using in the MEGA. It’s available from this branch of the repository. It broadcasts its version in it’s READY statement, saying READY_100 instead, and the controller will spot that and the new buttons will appear:
- Signal store… This pops up a window that lets you input a filename that any new commands issued will go into instead of being executed. This will create a file on the sd card on the machine, and fill it command-by-command. This is still pretty slow. It puts the machine into store mode.
- Signal play This signals the machine that it should go back into play mode, and start executing commands again, instead of storing them.
- Exec from store… This pops up a window to input the name of a file that contains your commands and when you hit submit it starts executing all the commands from that file.
A better way to do it is to hit export queue and save your queue to the card directly using a usb card reader – same result, and much faster, then swap the card back into the machine once you’re done.
So I still need to use the controller.
- I layout my artwork, then make sure I have an empty, paused queue before generating all my drawing commands.
- Then plug my sd card into the pc so it appears as a drive. Now export queue to a text file on the sd card.
- Take the card out and put it into the polargraph machine and reset it. It needs to be reset to initialise the card.
- Connect the controller and start the queue.
- Set home and move the gondola to the home point.
- Queue->Exec from store and enter the name of the file I just saved onto the sd card.
- The machine gets that message and starts drawing. Now I can just close the controller and turn the computer off if I want to.
Remember that the machine still needs power, and depending on how you have your machine set up, part of it might be being powered by USB. So if you turn the pc off, it might lose that power. It might not! Because you might have a powered hub or something. But If you have a power supply that plugs into your arduino board rather than your motorshield you will be ok to remove the usb entirely.
This works great for vector graphics where there’s thousands of little lines. Not such an issue for bitmap stuff, but still might be useful for bigger things.