cubeberg 540 Posted June 19, 2013 Share Posted June 19, 2013 I ran across this Instructable the other day on how to make a tiny laser engraver from a couple of CD-Roms. I figured my wife wouldn't be too keen on lasers, and the glasses I would need are expensive - so I decided to start with a Pen Plotter. Maybe I'll work my way up to a laser I'm using TI's DRV8834 low-voltage stepper driver - the same one used by a TI employee in their internal boosterpack challenge. For now, I'm using a small breakout board, based on the boosterpack design. Using the chip honestly couldn't be easier thankfully. Right now - I've got two stages built and I'm working on the third. Running some test patterns - using some "Poster Putty" in place of the unfinished Z-axis. I'm using an old PC power supply for the 5v needed for the steppers - works great, although it's almost as large as the project itself For now - the code is pretty rudimentary - but it's a good start. Current X/Y/Z coordinates are recorded, and it supports moving to any X/Y coordinate - although it doesn't calculate a perfect line between the points. The Z axis is handled first since it's simply used for starting/stopping a line - no purpose in moving the Z axis at the same time as X/Y. From there - X/Y are incremented/decremented by 1 until it hits the desired value. So moving from 0,0 to 15,30 would result in a 45 degree line from 0,0 to 15,15, and a straight line from 15,15 to 15,30. I'm fighting with some issues with the platform being level - the pen isn't exactly forgiving - a variation of a single MM is enough to stop a line. I might work in some Z-axis compensation, but hopefully I won't have to. I've also run into some situations where the steppers skip - I think that might be a lubrication issue. Hopefully it isn't an issue with the pen dragging on the paper. Since I've got a decent base with the X/Y coordinates - I'm hoping to apply some of the calculations found in LCD libraries for drawing lines and curves - should be pretty simple to apply the same logic. oPossum, roadrunner84, simpleavr and 3 others 6 Quote Link to post Share on other sites
Rei Vilo 695 Posted June 19, 2013 Share Posted June 19, 2013 Since I've got a decent base with the X/Y coordinates - I'm hoping to apply some of the calculations found in LCD libraries for drawing lines and curves - should be pretty simple to apply the same logic. The basic algorithm is called Bresenham's algorithm. To draw a circle, it uses only one octant and the rest is draw thanks to symmetries. So you may need to make some changes to the algorithm. Quote Link to post Share on other sites
semicolo 39 Posted June 19, 2013 Share Posted June 19, 2013 Nice start, I'm working on something similar using repurposed scanners. Since your Z axis is more like an on/off thing, maybe you could add a small spring to allow the pen to go up/down on bumps whithout having to compensate on Z. Are you using floppy drives? If so the steppers should take 12V and have more torque (double check first :-) Quote Link to post Share on other sites
cubeberg 540 Posted June 19, 2013 Author Share Posted June 19, 2013 The basic algorithm is called Bresenham's algorithm. To draw a circle, it uses only one octant and the rest is draw thanks to symmetries. So you may need to make some changes to the algorithm. Thanks - I know I'd run across that on my earlier research - I booked the midpoint circle algorithm. I'll definitely have to modify the approach since I will want to create a smooth circle, not hop around. Nice start, I'm working on something similar using repurposed scanners. Since your Z axis is more like an on/off thing, maybe you could add a small spring to allow the pen to go up/down on bumps whithout having to compensate on Z. Yeah - that's something I was considering - it has to be something that won't allow the pen to give at all in the x or y directions. I'll have to do some searching to see if someone has come up with a solution. Found a good forum thread here: http://www.shapeoko.com/forum/viewtopic.php?f=24&t=330 semicolo 1 Quote Link to post Share on other sites
semicolo 39 Posted June 19, 2013 Share Posted June 19, 2013 That guy has a nice design, but your cdrom steppers may be too weak that pen holder seems heavy. Quote Link to post Share on other sites
cubeberg 540 Posted June 19, 2013 Author Share Posted June 19, 2013 That guy has a nice design, but your cdrom steppers may be too weak that pen holder seems heavy. Yeah - I was wondering about that - I'm actually planning on using a floppy stepper for the Z-axis which is even smaller. I'll have to come up with something very light weight. Quote Link to post Share on other sites
cubeberg 540 Posted June 21, 2013 Author Share Posted June 21, 2013 Ran some circle algorithms last night. Ran into some problems with the midpoint circle algorithm - it isn't really designed for consecutive points and there's not enough memory on the device to store 4,000 points. Once I have a working Z-axis - it won't really be an issue though. I was able to get the gcodetools plugin for inkscape working. I started with a few complex shapes, added points and had it convert everything to straight lines. That means that the device won't have to do anything except draw lines (although I need to add linear interpolation). Next task is to write something that will transmit it to the device. spirilis 1 Quote Link to post Share on other sites
cubeberg 540 Posted June 25, 2013 Author Share Posted June 25, 2013 Ok - got the Z-axis working I'll try to take a video if it working tonight. Here are some test prints: Right now, I've got a G-code interpreter capable of reading X,Y and Z coordinates for lines (G01) and fast move (G00). Objects are placed on an 8000mm canvas in inkscape (I've got 250 full steps of range = 8000 1/32 steps). On the TODO list is interpolation. I'm using the Add Nodes and Flatten Bezier functions in Inkscape to avoid needing to calculate curves. Works beautifully so far. I'm using GCodeTools to generate the GCode from inkscape. Here is the G-code that I used to generate the 43oh logo 43oh_0002.txt And the corresponding inkscape file:43oh_circuit.svg.txt I've also got a C# program that's sending a line of code and waiting for a response. It currently supports sending one section at a time, or the entire file. I'm working on cleaning that up, but I'll be posting that shortly. @@bluehash - can you add the ability to attach SVG? bluehash, roadrunner84 and spirilis 3 Quote Link to post Share on other sites
cubeberg 540 Posted June 25, 2013 Author Share Posted June 25, 2013 Here's a screenshot of the interface for transmitting the gcode. I've got some threading stuff to work on - everything currently outputs to the debug window during transmission and not the UI. File is loaded into memory and can be analyzed for the # of commands as well as the # of sections (each time the pen is lifted off of the paper is considered the end of a section). Quote Link to post Share on other sites
Fred 453 Posted June 25, 2013 Share Posted June 25, 2013 I have to warn you that this CNC stuff gets very addictive. I started with a small mill (Proxxon MF70) that I converted to CNC - initially for milling PCBs. You quickly find other uses for it and want to do more... Quote Link to post Share on other sites
cubeberg 540 Posted June 25, 2013 Author Share Posted June 25, 2013 I have to warn you that this CNC stuff gets very addictive. I started with a small mill (Proxxon MF70) that I converted to CNC - initially for milling PCBs. You quickly find other uses for it and want to do more... lol - I know - this was a "gateway" project. It was pretty cool to finally get the Z-axis working and just watch it churn something out. My wife wanted to know what exactly I was going to do with the project - I don't think she quite understood what I meant when I said it was learning for future projects I've already considered adding on the laser like the original project and using it to create plastic stencils for SMD reflow. Needing $50 eye protection is putting me off a bit for now, although I considered just putting it in a box when it's running Quote Link to post Share on other sites
Fred 453 Posted June 25, 2013 Share Posted June 25, 2013 Don't skimp on the eye protection. I'm fairly sure that some cheap acrylic or polycarbonate safety goggles would be fine for my CO2 laser. I still bought some proper ones. They didn't stop me burning a hole in the back of my hand though. Quote Link to post Share on other sites
cubeberg 540 Posted June 25, 2013 Author Share Posted June 25, 2013 Don't skimp on the eye protection. I'm fairly sure that some cheap acrylic or polycarbonate safety goggles would be fine for my CO2 laser. I still bought some proper ones. They didn't stop me burning a hole in the back of my hand though. Better your hand than your eye! Yeah - I'll have some convincing to do with my wife before trying out the laser. That'll give me plenty of time to save up for glasses. The other possible avenue is a DYI 3D printer - a RepRap would be fun to build, although a small Printrbot would be cheaper and still tweakable. Quote Link to post Share on other sites
bluehash 1,581 Posted June 26, 2013 Share Posted June 26, 2013 @@cubeberg SVG support added. Quote Link to post Share on other sites
cubeberg 540 Posted June 26, 2013 Author Share Posted June 26, 2013 Thanks! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.