A raspberry pi-based digital readout above an old lathe

Roll Your Own DRO With An Added Twist

When using a manual machine tool such as a lathe or milling machine, there can be a lot of pressure to read the position and feed the axes at the correct rate. That’s why modern machines typically have some form of digital read-out (DRO). [Stefano Bertelli] has created a simple Raspberry Pi based DRO with an additional twist, that of a linked motor drive output.

A view of the custom RS485 interfaced DRO readout and motor controller
Realtime encoder position reading and motor control are best done with a dedicated microcontroller, ideally with a proper RTOS.

The axes that need to be monitored should be mechanically attached to a position sensor like a linear encoder or a rotary type. Using a linear sensor with a linear axis instead of a rotary encoder on the downstream dial is better. For the readout unit, [Stefano] used a WaveShare 7-inch touchscreen module with a Raspberry Pi 3 for the UI of the readout unit. The Pi has a custom-designed HAT, that performs power conditioning and provides a robust RS485 interface. Connected via that RS485 link is another custom PCB based on an STM32F411 with a few supporting power supplies and interfacing components. The job of this board is to interface to the position encoders, reading positioning pulses using interrupts. There is an additional stepper motor drive courtesy of a ULN2003 Darlington driver to allow the control of a single motorised axis. An additional motor driver module is required, which should be no surprise since driving a milling machine axis will require a fairly beefy motor. This GitHub repo contains the FreeRTOS-based firmware for this board. This motor drive has the ability to be connected to a measuring axis in a programmable way, enabling one axis to be adjusted to follow or jump in controlled steps with another. This feature can significantly simplify certain types of machining operations, as [Stefano] elaborates in the video.

Lastly, the Raspberry Pi runs a simple Python application with Kivy for the GUI. As [Stefano] explains in the video below, this makes debugging and modification quite simple.

Adding DROs to an older machine is an obvious but valuable hack. Here’s another way to do it. If that’s too much work, then you could just hack a digital readout calliper in there.

Continue reading “Roll Your Own DRO With An Added Twist”

Hackaday Prize 2023: PAROL6 – A GPL Desktop Robotic Arm

Parol 6 is a 3D-printed six-axis robot arm created by [Petar Crnjak] as a combination of the principles from a few previous projects. Aside from a pneumatic gripper, each axis is driven by a stepper motor, with at least a few of these axes being driven through a metal planetary gearbox for extra precision and torque.

From what we can glean from the work-in-progress documentation, there are some belt drives on four of the relevant axes and a mix of NEMA17 format steppers driving either 20:1 or 10:1 reduction boxes. There appears to be a mix of inductive sensors and traditional microswitches used, but it’s not so easy to work out where these are placed. Continue reading “Hackaday Prize 2023: PAROL6 – A GPL Desktop Robotic Arm”

The Virtue Of Wires In The Age Of Wireless

We ran an article this week about RS-485, a noise resistant differential serial multidrop bus architecture. (Tell me where else you’re going to read articles like that!) I’ve had my fun with RS-485 in the past, and reading this piece reminded me of those days.

You see, RS-485 lets you connect a whole slew of devices up to a single bundle of Cat5 cable, and if you combine it with the Modbus protocol, you can have them work together in a network. Dedicate a couple of those Cat5 lines to power, and it’s the perfect recipe for a home, or hackerspace, small-device network — the kind of things that you, and I, would do with WiFi and an ESP8266 today.

Wired is more reliable, has fewer moving parts, and can solve the “how do I get power to these things” problem. It’s intrinsically simpler: no radios, just serial data running as voltage over wires. But nobody likes running cable, and there’s just so much more demo code out there for an ESP solution. There’s an undeniable ease of development and cross-device compatibility with WiFi. Your devices can speak directly to a computer, or to the whole Internet. And that’s been the death of wired.

Still, some part of me admires the purpose-built simplicity and the bombproof nature of the wired bus. It feels somehow retro, but maybe I’ll break out some old Cat5 and run it around the office just for old times’ sake.

Hacker Dictionary: RS-485 Will Go The Distance

RS485 is a communication standard that should be part of the advanced hardware hacker’s arsenal; it’s not commonly encountered, but powerful exactly when you need it. It’s a physical layer interface for wired communications that uses a single differential pair for noise immunity, has good long-distance properties, and allows many connections to a single bus. Because of that, you will encounter it in security systems and even cameras, wired sensor networks, DMX512 lighting and all sorts of industrial electronics. For our hobbyist goals, you can absolutely use RS485 to build your home (or room) automation system, or a relatively large robot – without all those worries that wireless brings.

The name might remind you of RS232, and that’s because both RS232 and RS485 are standards that come from EIA (Electronics Industries Alliance). It also might remind you of RS422, if you’ve ever seen this name mentioned online – RS422 and RS485 are closely intertwined, sharing most of the physical layer, and I’ll show how exactly they relate. Continue reading “Hacker Dictionary: RS-485 Will Go The Distance”

A PoE adapter's RJ45 jack added inside an Acer laptop

Laptop Empty Space Filled With RS485 And PoE

Out of all the laptop upgrade options typically available, you wouldn’t expect this specific one. [controlmypad] decided to take a part of his RS485 device programming workflow and put it inside of a spare laptop he picked up for cheap. Typically, he’d occupy some desk space and lay out an unwieldy combination of a USB-RS485 dongle, a PoE power injector, a PSU for that injector, and a few cables to join it all – being extra weight in the tool bag, cluttering the workspace when laid out, and the RS485 adapter slowly wearing out the USB ports during the work-related motions. No reason that all of this couldn’t be packed inside a laptop, however.

What helps a lot is that, in many modern cheap laptops, the motherboard is fairly small, and the DVD drive plastic placeholder can be omitted without second thought. Cutting off the plastic molding from both of the adapters turns them into a nicely reusable circuit board and a small PoE module, respectively. After laborious yet careful cutting of the laptop case with a hobby knife, the PoE injector fits right in and, essentially, adds an extra RJ45 port to the laptop. From where the Hackaday.io write-up left off, it doesn’t seem like this mod got fully completed, but most of the important details are there for us to learn from. What got left out is connecting it to an internal USB port (should help that the motherboard’s schematics are available online), as well as creating 12V-24V from the laptop’s power rails. At this point, however, this mod is a big step forward usability-wise, even if it still requires an external PSU.

Laptop internal upgrade projects are rare but cherished – it’s a combination of “daring”, “inquisitive” and “meticulous” that results in people successfully hacking on a thing they certainly were not meant to hack, and have that thing serve their needs better. Apart from all the EEE PC upgrade options that set the bar for a generation of laptop modders, there’s a myriad of unconventional laptop modification vectors – you could do a thorough from-scratch Type-C charging port conversion, replace your webcam with an FSF-endorsed open firmware WiFi dongle, build in a “12-axis” sensor for auto-orientation and data-logging, or invent a remote self-destruct mechanism for your laptop. Those are, indeed, quite a few things you won’t typically find in the list of available options while customizing your laptop at the manufacturer website.

Learn DMX512 Basics

If you’ve done anything with modern lighting effects, you’ve probably heard of DMX, also known as DMX512. Ever wonder what’s really happening under the hood? If so, then you should have a look at [EEForEveryone’s] video on the topic, which you can see below.

At the core, the DMX512 uses RS485, but adds software layers and features. The video uses the OSI model to show how the system works.

Continue reading “Learn DMX512 Basics”

Meter All The Phases: Three Phase Energy Meter With OpenWrt

Keeping track your overall electricity usage is a good thing, and it’s even better if you know where all the kilowatt-hours are going. [Anurag Chugh’s] house has the three phases coming from the electrical distribution box tidily organized: One for the lighting and fans, one for household appliances, and one for the hot water supply. To monitor and analyze the electrical fingerprint of his house, [Anurag] installed a 3 phase energy meter and hooked it up to the internet.

Continue reading “Meter All The Phases: Three Phase Energy Meter With OpenWrt”