Reading Hack a Day I found an interesting challenge: drawing their logo somewhere. And the fact that was even more interesting: “preference will be given to the largest and smallest submissions“.
I started figuring out how to do something like that with the things I had around, and settled for using a laser and two servos. Even though I missed the deadline for submissions, it became a very interesting project and I learned a lot.
Get the code!
I took the time to upload the code to my GitHub account. You can download the Arduino code, both Processing scripts and even the Python code I used previously from the laserdriver repository. It’s all released under the MIT license.
What I learned/what’s next
I learned a lot by making this. These are some of the things I’d like to change in the future:
- The line algorithm must be enhanced in some way.
- I must redesign the frame to take advantage of the servos’ definition.
- The laser is weak. I should use something more powerful.
- I could store the canvas boundaries‘ variables using the EEPROMex library, so they don’t need to be entered at startup.
- The drawing array consists of 3 integers per point. It’s a huge waste of memory, given that the coordinate values are usually below 3000 and the laser status is just a binary value. Memory usage can be optimized.
- A physical button to start/stop drawing would be somewhat easy to add (to dispense serial communication)
- An automatic camera trigger would be helpful. I didn’t have an opto-isolator for that.
Here is an annotated version of how I built this:
I built the structure using only what I had at home and because of that many design choices were governed by that. There are many ways to draw with a laser and I think the best one is using a moving mirror, but sadly I didn’t have a tiny mirror for this, so the next option was moving the laser directly. The main disadvantage of this design is that I can’t replace the laser easily, but I can live with that.
I started by cutting a piece of cardboard to fit the servo arm. Once that was done, I attached the second servo to that cardboard using a copper wire and some ninja knitting technique.
My laser pointer was convenient at pointing things but not so much at being an electronic part for my project. It was inside a large cylinder and it was necesary to push a button to turn it on. The solution: a hacksaw (a tool with a cool name, by the way).
After tearing open the laser pointer I soldered two cables to the laser (bypassing the switch) and it was ready to be used.
The second servo (which holds the laser) had a cardboard piece too, but it was bulky and (more importantly) useless, so I attached the laser to the arm with high technology (masking tape).
Read More: Drawing with a Laser – Hack-a-Day Logo