Hand drawing and laser etching - rocket

Converting Kids’ Hand-Drawings To G-Code

[Martin Raynsford] wrote a program that converts a black-and-white 2D image to G-code so that his laser printer could then etch the image. Not satisfied with just that, he used his laser printer to make a scanner that consists of a stand for his webcam and a tray below it for positioning the paper just right. The result was something he took to a recent Maker Faire where many kids drew pictures on paper which his system then scanned and laser etched.

Screenshot of Martin's scanning and G-code maker program
Martin’s scanning and G-code maker program

[Martin’s] program, written in C#, does the work of taking the image from the webcam using OpenGL and scanning it line by line looking for pixels that surpass a contrast threshold. For each suitable pixel the program then produces G-code that moves the laser to the corresponding coordinate and burns a hole. Looking at the source code (downloadable from his webpage) it’s clear from commented-out code that he did plenty of experimenting, including varying the laser burn time based on the pixel’s brightness.

While it’s a lot of fun writing this code as [Martin] did, after the break we talk about some off-the-shelf ways of accomplishing the same thing.

Continue reading “Converting Kids’ Hand-Drawings To G-Code”

Generating Laser Cut Boxes In C

[Mike] is a laser cutting newbie and has never had the opportunity to create a file and send it off to a laser for cutting. He knew he didn’t want to squint at a CAD package, nudging lines by tenths of a millimeter, only to screw something up and have to do it all over again. His solution, like so many other automation tasks, was to create a program that would generate a box of any size in .SVG format.

[Mike]’s program runs in C, and only requires a few variables set in the program to create a box of any size. There’s no argc or argv for the program – the one thing that would turn this into a command line utility that simply creates SVG boxes. Perhaps another time.

The rest of [Mike]’s hackerspace, Fab Lab xChc, was impressed the program worked the first time. With this small bit of C code, [Mike] has an easy, simple tool to generate laser cut boxes. The only remotely complicated bit of C this program uses is printf(), so even an Arduino can spit out the SVG for a laser cut box.

Turning The Raspberry Into A CAD Workstation

Inventables has been working hard on a successor to the extremely popular Shapeoko CNC milling machine, and to bring digital fabrication to the masses, they’ve created Easel, possibly the easiest 3D design software you’ll ever use. [Sacha] was trying out the beta version of Easel and mentioned to the dev mailing list he was running his installation on a Raspberry Pi. One of the developers chimed in, and after a bit of back and forth we now have a workflow to use Easel with the Raspberry Pi.

Easel is a web app, but since the graphics, design, and g-code generation are handled locally, even the most rudimentary CAD suite would choke the decidedly low power Raspi. Instead, [Sacha] is using the Raspberry to grab 2D and 3D files, turn that into g-code for a machine, and send it off to a Shapeoko router.

Easel doesn’t yet have local sender support that works on Linux, so a separate piece of software is used to shoot the g-code over a serial port to the machine. That’s something that will probably be added in a later version of Easel, making a Raspberry Pi a great way to control router or milling machine.

THP Entry: Etch-A-CNC

etchacncCNC machines have been around for decades, but only recently have small desktop routers, 3D printers, and laser cutters brought G code to the tabletop. Obviously, this is a teaching opportunity, and if you’re trying to get kids interested in the inner workings of machines that build things, you can’t begin with obtuse codes understood only by machines and CNC operators.

[johnyang] is building his own CNC controller based on something just about every kid is already familiar with: the Etch A Sketch. He’s retrofitted a small, travel size Etch A Sketch with an LCD, buttons, rotary encoders, and a Raspberry Pi to turn this primitive drawing toy into a machine that generates G code for a Shapeoko 2 CNC mill.

The user interface for this CNC controller is as similar to the Etch A Sketch as [johnyang] can make it – two rotary encoders draw a shape on the LCD, and G code is generated from the drawn shape. Adding a third dimension is a bit of a challenge – it looks like two buttons take care of the up and down movement of the spindle. Still, [johnyang] plans to add the definitive Etch A Sketch feature – holding it upside down and shaking it will reset the CNC to its original state.

There are a few videos of [johnyang]’s progress. You can check those out below.


SpaceWrencherThe project featured in this post is an entry in The Hackaday Prize. Build something awesome and win a trip to space or hundreds of other prizes.

Continue reading “THP Entry: Etch-A-CNC”

Hackaday Links: November 17, 2013

hackaday-links-chain

If you purchased a knock-off FM transmitter and were unhappy with its broadcast range [Thiagohersan] shows how to double the range with a simple transistor amplifier circuit. He also hacked it for used without the 12V car socket.

[Patrick Herd] had a project that required him to strip about twenty Mindstorm batteries from their plastic enclosures. It’s not too tough getting into them but it does require drilling out the plastic rivets. He made a jig and used a CNC mill to automate the process.

Speaking of CNC, [Bertho] added some abstraction to distance himself from what he calls the “50+ years archaic syntax and grammar that G-code programs have”. The project is a meta-compiler for G-Code.

If you need a cold one and don’t have a HaDuino on hand you’ll thank yourself for hacking together this five-cent workbench bottle opener.

Just make sure you do all the lathe work for a custom speaker enclosure before you start pounding back those brewskis. Not only does [Shaun’s] creation look modern and stylish, but it boasts more than enough power to bump some tunes.

Here’s a project that adds LED feedback to your XBMC installation. It uses a Raspberry Pi to run the media center software, and a script to monitor it and actuate the lights on an Adafruit add-on board. At first glance you may not think much of it, but this is all the logic control you need to automate your viewing room. Who doesn’t want a home theater that automatically dims once you’ve made your viewing selection?

And finally, [08milluz] snagged some reactive electronics in the form of Disney’s Mickey Mouse ears. Apparently they glow different colors at live shows and based on where they are worn within the park. He did a complete teardown to show off the hardware within. It turns out to be controlled by an MSP430 which are known for their low power consumption. [Thanks Spikeo55]

HHH: Sniffing Proprietary CNC To Hack In G-Code Support

hhh-proprietary-g-code-hack

Here’s a beautiful desktop CNC mill which had one big drawback: it used a proprietary interface for driving it. To increase the flexibility of the tool it was hacked to work with G-Code.

The project is a Hackaday Hackerspace Henchmen submission from rLab, the Reading Hackspace in the UK. [Barnaby] explains the entire project after the break. The machine itself wasn’t altered, but a translator script was written in Python after capturing a bunch of packets and working out the protocol. This script listens for G-Code and does the translation into the type of commands the machine is expecting to receive.

If you know of a CNC hack from your own hackerspace send us the story for a chance to win some loot.

Continue reading “HHH: Sniffing Proprietary CNC To Hack In G-Code Support”

Turn A Decommissioned Robot Into A CNC Machine

adeptRobot

Some of us may have been accused of living in Mom’s basement – [Benjamin] kicks it up a notch by keeping an industrial robot in his parent’s attic shed loft.
[Benjamin] was tasked with stripping down some retired equipment at work. It turns out the “retired equipment” was three Cartesian robots from Adept Robotics. These are large industrial XYZ platforms capable of high speed movements (3000 IPM rapids!).

Getting from a decommissioned machine to a working CNC is never a simple path. In this case [Ben] was able to make the transition relatively easily. Each axis of the robot has a 400 Watt Yaskawa servo with a 65k encoder and brake. The original Adept servo amps and control system was still working, so he kept it. The controllers were new enough that they communicate over a daisy chained IEEE1394 (Firewire) link. That is relatively modern compared to some of the conversions we’ve seen in the past.  The final piece of the puzzle was G-code creation Translating common G-code to a format his machine could recognize. Ben chose MeshCAM for the task.

One problem [Ben] ran into was stuttering on the X-axis. The original machines only had a single sided drive system on the X-axis. Single side is fine for an assembly machine that doesn’t see any tool load. However for a CNC machine that will see spindle loads, a single side drive creates a twisting force which threatens to rack the entire frame. He used one of the drive systems from his spare robot to convert his main machine to a double-sided drive, eliminating the issue.

Continue reading “Turn A Decommissioned Robot Into A CNC Machine”