miranda makes things! PCB Design: DDR pads

PCB Design: DDR pads

To make progress on my final project, I wanted to prototype a PCB which will sense the DDR arrows being pressed by the user’s fingertips, and light up the LEDs when each arrow is pressed.

Collecting advice

The easiest sensing mode would be something like a button or mechanical keyboard switch, but real DDR pads don’t depress when stepped on. The finger-to-copper inductive (?) sensing on the QPAD was also not totally satisfying, as I want to press the arrow pads with the tips of my fingers, which don’t always register on the touch pads as my fingernail gets in the way. So, with all of these opinions and one measly EE class worth of understanding, I went to find Quentin.

As Quentin spoke, I frantically scribed notes.

Quentin described a capacitive pressure sensor which is two conductors, separated by a layer of foam (or other insulator). One of the conductors is the transmitter (TX), and it is connected to a digital output pin on the microcontroller. The other conductor is the receiver (RX), and it is connected to two resistors (one which goes to ground, the other to the power source), as well as an analog read pin. To be honest, at this point I was feeling pretty lost.

My parents were in town for the weekend, so I was away from the shop, but luckily in close proximity to yet another talented electrical engineer: my dad. I described Quentin’s idea to him, and he described a slightly different circuit, and explained to me what the system was fundamentally doing: modulating the capacitance of a capacitor (the two conductors) and measuring the change in voltage over time as a way to get a value for how “pressed” the sensor is.

He also suggested I put the LEDs for each arrow on top of the top layer of the capacitor, instead of in the middle of the bottom pad. That way, the LED isn’t caught in the middle of the crucial “pressing” interaction, and can easily shine through the top of the outer case of the arrow pads so the user can see the light. My dad explained to me that in industry, multi-layer PCBs are the norm, and so to have a 2-layer PCB would be very doable, so that I could make a second PCB design for each arrow with an LED on one side and the transmitter conductor on the other.

I also found a Youtube video from a Microsoft-authored educational module with the same mechanism Quentin described, and did some digging and reverse engineering to figure out how this sensor is wired to the microcontroller.

Less lost, but still lost, I talked to Nikhil who explained that my dad’s circuit and Quentin’s circuit were in fact not the same thing, but based on a similar principle. I began to understand that there are several ways of doing what I am trying to achieve.

I also got some help from Sara, who showed me how to make a custom schematic component and footprint in Kicad for my copper “pads”. The process she walked me through is explained in detail in this Youtube video. Here are the pad and footprint.

I went to visit Quentin again, to confirm my slowly solidifying understanding. He confirmed my understanding, and suggested that I use flexure to make all of the arrow pads one contiguous piece, similar to this project of Quentin’s.

How it works (I think)

I am implementing a mutual capacitance sensor which uses step response to measure pressure. Basically, I have two conductive panels. One is connected to a digital output pin, which I will flash high, then low, similarly to Neil’s code here. This one is called the “transmitter.” The other panel is the receiver, and it is attached to an analog read pin (in addition to two resistors, one which goes to ground and the other to the power source).

Physically, I will have one large area of copper as the receiver on the same PCB as the microcontroller. Each arrow pad will have its own PCB as the transmitter. I could have chosen the reverse – to put the transmitter on the main PCB and the receiver on each of the arrow PCBs, but this configuration allows me to sauter only 2 resistors instead of 8.

The code will set the input voltage to high and then read the voltage from the output pin. If the sensor is pressed, the capacitance will be higher, and we will see a slower rise / drop in voltage when the input pin changes its voltage, so this initial reading will be higher. For added sensitivity we will subsequently set the input voltage low, and then read again. Our output value will be the difference between the two readings, so that it will be higher when the sensor is pressed and lower when the sensor is unpressed. I’ll set some threshold to turn this value into “pressed” or “unpressed.”

Simulation

Here’s a simulation of how one of the pads works. The bottom left plot is the input voltage (which is just cycling high and low) and the on the right is the output voltage on the other side of the capacitor. The two conductive plates serve as the capacitor. As the capacitance changes, the voltage rises and falls at different rates.

The demo is live at this link; here’s a video:

Schematic

My initial draft of the schematic had everything on one schematic:

However, Quentin recommended that I put my second PCB into its own KiCAD project. This schematic, and the routing, is still in progress. Stay tuned!