If I understand well this document page 93 : it is a maximum of 25mA per output with a maximal sum of 120mA.
That seems quite big to me considering the size of the chip
I made some experiments to have an idea of "ON resistances" in the conditions I want to operate the keyboard (3V3 --> 2k2 resistor --> FSR --> "ground drain"):
tested "ground drains" :
- 74HC4051 : 90 Ω
- GPIO open drain : 25 Ω
- 2N7000 : 4 Ω
The max current being:
- 74HC4051 : 25mA
- GPIO open drain : 25mA
- 2N7000 : 200mA
I'll give the 2N7000 a go:
- they are very low priced (less than 0.25€)
- I won't be afraid to fry my Axoloti
- the "ON resistance" is small enough to limit bias when multiple sensors will be pressed on a row (sensors on a row share the same "ground drain").
- I can lower the 12 "drive" resistances from 4k7(8mA) to 2k (20mA) or even 1k (40mA) => higher range, lower noise from the ADC
- As i won't use some specific GPIO feature, the design will be transposable to the teensy.
Some on going experiments with copper tape + eeontex + 2N7000...
Experimenting layered eeontex (the black fabric) vs simple layer eeontex, row / column copper width and 2N7000 ground drain:
Practical design of copper rows and eeontex grid:
Aligning columns over the rows and the grid before inserting eeontex tiles...
[EDIT 08 nov. 17]
Oooops, I forgot the diodes !!
Each key needs to be associated with a diode to avoid current from inactive rows to push back in a column.
[EDIT 16 nov 17]
Hopefully 1N4148 are like 5€ for 200 pieces...
The row current "sinks" now have a diode for each sensor... 72 diodes. I simplified the wiring by making holes in the thick cardboard and using the diodes tinned anode tips as electrodes in contact with the eeontex.
As diodes add a voltage bias I lowered the driving resistors to 680Ω.
As that bias depends on the temperature, i added a reference diode to measure that bias (and try to compensate its effects in software) .
Now, all 20 GPIOs are used:
- 12 column (C C#... B) analog inputs: PC2 PC1 PC0 PB1 PB0 PA7 PA6 PA4 PA3 PA2 PA1 PA0
- 6 row selections (5 octaves+function keys): PC4 PC5 PB6 PB7 PB8 PB9
- 1 temperature compensation analog inputs that measures a diode bias: PC3
- 1 one PWM output to control a LED: PA5 (pwm t8)
That's a lot of wires to fit in the 23 x 20 x 4 cm box
[EDIT 17 nov 17]
Finished wiring and assembly. It seems to work.
I added a 9v battery holder, a little switch and a diode (to avoid reverse current to the battery if an external 9v power source is used).
It is a little tight but it fits.
Now, let's code an object that will deal with all these pressure sensors and generate some convenient "intern MIDI"...
[EDIT 21 nov 17]
Here are the different layers for the pressure sensitive keyboard:
A close up of the back side of the cardboard(an old calendar) showing the row strips and the sink diodes:
A global view before hooking up the rows and columns of the pressure sensitive keyboard to the FET stripeboard and to the Axoloti: