In the previous article we introduced the Vortex ring and derived the governing equations. We found that the voltage developed on the sense coil could be described by the following equation:
We also defined a rough process for designing the ring.
The first step is to select the material and dimensions of the ring itself. For a proof of concept, it is unnecessary and expensive to create a custom ring and so instead I looked online for existing solutions. Luckily, toroidal ferrite cores are a common component for creating inductors and transformers. These are effectively just a ring of a high permeability material which is exactly what I need – although they aren’t generally made to fit on a finger. The best solution I found was the TDK Electronics B64290L0647X038 which has an inner diameter of 17.7mm, an outer diameter of 31.0mm and a length of 16.1mm. The magnetic permeability is about 10000 which is pretty good. This is definitely a chunky ring and barely fits on my finger, but it was the best off-the-shelf compromise I could find for now. The effective area and effective magnetic length can be read from the data sheet as 76.98mm2 and 73.78mm.
Touch Target Properties
Depending on the application, the optimal touch target properties are likely to change, so I made some assumptions. I assumed that the finger contact area would be about 30mm2 with a 120µm layer of FR4 between the finger and the copper – based on an example of a 4-layer PCB stackup. This gives a capacitance of about Cf = 10pF.
I selected a frequency of 100kHz based on what I thought would be the highest frequency I could easily generate, sample and demodulate in real time, though this is fairly arbitrary. I also selected a high resonance safety factor of x=5 to ensure that I was staying well away from resonance and to allow room for error in my predicted resonant frequency.
The drive voltage was selected to be 3V based on 3.3V being a common digital electronics frequency, so DACs and other components would be readily available.
The parasitic capacitance of the sense coil comes from the capacitance of the coil itself, the PCB on the ring, and the input capacitance of the sense circuitry. I selected the lowest input capacitance amplifier I could find which is the LTC6268 with only 450fF of input capacitance. I estimated that the lowest capacitance I could achieve would be around 2pF, so that is the value I selected. Having chosen a large resonance safety factory I have some leeway here.
With all of these parameters defined we can now calculate the number of turns required on our coil. Because the core has a wide inductance factor, AL, of +/-30% (this is the combined effect of A, le and µ), I wrapped 25 turns around the coil and measured the inductance to calculate the inductance factor. If the specified value were exact we would expect to measure 8.19mH however I measured only 6.7mH at 200kHz. This means that our nominal inductance factor decreases from the nominal 13100nH/turn2 to 10700nH/turn2.
This gives us an ideal value of N=69.
With the values defined above we can expect a peak-to-peak signal of about 8.7mV which will need to be amplified so we can measure it. If we want to achieve 2Vpkpk we require a gain of 229x.
For this we use the LTC6268 as previously mentioned, with a 220x gain created by the feedback resistors R4 and R5. Because the input is an AC signal around 0V, we need to capacitively couple the signal onto the mid-rail value which is achieved with C2, R2 and R3 This is effectively a high-pass filter with cut-off frequency of 318Hz which is well below our operating frequency of 100kHz. The feedback circuit also requires C8 to ensure zero gain at DC to prevent us saturating the amplifier.
Rather than include the analog sampling on the ring for the first prototype, I included a small U.FL connector to allow me to connect an oscilloscope to the ring and measure the signal. This allows for easy debugging and algorithm development as the data can be piped straight into my computer for easy visualisation and processing.
The PCB layout is a pretty simple two-layer design. Two pads are included in the bottom left for power and ground which goes to a 3.3V regulator. The coil is passed through the circular cutout in the centre and soldered to the two pads at the top. The signal is then amplified and passed to the U.FL connector on the right hand side.
The ring sits on a simple 3D printed base that is affixed to the ring with double-sided tape.
Because we have such a small signal due to the magnetic field, we need to minimise any other sources of noise or signal. One key factor is to ensure that there is no capacitive coupling between the coil and the finger or touch target. This is because we want to ensure that any signal we see is purely due to current in the finger and not due to capacitive coupling due to the proximity to the signal source – this is critical for security to prevent malicious injected signals. To achieve this, we cover the entire ring in copper tape that we then connect to ground. One critical consideration is to make sure that we do not create a secondary loop through the ring, as this would kill our magnetic field due to the induced currents in that loop. Therefore we must be sure to leave a gap in the shielding to prevent these currents.
Adding shielding will increase the parasitic capacitance on the coil due to proximity to grounded metal, but I have not yet quantified by how much exactly.
The completed ring definitely looks like a prototype. It isn’t very comfortable to wear, but it’s not terrible.
To test out the ring I created a simple keypad with 11 buttons – the numbers 0-9 with an extra button.
The buttons are just circular pads of copper on the top layer that are driven with a 100kHz signal. This signal is then modulated to encode which button it is. The data is encoded simply as a series of 1s and 0s where a 1 is represented by a 500µs burst of 100kHz whereas a 0 is 500µs of no signal. The packet beginning is marked by a one followed by a zero. The packet has a fixed length of 8-bits and the end of the packet is marked with a zero followed by a one. This is definitely not an optimal encoding scheme, but is sufficient for now.
The 100kHz signal is generated using an AD9837 DDS chip and is then buffered. Each touch target has it’s own buffer that can be enabled or disabled by the STM32 microcontroller to modulate the signal and encode the data.
For the first prototype I left any kind of digital electronics off the ring. This means that to capture the waveform I need an oscilloscope connected to the U.FL connector.
I used my Picoscope 2205A which is a two channel 25MHz USB oscilloscope to capture the data via the pico-python project from Colin O’Flynn which allows me to directly capture data into Python and process it. With this method I set up the scope to capture 20ms of data at about 390k samples per second which is enough for a 100kHz signal. We then need to take this raw data and demodulate it.
In the image above we show the raw data captured by the oscilloscope in orange. The first step is to demodulate the data and this is achieved by typical IQ-Demodulation, which involves multiplying the signal by a 100kHz sine- and cosine-wave, low-pass filtering the results and taking the square-root of the sum. This leaves us with the green line plotted above which is clearly very close to the transmitted data – visually we can see that it represents the data 101010000001 which matches what we transmit on the 4-button. However, the software needs to know where to sample the bits, since the packet can appear anywhere inside that 20ms window. To find the location of the data packet we are looking for two 500µs pulses separated by 5.5ms which represent the bits transmitted at the start and end of the packet. This is achieved by convolving the green data with a “template function” which is simply a 6ms length piece of data with zeros everywhere except for ones where the pulses should be. The resulting peak of this convolution indicates the location of the start of packet. We represent this by plotting the template function in blue, starting at the start of the packet. We can now distribute our samples along the packet, represented by the red dots.
It turns out that wearing a ring with long wires to an oscilloscope and power supply can make it pretty tough to use a computer. In order to help with development I developed a hub for the ring. This is just a 3D printed block in which the ring sits. There is a hole routed from the back of the hub, through the centre of the ring, into the lid and back out the back side of the lid. This allows me to pass a wire through the ring and inject known signals to help with development and testing.
So far we have demonstrated that the core principle of Vortex works successfully and we are able to clearly transmit data between an external device and the Vortex ring through the magnetic field generated when a small current flows along the user’s finger.
Vortex2 is next and will have two key improvements:
- Able to both receive and transmit data
- Analog sampling and demodulation will be completed entirely on device
In order to demonstrate these capabilities I will need to develop a new external device that is also capable of transmitting and receiving data in a meaningful way.