Wednesday, January 13, 2021

Digital Readout (DRO) for mini lathe using cheap digital calipers

Digital calipers can be used as an inexpensive alternative to a commercially available DRO for home workshop machine tools.

Many hobbyists attach the calipers to the axis of their machines, and use the screen and buttons directly on the calipers as a DRO. This has several disadvantages:

  • Calipers are not shielded from cutting fluids and chips
  • While you can zero the caliper, there is no way to set the position to a value.
  • For a lathe, the X-axis dimension will be a radius, not a diameter.

The PCB of commonly available digital calipers has traces for serial data output which can be read by a microcontroller. Use of a microcontrolled enables the connection of a display, and calculation of relative position from a user input entered by way of a keypad.

Example: Use of DRO with lathe turning operation

  1. Round stock is placed in the lathe chuck.
  2. Stock is faced, and the Z-axis is zeroed.
  3. Stock is turned lightly to remove any eccentricity, and the diameter is measured. This X-axis diameter is entered into the DRO using the keypad.
  4. The part can then be turned to the correct length as displayed by the DRO Z value, and to the correct diameter as displayed by the DRO X value.

In this project, I have connected two sets of digital calipers to an Arduino Nano board to display the X (cross slide) axis diameter and Z (carriage) axis position of my 7x14 mini lathe. The DRO is accurate to 0.01mm in the Z-axis, and 0.02mm in the X-axis diameter (this is because the cut of the diameter is 2 x the travel of the caliper scale).

I have also written code and included connections in the schematic for a 3 axis version for a milling machine.

Modification of calipers

Calipers were disassembled, and connections soldered for the serial line.
I used CAT5 cable as it was what I had available.
Cable secured to case of calipers.
The jaws were cut to size with an angle grinder, and slots cut for M4 screws to fix the calipers to the mini lathe. Caliper jaws are made of hard steel, so drilling is not advisable. Slots also allow for some adjustment.
Modified calipers were reassembled and tested.


Calipers are ordinarily powered from a 1.5V battery. A circuit was designed to supply the calipers with 1.5V, and to convert the serial line to the 5V logic level required by the Arduino nano microcontroller.

An I2C display is used for the screen, and a matrix keypad for user input.

PCB design

The PCB was drawn to the dimensions of the lid of an off the shelf plastic enclosure, and all through hole components were hidden behind the keypad.

The PCB was printed by JLC PCB.
Components were soldered in place.
The PCB mounts nicely to the enclosure.

I have as yet neglected to print a sticker for the keypad.

User interface

Mounting calipers to the mini lathe

Holes were drilled and tapped in cross slide for M4 screws to mount the X-axis caliper.
An M4 nut was soldered to the sheet metal chip shield to form an integral bracket.
Chip shield installed and X-axis caliper mounted.
A small aluminium clamp was milled to fix the Z-axis calipers to the lathe bed ways. The clamp allows you to adjust position of the bracket, as the calipers only permit ~140mm of travel.

Chip shield installed over Z-axis calipers.

DRO mount

The DRO is attached to the mini lathe using a cheap "magic arm" camera mount for easy adjustment.

The plastic packaging that the enclosure was sold in protects the DRO from cutting fluid and chips.

Project Files 

Friday, June 19, 2020

DC Motor Controller Circuit using Triac Dimmer

This circuit has been designed for use with 200VDC motors, such as those found in treadmills.
It uses a cheap triac motor controller, which can be found on eBay listed as 2000W SCR Motor Controller.

With an input of 240V AC, the maximum rectified output of the SCR controller will be 340V DC peak. The circuit was modified for use with 200V DC treadmill motors. This simply required replacing one resistor on the PCB (see schematic).

The circuit fits in a small metal enclosure.

Homemade Milling Machine

This milling machine is the result of years of tinkering in the home workshop, and is built mostly from scrap materials at low cost.

This project started as a lathe, but after encountering significant difficulty in the construction of the project, I decided to purchase a mini lathe instead. The project was then repurposed to a milling machine.

X-axis travel is 120mm, Y-axis travel is 60mm, with ample Z-axis travel.


The headstock is 90x90 thick wall square section.
The 20mm spindle holds MT2 tooling with a drawbar.

The spindle has a shoulder on the bottom end, and is threaded at the top to accept a brass nut, which presses against the pully and two turned aluminium spacers in order to pre-load the flange bearings.
The Z-axis ways were constructed by welding two pieces of angle iron together, and is mounted to rectangular tubing.
The entire carriage assembly is made from 6mm cold rolled steel.

A bolt in a tapped hole in the carriage presses against a turned button to lock the Y-axis.

Pulleys and handwheels were turned from a length of 65mm diameter aluminium purchased from a scrap yard.

All leadscrews are M6 threaded rod, as the 1mm pitch made dividing the 0.1mm handwheel graduations simple.

A 10mm nut on each handwheel allows power feed by use of a power drill.

The motor was taken from a scrapped treadmill, and is controlled by a modified triac based motor controller bought cheaply on eBay. 


MT2 tool holder for 6mm HSS end mill.
Made from a spare Jacobs taper adapter. 
Bored and tapped for M6 drawbar.

MT2 Fly cutter holds lathe tools.
Made from a spare lathe centre.
Bored and tapped for M6 drawbar.

Mini Lathe

A 7x12" mini lathe is an excellent addition to the home workshop. With some patience it can produce parts to a high standard. As with most cheap import tools, the mini lathe will require modification and repair upon purchase.

Initial Modifications

Visually inspect the earth connection behind the motor controller housing. Unscrew the terminal from the headstock and remove any paint from the contact area. Reconnect the earth and test with a multimeter. Earth continuity must be less than 1Ω from the chassis to the earth pin of the cord.

Inspect the mains fuse and confirm that it is T4A. A higher value will cause significant damage to the controller board under fault conditions.

Take apart carriage, slides and apron, and clean with kerosene to remove grinding dust from the factory.
Deburr all sharp edges, including the bed, carriage assembly, and tool post.
Glue sheet metal over holes in chassis to prevent swarf getting into the motor.
Use short screws to fill tapped holes in carriage, again to prevent swarf ingress.

After the lathe is full re-assembled, take some time to carefully adjust the gib screws in the cross slide and compound slide.

Align the tailstock. This can be done quickly by putting a centre in the tailstock and aligning it to a piece of stock in the 3 jaw chuck which has been turned to a point. Having the two points aligned when the tailstock is both the fully extended and fully retracted will ensure that the tailstock is parallel to the lathe bed.
A more accurate test is to turn a piece of stock, held between centres and driven by a dog, along the length of the bed. The diameter is measured at each end to determine the tailstock offset.

Periodic Maintenance

Remove the sheet metal motor cover and check that no swarf has entered the motor housing. If chips short against the motor brushes, the control board will fail. 
Oil the bearing surfaces and lead screws, and apply lithium grease to the change gears.

The printed board assembly of the mini lathe is commonly marked SCR-340 with a sticker on the heatsink. The silkscreen on my printed board is marked FzDz Ver1. A, but this seems to vary between manufacturers.
The circuit and printed board design appears to be a copy of the KBLC-240D. Unfortunately, the component names are different.

If the lathe trips an RCD, or otherwise fails to turn on, disconnect mains power and check the fuse. DO NOT replace the fuse without further inspection. Check the motor is free of swarf, then check for blown components on the main board.

Use a multimeter to diode check D2 and D3, and check resistance of R8. Replace any blown components.

Further modifications

Tuesday, October 4, 2016

SMD Beak

An SMD Beak is used to hold a surface mount device in place as you solder it, leaving both of your hands free to hold your iron and solder. The idea came from Vpapanik. The beak must be sharp in order to grip the device you are soldering, and have enough mass so as not to be moved easily. My design is adjustable and folds flat after use.

3mm mild steel was cut to 10mm strips.
Base is tack welded in place.
Holes drilled to fasten the arm with a wing nut.
Beak arm sharpened to a point.

Tools for the Electronics Tradesman

As with any trade, purchasing the right tools for a job in the electronics industry is essential. Here I have listed the tools that I believe are necessary for an apprentice starting work in the electronics industry.

The tools for the electronics tradesman will vary between disciplines. The majority of work I do is amplifiers repairs, with some fabrication of enclosures and the like. An embedded design engineer would have tools specific to that area, but many of the tools listed here would still be relevant.

You will not need to purchase all of these tools at once, rather you will add each tool as it is needed over the course of an apprenticeship. A soldering station will likely be supplied by your employer. A nice pair of side cutters and a set of insulated screwdrivers are essential. As soon as you can afford it, purchase a large rolling tool chest with sliding drawers.

As you accumulate more tools, careful attention should be paid to organisation. It saves a lot of time if tools used for particular tasks are grouped together.

Toolbox Top: large frequently used tools.
Probes + Clip leads for multimeters.
Two Multimeters; Measure voltage and current at the same time or monitor dual supply rails.
Discharge resistor 25W 40R, used to discharge supply capacitors before working on a PCB.
Helping hands for holding connectors when terminating.
SMD beak; a small pointed arm that holds SMDs in place while soldering.
Small socket set, Hacksaw and safety glasses.
Stanley security driver set.
IR thermometer; check heatsink thermal protect circuits are working correctly.
Small top drawers: Small tools.
Combination spanner set.
Punches, deburring tool.
Small screwdriver set.
Screwdriver bits.
IDC removal tool, Tweezers, Prying tools.
Torch, Otoscope for inspecting small devices.

Second drawer: Most frequently used tools.
Stubby screwdrivers.
Insulated screwdriver set.
Bullnose pliers, Wire strippers, Long nose pliers.
Screw removal pliers.
Small long nose pliers.
Side cutters *2; keep an old pair for cutting steel wire.
Third drawer: Measuring tools.
Vernier calipers.
Square and 12" Ruler.
Caliper set.
Screwdriver extension bit.
Microphone for testing audio inputs.
Fourth drawer: Fabrication tools.
Files + wire brush or file card.
Tin snips.
Large shifter.
Ball peen hammer.
25mm scraper.
Drill bits.
Fifth drawer: Infrequently used tools.
Analog multimeter.
Cable tester.
Wooden mallet.
Large socket set.
Stanley knife blades.
Hacksaw blades.
Above workbench: Test equipment
Curve tracer for power-off in-circuit testing.
Mains current limiter.
Speaker impedance tester.
Dual rail lab supply.
Above workbench: 
Device programmers, Connectors, Test CDs.
Scope probes and Differential Scope Probes
Alligator leads.
Solder, solder wick, solder sucker.
Containers for holding screws.
A good quality temperature controlled soldering iron is essential. I use the JBC CD2BB, as it has easily removable tips and heats up very quickly.

A PC modified with a power button on the rear of the case allows easy access to all ports.
I also find it necessary to wear a tool belt, so that I always have these items on hand:
Markers and pen.
Small note pad.
Tape measure (for measuring freight boxes).
Folding stanley knife.

A lot can be learned from tools of other trades; Tom from OX Tools produced a great video on tools for the apprentice machinist.

Thursday, April 21, 2016

Speaker Impedance Measurement

Comparing two speakers side by side is the best way diagnose a fault, but it's likely you will not always be able to do this. Speaker impedance measurement software is a useful tool for recording the characteristics of a woofer or speaker box for future comparison.

Different from a frequency response graph, an impedance graph indicates load on the amplifier vs frequency. 
Software produces a sine sweep (or pink noise). This signal is taken from the PC output and amplified. Current (voltage across a known resistance) and voltage of the output is measured, and fed back into the PC. Software then calculates Impedance and compares it to the source signal.

Here is a comparison of a speaker before (gray) and after repairing a fault in the crossover (black). Note the significant difference in impedance at 4kHz.

LIMP by Artalabs is the software used in this project.
It has great calibration tools, and a thorough tutorial.

My example; Speakon connects to woofer  / speaker box to be tested, 3.5mm TRS are used for simple interfacing with PC.

Constructed from several other PCB projects (TDA7294 50W amplifier, and Differential Scope Probe circuits), with point to point wired linear supply for simplicity. These were just things I had on hand at the time of construction.
Output of the amplifier passes through a 1R 10W sense resistor. 
Sense outputs are voltage dividers, and PC mic level inputs are buffered.