I am trying to make some pressure sensors, and thought that using the CapSense library (Arduino Playground - HomePage) to make capacitance-based pressure sensors would be the best/easiest way forward. This works really well when using the digital Arduino pins, but I need to have ~100 outputs and thought I could just daisy chain some 74HC595N shift register together for this, but just realised that the CapSense library only works with the Arduino pins. This problem has been posted here before (Capsense with Shift Registers - Bugs & Suggestions - Arduino Forum) but the question I would like to pose is if it is possible to can shift the data one by one to an Arduino pin so I can measure the capacitance of each of the shift register output pins.
Please do let me know if I can make anything clearer, I am quite new to physical computing (and computing in general), and may not have explained everything as I should have.
It sounds like you are mixing up inputs and outputs.
Cap sense works on arduino inputs.
The shift register produces outputs. What you are asking dosn't make any sense.
You could use an input shift register, that would make sense, but the answer would be no because once a signal is in the shift register it looses any analogue property it had as a raw pin.
Grumpy_Mike:
It sounds like you are mixing up inputs and outputs.
Cap sense works on arduino inputs.
The shift register produces outputs. What you are asking dosn't make any sense.
You could use an input shift register, that would make sense, but the answer would be no because once a signal is in the shift register it looses any analogue property it had as a raw pin.
Oh ok that makes a lot of sense.
Sorry, just to make things clear, it would not work with an input shift register either? I don't quite understand what you mean by it losing any analog property it had as a raw pin.
it would not work with an input shift register either?
Yes that is right.
I don't quite understand what you mean by it losing any analog property it had as a raw pin.
The cap sense works (when it does work) by seeing how long it takes for a pin to charge up.
To quote from the capsense page:-
The capacitiveSensor method toggles a microcontroller send pin to a new state and then waits for the receive pin to change to the same state as the send pin.
It then times this delay.
What a shift register does is to transfer a digital value from one section to the other. This value is reconstructed when it transfers from one section of the shift register to the other. This means that there is no effect to be measured because the pin has already been sampled by the shift register and found to be a one or a zero. It will stay at this value forever.
You might say can you shift in all the pins rapidly over and over noting the time change for each individual pin. While in theory this might seem to work you will find that you can't transfer the data in fast enough to do the measurements.
raunag,
The reason I asked about the length of the bus, is I use Attiny 85s on little boards with an ic socket, decoupling cap and the resistor for capsense I need to create 4 exterior tank liquid level sensors on an I2C bus. Works up to 12 ft with flat phone cable, wired up SDA-gnd-SCL-Vcc and the pullup resistors at the low limit of the I2C specs. Attiny85s are cheap in 100 lots, you could get 10 of the little boards on a 5cmX10cm board from Itead Studio, I think $22 for ten boards last time I ordered, that would be your 100 sensors. My ammature coding is just a combination of ButtonPress, Case, and the Wire master examples on the Uno and the capacitive sensor and tinywire slave examples on the ATtiny85. Pressing a button cycles between sensors.
TomJ