An idea to convert hall effect keyboards (tedious, but simple)

User avatar
PlacaFromHell

10 Mar 2018, 19:57

Hi guys. Some days ago I've been searching for a czechoslovakian hall effect keyboard for my colection (Zbrojovka Brno, Tesla or Consul), the ones with SW-like switches specially.
I started to get curious about the working of this switches, and finally got an idea to convert a hall effect switch in a simple electrical key and featuring NKRO.
Lets start! I did not understand why people claimed that is so hard to conver a hall effect keyboard until I saw how the hall effect sensors works.
Lets SUPPOSE that this is the pinout of a hall effect sensor of our keyboard:
Image
Unlike a normal contact switch, we aren't closing a circuit between two traces (a row and a column), this guy sends current to two different pins.
And what if I want to connect a hall effect keyboard to a normal controller?
Obviously you can't, unless you convert the hall effect sensors in contact-like switches.
Here this starts to get interesting, lets see how works an AND gate
Image
this table means that Z = A . B
And what happens if i connect A to one of the outputs from the sensor and B and Z to a normal controller?
We've got a working hall effect switch, BUT if you want to do that keep this in mind, you will need one gate per switch. For example I want to make a 3101 layout keyboard (88 keys, if I'm correct), that means 22 IC4081 (4 gates per integrated circuit).
Image
This should feature NKRO (correct me if not), because the logic gates would work as diodes.
Isn't cheap, isn't fast, but simple. I'll try this by myself when I get my board.

The real problems

We need something like 528 mA only to power the switches (like 6 mA per switch), even more for the controller and IC's. So maybe the best option here is ask our PC's power supply for some help, USB can't deal with this.
New PCB, obviously. I made this post based on the SW switches and the czechoslovakian "clones", so a new PCB means destroy the metal rivets of the switch holder and replace them with really small bolts (or even glue it).
Image

I'm not an expert, so evey constructive critic is well welcomed.

User avatar
DMA

11 Mar 2018, 18:53

You can also use multiplexors and get something like 8:1 reduction factor. Also think about making the logical matrix square - that would save some chips.

Also wow, rivets!

User avatar
PlacaFromHell

11 Mar 2018, 20:15

DMA wrote: You can also use multiplexors and get something like 8:1 reduction factor. Also think about making the logical matrix square - that would save some chips.

Also wow, rivets!
So you think this can work? :D looks like rivets aren't a exclusive problem of the model M

User avatar
DMA

11 Mar 2018, 23:44

Yeah, why not, it will work. Not going to be an USB-powered device though :)

User avatar
j0d1

11 Mar 2018, 23:49

USB 3.0 can go as much as 900 mA.

That said, some hardware do not respect the 500 mA of USB 2.0 anyway and will give as much mA as requested.

User avatar
DMA

11 Mar 2018, 23:51

j0d1 wrote: USB 3.0 can go as much as 900 mA.
USB-C with power delivery can deliver 5A@20V. Fried 2 devices recently :(
j0d1 wrote: That said, some hardware do not respect the 500 mA of USB 2.0 anyway and will give as much mA as requested.
And some hardware has non-resettable 500mA fuses.
Mostly everyone has resettable 500mA fuses though :)

User avatar
j0d1

12 Mar 2018, 03:15

5A@20V is for power only, though, no?

* USB 3.0 and USB 3.1 max current with data: max 900 mA.
* USB 3.0 Battery Charging without data: max 1.5A.
* USB 3.1 Power Delivery without data: max 5A.

User avatar
PlacaFromHell

12 Mar 2018, 03:24

Every IC4081 takes 50 mA :? I'll need the USB 3.1 Power Delivery without data I think

User avatar
j0d1

12 Mar 2018, 04:06

50 mA is very high... Can you post a link to the datasheet of your component? This number is probably the maximum input current that the component can take, not the one you need to drive it.

User avatar
DMA

12 Mar 2018, 04:11

j0d1 wrote: 5A@20V is for power only, though, no?

* USB 3.0 and USB 3.1 max current with data: max 900 mA.
* USB 3.0 Battery Charging without data: max 1.5A.
* USB 3.1 Power Delivery without data: max 5A.
Can I see the link to USB standard about that? Looks like extremely stupid thing to do, I don't expect USB IF actually doing that.

User avatar
j0d1

12 Mar 2018, 04:41

I may have misread on the topic. I did not read the specifications, only some stuff on Wikipedia.

For USB 3.0 Battery Charging...
USB Battery Charging defines a new port type, the charging port, as opposed to the standard downstream port (SDP) of the base specification. Charging ports are divided into 2 further types: the charging downstream port (CDP), which has data signals, and the dedicated charging port (DCP), which does not.
So I'm wrong about that. Seems like 1.5A with data.

For USB 3.1 Power Delivery, I cannot find a clear quote that it supports power and data for 5A.

User avatar
PlacaFromHell

12 Mar 2018, 04:53

j0d1 wrote: 50 mA is very high... Can you post a link to the datasheet of your component? This number is probably the maximum input current that the component can take, not the one you need to drive it.
https://assets.nexperia.com/documents/d ... F4081B.pdf here it reffers to the 50 mA as max "supply current", but hasn't information about min operating current.

User avatar
DMA

12 Mar 2018, 05:39

j0d1 wrote: I may have misread on the topic. I did not read the specifications, only some stuff on Wikipedia.

For USB 3.0 Battery Charging...
USB Battery Charging defines a new port type, the charging port, as opposed to the standard downstream port (SDP) of the base specification. Charging ports are divided into 2 further types: the charging downstream port (CDP), which has data signals, and the dedicated charging port (DCP), which does not.
So I'm wrong about that. Seems like 1.5A with data.

For USB 3.1 Power Delivery, I cannot find a clear quote that it supports power and data for 5A.
USB battery charging != USB power delivery. Different specs.

User avatar
j0d1

12 Mar 2018, 06:02

DMA wrote: USB battery charging != USB power delivery. Different specs.
Yes I am aware that they are two different specs.
PlacaFromHell wrote:https://assets.nexperia.com/documents/d...F4081B.pdf here it reffers to the 50 mA as max "supply current", but hasn't information about min operating current.
I know how an AND gate works conceptually but I don't know how it is implemented electronically.
I am wondering if in an ideal world, if you give 10 mA to the gate, it outputs 10 mA when HIGH.
If you look under the "Static characteristics" section, there are stats for the "HIGH-level output current" which suggests the output mA will be slighly less than the input mA.

That's all I can tell you unfortunately without reading more on the subject, which I don't have the time at the moment. :(

User avatar
DMA

12 Mar 2018, 06:52

j0d1 wrote:
DMA wrote: USB battery charging != USB power delivery. Different specs.
Yes I am aware that they are two different specs.
Soooo, which part of USB 3.1 standard says "without data"? I have at least one counter-example on my table - that's Apple's USB-C to USB-C+HDMI+USB3 adapter, which provides power pass-thru.
Also lenovo docking stations connected by USB-C.

May be they're violating the spec - but which one, specifically?

User avatar
j0d1

12 Mar 2018, 07:24

Alright, I found this:
There’s also a major change in the process of negotiating power. Earlier generations made use of the data wires for enumeration purpose: USB power delivery specifies negotiation using the VBUS only, without affecting the data bus. This leads to the second benefit:

Data transfer during power delivery:

The power-delivery spec removes the data bus from the process of negotiating power delivery. This makes possible simultaneous data transfer and power flow. This means devices can continue with their primary function while also charging.
Source.

Seems like I was wrong about that too.

User avatar
Blaise170
ALPS キーボード

12 Mar 2018, 14:31

What exactly is the purpose of the four pins? Is it just for NKRO?

User avatar
PlacaFromHell

12 Mar 2018, 22:13

Blaise170 wrote: What exactly is the purpose of the four pins? Is it just for NKRO?
I don't really know, if you reffer to the 4 pins of the sensor. They suppose to be two outputs, but I don't see why not connect the two traces to a single pin in paralel for sensing, maybe they are different. Anyway they send a current (in the worst case, one of these but it's still the same), so this should work.
Image


PD: find czechoslovakian keyboards isn't too easy, many of them have been already sold or are too new :( (SD clones, SD = imposible to clean and no cool metal clips)

Slom

12 Mar 2018, 22:39

Blaise170 wrote: What exactly is the purpose of the four pins? Is it just for NKRO?
I assume they would easily allow to detect and ignore multiple keys pressed at the same time. For example by XORing the rows and the colums and inhibit the signal if more than one row or more than one column is active. So you would have 1kro and avoid ghosting problems.

That may sound strange, but consider that Terminals would send the typed characters directly to whatever they were connected to. So pressing more than one key or holding keys would not really make sense.

User avatar
PJE

17 Mar 2018, 12:49

How quickly do they power up?

You could power up one row and while reading another and then turn off the row after reading....

This would require a fast start up time.


Sent from my iPhone using Tapatalk Pro

User avatar
XMIT
[ XMIT ]

17 Mar 2018, 13:01

The XMIT keyboards use a Hall sensor connected to a MOSFET which acts as a switch in series with a diode (for natural NKRO at a hardware level). The MOSFETs are arranged in a matrix and polled like any other keyboard matrix.

As I've said on another thread the real issue is the trouble with "hold" versus "pulse" type sensors. One maintains a different logic value as long as a key is pressed or held, the other emits a ~1ms pulse when a key is pressed or held.

I guess you could hook up the pulse type sensors to a one-shot switch that opens or closes a MOSFET for like 5ms and then poll those in a matrix, but then you're limited to 5ms key latency. Still, that's the best idea I've had in two years of thinking of how to deal with these pesky switches.

User avatar
PlacaFromHell

17 Mar 2018, 18:54

XMIT wrote: The XMIT keyboards use a Hall sensor connected to a MOSFET which acts as a switch in series with a diode (for natural NKRO at a hardware level). The MOSFETs are arranged in a matrix and polled like any other keyboard matrix.

As I've said on another thread the real issue is the trouble with "hold" versus "pulse" type sensors. One maintains a different logic value as long as a key is pressed or held, the other emits a ~1ms pulse when a key is pressed or held.

I guess you could hook up the pulse type sensors to a one-shot switch that opens or closes a MOSFET for like 5ms and then poll those in a matrix, but then you're limited to 5ms key latency. Still, that's the best idea I've had in two years of thinking of how to deal with these pesky switches.
I didn't completely understand due to my limitated english, so my apologies if I'm not correct. Also you could use FF's and some simple logic (don't hit me if I saying no sense things, something like a accountant from 0 to 1 wich reset with other pulse, so you have a thing that goes from 0 to 1 and from 1 to 0) for pulse sensors.
So if I want to do all I showed up here I need to use "hold" switches or this just don't work?
Do you know how to identificate them? It would be really disappointing to me get pulse switches right now (bad experiences with both MOSFET's and FF's).
Also I think if it's possible to replace the sensors with new commercial ones, just for have more possibilities.
PJE wrote: How quickly do they power up?

You could power up one row and while reading another and then turn off the row after reading....
I don't know, I still don't have the switches to experiment with them. Anyway is a good idea

zool

06 Apr 2018, 19:46

DMA wrote:
j0d1 wrote:
DMA wrote: USB battery charging != USB power delivery. Different specs.
Yes I am aware that they are two different specs.
Soooo, which part of USB 3.1 standard says "without data"? I have at least one counter-example on my table - that's Apple's USB-C to USB-C+HDMI+USB3 adapter, which provides power pass-thru.
Also lenovo docking stations connected by USB-C.

May be they're violating the spec - but which one, specifically?

Late to the party.
you can do data+power USB C. can even swap sink and src. anything above 5V 3A must be negotiated and agreed by the port partners, that includes the cable, as the is a port partnership between the usb ports and the cable as well as the pd port and the sink port. The problems come in when you throw non usb C into the mix to handle all the other power profiles of non C, plus shitty cables.

USB 2.0 5V 500 mA
USB 3.1 5V 900 mA
USB BC 1.2 5V Up to 1.5 A
USB C 5 V 1.5A
USB C 5 V 3.0A
USB C 9V 3.0A
USB C 15V 3.0A
USB C 20V 3.0A

There are some other standard profiles for USB C PD, but it is best to stick with one of the major standards above. All can run data, HS,SS,ALT.

then are the usual usb charging standards on non usb C cable you need to be mindful off, In a lot of ways you are best to design to survive the a full wack of 24V if you throw a usb C in. There are some nice PD IC around the ISL95338 comes to mind.

for ref see the USB 3.2 PD Spec section 10

I think the confusion comes in as the spec is optional on the data lines. so a USB C PDP does not have to supply data other than the base band for PD itself if greater than 5V 3A.

User avatar
PlacaFromHell

06 Apr 2018, 23:39

The power supply won't be a problem, in the worst case I can suply the most heavy things with a second port and make my own thicker cables to prevent the destruction. Anyway I'm short of money right now so this will start when I end with some debts and have some money.
To convert the pulses into DC I'll use T flip-flops, so this big and heavy monster would need even more power. My intention isn't make money of this so I don't care if is impractical due the two ports, but don't worry, I'll post all my progress here.
If someone wants to wait some time I'm looking for Honeywell or Zbrojovka-like keyboards with SW's or clones.

User avatar
PlacaFromHell

19 Jun 2018, 07:43

I'm still on this, just need to found the correct keyboard in the correct time. Finally as a conclusion, you only need to connect every switch to a flip-flop T and then the flip-flop to the AND gate with the controller. I'll gladly accept every information about the switches (keyboard models, dimensions, whatever). I'm thinking about use some bunch of PIC's as "emulated" flip-flops for a much more simple PCB. Anyway I can't do anything without have switches or at least some measurements. Just wanted to say that this project isn't dead.

User avatar
armatus

19 Jun 2018, 11:32

PlacaFromHell wrote: So if I want to do all I showed up here I need to use "hold" switches or this just don't work?
if your sensors marked as МН3SS2 then you have "normal" not pulsing switches, that outputs HIGH on press (around 3.5V)
Image

you may need a pullup resistor (around 5.6KOhm) to read it as digital input

if you try to make something of it - make sure you power enough this switches (not from MCU pins) because underpowered they send really unreadable output

i think it's about 8mA per switch that's limit you on small USB2 projects like Atreus or Gherkin

---

but if you have MH3SD1 switches - it only pulses when pressed, so it's hard to make keyboard with it

---

for my board (Zbrojovka Brno) i have a scan of schematics from users manual https://gitlab.com/armatus/consul_262_docs

User avatar
PlacaFromHell

19 Jun 2018, 23:44

Wait a second, don't MH3SD1 switches send a second pulse when relase? Thanks for all your info!

User avatar
armatus

20 Jun 2018, 05:37

I'm not sure about second pulse, don't have any of these (read documentation long ago)

good for me, i have board with MH3SS2 sensors

User avatar
PlacaFromHell

20 Jun 2018, 08:18

armatus wrote: I'm not sure about second pulse, don't have any of these (read documentation long ago)

good for me, i have board with MH3SS2 sensors
I think is the only way to have any "sense" about sensing. If not, would be only possible an electronic latching switch. So if it works like that, you'll have just a bunch of 0 to 1 counters with automatic reset.
I Discovered a lot of places for keyboard hunting, the only thing I need is a list or something to know what kind of keyboards search. For example if I'm looking for something specific I can ask for the entire machine (obviously not all geeks are experienced keyboard collectors), like a card punch.

Post Reply

Return to “Workshop”