With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Congratulation! Regarding the pin 1, you are right, that is always on the left of the half circle (or directly indicated by the dot). The name is flipped by the Fritzing tool automatically.
The Nano does not have enough memory and is too slow to handle the interactive part. I did some experiments with a Teensy 3.2 and an ESP8266 so that you can draw something on a HTML page and it sends the drawing via HTTP post. That works but is not fast enough to run at interactive framerates.Maybe a Photon with buildin Wifi would be fast enough. Alternatively it surely can be done with a RasberryPI.
Well, the laser can only draw lines, so you will have to create lines in Processing and send those back to the Arduino. The Mega has 8 KB SRAM, so if you can use maybe 4KB of it for a buffer, it can store 1000 points (4 bytes per point). Since you want to communicate with Processing while drawing with the laser, it might get tricky to communicate via serial and at the same time draw with the laser. Maybe you could rewrite the laser drawing code to run in an interrupt, but I doubt the Mega is fast enough. I guess upgrading to a Teensy would do the job, but would still require some interrupt magic to get both serial and laser running in 'parallel'.
Yes, I2C is too slow and a dual channel DAC is easier to latch synchronously. And with the MCP 4822 no extra components are needed. Thanks for the details!
Great! Which galvos/laser pointer did you use?
I cleaned up the script a bit and added it to Github, I hope it helps you guys:https://github.com/DeltaFlo/LaserProjector/blob/master/Scripts/convertGCode.py
I will see what I can do... It is not very generic nor cleaned up. I guess without cleanup it raises more questions than it helps.
I upgraded to 1.6.12 and worked around the problem, which indeed is a compiler bug. The fixed version is on GitHub.
Look for a laser pointer powered by three 1.5v coin cell batteries. I did not buy mine, it was an advertisement present.
To get nice 'linear' lines, I have to split each line into small segments, otherwise the galvos move non-linear and too fast. So although my objects have less than 800 points, the overall positions that the galvos move to are more than 800 points on many objects. Another thing to consider is that the laser on/off delay is 400ns (for my laser pointer), so each separate contour cost extra on/off time.And the 20k does not really mean that you can go 20k from 0 to 4096, it only means moving 20k times in small fractions.
The nodal points are less visible to the human eye than to the camera. The reason for them is that the laser pointer stays longer at these points. It is all a tradeoff between speed and visible quality. You can play around with the parameters in Laser.h. If you reduce the waiting time, you will get less straight lines but also less nodal points. Upgrading to a faster microcontroller also helps, e.g. a Teensy 3.2 can be used as a drop-in replacement.
I wrote a Python script that transforms gcode to my hex code. The hex code is really simple, just 15bit for x and 16bit for y and one bit for laser on/off.
Arduino Laser Show with rea...View Instructable »
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.