You are browsing as a guest. Sign up (or log in) to start making projects!

DIY Digital Calipers

Hardware
  • 3 Devlogs
  • 9 Total hours
Open comments for this post

2h 44m 1s logged

Devlog #3

Reconfigured PCB to use surface-mount 74HC595

As the teeth of a through-hole 74HC595 would block the sliding action of the stator, I took some time to redesign the PCB with a surface mount component instead.


3D CAD casing

I also spent some time designing the casing that would hold everything together. It’s a little bulky, but I think it’ll work for now. I will be adding finishing touches (including mounting holes) later.


1
0
40
Open comments for this post

48m 38s logged

Devlog #2

Almost completed PCB Design for slider + stator (design error)

I redesigned my PCB several times to achieve the optimal layout for all the components. I ran into several issues along the way.

1) Rx electrode and Tx transmitter positioning

The Rx electrode and Tx transmitter array are sensitive capacitive devices. When positioned close to other electrical components, parasitic capacitance can be introduced, which can disrupt our weak signal and create crosstalk. It may also affect the integrity of our 8-phase signal, causing phase delays and shifts.

2) Connecting the Tx array pads to the 74HC595

Wiring the Tx array pads (under the Rx electrode) in a way so that every 8th pad was connected was a nightmare. I couldn’t directly draw traces over the copper pads as that would disrupt the ground plane, which is crucial for blocking noise from other components and external sources. For example, the human body is essentially a giant capacitor, and a human placing their hand over an unshielded Tx array would completely ruin our delicate signal. Therefore, it is crucial that the copper traces avoid cutting up as much of the ground plane as possible.

Thus, I ended up reducing the width of both the Rx electrode and Tx array to make extra room for running the copper traces to the side. I also added a small grounded copper pad between the traces and the Rx electrode just to shield it from any parasitic capacitance.

3) Design mistake

I realized just now after looking at the PCBs I ordered that I made a tiny mistake with my op-amp circuit. To the left of my Seeed MCU, I have an op-amp functioning as an ultra-high input impedance buffer. I’ve also attached an image of the schematic.

An op-amp normally takes a weak voltage signal, compares its two inputs, and multiplies the difference to create a much stronger output voltage. On my circuit, Pin 4 and Pin 1 (VOUT) of my circuit are connected to create a 1:1 voltage ratio, creating a unity-gain buffer feedback loop, so no amplification is actually happening. What DOES happen is that we’ve exposed the op-amp’s high input impedance, meaning it draws incredibly little current from our incredibly weak Rx electrode capacitor. This prevents our Rx electrode from just straight discharging our AC signal our circuit - preserving its original timing and phases. We feed the signal into pin 3 of the op-amp, allowing it to ride the 1.65 V (introducing micro-fluctuations, e.g. 1.64V-1.66V), and our op-amp outputs this signal directly to our MCU pin.

My mistake was that I connected the Rx electrode straight to pin 4 instead of pin 3.
I will see if I can fix it with some quick mods. Fingers crossed.


0
0
35
Open comments for this post

5h 12m 1s logged

Devlog #1

I’ve completed a schematic and an initial PCB layout for my own DIY capacitive sensor calipers, although I will definitely redo the layout to ensure a more efficient trace design.

The design of the calipers and how they work

Calipers are fundamentally capacitive sensors, and so I will recreate these precise sensors with carefully placed copper pads on the PCB. The Xiao Seeeduino RP2040 in my design will control the copper pads, and an LCD screen. I’m also using an 74HC595 to convert 3 pin outputs into eight (for the Tx transmitter array discussed later).

The slider and the stator

All the MCU and electrical components will be placed on the slider (head of the calipers). The stator (ruler body) will be a separate, long PCB “stick” that doesn’t contain any electrical components, consisting of only floating copper islands.

The capacitive pads: How is the signal received?
I will be placing several copper islands to form an Receiver (Rx) electrode and a Transmitter (Tx) array on the bottomside of the slider head. The copper islands on the stator will be 2.5mm wide, and placed 2.5mm apart (forming one 5mm cycle). The Tx array on the stator head will consist of a repeating pattern of 8 copper pads spaced apart evenly within every 5 mm cycle.

  1. This configuration essentially forms a capacitor - two conductors separated by a layer of insulating material (a thin sheet of air).
  2. To bridge the air gap between slider and stator, I need to generate an AC signal (which radiates electromagnetic radiation much better than DC). By generating a square wave signal with the 8 copper pads, we can simulate an AC signal without actually using digital-to-analog converters.
  3. I use the 8-pad Tx array to generate an 8-phase signal (driving half of them HIGH and half of them LOW, and then rapidly shifting the square wave right, going from 0deg phase shift to 360deg in 45deg increments). Using the RP2040, I can generate the 8-phase signal at very high speeds (e.g. 100 kHz) with the PIO state machines. A high frequency is needed to limit capacitive reactance (resistance to AC current), whose formula is given by Xc = 1/2πfC. Our homemade capacitor has an extremely low capacitance (C) value (picofarads), and thus my frequency (f) must be high for me to get any usable signal.
  4. No matter the position of our slider, the copper islands on the stator line up most with only certain copper pads on our 8-phase Tx array. When these copper pads are driven HIGH, we read the biggest signal from our Rx electrode. When the copper pads are misaligned, we read a weak signal from our Rx electrode.

The logic behind position

We take two samples (I and Q) at specific phases in the 100 kHz cycle to find the output voltage of the Rx array. Samples that return a strong signal (high output voltage) are samples whose phase aligns strongly with the copper pads of the stator. If the stator is shifted slightly and thus misaligned, the returned signal will be weaker. We can use two samples and some math to easily determine position.


All ICs are to be fitted with decoupling capacitors placed very close by to ensure the voltage supply (VCC) is not overwhelmed by the 100 kHz frequency and that a stable voltage supply is maintained at all times.

0
0
4

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…