Request review of project - Page 1
Forum section: electronics / projects

author: Jonathon_Doran
author_rank: Regular Contributor
timestamp: July 09, 2024, 10:06:35 pm
content: This is my keyboard project.A bit of background. I first started on this a couple of years ago, but ran out of time. I have returned to this project this summer and have an updated design.The intent/purpose is that Logitech discontinued my favorite keyboards. I am concerned about the longevity of my 20+ year old membrane keyboards, and am not aware of any suitable replacement products. Used keyboards (!) are going for a premium. The Logitech G15 is available for around $450 the last time I checked. And that is for a very old, used, item.I decided to make my own. And while I'm at it, change the design a bit. I don't need the display (I'm looking at real monitors not my keyboards), and I want more keys. The original G13 had an excellent arrangement of 3x6 keys which was great for touch-typing. The G15 had more keys, but it was too easy to lose my position on the keys. So I doubled the G13 arrangement of G-keys, but am not including any alphanumeric keys (like the G15).Firmware won't be a problem, as I have captured the raw USB traffic from my working keyboards and understand the format of the HID reports. I can emulate Logitech's products exactly.OK, that is enough backstory. I am using an STM32F105 because I want the USB bootloader. I am using a 16-Pin USB-C connector for USB 2.0 traffic and power. The board should pull 170mA max.I have had a fit with that USB connector, as the library footprint does not pass DRC checks for JLCPCB due to hole/pad clearance issues with the connector. This makes no sense to me, as JLCPCB has about 40K of those connectors in stock. They use them. So I am not worred about those DRC issues.The board is 4 layers, in a Signal-Ground-Power-Signal stackup. Power is split between 3.3 and 5v.I am attaching three sheets of schematics, and 3 of the layer layouts. I would greatly appreciate any comments/suggestions before I send this off to be made.This will be my first board. I am a CS person, who has done a lot of low level OS/firmware work, but self-taught on electronics. Any obvious silliness is because I really don't know what I'm doing yet. But I'm learning.Thanks for your time.

author: Positron Enthusiast
author_rank: Newbie
timestamp: July 13, 2024, 05:54:48 am
content: Nice work. Not familliar with that micro, so not sure if you meet the requirements for it but I'm guessing you are following a reference design? I would have based my keyboard off a teensy, it would be less work and part of an existing project. But, nothing wrong with doing your own thing.TPS7A470x is an excellent LDO. I would have recommended something cheaper but if this is a one-off, $5 savings won't matter. (TPS7a2033, get the SOT23 package for easier hand soldering if that's your plan. I wouldn't recommend hand-soldering the TPS7A470x).The other thing I see is your cap values - typically you want equal power draw on the input and output decoupling caps. And for a cable VBUS supply, I would even lean towards more capacitance on the input. Either way, they should be closer than 5:1, so either do 47u on both or 10u on both.I can't tell what your switch diodes are, which makes that part of the schematic hard to analyze. I'm guessing you plan to debounce in software? You will want esd protection if using socketed keyswitches (quite popular in the mech keyb space right now).You should post a BOM (bill of materials) for the project as well. that would be helpful for design review.I don't trust JLCPCBs DRC system - I've never had my company's altium gerbers come out correctly for turnkey assembly. But for bare proto PCBs they are great. You might also try PCB Universe? If you want to buy pre-assembled circuit hub has had good prices recently (although that's typically much more expensive than raw PCBs at JLCPCB).Sierra Circuits/ Protoexpress.com has an excellent free online DRC/DFA/DFM checker. It's a little naggy and clunky to use, but it does catch a lot of problems.I'm not a layout expert so can't say much there either way, but this is a simple, low speed, and high design margin board so it won't matter much except for the USB -> uController routing. make sure that is short and differential, and make sure you check d+/d- connections. I've seen boards/chips where they need to be reversed but it might be only mentioned in the errata docs.Does that all make sense/ help at all?

author: Jonathon_Doran
author_rank: Regular Contributor
timestamp: July 13, 2024, 10:52:11 pm
content: Thanks for your feedback. This is partially a learning experience. Being able to get one of these MCUs working would be a nice feeling. I went with the TI regulator because I could use MLCCs (the first one I looked at would have required tantalum caps which would cost more than the regulator). JLCPCB charges $2.41 quantity 1 for the part, and it lets me build some experience with such a versatile device.I'm having JLCPCB do most of the assembly. I'll hand solder the switches, and made sure the bootloader switches had a large enough footprint that this will be easy. So those parts are DNP. I didn't like any of the switches that JLCPCB had in stock, and found a nice part on Mouser (SLW9135352ASMT) which is a bit overkill but will work. I prefer not to use a momentary switch (hopefully that won't be a problem with the DFU bootloader). I envision flipping the switch, loading firmware, powering it off, flipping the switch and I'm good to go.I have the SWD as a backup. I assume that I will have all sorts of problems, and want all of the tools I can get. I have a JLINK edu, so I'm already using that Cortex connector.I'll debounce in software. I have USBLC6's on all of the row inputs, and assume that the outputs will be fine. If someone presses a switch, then I would expect the appropriate row diode would protect the MCU.I don't want someone else's board, this is a very specific layout for an unusual board (that does not send regular scan codes). I have reverse engineered the old Logitech HID reports and can duplicate them. One of my main motivations is to replace old devices that are a bit fragile.I didn't bother with socketing the switches on this version. I thought about it. I can always desolder the switches if I absolutely hate them, but I figure that the odds are that I'll spin another version of this board before too long. I have a box of Cherry Silent Reds, but unfortunately the vendor had pictures of PCB mount and sent plate mount switches. I wasn't planning on making a plate and don't think that I need one.I'll attach a BOM.Edit: Corrected typo

author: Kim Christensen
author_rank: Super Contributor
timestamp: July 14, 2024, 12:04:49 am
content: Quote from: Jonathon_Doran on July 09, 2024, 10:06:35 pmI would simply edit that footprint in KiCad and save it as a custom footprint. (trim a bit of copper from the offending pads) That'll fix things and you'll know exactly how it'll be manufactured.

author: Jonathon_Doran
author_rank: Regular Contributor
timestamp: July 14, 2024, 12:34:56 am
content: Thanks. I did that on another footprint, but it was the wrong part. I'll do that again. I can shrink four pads by about 1mm and they will pass.

author: Jonathon_Doran
author_rank: Regular Contributor
timestamp: July 15, 2024, 03:54:55 pm
content: Another couple of questions:I had a polyfuse in the circuit earlier and seem to have removed it. I'm not sure what my reasoning was.I'm thinking of putting one back on VBUS (C910821 from LCSC). The description is "24V 350mA 40A 750mA 0805 Resettable Fuses ROHS". As confusing as that looks, the datasheet is clear: 750mA with Rmin of 0.2 ohm, and R1max of 1.2 ohm.Does anyone see a problem with this? The board will be checked for shorts, but I don't want to risk damaging an expensive port/computer. A $0.05 part seems like cheap insurance.Next, I'm looking at that Bootloader switch and wondering if I should have a pull-down resistor on that. I would probably go with another 10K since I'm already using that part.I'm also planning on flooding the rest of layer 3 with 3V3. I might add a few more LEDs. I don't have the power over USB 2.0 to drive many. I was writing this off earlier, but have the clear switches and want to get some sort of proof of concept. The WS2812Bs look like a lot of fun, but I can't afford 60mA per LED. I was thinking of single color LEDs I could limit to 5mA or so. Does anyone have an experience with this?

author: Jonathon_Doran
author_rank: Regular Contributor
timestamp: July 15, 2024, 04:01:28 pm
content: Quote from: Positron Enthusiast on July 13, 2024, 05:54:48 amI finally had a chance to look over those cap values. Those were obtained from the TI datasheet (Sec 8.2, Figure 24, Typical Application Vout=3.3V). They later explain this in 8.2.2.1.1 (Input and Output Capacitor Requirements) that a larger output cap was used for "optimal noise performance", which is a pretty good name for a band.