Grbl Ported To The ESP32

If you’re building a CNC or laser, there’s an excellent chance you’ll be using Grbl to get moving. It’s also a pretty safe bet you’d end up running it on some variation of the Arduino sitting in a motor controller breakout board. It’s cheap, easy to setup and use, and effectively the “industry” standard for DIY machines so there’s no shortage of information out there. What’s not to love?

Well, quite a few things in fact. As [bdring] explains, Grbl pushes the capability of the Arduino to the very limit; making it something of a dead-end for future development. Plus the Arduino needs to be plugged into the host computer via USB to function, a rather quaint idea to many in 2018. These were just some of the reasons he decided to port Grbl to the ESP32 board.

Price wise the Arduino and ESP32 are around the same, but the ESP does have the advantage of being much more powerful than the 8-bit Italian Stallion. Its got way more flash and RAM as well, and perhaps most importantly, includes Wi-Fi and Bluetooth out of the box. It still needs to be plugged into a board to hold the motor drivers like the Arduino, but beyond that [bdring] opines the ESP32 is about as close to the perfect Grbl platform as you can get.

[bdring] reports that porting the code over to the ESP32 wasn’t terrible, but it wasn’t exactly a walk in the park either. The bulk of the code went by without too much trouble, but when it came to the parts that needed precise timing things got tricky. The ESP32 makes use of a Real Time Operating System (RTOS) that’s not too happy about giving up control of the hardware. Turning off the RTOS was an option, but that would nuke Bluetooth and Wi-Fi so obviously not an ideal solution. Eventually he figured out how to get interrupts more or less playing nicely with the RTOS, but mentions there’s still some more work to be done before he’s ready to release the firmware to the public.

If you’ve been browsing Hackaday for a while you may remember [bdring]. He’s got a real knack for making things move, and has created a number of fantastic little CNC machines recently which have definitely caught our eye.

[Thanks to Jon and Craig for the tip.]

Continue reading “Grbl Ported To The ESP32”

ESP8266 Zelda Heart Responds To Tweets

It might not be enough to make you the Hero of Time, but this piece of Hylian interactive art would still be a worthy addition to your game room. [Jeremy Cook] writes in to tell us about how he put together this 8-bit style heart display, and goes into enough detail on the hardware and software sides of things that you shouldn’t have any problem adapting his design for your own purposes.

The build is pretty simple overall but it does assume you have a CNC to cut the basic shape out of MDF. You could cut the shape by hand if you had to, but if you don’t have a CNC the next best thing might be to 3D print the case. You’d potentially have to print it in two parts right down the center though, depending on how big your bed is. Whichever way you create the case, you’ll then need to cut the shape out of a piece of acrylic to make the face.

In any event, once the pieces are cut out [Jeremy] adds in a Wemos D1 Mini, a power supply, and some red LED strips. He provides a wiring diagram, but it’s fairly straightforward stuff. With a couple of 2N2222 transistors he controls the LED strips right from the digital pins of the ESP8266.

The software side is setup to be controlled via IFTTT by way of Adafruit.io. When IFTTT sees one of the keywords on Twitter, it passes a message to Adafruit.io which ultimately talks to the ESP8266 and gets the heart going. The software supports three states (on, off, and half) and gives a good example of a basic IoT implementation on the ESP8266 if you’re looking for some inspiration.

This hack seems like it would fit in perfectly with the Zelda home automation project we covered last year.

Drive Big Servos With Ease

CNC machines of all types are a staple here at Hackaday, in that we have featured many CNC builds over the years. But the vast majority of those that we see are of relatively modest size and assembled in a home workshop, using small and readily available components such as small stepper motors. These drives are a world away from those used in industrial CNC machines, where you will find high-voltage servos packing a much greater punch. With good reason: driving a small low-voltage motor is easy while doing the same with a high-voltage servo requires electronics that have hitherto been expensive.

STMBL (for STM32 microprocessor and BrushLess motor) is a servo driver for STM32F4 microcontrollers that is specifically designed to use in retrofit projects to industrial CNC machines that have those high-voltage servos. When assembled, it takes the form of two PCBs arranged in a T configuration over a heatsink, with high-power connectors for the motor terminals, and RJ45s for feedback and serial control. In fact each of the boards has its own STM32, one on the high voltage side and the other on the low voltage, to enable only the simplest of isolated serial connections between them.  A significant variety of combinations of motor and feedback system is supported, making it as versatile as possible a module for those whose CNC needs have escaped their home bench setup. We’re sure we’ll see this module pop up in quite a few builds we show you over the coming years.

Thanks [Andy Pugh] for the tip.

Replace Your Calipers With A Microscope And Image Analysis

Getting a good measurement is a matter of using the right tool for the job. A tape measure and a caliper are both useful tools, but they’re hardly interchangeable for every task. Some jobs call for a hands-off, indirect way to measure small distances, which is where this image analysis measuring technique can come in handy.

Although it appears [Saulius Lukse] purpose-built this rig, which consists of a microscopic lens on a digital camera mounted to the Z-axis of a small CNC machine, we suspect that anything capable of accurately and smoothly transitioning a camera vertically could be used. The idea is simple: the height of the camera over the object to be measured is increased in fine increments, with an image acquired in OpenCV at each stop. A Laplace transformation is performed to assess the sharpness of each image, which when plotted against the frame number shows peaks where the image is most in focus. If you know the distance the lens traveled between peaks, you can estimate the height of the object. [Salius] measured a coin using this technique and it was spot on compared to a caliper. We could see this method being useful for getting an accurate vertical profile of a more complex object.

From home-brew lidar to detecting lightning in video, [Saulius] has an interesting skill set at the intersection of optics and electronics. We’re looking forward to what he comes up with next.

Spraychalk Anoints Your Sidewalks With Precision Sandprints

Giant lines in the sand are incredibly useful for pleasing the gods and hailing overpassing extraterrestrials. Beautiful, unwarranted spray-painted sidewalks might land you in detention with local law enforcement. Of course, why not have both? With the Sand-and-Spraychalk machine, you can!

The Sand-and-Spraychalk machine Is a moving two-axis CNC machine that can anoint its path with a spray of either sand bits or spray paint.  As with any self-respecting power tool these days, the Spraychalk is driven by a rechargeable Bosch 18 V battery pack. As far as safety goes, leveraging an already-product-proven solution instead of cooking our lawns with questionable LiPos is downright clever.

Elegance is in simplicity, and the Spraychalk is no exception. The entire build is a collection of off-the-shelf parts mixed with a few laser cut plates and a one custom nozzle made of POM (Acetal). Precise spraying might sound like a hard problem, but it’s executed here with just a motor-driven cam and a couple levers. Finally, adapting a 18 V battery pack may seem like a form-factor nightmare, but our creator, [kallibaba], managed to pull it off with just a few laser-cut plates.

The Spraychalk rightfully sits next to its previously mentioned cousins that have graced these pages before. The next time we’re wondering just who vandalized your lawn so majestically, we know where to look!

Continue reading “Spraychalk Anoints Your Sidewalks With Precision Sandprints”

A Pick-And-Place That Is A Work Of Art

It’s a Holy Grail among hackerspaces, the possession of a pick-and-place machine. These robotic helpers for placing surface-mount components on PCBs are something of a gateway to electronic production, but they can carry a fearsome cost. Happily for the cash-strapped would-be electronic manufacturer, it is possible to build a pick-and-place for yourself. [Mcuoneclipse] has demonstrated this with a rather impressive build that works with the freely available OpenPnP software.

Superficially it shares much with what you might expect from a small CNC mill, in that it has a frame made from extruded aluminium that carries rails that trace an X and a Y axis supporting a tool head. But instead of a blade it has a box made from laser-cut ply that contains a camera and a vacuum pick-up tool that can collect a component from the tapes and deposit it in the correct point on the board. At the machine’s heart is a Smoothieboard, and the work is done by an assortment of solenoid valves and actuators. A huge amount of attention to detail has been paid to this build, with a holder for all the interchangeable nozzles for different component sizes, laser-cut mountings for all the motorised components, and automatic feeders for the SMD tapes all being carefully designed and built. Several iterations of the design are presented, in particular around the head itself which has passed through more than one form to remove as much vibration as possible. But don’t take it from us, have a look at the video we’ve pasted in below the break.

This isn’t the first pick-and-place machine we’ve brought you here at Hackaday. If you already have a 3D printer, would you consider this upgrade?

Continue reading “A Pick-And-Place That Is A Work Of Art”

MakerbotCNC PCB etcher

Makerbot Printer Reborn As PCB Engraver

Makerbot 3D printers were among the first to hit the market, so it makes sense that old and broken ones now litter the shelves of hackerspaces and home workshops alike. Rather than throw his one out, [Foaly] saw an opportunity to convert it to some sort of CNC machine. Given its lack of inherent rigidity and relatively weak motors, he opted to make a low-impact circuit board engraver which he appropriately calls the MakerbotCNC. We like the thought he put into this project, and it was clearly backed by plenty of experience.

Circuit board etched using MakerbotCNC

Fortunately, his Makerbot Replicator 2 stemmed from a time when MakerBot was more open, meaning he could control the machine using a simple, open library. A little more open software handled his conversion of Gerber files to G-code. First tests drawing with a pen were successful, so he moved on to the carving head. He opted for an inrunner brushless motor to minimize dust getting into the motor but since these motors have a tendency to heat up he had to add fans to cool it. That still didn’t stop the heat from melting and bending his attempt at a 3D printed PLA carriage, so he switched it to a laser-cut MDF board to fix it. Finding the right collet proved tricky but eventually, he found the perfect fit was a collet clutch normally used to couple flex shafts to RC boat motors.

The result, as you can see was worth it. Using shallow passes, he can even cut carbon fiber parts.

While [Foaly] didn’t opt to replace more parts and go for a more powerful CNC, check out this 3D printer to CNC conversion which can cut wood, acrylic, and even aluminum.