# Using the Charlieplexing pattern for pressure sensors.

I'm trying to make a pressure sensor matrix. The usual way to do so is by rows and cols of conductive thread on conductive/neoprene fabric and velostat in between. That way though I have to use many inputs, which is something I don't like.

So I stumble upon the charlieplexing pattern. Here's an example ( http://www.flickr.com/photos/missioncontrol/3767663436/in/set-72157621761527159/ ).

The think is I don't really understand how to read the values from it. If the top left corner of a charlieplexing pattern is pressed, it returns deferent value from lets say the bottom left corner? What happens in we press further towards the inside of the pattern?

Seems really interesting but I could find any info on the subject. Not even a paper.

Any help would be greatly appreciated. Thank you. And thank you for being an awesome community :).

"Charlieplexing" uses the properties of LED's to allow more then X*Y LED's to be controlled by X+Y pins.

The circuit in the picture is a simple XY matrix. Each row and each column uses a separate I/O pin.

You can use analog multiplexers to increase the number of available analog inputs if you need more than 6.

I want to make something like in the above picture instead of something like this ( http://farm8.staticflickr.com/7149/6457350363_0a26d43780_m.jpg ). To emulate the rows and cols. Because there're just to many of them for the traditional I/O pattern.

Time to look into shift registers. You set them up with outputs along the columns and inputs along the rows. Drive column 1 high, read all the rows, a high indicates a closed contact. Drive column 2 high, read all the rows. etc.

Need a serial-in, parallel out register for the outputs (74HC595 for example), and parallel-in, serial out (such as 74HC597) for the inputs.

Kevin_Jim: I want to make something like in the above picture instead of something like this ( http://farm8.staticflickr.com/7149/6457350363_0a26d43780_m.jpg ). To emulate the rows and cols. Because there're just to many of them for the traditional I/O pattern.

That picture shows a 16x16 simple (not Charlieplexed) matrix. Is that what you want to implement?

I you use the Arduino Mega you can do 16x16 analog without any extra hardware: 16 analog input pins and way more than 16 digital output pins.

If you want to use an UNO or smaller you will need some extra hardware. For analog inputs I would use a couple of CD4051 8-way multiplexers. They can share three data pins for addressing and use two analog input pins for i/o. The row addressing can be done with four output pins and a 1-of-16 decoder like the CD4067.