Bluetooth T9 keyboard for smartphones (and other things)

rcarmo2 pts0 comments

T9 – In Which Jarrett Builds

Skip to content

Forewarning: Bit of a plug for PCBWay in here, but they deserve it. They’re a rad company, and I always like working with them.

Premise:

This project is a reasonably straightforward keyboard / Bluetooth project, that touches a few neat features, without getting too into the weeds. Really the idea is to do a simple product, really well.

I quite like keyboards and some of the associated projects and designs, but have very carefully avoided becoming a keyboard enthusiast. That’s a deep rabbit hole I do not need to go down.

The keyboard community has a really defined keyboard schematic layout, and a really well defined set of variations of features that people may want in a keyboard, and even a particular microcontroller and firmware that they recommend. The firmware, QMK (and ZMK, and maybe some spin-offs) is fully featured, well adopted, and very customisable. From an engineering perspective, it would be irresponsible of me to use anything else.

Unless I drastically altered the form factor. So this is a Bluetooth T9/ABC Multitap keyboard based around the keypad of a Nokia E52, as an input device to a smartphone or laptop. For my particular generation only, this typing style is muscle memory. for any other generation, it’s incomprehensible.

Schematic:

Classic keyboard circuit.

For the keys themselves, I used the Alps SKRK series switches at 0.98N of actuation force. This ends up feeling a little mushy, and I should have gone for the 1.57N version instead. Next time.

I’ve covered battery circuits here before. There are few open source designs out there with proper undervoltage / overcurrent lockout and a proper power path. Where I’ve done this professionally, I’ve used TI’s BQ-series battery management family, which has nice features for a commensurate added cost.

For this one, I played around with a set of classic cheap parts that are sold here by the millions but remain mostly unknown to the western world: the TP4200 battery charger, the DW01A low-voltage / overcurrent cutoff, and a matching 8205A MOSFET pair to disconnect the battery. This is likely the exact combination of parts hiding inside many cheap gadgets you’ll find online, in part because it’s about 25 cents of total BOM cost.

The protection circuit isn’t strictly necessary for this device – the LiPo I used has a protection circuit built into the pouch. That isn’t always the case.

I won’t use this exact circuit again. If I picked similar design considerations next time, some off-the-cuff substitutions would be: the TP5100 (a switching charger) instead of the TP4200 (linear), the PT8261 instead of the DW01A, and I’d actually do some comparison shopping on the 8205A.

The DW01A in my circuit didn’t behave correctly. Under nominal conditions, other OC and OD pins (over-current and over-discharge) are HIGH at all times. My circuit never asserts OD HIGH, and OC is LOW when the USB cable is unplugged.

There are three possibilities:

– I’ve read / implemented the schematic wrong. It doesn’t appear to be the case, based on the datasheet and multiple re-readings, but it’s always possible.

– This manufacturer is bad. This IC seems to be a generic part, and is manufactured by several different manufacturers, who all have different datasheets, and may be doing something different.

– This IC is bad. Static discharge, manufacturing defect, soldering temperature issue.

The latter two issues could be solved by swapping the IC out to one from a different manufacturer, or the PT8261, which is a pin-compatible replacement. The first issue, well, I do have a reference product on-hand, and it would be straightforward to reverse engineer the connections, and see if something is obviously different than my implementation.

These are things I would do right before designing a second revision. In the meantime, I just jumped over this particular section of battery protection, because again, this exact circuit already exists on the LiPo pouch itself.

There are also a couple voltage dividers on the USB and battery lines to detect USB status and the state of charge (roughly) of the battery, connected to the microcontroller’s ADC. This results in a predictable parasitic current draw! They should have been connected to a MOSFET to be able to be disconnected from the system when not actively sampling.

For the microcontroller, I’m deep in with the ESP32 ecosystem lately, and it hits all of the requirements for this project, so that trend will continue. I used an ESP32-C6 module that is tiny, has its own antenna, and the C6 has a Bluetooth stack. Also, USB serial/JTAG, as a bonus.

PCB:

I built this up over the existing keypad of a Nokia E52 phone.

First, I scanned in an image of the keypad, then laid out my button arrangements in the proper positions.

This design was really irritating to solder by hand. On one side of the PCB, I have an array of 25 switches, that must be installed flat and level, and has melty...

keyboard circuit battery really different bluetooth

Related Articles