
This week's pick is Nick Steele's open capacitive linear encoder: two PCBs and an STM32 that read position to about 40 µm for roughly $32, an advanced build whose accuracy rests on a 0.1 mm gap and a reference indicator.

| Qty | Part | Specification | Role in the build | Price anchor |
|---|---|---|---|---|
| 1 | Sensor PCB | 4-layer, 1.6 mm FR-4, HASL acceptable, 57 × 33 mm 7 | The moving read head and all the electronics | fab order |
| 1 | Reflector PCB | 2-layer, 1.6 mm, 99.8 × 11.8 mm, no components 8 | The fixed copper scale | fab order |
| 1 | MCU | STM32L476RCT6, LQFP-64, Cortex-M4F with FPU, 256 KB flash 9 | Emitter drive, ADC, integrator amplifiers, UART | $4.86 10 |
| 2 | LDO | AP7354-33W5-7, SOT-23-5 9 | Digital 3.3 V rail and a separate analogue rail | $0.24 each 11 |
| 1 | Trimmer capacitor | JR200, C15 9 | Sets the charge integrator's gain | not priced |
| 16 | Capacitor | 9 × 1 µF 0603, 6 × 0.1 µF 0402, 1 × 4.7 µF 0805 9 | Decoupling on both rails | not priced |
| 2 | Capacitor | 1.1 nF and 2.2 nF, 0603, C17 and C18 9 | The two filter poles | not priced |
| 12 | Resistor | 680 k, 100 MΩ, 2 × 5.1 k, 3 × 10 k, 2 × 510 Ω, 3 × 0 Ω, 0603 9 | Bias, integrator leakage, filter, LEDs, links | not priced |
| 2 | Push button | SKRKAHE020, SMD 9 | Boot and reset | not priced |
| 2 | LED | 1206, green and red 9 | Status indication | not priced |
| 1 | Connector | JST PH 5-pin, S5B-PH-SM4-TB, J2 9 | 5 V in, UART transmit and receive, one spare line | not priced |
| 6 | Test point | Keystone 5015 9 | Probe points on the integrator and filter nodes | not priced |
| 5 | Pin | ASPHSPH24K102 9 | Board mounting | not priced |
| 1 set | Unpopulated footprints | 1 pF C16, four 10 k resistors, BSS138, 4-pin JST PH 9 | Options the author left marked DNP | not fitted |


pio run -e release -t upload. 6nucleo_l476rg board definition because it targets the same L476 family, and that definition assumes 1 MB of flash while the sensor board's RC part has 256 KB. The build works; a reader who starts retargeting the project should fix the part in the board definition first. 6w and r, which read and write a list of 20 registers: conversion factor, tare, ADC input, output mode, sequence timing, oversampling window. Timing registers only accept writes while the sensor is stopped, and stopping is a register write of its own. 6LiveView.py plots position and transients live, BurstReader.py saves a burst, and AccuracySamplerCalibration.py drives a Prusa printer through a sweep while reading both the sensor and a Mitutoyo indicator through a second microcontroller. Steele describes them as quick and dirty test scripting that he edits as questions come up. 17
github.com
github.com
github.com
github.com
github.com
github.com
github.com
octopart.com
octopart.com
tag-connect.com
github.com
github.com
github.com
github.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.