[Done] CommonSense: matrix LCR meter with a HID interface

DMA

26 Jan 2020, 18:19

Diode conversion is for 2 AEKs I made as gifts to friends.

Have not touched KLL - and it doesn't matter. What matters is ScanModule. OutputModule "uartOut" is so I can see keypresses in serial console.

Looks like BluePill is capable of scanning fast enough with a bit more handholding (you'll need to trigger ADC from MCU (unless you find some sort of a timer block in MCU)). As for "how good those ADCs are" - you'll never know until you try.

And stop complaining about "widows only tool" - VirtualBox is TEN YEARS old.

..also you won't get normal USB descriptors anywhere else - for some strange reason everybody else uses those clowny "NKRO" descriptors which make a effing gamepad out of a keyboard, and have bios problems on one platform or another, KVM problems, OS problems if they won't guess the exact moment to go "into NKRO mode" etc etc.

User avatar
cryham

26 Jan 2020, 19:35

Right. Thanks for info.
I fixed kll issues by getting an older version of kll repo (with ver 0.5c).
But now I have this weird error, at start of building:
make[2]: *** No rule to make target '/matrix.h', needed by 'CMakeFiles/kiibohd.elf.dir/Scan/MatrixARM/matrix_scan.c.obj'. Stop.
Not sure why, is MatrixARM common and also used with CommonSense?
Hmm. Maybe I'll just pick your ADC code and put into my working code with LCD.

There is a return 0; Here, right at start of

Code: Select all

inline uint8_t Scan_loop()
This is because scan is triggered just once in cliFunc_T ?

DMA

26 Jan 2020, 22:27

cryham wrote:
26 Jan 2020, 19:35
There is a return 0; Here, right at start of

Code: Select all

inline uint8_t Scan_loop()
This is because scan is triggered just once in cliFunc_T ?
You are asking a person that does not exist.
2016.. I have great trouble remembering 2018. At this point you and me know exactly the same amount about that code. In fact, you may know more.

Looked at the code - everything is in CLI functions. Also it doesn't seem to dump sampling capacitor between measurements, so keypress will cause echoes downwards (press of the key in col 3 will trigger cols 4, 5 and so on).
You'll need some creativity (or a lot of pins) to make this working with standard "scanning ADC". Doing it without scan mode should be possible on teensy4 because of sheer clockspeed, not sure about BluePill (yes, 72MHz, but I had to tweak things for speed @36MHz with all scanning outsourced). OTOH everything depends on your expectations. If you feel you don't need 30k rows/s (and you need that, for debouncing) - you might try driving everything from MCU.

If you'll find a way to keep input pins in high-Z until you're ready to read them, you won't even need stable latencies (i.e. capability to drive the GPIO up and kick off ADC exactly 3 microseconds apart). If you won't - you'll need capability to delay things with nuclear weapon firing controller precision (kidding but not much - you'll need precision on order of 50ns).

Good luck!

User avatar
cryham

26 Jan 2020, 23:25

I see. Thanks.
I will learn from code and try stuff. I got just a 3x3 matrix to start with.

DMA

02 Feb 2020, 01:33

cryham wrote:
26 Jan 2020, 23:25
I see. Thanks.
I will learn from code and try stuff. I got just a 3x3 matrix to start with.
My first was 2x2, but I'd go with a single sensor these days. Then expand in sense dimension, not too fast - 2x1 first, and once that works, 4x1 should be a final prototype. If it works with 4 columns, you can put however many you like.

Scope will help greatly - but if you don't have it, just have insanely long discharge delay.
Another thing is - never leave sense GPIOs floating - when not sensing they must be grounded - my choice was to use OE pins on GPIOs and setting output to zero. How would you achieve that depends on your hardware.

DMA

17 Feb 2020, 06:17

https://github.com/dmaone/CommonSense/r ... g/v1.0.1.0

* Fixes random keypresses for empty layout cells
* Added noisy keys indicator for when scanner trips the sanity check (open thresholds or matrix monitor, you'll see those on red background in couple of seconds. If nothing is red - upload config while threshold/matrix monitor window is open, wait 10s.)
* Significantly expanded MagValve documentation - got another board and discovered that half of the Important Things are not mentioned in previous doc. Now they are.

"Solenoid" now blinks in all modes, not only solenoid. On a protoboard that pin is wired to the blue LED, so..
This makes CS expansion header incompatible with xwhatsit's in LED mode - but if it ever gets to real device ExpHeader will be different anyway - in particular, it will be either immune to inserting it upside down or keyed to prevent that.
CS version bumped to 1.1 to "celebrate" that, FC to 1.0.1.0

Post Reply

Return to “Workshop”