Electronics > Projects, Designs, and Technical Stuff
Matrix – recommended pullup and diode configuration
3dgeo:
Howdy,
I'm making a commercial (hopefully) product with 35 key matrix (7x5) and just wanted to know best configuration of diodes and pullups.
Currently my diode and pullups setup is below (V1).
I want to optimize circuit as possible and was wondering, is it good idea for this purpose to relay on MCUs (SAMD21) internal pullups and remake circuit as in V2? Also as I understand in V2 there is no need to use current limiting resistors anymore (R16-20) because current will be limited by MCU internal pullup resistor, am I right?
Reason I did't went with the first design from the start is diode arrays – I didn't find any suitable common cathode array and I was avoiding single diodes due to possibly higher Pick and Place price, but now when comparing arrays and single diodes – single diodes cost practically nothing. This bring another question – ruffly how much of a PNP savings I can expect if its 7 vs 35 components to place? Will savings on PNP will be enough to justify 0,045 (array) vs 0.0035 (single) price difference, what would be your advice in this situation?
Also should I worry about EMC from matrix like this (10x20 cm PCB, on same PCB there is RGB matrix for every button)? Will flooding it with ground on two sided PCB will be enough or I should even consider 4 layers?
Talking about RGB matrix – if P mosfets gate is connected to MCU output, is pullup really necessary? Output floats only if MCU is off anyway, so I don't see the need for it...
rstofer:
Typically, internal pull-up resistors don't pass enough current to provide reliable switching. It's one of the reasons they invented bifurcated gold plated contacts which are pretty much out of the question for a keyboard matrix.
Combine low voltage which will have a problem breaking through any oxidation with low current and you might have a problem.
You might want to research this a bit.
thm_w:
You might pay a few cents for pick and place per component. I am using BAT54C for example: https://lcsc.com/product-detail/Schottky-Barrier-Diodes-SBD_BAT54C_C181200.html
But I don't know if its really worth the time to worry about right now, I would stick with the array, and focus more on the design/reliability.
There is a lot of good information here: https://learn.sparkfun.com/tutorials/cherry-mx-switch-breakout-hookup-guide/all
--- Quote from: rstofer on August 26, 2019, 10:12:35 pm ---Typically, internal pull-up resistors don't pass enough current to provide reliable switching. It's one of the reasons they invented bifurcated gold plated contacts which are pretty much out of the question for a keyboard matrix.
Combine low voltage which will have a problem breaking through any oxidation with low current and you might have a problem.
You might want to research this a bit.
--- End quote ---
Depends on the switch I suppose, this datasheet is listing 10uA minimum which should be fine with internal pullups right? (<100k internal).
https://cdn.sparkfun.com/datasheets/Components/Switches/MX%20Series.pdf
RGB ideas: https://github.com/Project-Aurora/Project-Aurora
3dgeo:
I have already fully working prototype with external pullups and diode arrays. I try to prepare and optimize it for production at the moment.
If PNP price is more than 2 cents per part then it's cheaper to use arrays... Can it be that expensive?
I was looking at BAT54TW (three parallel diodes) or BAT54CDW (two pairs common cathode). Also there are MMBD4148PLM, they would be almost perfect if not their high price and poor availability, I will dig deeper to find suitable cheap enough 5 diode alternative.
In SAMD21 datasheet: "Pull-up - Pulldown resistance: Min-20K Typ-40K Max-60K", so 165 / 82.5 / 55 microamperes. I guess I'll have to bread board part of the matrix and test if they are enough.
Sidenote – I have made my own MX breakout PCBs, they are way more "advanced" compared to sparkfuns, with pullup/down, hardware debounce, SMD/TH RGB diode and limiting resistors, I think I should sell them too :)
thm_w:
If it has RGB diode thats different enough that some people might be interested in buying it.
What I would do is put the pullups in the schematic and just not populate them for now. Not a huge fan of the package of that MMBD4148PLM, but should be fine for assembly.
PCBway is showing me about 8c per part, a bit high: https://www.pcbway.com/quotesmt.aspx
Check with seeed as well: https://www.seeedstudio.com/fusion_pcb.html
Which SAMD21 are you using, they tend to be expensive. The cost of the key switches is not bad, ~$5.25 for kailh: https://lcsc.com/product-detail/Electrical-Switches_Kailh-CPG151101S13_C404353.html
Any mechanical parts are probably going to cost more than either of those though.
Navigation
[0] Message Index
[#] Next page
Go to full version