[Done] CommonSense controller - better capsense!

I can smell what you guys are cooking, and it's nice and savory!
Techno Trousers
User avatar
100,000,000 actuations

Unread post20 Apr 2018, 03:28

User avatar
X
Techno Trousers
100,000,000 actuations
 
Posts: 1054
Joined: 14 Jun 2013, 01:16
Location: California
Main keyboard: IBM Model F-122
Main mouse: Mionix Naos
Favorite switch: Capacitive Buckling Spring (Model F)
DT Pro Member: 0159
 
wcass wrote:What layout would you like to see? 104, SSK, or something else?

I don't know yet.

The idea was to use this as a "brains" module with larger "controller PCB" which have sense card interface.
That larger PCB may also have footprint for BLE module + power/battery management circuitry, or just be a breakout board with USB connector and fuse on it (different form-factors using the same module to alleviate current displaywriter controller deficit. Want a displaywriter controller? Order the breakout board on oshpark, solder the brains in and you're done)

..also I need to submit this to PCBA shop and ask them if it's even suitable for PCBA :) Parts may be too close to each other.
DMA

Unread post20 Apr 2018, 03:58

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
TIL four-sided castellated modules are not a thing.
Also that smallest candidate for PCBA is 50x100mm - which means paneling.
And that it looks like castellations can only be done on non-panelized PCBs.

Back to the drawing board, it seems.
DMA

Unread post22 Apr 2018, 03:45

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
DMA wrote:TIL four-sided castellated modules are not a thing.

Sure they are: https://getchip.com/pages/chippro

Also that smallest candidate for PCBA is 50x100mm - which means paneling.
And that it looks like castellations can only be done on non-panelized PCBs.

Back to the drawing board, it seems.

... you just have to have enough of an edge for V-score between castellations.
__red__

Unread post22 Apr 2018, 09:29

X
__red__
 
Posts: 435
Joined: 14 May 2012, 20:12
Location: Beamspringville
Main keyboard: 4704
DT Pro Member: 0186
 
__red__ wrote:... you just have to have enough of an edge for V-score between castellations.

Submitted to PCBWay w/o panelization. Let's see what happens.
DMA

Unread post22 Apr 2018, 19:27

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
TIL those 18x14 "brain" modules will be $10.61@100 units plus shipping (PCBway). [IC] time?
DMA

Unread post24 Apr 2018, 07:20

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
DMA, has the github code been adjusted to the board you're designing, or will it still run on a CY8CKIT-059? I have a custom 4x12 PCB I'd like to use this on.
FletchINKy
User avatar

Unread post25 Apr 2018, 15:49

User avatar
X
FletchINKy
 
Posts: 17
Joined: 11 Feb 2016, 21:17
Location: Ky, USA
Main keyboard: Signum II
Main mouse: Evoluent 4
Favorite switch: Buckling Spring
DT Pro Member: -
 
FletchINKy nope, the github code is for the kit. Currently it's for 8x12 matrix (XTant).
Most probably it will always be the kit (unless I forget and commit the custom version)
Even if it wasn't - switching to the kit is 3 clicks (explained in readme, too).
DMA

Unread post26 Apr 2018, 02:43

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
CommonSense now supports different scanners - namely, ADB and Sun protocols.
So one can make 2 keyboard controllers from one protokit - KitProg can be used as a converter (or for keypad - one can still do 5x5-ish matrix from KitProg :)
DMA

Unread post07 May 2018, 01:25

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
I am trying to understand if the is a group buy or similar way to get a PCB ......
Can anyone help ?
idollar
i$

Unread post25 May 2018, 11:23

X
idollar
i$
 
Posts: 1317
Joined: 24 Oct 2014, 15:57
Location: Germany (Frankfurt area)
Main keyboard: IBM F or M
Favorite switch: BS
DT Pro Member: -
 
idollar wrote:I am trying to understand if the is a group buy or similar way to get a PCB ......
Can anyone help ?

This is about a firmware/software. The controller used is a VERY affordable developer kit:
http://www.cypress.com/part/cy8c5888lti-lp097

No more Xwhatsit Controller GBs, instead just 12$ controllers from various distributors :)
Wodan
User avatar
ISO Advocate

Unread post25 May 2018, 13:11

User avatar
X
Wodan
ISO Advocate
 
Posts: 3204
Joined: 23 Nov 2015, 20:43
Location: ISO-DE
Main keyboard: Intense Rotation!!!
Main mouse: Logitech G903
Favorite switch: ALL OF THEM
DT Pro Member: -
 
idollar I actually think of making the PCBs - but the kit makes custom PCB much harder to justify.

It's $10 - http://www.cypress.com/documentation/de...rammer-and - and you can make 2 controllers from it.

Wodan's link is for much more expensive one :)
DMA

Unread post26 May 2018, 00:21

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
So you snap the $10 one in half and get a large micro USB and small USB-A connected controllers?
Techno Trousers
User avatar
100,000,000 actuations

Unread post26 May 2018, 01:17

User avatar
X
Techno Trousers
100,000,000 actuations
 
Posts: 1054
Joined: 14 Jun 2013, 01:16
Location: California
Main keyboard: IBM Model F-122
Main mouse: Mionix Naos
Favorite switch: Capacitive Buckling Spring (Model F)
DT Pro Member: 0159
 
Techno Trousers: yep. I use mine as USB-Sun and USB-ADB controllers. But it also can be used as keypad controller, for example. The problem is it has much less GPIOs available.
DMA

Unread post26 May 2018, 01:45

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
Oh, I can actually program and configure controllers for anyone who asks. Just ship the kit to me (I can tell you the address in PM) and tell me what configuration you want to have. And, unless you live in europe and shipping is exorbitant, I'll send you the pre-programmed, pre-configured kit, ready to solder.
This way you won't even need the windows machine - all you'll have to do is configure sensitivity and configure layout.
PS: I'll keep the kitprog - unless you specifically need it for something (in which case you'd be better off doing whole configuration yourself :) )
DMA

Unread post05 Jun 2018, 03:23

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
I had a quick question. I need to use the expansion header for both a Capslock LED and a Beeper. Flightcontroller only seems to let you pick one or the other. Is there a way to do both? Also, the expansion header pins go high right? So LED's connect one end to pin and one to ground?

Also, anything special about what you can assign as header pins? Or is it all just whatever is free, not a voltage reference and rated for 25mA? And are functions slaved to assigned pin? Like is Caps always a certain one and so on?
Sangdrax
User avatar

Unread post26 Jul 2018, 01:54

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
Sangdrax wrote:I had a quick question. I need to use the expansion header for both a Capslock LED and a Beeper.

Not supported. LEDs (all 3) or solenoid. Not "fundamentally unsupported" - just "not supported". If you convince me it's a good idea - I'll do it.
Now solenoid + lock switch configuration is not supported fundamentally. I don't want to muck with host's lock state. I can be convinced it's cool - but that will take a lot of convincing because it's host's business and what if you have 2 keyboards, one with such a switch set to "on" and another to "off"? Constant ping-ponging?
Sangdrax wrote:expansion header pins go high right? So LED's connect one end to pin and one to ground?

Yep.
Sangdrax wrote:Also, anything special about what you can assign as header pins? Or is it all just whatever is free, not a voltage reference and rated for 25mA?

Pretty much. Cypress doesn't mind to put 20mA LEDs on protokit and connecting them to "4mA source, 8mA sink" pins though. So probably any pin is fine.
Sangdrax wrote:And are functions slaved to assigned pin? Like is Caps always a certain one and so on?

Yes, and this is defined in exp.h
num-caps-scroll IIRC.
Solenoid has "enabled" and "active" pins to maintain compatibility with xwhatsit solenoid driver board.
DMA

Unread post26 Jul 2018, 02:51

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
This keyboard just needs the LED, doesn't have an actual locking switch. Way that worked on the xwhatsit was I think you got one assignable LED and the solenoid but you couldn't use the neat little ribbon cable because it was all in the same header. But that was just a free pin limitation I think. In this project, I think I can get away with just the LED since the piezo beeper is a non-original addition from the original owner. But it would be cool to fire it up if I could.

I had one more question. Is there a way to get more aggressive debouncing than 16? I'm having the same problem I had with the xwhatsit on these same kind of keytronic switches. Occasional double presses on a handful of keys even when everything is set to correct threshold. I had to flash the alternative debounce on that one to fix it, which IIRC mostly just slowed the scan rate.

Otherwise, everything is working great. Learning curve is a bit steeper on your stuff, but the fine control really is superior in every way that matters. And you can't beat the price or size.

Image
Sangdrax
User avatar

Unread post27 Jul 2018, 02:31

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
xwhatsit - at least 0.9 version - has solenoid, LEDs, and solenoid + lock switch (for normally open and normally closed variants). That's all there is in the GUI. Not a big problem to add buzzer + 2 LEDs (Num+Caps - no one ever needs ScrLk nowadays) - I have 4 pins in exp header after all. Doable over the weekend, needs like 10 minutes really.

Wait, did I make debouncing to 16? Must be some special request, never needed more than 4, actually.
If you have double presses - just lower the threshold. Don't be afraid going down to max(15s) + 1. Debouncing algo requires X _consecutive_ readouts to flip the state - this is hard to reach accidentally.
Although if you have linear switches - there may be a problem of key not flying fast enough towards PCB, and sensor (3k+ scans per second, remember?) having time to count those 7 ones then 7 zeroes than 7 ones again. In which case just increase the second delay to, dunno, 2000? This will lower scanning frequency, effectively extending debounce window.

Want to hear about learning curve, actually. What was hard?
DMA

Unread post27 Jul 2018, 04:04

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
Mostly just the little stuff that comes with looking at any new program, and this was two. And there's a couple minor things left out of the GITHub tutorial I was following that might trip someone unfamiliar or not paying attention.

The main zip download includes the Bluetooth, separate firmware for the kit programmer for if you remove it and make it into it's own thing and also that new Sun conversion thing you were woking on. The kit programmer firmware pops up first in the PSoC Creator main screen when you open the main Capsense project. Took me a few seconds of wondering why the diagram had too few pins before I realized what I was really seeing. Some mention of removing extraneous modules before compiling would have saved some time. Especially since the Bluetooth expansion wouldn't compile on mine (program referenced needing to download additional components) and the Sun scanner file was missing from the folders.

FlightController is a neat program, but a couple basic explanations of functions would be nice. Maybe they're already there and I just missed it. Main ones that would have helped.

The board automatically shuts off the scan module with all keys firing at once. So you have to set thresholds to something just to start. But even if you do, you have to reinitialize it or it still won't do anything. Took me a bit to figure out you click Scan and Output to do that. I thought the lower bar was just status stuff at first.

Upload temporarily uploads settings to flash for testing. Confirm writes those settings to the chip EEPROM.

Setup mode makes it where no keypresses register outside the program. But you can turn this off for concurrent testing fine tuning stuff like doublepressing keys or ghosting.

You can't upload with key monitor running. And if you accidentally try, you have to close out the program and unplug and replug the USB to restart the devboard. Reset button probably works too but I didn't have access to it in the case when doing this.

Also, cranking up the discharge time really worked well like you said. Still going to be fiddling with a few settings but it's all smooth sailing now. I bumped it from .25milisec to .9milisec. 2 caused some kind of rollover error in FlightController and worked but bogged down a bit, so I kept cranking it down to find a sweet spot.
Sangdrax
User avatar

Unread post27 Jul 2018, 05:17

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
Rejoice! I changed "Solenoid" mode to "Solenoid + Num + Caps". FlightController doesn't need to be changed, just the firmware. There's a separate commit for firmware, if you want to cherrypick (you probably do).

Most of the other stuff is fixed too. Inline.
Sangdrax wrote:The main zip download includes the Bluetooth, separate firmware for the kit programmer for if you remove it and make it into it's own thing and also that new Sun conversion thing you were woking on. The kit programmer firmware pops up first in the PSoC Creator main screen when you open the main Capsense project. Took me a few seconds of wondering why the diagram had too few pins before I realized what I was really seeing. Some mention of removing extraneous modules before compiling would have saved some time. Especially since the Bluetooth expansion wouldn't compile on mine (program referenced needing to download additional components) and the Sun scanner file was missing from the folders.

Fixed. README.md is updated not to advise to build everything.
Also those sun scanner files are added. I just forgot to add them..
Sangdrax wrote:FlightController is a neat program, but a couple basic explanations of functions would be nice. Maybe they're already there and I just missed it. Main ones that would have helped.

I must add documentation. But there's some catch-22 situation - hard to convince oneself to write documentation for no users.
Sangdrax wrote:The board automatically shuts off the scan module with all keys firing at once. So you have to set thresholds to something just to start. But even if you do, you have to reinitialize it or it still won't do anything.

Actually, every time you upload config the controller reevaluates safety of the scanning module and automatically enables it if safe to do so. This feature was added after several cases of keyboard spamming the system after settings update.
Sangdrax wrote:I thought the lower bar was just status stuff at first.

They were just the status LEDs at first. But then I thought..
Sangdrax wrote:Upload temporarily uploads settings to flash for testing. Confirm writes those settings to the chip EEPROM.

Explanation added to menu items.
Sangdrax wrote:Setup mode makes it where no keypresses register outside the program. But you can turn this off for concurrent testing fine tuning stuff like doublepressing keys or ghosting.

Actually setup mode logs all keypresses - so you can see double keypresses in the main FlightController window.
Sangdrax wrote:You can't upload with key monitor running. And if you accidentally try, you have to close out the program and unplug and replug the USB to restart the devboard. Reset button probably works too but I didn't have access to it in the case when doing this.

Fixed - it's not possible to upload config with monitor running :)
It is still possible to get into "Not a good day to upload config" state - the fix is to click "Reconnect" button to reset internal state.
Sangdrax wrote:Also, cranking up the discharge time really worked well like you said. Still going to be fiddling with a few settings but it's all smooth sailing now.

Yay!
Sangdrax wrote:2 caused some kind of rollover error in FlightController and worked but bogged down a bit, so I kept cranking it down to find a sweet spot.

What do you mean by "bogged down a bit"? those delays are in hardware, no waiting from software side, when delay expires it fires an interrupt. So apart from slower scanning nothing should happen..
Just tried 65000 as discharge delay. It works (though the reaction is slow - which is expected. 65000 is about 3 milliseconds, so one matrix scan is 25ms. Even with modest 4-step debouncing that's 10Hz scanrate)
DMA

Unread post28 Jul 2018, 19:35

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
Awesome. Will break out the soldering station and report back in a bit on having the new features hooked up.

What I meant by bogging down was the letters would show when I was typing, but there would be a full quarter to half second delay. That was in notepad, not the concurrent log in Flightcontroller which seemed to show up immediately. So could have just been something on the PC itself. Not sure what was up with that, but it went away when I turned the delay down a bit.
Sangdrax
User avatar

Unread post28 Jul 2018, 21:34

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
Well, I got the new firmware loaded and everything wired up using the header pins specified in the new config. I used a solenoid board I had soldered awhile back that I know tested good.

Everything builds fine.

The current Bootloader folder is missing the compiled hex for the other stuff to reference when it builds. I still had it from the last version so just moving the folder over worked.

The one thing I can't hunt down is the independent FlightController.exe. Can't even find where I got the old one now and I just downloaded it the other day. So I can't turn the new features in the header on and test it all out. The old version still has the normal 3.
Sangdrax
User avatar

Unread post30 Jul 2018, 04:00

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
Sangdrax wrote:The current Bootloader folder is missing the compiled hex for the other stuff to reference when it builds.

That's kind of the point. Bootloader project builds the bootloader (elf+hex). Then firmware uses that bootloader.
Sangdrax wrote:The one thing I can't hunt down is the independent FlightController.exe. Can't even find where I got the old one now and I just downloaded it the other day. So I can't turn the new features in the header on and test it all out. The old version still has the normal 3.

https://github.com/dmaone/CommonSense/r...tag/v0.2.1
DMA

Unread post30 Jul 2018, 05:25

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
DMA wrote:
Sangdrax wrote:The current Bootloader folder is missing the compiled hex for the other stuff to reference when it builds.

That's kind of the point. Bootloader project builds the bootloader (elf+hex). Then firmware uses that bootloader.

Wait, I figured out how I was being retarded. I was just building (test compiling) instead of actually building firmware. :lol:


Thanks a ton for the updated .exe. I should have everything running shortly. This is going to be exciting!
Sangdrax
User avatar

Unread post30 Jul 2018, 05:51

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
Success! This battlestation is fully armed and operational. I'm definitely using your setup for every capacitive project from here on out. Wonderful work.

Image

Would have been impossible with any other option with how little space there was to work with in this board.

Image


Typing tests.

Without header.
https://www.dropbox.com/s/2y5z8diwo210d...t.mp4?dl=0

With Capslock AND Beeper via solenoid board.
https://www.dropbox.com/s/pryyjz9365sj2...r.mp4?dl=0
Sangdrax
User avatar

Unread post30 Jul 2018, 07:51

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
You can break away the kitprog - you'll never need it anymore.
DMA

Unread post30 Jul 2018, 15:40

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
 
The bringer of PSoC
Yeah, just wanted to wait until I was completely done in case I borked a firmware update in Flightcontroller and needed to hook up to PSoC Creator again (got an unreadable node error first time I tried when I accidentally unplugged the board before it was finished :lol: ).

I bet I can use it in something else fun down the road. Honestly, I think the best use would be compatibility with something like Hasu's convertor since everyone can always use extra convertors. His seems mostly based around Atmel stuff though I have no idea how tough that is.

Image
Sangdrax
User avatar

Unread post30 Jul 2018, 22:03

User avatar
X
Sangdrax
 
Posts: 268
Joined: 05 Jul 2017, 06:50
Location: Acadiana
Main keyboard: Harris 1978 Terminal
Main mouse: Mammoth
DT Pro Member: -
 
Could the kitprog be used for a smaller capacitive keyboard? Something like 4x5 plus maybe one LED?
wcass
User avatar

Unread post31 Jul 2018, 03:10

User avatar
X
wcass
 
Posts: 488
Joined: 27 Nov 2011, 21:18
Location: Fort Lauderdale, FL, USA
Main keyboard: ibm model m
Main mouse: kensington expert mouse
Favorite switch: buckeling spring
DT Pro Member: 0185
 
wcass wrote:Could the kitprog be used for a smaller capacitive keyboard? Something like 4x5 plus maybe one LED?

Sure, why not. Kitprog's 5868 is more than capable for that.
Also 5868 can be desoldered from the kitprog and reused on custom PCB :)

Sangdrax actually it's very easy to make a converter from the kitprog. Open the KitProgConverter project and see for yourself. sun_scanner.c + UART in the design should be enough for every serial-protocol-using keyboard (except those working with 12V - for those level-shifter will be needed). And there's not many not-serial-using keyboards.

PS: Got myself a topre board for the experiments. Just need to run it thru a dishwasher, because https://www.instagram.com/p/Bl3T_YTg-O1/
DMA

Unread post31 Jul 2018, 05:37

X
DMA
 
Posts: 507
Joined: 23 May 2016, 06:24
Location: Seattle, US
Main keyboard: T420
Main mouse: Trackpoint
Favorite switch: beamspring
DT Pro Member: -
 
PreviousNext

Who is online

Users browsing this forum: Lukas, Spaceman1200 and 48 guests