Direct CNC Control With The Raspberry Pi

If you’re building a CNC router, laser cutter, or even 3D printer, you’ll usually be looking at a dedicated controller. This board takes commands from a computer, often in the form of G-Code, and interprets that into movement commands to the connected stepper motors. Historically this has been something of a necessary evil, as there was really no way to directly control stepper motors with a computer fast enough to be useful. That may not be the case anymore.

A stepstick driver

Thanks to the Raspberry Pi (and similar boards), we now have Linux computers with plenty of GPIO pins. The only thing missing is the software to interpret the G-Code and command the steppers over GPIO, which thanks to [pantadeusz], we now have. Called raspigcd, this software interprets a subset of G-Code to provide real-time control over connected steppers fast enough to drive a small CNC router.

Of course, you can’t directly control a beefy stepper motor to the GPIO pins of a Pi. You’ll let out all the magic smoke. But you can wire it up directly to a stepper driver board. These little modules connect up to a dedicated power supply and handle the considerable current draw of the steppers, all you need to do is provide them the number of steps and direction of travel.

This method of direct control offers some very interesting possibilities for small, low-cost, CNC projects. Not only can you skip the control board, you could conceivably handle the machine’s user interface (either directly via a touch screen or over the network) on the same Pi.

We’ve seen attempts at creating all-in-one Linux stepper controllers in the past, but the fact that anyone with a Raspberry Pi 2 or 3 (the boards this software has currently been tested on) can get in on the action should really help spur along development. Has anyone used this?

Soundproofing A CNC Mill Conversion

The Proxxon MF70 is a nice desktop sized milling machine with a lot of useful add-on accessories available for it, making it very desirable for a hacker to have one in his or her home workshop. But its 20000 rpm spindle can cause quite the racket and invite red-faced neighbors. Also, how do you use a milling machine in your home-workshop without covering the whole area in metal chips and sawdust? To solve these issues, [Tim Lebacq] is working on Soundproofing his CNC mill conversion.

To meet his soundproof goal, he obviously had to first convert the manual MF70 to a CNC version. This is fairly straightforward and has been done on this, and similar machines, in many different ways over the years. [Tim] stuck with using the tried-and-tested controller solution consisting of a Raspberry Pi, an Arduino Uno and a grbl shield sandwich, with stepper motor drivers for the three NEMA17 motors. The electronics are housed inside the reclaimed metal box of an old power supply. Since the Proxxon MF70 is already designed to accept a CNC conversion package, mounting the motors and limit switches is pretty straightforward making it easy for [Tim] to make the upgrade.

Soundproofing the box is where he faced unknown territory. The box itself is made from wooden frames lined with particle board. A pair of drawer slides with bolt-action locks is used for the front door which opens vertically up. He’s also thrown in some RGB strips controlled via the Raspberry-Pi for ambient lighting and status indications. But making it soundproof had him experimenting with various materials and techniques. Eventually, he settled on a lining of foam sheets topped up with a layer of — “bubble wrap” ! It seems the uneven surface of the bubble wrap is quite effective in reducing sound – at least to his ears. Time, and neighbours, will tell.

Maybe high density “acoustic foam” sheets would be more effective (the ones similar to “egg crate” style foam sheets, only more dense)? Cleaning the inside of the box could be a big challenge when using such acoustic foam, though. What would be your choice of material for building such a sound proof box? Let us know in the comments below. Going back many years, we’ve posted about this “Portable CNC Mill” and a “Mill to CNC Conversion” for the Proxxon MF70. Seems like a popular machine among hackers.

Build Your Own Android Smartphone

Let’s get this out of the way first – this project isn’t meant to be a replacement for your regular smartphone. Although, at the very least, you can use it as one if you’d like to. But [Shree Kumar]’s Hackaday Prize 2018 entry, the Kite : Open Hardware Android Smartphone aims to be an Open platform for hackers and everyone else, enabling them to dig into the innards of a smartphone and use it as a base platform to build a variety of hardware.

When talking about modular smartphones, Google’s Project Ara and the Phonebloks project immediately spring to mind. Kite is similar in concept. It lets you interface hacker friendly modules and break out boards – for example, sensors or displays – to create your own customized solutions. And since the OS isn’t tied to any particular brand flavor, you can customize and tweak Android to suit specific requirements as well. There are no carrier locks or services to worry about and the bootloader is unlocked.

Hackaday Show-n-Tell in Bangalore

At the core of the project is the KiteBoard – populated with all the elements that are usually stuffed inside a smartphone package – Memory, LTE/3G/2G radios, micro SIM socket, GPS, WiFi, BT, FM, battery charging, accelerometer, compass, gyroscope and a micro SD slot. The first version of  KiteBoard was based around the Snapdragon 410. After some subtle prodding at a gathering of hackers in Bangalore, [Shree] moved over to the light side, and decided to make the KiteBoard V2 Open Source. The new board will feature a Snapdragon 450 processor among many other upgrades. The second PCB in the Kite Project is a display board which interfaces the 5″ touchscreen LCD to the main KiteBoard. Of Hacker interest is the addition of a 1080p HDMI output on this board that lets you hook it up to external monitors easily and also allows access to the MIPI DSI display interface.

Finally, there’s the Expansion Board which provides all the exciting hacking possibilities. It has a Raspberry Pi compatible HAT connector with GPIO’s referenced to 3.3 V (the KiteBoard works at 1.8 V). But the GPIO’s can also be referenced to 5 V instead of 3.3 V if you need to make connections to an Arduino, for example. All of the other phone interfaces are accessible via the expansion board such as the speaker, mic, earpiece, power, volume up / down for hacking convenience. The Expansion board also provides access to all the usual bus interfaces such as SPI, UART, I²C and I²S.

To showcase the capabilities of the Kite project, [Shree] and his team have built a few phone and gadget variants. Build instructions and design files for 3D printing enclosures and other parts have been documented in several of his project logs. A large part of the BoM consists of off-the-shelf components, other than the three Kite board modules. If you have feature requests, the Kite team is looking to hear from you.

When it comes to smartphone design, Quantity is the name of the game. Whether you’re talking to Qualcomm for the Snapdragon’s, or other vendors for memory, radios, displays and other critical items, you need to be toeing their line on MOQ’s. Add to this the need to certify the Kite board for various standards around the world, and one realizes that building such a phone isn’t a technical challenge as much as a financial one. The only way the Kite team could manage to achieve their goal is to drum up support and pledges via a Kickstarter campaign to ensure they have the required numbers to bring this project to fruition. Check them out and show them some love. The Judges of the Hackaday Prize have already shown theirs by picking this project among the 20 from the first round that move to the final round.

Continue reading “Build Your Own Android Smartphone”

1960’s Console Stereo Gets Raspberry Pi Touch Screen

When he was but a wee hacker, [WhiskeyDrinker] loved to play with the big console stereo his grandparents had. The idea of a functional piece of furniture always appealed to him, and he decided that when he grew up and had a place of his own he’d get a similar stereo. Fast forward to the present, and a Craigslist ad for a working Penncrest stereo seemed to be a dream come true. Until it wasn’t.

The original physical controls are connected to the Pi’s GPIO

As difficult as it might be to believe, sometimes things we read on the Internet are not true. The “working” Penncrest radio turned out to be a dud. But realizing that the look of the cabinet was more important to him than historical accuracy, [WhiskeyDrinker] decided to outfit it with a Raspberry Pi powered touch screen that would look as close to stock hardware as possible.

The final result really does look like some kind of alternate timeline piece of consumer electronics: where chunky physical buttons and touch screens coexisted in perfect harmony. The vintage stereo aficionados will probably cry foul, but let them. [WhiskeyDrinker] did a fantastic job of blending old and new, being respectful to the original hardware and aesthetic where it made sense, and clearing house where only nostalgia had lease.

A HiFiBerry DAC+ Pro is used to get some decent audio out of the Raspberry Pi, and the touch screen interface is provided by Volumio. [WhiskeyDrinker] mentions that it even has a GPIO plugin which he successfully used to handle getting the physical buttons to play nice with their digital counterparts.

Updating old audio gear is always a sensitive subject around these parts. Sometimes they go so far that the original hardware is almost an afterthought. On the other side of the spectrum are the projects which try to take modern gear and mimic the look of the classics. In any event, one thing is clear: they don’t make ’em like they used to.

Continue reading “1960’s Console Stereo Gets Raspberry Pi Touch Screen”

Raspberry Pi Becomes Cycle Exact Commodore Drive Emulator

The Commodore 1541 disk drive is unlike anything you’ll ever see in modern computer hardware. At launch, the 1541 cost almost as much as the Commodore 64 it was attached to ($400, or about $1040 at today’s value). This drive had a CPU, and had its own built-in operating system. Of course, anyone using a Commodore 64 now doesn’t deal with this drive these days — you can buy an SD2IEC for twenty dollars and load all your C64 games off an SD card. If you’re cheap, there’s always the tape drive interface and a ten dollar Apple Lightning to 3.5mm headphone adapter.

But the SD2IEC isn’t compatible with everything, and hacking something together using the tape drive doesn’t have the panache required of serious Commodoring. What’s really needed is a cycle-accurate emulation of the 1541 disk drive, emulating the 6502 CPU and the two 6522 VIAs in this ancient disk drive. The Raspberry Pi comes to the rescue. [Steve White] created the Pi1541, an emulation of the Commodore 1541 disk drive that runs on the Raspberry Pi 3B.

Pi1541 is a complete emulation of the 6502 and two 6522s found inside the Commodore 1541 disk drive. It runs the same code the disk drive does, and supports all the fast loaders, demos, and copy protected original disk images that can be used with an original drive.

The only hardware required to turn a Raspberry Pi 3 into a 1541 are a few transistors in the form of a bi-directional logic level shifter, and a plug for a six-pin serial port cable. This can easily be constructed out of some Sparkfun, Adafruit, Amazon, or AliExpress parts, although we suspect anyone could whip up a Raspberry Pi hat with the same circuit in under an hour. The binaries necessary to run Pi1541 on the Raspberry Pi are available on [Steve]’s website, and he’ll be releasing the source soon.

This is a great project for the retrocomputing scene, although there is one slight drawback. Pi1541 requires a Raspberry Pi 3, and doesn’t work on the Raspberry Pi Zero. That would be an amazing bit of software, as ten dollars in parts could serve as a complete emulation of a Commodore disk drive. That said, you’re still likely to be under $50 in parts and you’re not going to find a better drive emulator around.

Continue reading “Raspberry Pi Becomes Cycle Exact Commodore Drive Emulator”

3D Printering: Which Raspberry Pi Is Best At Slicing In Octoprint?

OctoPrint is arguably the ultimate tool for remote 3D printer control and monitoring. Whether you simply want a way to send G-Code to your printer without it being physically connected to your computer or you want to be able to monitor a print from your phone while at work, OctoPrint is what you’re looking for. The core software itself is fantastic, and the community that has sprung up around the development of OctoPrint plugins has done an incredible job expanding the basic functionality into some very impressive new territory.

RAMBo 3D controller with Pi Zero Integration

But all that is on the software side; you still need to run OctoPrint on something. Technically speaking, OctoPrint could run on more or less anything you have lying around the workshop. It’s cross platform and doesn’t need anything more exotic than a free USB port to connect to the printer, and people have run it on everything from disused Windows desktops to cheap Android smartphones. But for many, the true “home” of OctoPrint is the Raspberry Pi.

As I’ve covered previously, the Raspberry Pi does make an exceptional platform for OctoPrint. Given the small size and low energy requirements of the Pi, it’s easy to integrate into your printer. The new Prusa i3 MK3 even includes a header right on the control board where you can plug in a Raspberry Pi Zero.

But while the Raspberry Pi is more than capable of controlling a 3D printer in real-time, there has always been some debate about its suitability for slicing STL files. Even on a desktop computer, it can sometimes be a time consuming chore to take an STL file and process it down to the raw G-Code file that will command the printer’s movements.

In an effort to quantify the slicing performance on the Raspberry Pi, I thought it would be interesting to do a head-to-head slicing comparison between the Pi Zero, the ever popular Pi 3, and the newest Pi 3 B+.

Continue reading “3D Printering: Which Raspberry Pi Is Best At Slicing In Octoprint?”

Raspberry Pi Is Up Up And Away

BACAR — Balloon Carrying Amateur Radio — is just what it sounds like. A high-altitude balloon carries experiments and communicates via amateur radio. [ZR6AIC] decided to fly a payload in a local BACAR experiment. The module would send its GPS position via the APRS network and also send a Morse code beacon every seven minutes. It also sends other data such as temperature, and has an optional camera fitted.

The hardware used was the ubiquitous Raspberry Pi along with an associated daughterboard for transmitting on the 2 meter ham band. An RTL dongle took care of the receive portion and another dongle provided GPS. A DS18B20 temperature sensor provides the temperature data.

Continue reading “Raspberry Pi Is Up Up And Away”