5 ms·
Clavier: An FPGA-based mechanical keyboard with USB hub and comms interfaces
- analog8374 1y agoDesigned in OPENSCAD! So you can do openscad (its weird language) or you can do python and use the STL lib. Which do you like better?
- willis936 1y agoAfter making one medium complexity design in openscad over the course of weeks I am pretty confident in saying there is no use case for openscad that isn't better served by freecad.
- sebazzz 1y agoBasically, only variable adapable designs are suited for OpenSCAD - because those can be trivially regenerated in web applications.
- exasperaited 1y agoI came to the conclusion that if I need to do that -- webapp-regenerated, parametric variable stuff -- I would either hook up headless FreeCAD in containers (which is now potentially a bit easier, because the work Ondsel did is open source), or set up replicad, e.g. https://replicad.xyz/docs/examples/gridfinity https://replicad.xyz/docs/examples/gridfinity OpenSCAD is simply not worth the pain unless you're using it to demonstrate abstract geometry. Build123D or CadQuery could well be viable, though IMO both have slightly frustrating dependencies. But since they can both load STEP files then customisations can be applied to designs built mostly elsewhere.
- random_duck 1y agoVery cool project.
- MadnessASAP 1y agoAs somebody who regularly tinkers, debugs, and programs microcontrollers at my desk. I just realized how handy having UART/SPI/I2C headers right there would be. Obviously I already have them like right there but to have them right there there would be great.
- nine_k 1y agoHow about the risk of frying the MCU?
- MadnessASAP 1y agoRisk? Ain't no risk to it, it's an established fact! What's a good electronics hobby without an assortment of dead MCUs, melted wires, and exploded probe tips?
- xnzakg 1y agoYou can always put some extra protection on the external interfaces. Won't make it impossible to fry if you really do something stupid but would reduce the risk significantly.
- RainyDayTmrw 1y agoAfter a few dumb accidents involving header pins, I've come to the conclusion that exposed male header pins on my desk are a hazard.
- wtallis 1y agoI've learned to be wary, too. Most desktop motherboard these days have several fan headers just above the memory slots. They also frequently use DIMM slots that only have one latching lever, usually at the top of the slot near the fan headers. So when you're trying to remove a memory module, if you use slightly too much force and your finger keeps moving after the latch opens up all the way, you get a deep puncture wound. The headers on the keyboard look like they'd be easier to hit accidentally, but probably not with enough force to cause a serious injury. I'd still prefer having some covers over them.
- snitty 1y agoThe FPGA is a Lattice LFE5U-25F, about $20 https://www.digikey.com/en/products/detail/lattice-semiconductor-corporation/LFE5U-25F-6BG256I/9553919 https://www.digikey.com/en/products/detail/lattice-semicondu...
- crote 1y agoOr about $5 on LCSC.
- greenbit 1y agoThank you for surfacing that info, was wondering if I seriously had to go start opening files to find out. Btw, that's a 256 pin BGA part, grandad's Weller cannot help.
- tremon 1y agoCurious why they didn't use the LFE5U-12F, I can't imagine this project maxing out even the smallest modern FPGA.
- rowanG077 1y agoEven better. The LFE5U-12F is just a 25F in terms of resources you can full utilize it with nextpnr. I expect lattice didn't find it economical to have a truly separate production process for it.
- FridgeSeal 1y agoIs the benefit of the FPGA here that you can program the whole stack? Like a kind of super-charged QMK based board?
- pedro_caetano 1y agoWell the project description seems to hint at to their motivation: > 1000 Hz polling rate > No multiplexing, no ghosting > FPGA-based, VHDL only, no ALU It looks like a pure HW 'described' keyboard with no running software meaning it is fully parallel (plus some serialization when reaching the USB device/interface). So arguably on top of true parallelism the only ceiling for the latency of the whole thing will be the clock period configured in the design and the physics and electrical behaviour of the switches themselves + circuitry. Probably someone who enjoys working close to hardware and wants to optimize performance.
- crote 1y agoMost MCU-based keyboards have a 1000Hz polling rate - and some mainstream gamer-focused keyboards are even going for 8000Hz these days. Getting rid of multiplexing is a result of having a high number of IO pins: an MCU like the STM32F429BE also has enough pin for direct-attach switches. Ghosting hasn't been an issue for ages, even with a traditional keyboard matrix it's just a matter of adding per-key diodes. In theory it has a sliiightly lower latency than an MCU-based keyboard using the same USB interface, but I doubt the difference is big enough to even be measurable in real-world scenarios. We're talking about, at most, a few thousand cycles of an MCU running at a few hundred megahertz - and that's only relevant when you press the key right before a polling request arrives. That's the difference between an average input latency of 0.500 ms and 0.505 ms. Meanwhile on the output side, your fancy 480Hz monitor is only showing one frame every 2.1 milliseconds...
- deleted 1y ago[deleted]
- pedro_caetano 1y agoThe optimization here is somewhat theoretically specially when you take into account the USB bottleneck as well as real-world Human reaction times and Perception. But it appears from the project description that the author's motivation was indeed performance (irrespective of merit). A neat VHDL + HW project nevertheless.
- c0wb0yc0d3r 1y agoI'm curious as to why it doesn't have USB 3.0 ports. Do they take too much power? Too much space?
- crote 1y agoUSB 3 is significantly more complicated to implement, and the hub chips are quite a bit more expensive. Hardware-wise it would've become by far the hardest part of this board. USB 2, on the other hand, is fairly trivial. You almost have to try to get it wrong - especially when you are not concerned about certification.
- userbinator 1y agoPS/2 is far more trivial and low-latency than USB.
- snitty 1y agoI'll remember that next time I'm developing an FPGA keyboard for my Gateway computer.
- userbinator 1y agoMany of the latest gaming mobos still have PS/2 exactly because of the low latency.
- bojle 1y agoGoing by the task at hand, registering keystrokes pressed by a human, USB 3 is also not quite needed.
- astrange 1y agoIf you think about it, it's not really mechanical if it has an FPGA. It should be made of gears or something.
- vardump 1y agoI wonder if something mechanical could ever talk even USB 1.1 at 12 Mbps. Perhaps if it was small enough...?
- EvanAnderson 1y agoIf you're not familiar with how teletype machines worked you might enjoy it. There were early units that were purely electromechanical. It's really cool. Usagi Electric did a nice video if that's your kind of thing: https://youtube.com/watch?v=sSiVYgot9SI https://youtube.com/watch?v=sSiVYgot9SI I think the video does a nice job of showing the mechanical components that encode the keypresses and generate the 45.5 baud serial output. The printing side isn't given quite as much coverage but you do get to see close-up views of it in operation.
- deepsquirrelnet 1y agoThis seems like a great place for a Cypress (Infineon) PSOC. A while back, I interfaced one to a linear CCD and it was a great experience. They also have USB HID support on chip.
- robinsonb5 1y agoI used a PSOC (4) for a project once, and while the chip itself was awesome the software was so bad that attempting to use the next version of the software "bricked" the devboard I was using. (Something to do with the new serial bootloader being a different size. "Bricked" in quotes, because with the right kind of expensive programming cable it could have been resurrected - but the whole point of the devboard in question was that it was cheap and self-contained, not needing an external programmer.)
- lifeline82 1y ago[dead]