Linux In The Machine Shop Hack Chat

Join us on Wednesday, July 8 at noon Pacific for the Linux in the Machine Shop Hack Chat with Andy Pugh!

From the time that numeric control started making inroads into machine shops in the middle of the last century until relatively recently, the power of being able to control machine tools with something other than a skilled human hand was evident. Unfortunately, the equipment to do so was expensive, and so NC technology remained firmly in the big shops, where a decent return on investment could be realized.

Fast forward a few decades, and everything that makes the computerized version of NC possible is cheap and easily available. Servos, steppers, drivers, and motion control components can be plugged together into CNC machines that can move a tool to a fixed point in space with incredible accuracy and repeatability. But without CNC software, none of it means a thing.

Enter Linux CNC, the free and open-source CNC package. With support for realtime operation, one-step installations, and a huge range of capabilities provided by a team of volunteer developers and supported by an active community, Linux CNC has democratized the world of CNC machines.

Andy Pugh is a frequent contributor to the Linux CNC codebase and a moderator on the forum. He knows a thing or two about Linux CNC in particular and Linux in the machine shop in general. He’ll stop by the Hack Chat to share his experiences with the Linux CNC project, tell us how Linux can revolutionize the machine shop, and maybe share a few stories from the world of CAD, CAM, and using Linux to make a few chips.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, July 8 at 12:00 PM Pacific time. If time zones have you down, we have a handy time zone converter.

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.

Continue reading “Linux In The Machine Shop Hack Chat”

Making An Arduino Ventilator? Read This First

Thanks to the virus crisis, lots of people are designing makeshift ventilator designs in the hopes of saving people’s lives. Many of these are based around some sort of Arduino-powered CPU. [Armstrong Subero] things that’s a great idea, but cautions that making an electronic pair of dice is a different proposition than creating a machine to breathe for someone. But he isn’t just complaining. He talks about considerations when building a real-time and safety-critical system.

[Armstrong] has a lot of good points, although we aren’t sure you need the complexity of a real-time operating system just to squeeze a bag. If anything, that seems like it might make it more susceptible to unexpected operation. However, we agree with his comments that you should have closed-loop control to make sure the device is working, alarming when the device isn’t working, and watchdog timers to guard against lockup.

Continue reading “Making An Arduino Ventilator? Read This First”

Write Once, Run Everywhere: Cross-Platform Programming Done Right

One of the goals of programming languages back in the 1950s was to create a way to write assembly language concepts in an abstract, high-level manner. This would allow the same code to be used across the wildly different system architectures of that era and subsequent decades, requiring only a translator unit (compiler) that would transform the source code into the machine instructions for the target architecture.

Other languages, like BASIC, would use a runtime that provided an even more abstract view of the underlying hardware, yet at the cost of a lot of performance. Although the era of 8-bit home computers is long behind us, the topic of cross-platform development is still highly relevant today, whether one talks about desktop, embedded or server development. Or all of them at the same time.

Let’s take a look at the cross-platform landscape today, shall we?

Continue reading “Write Once, Run Everywhere: Cross-Platform Programming Done Right”

Benchtop Lathe Gets An Electronic Leadscrew Makeover

The king of machine tools is the lathe, and if the king has a heart, it’s probably the leadscrew. That’s the bit that allows threading operations, arguably the most important job a lathe can tackle. It’s a simple concept, really – the leadscrew is mechanically linked through gears to the spindle so that the cutting tool moves along the long axis of the workpiece as it rotates, allowing it to cut threads of the desired pitch.

But what’s simple in concept can be complicated in reality. As [Clough42] points out, most lathes couple the lead screw to the spindle drive through a complex series of gears that need to be swapped in and out to accommodate different thread pitches, and makes going from imperial to metric a whole ball of wax by itself. So he set about building an electronic leadscrew for his lathe. The idea is to forgo the gear train and drive the leadscrew directly with a high-quality stepper motor. That sounds easy enough, but bear in mind that the translation of the tool needs to be perfectly synchronized with the rotation of the spindle to make threading possible. That will be accomplished with an industrial-grade quadrature encoder coupled to the spindle, which will tell software running on a TI LaunchPad how fast to turn the stepper – and in which direction, to control thread handedness. The video below has some great detail on real-time operating systems on microcontrollers as well as tests on all the hardware to be used.

This is only a proof of concept at this point, but we’re looking forward to the rest of this series. In the meantime, [Quinn Dunki]’s excellent series on choosing a lathe should keep you going.

Continue reading “Benchtop Lathe Gets An Electronic Leadscrew Makeover”

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”

Microsoft Secures IoT From The Microcontroller Up

Frustrated by the glut of unsecured IoT devices? So are Microsoft. And they’re using custom Linux and hardware to do something about it.

Microsoft have announced a new ecosystem for secure IoT devices called “Azure Sphere.” This system is threefold: Hardware, Software, and Cloud. The hardware component is a Microsoft-certified microcontroller which contains Microsoft Pluton, a hardware security subsystem. The first Microsoft-certified Azure Sphere chip will be the MediaTek MT3620, launching this year. The software layer is a custom Linux-based Operating System (OS) that is more capable than the average Real-Time OS (RTOS) common to low-powered IoT devices. Yes, that’s right. Microsoft is shipping a product with Linux built-in by default (as opposed to Windows Subsystem for Linux). Finally, the cloud layer is billed as a “turnkey” solution, which makes cloud-based functions such as updating, failure reporting, and authentication simpler.

Continue reading “Microsoft Secures IoT From The Microcontroller Up”

Zephyr Adds Features, Platforms, And Windows

Zephyr is an open source real-time operating system (RTOS) that appeared on the scene a few years ago with support for a few boards. The new 1.11 release adds a lot of features, a lot of new boards, and also has a Windows development environment. But don’t worry, the environment is portable so it still runs on Linux and Mac, as well.

The OS has support for many ARM and x86 boards. It also supports ESP32, NIOS II, and can also target Linux which is useful for debugging or studying execution using desktop tools.

Continue reading “Zephyr Adds Features, Platforms, And Windows”