project proposal
press fit construction kit
pcb fabrication
3D scanning and printing
electronics design
molding and casting
embedded programming
cnc machining
input
[09] ~ INPUT |
This week we were tasked with using a microcntroller to sense something. I decided to try to make a rotary capacitive sensor (CVDT). The sensor uses variable capacitors (parallel plates) to detect it's absolute rotary position. My hope is to use this as part of my final project (to build a handheld CNC-milling tool) to measure the angles at the joints of the digitizer arm.
I started by just building the standard hello.txrx board to get familiar with the step response stuff. Building and programming went smoothly and the sensed value changed when I touched the sense pins on the board's header. I then lasercut and vinyl-cut a rudimentary device to test the effect of a moving dialectric between parallel plates. This worked quite well actually. As I slid the piece of wood between the vinyl-cut copper sheets, the capacitance went up (because capacitance is proportional to the dialectric constant of the material between the plates). Since the proof of concept worked I set about designing the rotary version of the sensor. I asked Matt for some advice (since he's done some work with CVDT's in the past) and he suggested I use three transmit pads, one receive pad, and a rotating half-cirle dialectric. So that's exactly what I did. I designed the control board in eagle and designed the transmit and receive boards in GIMP. I then lasercut a delrin spacer and half-circle. I glued the spacer onto the transmit pad and the half-circle on a bolt which I'd use as the knob to rotate it. I first tested my code with the same hello.txrx code (modified for the attiny44) and the lasercut linear slider. It worked! I then tested my transmit and receive pads by putting a piece of napkin between them and squeezing them together. I found it worked extremely well as a pressure sensor. The more pressure you apply to the plates (pushing them together), the larger the capacitance and the greater the sensor value. I finally got around to writing my own code to put all the transmit pads into comission. The code is pretty simple and does exactly the what the standard hello.txrx does except it only turns one transmit pin on at a time and keeps track of the 6 values seperately (one up and one down value for each transmit pad). I also modified the python script to display 3 more bars (so I can display the two new sensor values and an average). So now, as I move rotate the knob, the three values all change. The value of each bar increases depending on what percent of the respective transmit pad is covered by the dialectric. The challenge now lies in taking that waveform and turning it into a rotation angle. As I work toward a more precise and robust sensor there are a few things I'll be playing with. For one, I've found grounding is a huge concern. Even though I'm grounding the back of both the transmit and receive pad it's not enough. I think integrating the control board onto the transmit pad would eliminate the noise which comes from the ribbon cable. Second, using an op-amp to integrate the signal should provide a much more robust way of measuring the RC time-constant (rather than just looking at one point). Finally, I want to put it all in a nice, friendly package with bearings and everything so it'll rotate super smoothly and be awesome. Source: all of it
|