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”

KiCAD BOM Management

KiCAD remains a popular tool for designing PCBs and other circuits, and with good reason: it’s versatile and it’s got pretty much everything needed to build any type of circuit board you’d want. It also comes with a pretty steep learning curve, though, and [Jeff] was especially frustrated with the bill of materials (BOM) features in KiCAD. After applying some Python and Kivy, [Jeff] now has a BOM manager that makes up for some of KiCAD’s shortcomings.

Currently, the tool handles schematic import, like-component consolidation, and a user-managed parts database that can be used to store and retrieve commonly used parts for the future. All of the changes can be saved back to the original schematic. [Jeff] hopes that his tool will save some time for anyone who makes more than one PCB a year and has to deal with the lack of BOM features native to KiCAD.

[Jeff] still has some features he’d like to add such as unit tests, a user guide, and a cleaner user interface. What other features are you anxious to see added to KiCAD?

This script is a great tool for anyone who has had similar frustrations. KiCAD is popular to modify and expand, too: there have been tools for mechanical CAD export, a parts-generator and cost-tracker, and an Eagle to KiCAD converter if you’re thinking of making the switch.