| ~ NETWORKING|
This week I made a second revision of my capacitive rotary sensors and wired them together with a serial bus.
Version 2 of the rotary sensor features an integrator op-amp to linearize the capacitance reading and a nautilus shaped dialetric for a nice smooth, linear inrcrease in capacitance over a 315-degree range.
I made two of the sensors. The first one came out perfectly and worked the first time. The second one was a bit rough (since I used a narly endmill) and there were a bunch of shorts on the board. I eventually found and destroyed all the shorts by using a microscope and an exacto knife.
My original plan for networking the sensors was to use SPI since it would be faster than bit-banging serial. After reading some forums online and the documentation for the USI module on the ATTiny I decided to forgo SPI in favor of the simpler serial bus. The only problem is that I decided to switch network protocols after having fabricated my boards.
So... I thought that I'd be able to use two of the SPI pins as Tx and Rx but after several unsuccessful attemps I just decided to link my boards via their FTDI connectors and only share power through the SPI headers. It was a bit messy but it worked.
The way it works now... Each node is assigned a node-id. The computer can request an angle measurement from a given sensor by writing the respective node-id to the serial port. The node will reply with the angle reading.
For extra credit I also wired up a flow meter to the Arduino (via a serial bus). I'm using the flow meter in a simulated cardiovascular system that I'm building as part of my machine design's class final project.