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.
- This configuration essentially forms a capacitor - two conductors separated by a layer of insulating material (a thin sheet of air).
- 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.
- 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.
- 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.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.