Speak To The Machine

If you own a 3D printer, CNC router, or basically anything else that makes coordinated movements with a bunch of stepper motors, chances are good that it speaks G-code. Do you?

If you were a CNC machinist back in the 1980’s, chances are very good that you’d be fluent in the language, and maybe even a couple different machines’ specialized dialects. But higher level abstractions pretty quickly took over the CAM landscape, and knowing how to navigate GUIs and do CAD became more relevant than knowing how to move the machine around by typing.

a Reprap Darwin
Reprap Darwin: it was horrible, but it was awesome.

Strangely enough, I learned G-code in 2010, as the RepRap Darwin that my hackerspace needed some human wranglers. If you want to print out a 3D design today, you have a wealth of convenient slicers that’ll turn abstract geometry into G-code, but back in the day, all we had was a mess of Python scripts. Given the state of things, it was worth learning a little G-code, because even if you just wanted to print something out, it was far from plug-and-play.

For instance, it was far easier to just edit the M104 value than to change the temperature and re-slice the whole thing, which could take an appreciable amount of time back then. Honestly, we were all working on the printers as much as we were printing. Knowing how to whip up some quick bed-levelling test scripts and/or demo objects in G-code was just plain handy. And of course the people writing or tweaking the slicers had to know how to talk directly to the machine.

Even today, I think it’s useful to be able to speak to the machine in its native language. Case in point: the el-quicko pen-plotter I whipped together two weekends ago was actually to play around with Logo, the turtle language, with my son. It didn’t take me more than an hour or so to whip up a trivial Logo-alike (in Python) for the CNC: pen-up, pen-down, forward, turn, repeat, and subroutine definitions. Translating this all to machine moves was actually super simple, and we had a great time live-drawing with the machine.

So if you want to code for your machine, you’ll need to speak its language. A slicer is great for the one thing it does – turning an STL into G-code, but if you want to do anything a little more bespoke, you should learn G-code. And if you’ve got a 3D printer kicking around, certainly if it runs Marlin or similar firmware, you’ve got the ideal platform for exploration.

Does anyone else still play with G-code?

Hackaday.io Low-Power Challenge Begins Today

How low can you go? The 2023 Hackaday.io Low-Power Challenge is about doing the most with the least juice – bang for the power-budget buck, if you get our drift. And with three $150 gift certificates from Digi-Key on the line, you’ll be able to keep your projects going forever. The Challenge runs until March 21st, but with low-power, the devil is often in the details, so get started today!

More and more projects need to run on their own power, and more often than not, that means getting by without access to a wall plug. This contest is to encourage your designs that run on solar, small batteries, and generally energy harvested from wherever you can get it. But the power generation mechanism is taking the back seat here – we want to see what you can do with a few good electrons. Surprise us with your maximum minimalism!

Continue reading “Hackaday.io Low-Power Challenge Begins Today”

Irreproducible, Accumulative Hacks

Last weekend, I made an incredibly accurate CNC pen-plotter bot in just 20 minutes, for a total expenditure of $0. How did I pull this off? Hacks accumulate.

In particular, the main ingredients were a CNC router, some 3D-printed mounts that I’d designed and built for it, and a sweet used linear rail that I picked up on eBay as part of a set a few years back because it was just too good of a deal. If you had to replicate this build exactly, it would probably take a month or two of labor and cost maybe $2,000 on top of that. Heck, just tuning up the Chinese 6040 CNC machine alone took me four good weekends and involved replacing the stepper motors. Continue reading “Irreproducible, Accumulative Hacks”

2022 FPV Contest: Congratulations To The Winners!

We wanted to see what the Hackaday crowd was up to in first-person view tech, and you didn’t disappoint! Commercial FPV quads have become cheap enough these days that everyone and their mom got one for Christmas, so it was fantastic to see the DIY spirit in these projects. Thanks to everyone who entered.

The Winners

None of the entries do the DIY quite as thoroughly as [JP Gleyzes]’s “poor man’s FPV journey”. This is actually three hacks in one, with DIY FPV goggles made from cheap optics and 3D printed additions, a USB joystick to PPM adapter to use arbitrary controllers with an RC transmitter, and even a fully DIY Bluetooth-based controller for a popular flight simulator. [JP] has done everything but build his own drone, and all the files are there for you to use, whether you’re goal is to do it on the cheap, or to do something new.

If you want to build your own drone from scratch, though, ESP32 Drone project has you covered. At least, mostly. This build isn’t entirely finished yet, and it’s definitely got some crash-testing still in its future, but the scope and accessibility of the project is what caught our eyes. The goal is to make a lightweight indoor quad around parts we can all get easily and cheaply, completely scratch-built. This drone is meant to be controlled by a smartphone, and the coolest parts for us are the ESP_Drone and ESPStream software that run on the drone and your phone respectively. Congrats to [Jon VB]! Now get that thing in the air.

And if you’re looking for a tidy little build, [Tobias]’s Mini FPV Speed Tank doesn’t disappoint. It’s a palm-sized mini tank, but this thing hauls, and looks like a ton of fun to drive around. It uses an absolutely tiny RP2040 module, an equally tiny receiver, and a nano FPV camera and transmitter to keep it compact. The 3D-printed frame and tracks are so nice that we’re not even complaining that the FPV rig is simply rubber-banded on top of the battery. This looks like a super fun build.

Each of these three projects have won a $150 Digi-Key shopping spree to help out with parts in this, or your next project. Thanks again to Digi-Key for sponsoring!

Continue reading “2022 FPV Contest: Congratulations To The Winners!”

Too Many Pixels

Sometimes simpler is more impressive than complicated, and part of this is certainly due to Arthur C. Clarke’s third law: “Any sufficiently advanced technology is indistinguishable from magic.”. It’s counter-intuitive, though, that a high-tech project would seem any less amazing than a simpler one, but hear me out.

I first noticed this ages ago, when we were ripping out the blue laser diodes from Casio XJ-A130 laser projectors back when this was the only way to get a powerful blue laser diode. Casio had bought up the world’s supply of the 1.5 W Nichias, and was putting 24 of them in each projector, making them worth more dead than alive, if you know what I mean. Anyway, we were putting on a laser show, and the bright blue diode laser was just what we needed.

RGB Laser show
A sweeter setup than mine, but you get the idea. 

Color laser setups take three or more different lasers, combine the beams, and then bounce them off of mirrors attached to galvos. Steer the mirrors around, and you can project vector images. It’s pretty cool tech, and involves some serious fine-tuning, but the irony here is that we were tearing apart a device with 788,736 microscopic DLP mirrors to point the lasers through just two. And yet, a DIY laser show is significantly cooler than just putting up your powerpoint on the office wall.

The same thing goes for 2D plotting machines like the AxiDraw. The astonishing tech behind any old laser printer is mind-numbing. Possibly literally. Why else would we think that art drawn out by a pen in the hands of a stepper-powered robot is cooler than the output of a 1600 DPI unit coming from HP’s stable? I mean, instead of running an hours-long job to put ink on paper with a pen, my Laserjet puts out an image in ten seconds. But it’s just not as much fun.

So here we are, in an age where there’s so darn much magic all around us, in the form of sufficiently advanced technology, that comprehensible devices are actually more impressive. And my guess is that it’s partly because it’s not surprising when a device that’s already magic does something magical. I mean, that’s just what it’s supposed to do. Duh!

But when something beautiful emerges from a pair of mirrors epoxied to shafts on springs turned by copper coils, that’s real magic.

Supercon 2022: Samy Kamkar’s Glowing Breath

Sometimes the journey itself is the destination. This one started when [Samy] was 10 and his mom bought a computer. He logged on to IRC to talk with people about the X-Files and was WinNuked. Because of that experience, modulo a life of hacking and poking and playing, the talk ends with a wearable flex-PCB Tesla coil driving essentially a neon sign made from an ampule of [Samy]’s own breath around his neck. Got that? Buckle up, it’s a rollercoaster.

Continue reading “Supercon 2022: Samy Kamkar’s Glowing Breath”

Happy New Year, Hackaday!

[Tom Nardi] and I were talking on the podcast about 2022, and how it went from the hacker’s perspective. As the global chip shortage entered its second full year, we both thought back on the ways that we all had to adapt and work around the fact that we just couldn’t get the parts we were accustomed to picking up with ease.

What had previously been an infinite supply of knockoff Arduino clones and STM32 Blue Pill boards all of a sudden just dried up. Sometimes you just couldn’t get the DAC chip you wanted, or at least not without many weeks’ lead time, and even then, it’d cost you. Raspberry Pi single-board computers became hard to find. PCB designs had to change and new SDKs needed to be learned. I know I had to grab twice for unfamiliar microcontroller platforms this year.

We hacked around the problems. It would be absurd to say that the chip shortage wasn’t a pain in the posterior, but in the end we all managed to carry on and keep creating. We created more flexible footprints, learned to design around what we could get, and definitely had to do more planning. We pulled parts for projects out of the junk box or shelf stock. Or, as Tom noted, we did what everyone in the parts of the world who aren’t as fortunate to get free expedited shipping does – we made do.

Making do often meant learning new environments, questioning old habits, and double-checking pinouts. But if you’re like me, not all of that time was wasted. Sometimes it’s good to get shaken out of comfy workflows, even if by force. So while we wish you parts-in-stock and easy availability for 2023, don’t forget the lessons learned from 2022. Stay scrappy, Hackaday!