Solar Plotter

July 11, 2010

My friend Kurt Schaefer and I have built a solar plotter, which is a device that burns 2-D patterns into wood by focusing the sun’s light using a moving magnifying glass. Here’s a video of it in action:

Kurt already had the 2-D table from a previous project that cut styrofoam using a hot wire. We replaced the wire with a stand to hold the magnifying glass and added various bits so that the machine could face the sun.

To burn a pattern, we bring it into Adobe Illustrator and use a plug-in that Kurt wrote to generate a file of G-codes, which are industry-standard codes that control CNC (computer-controlled) machines. The file is imported into a program called Mach3, which uses the parallel port to communicate with a board that controls the two stepper motors for the two axes.

One interesting thing about a solar plotter is that the sun moves as you’re making your plot. Even a simple circle that takes a minute to burn won’t finish exactly where it started because the sun will have moved by then. A 10-minute burn (like the above) will have major errors in it.

You can see the effect in this burn, which was one of our first:

Solar plotter error

The “O” on the bottom starts at its upper-left, and that’s where the discontinuity is. We burned the second “E” (lower-right) more slowly to verify that the problem was indeed the motion of the sun. The entire word shifts up because of this problem.

I wrote a program that compensates for this. It reads a G-code file and some other data, such as your location on earth, time of year, time of day, and height of the magnifying glass above the wood, and generates a modified G-code file that adjusts for the sun’s motion. It assumes that the board is perpendicular to the sun’s rays when the burn starts. You have to run it just before you start the burn for the compensation to be correct.

Here’s the final picture of the fox that was being burned in the video above:

Solar plotter fixed

I wrote another program that converts a raster image into a file of G-codes. It adjusts the speed of the plotter to generate different levels of gray, zig-zagging down the image. Naturally, I tested it with a photo of Bertrand Russell:

Solar plotter Bertrand Russell

I converted that to a low-resolution version, since the plotter’s resolution isn’t all that great anyway:

Solar plotter Bertrand Russell small

Unfortunately this doesn’t work well because the relationship between speed and blackness is very non-linear: once the wood burns at all, it’s already quite black.

One possible solution would be to install an iris on top of the magnifying glass. This would allow us to control the size of the spot being burned. Kurt’s already designed and built it:

We now have to hook it up to Mach3 somehow. One idea is to use the Z axis to encode aperture size, and use an Arduino board to convert stepper motor pulses into servo pulses to open and close the iris. (We would also close the iris when moving from object to object, which we do now by moving as fast as we can, hopefully faster than the wood can start to burn.) Another idea is to keep the iris small all the time and make darker patches using dithering in software.

The code is on GitHub.