PocketType - Espruino Bluetooth Keyboard & Display #3419
Replies: 25 comments 18 replies
-
Posted at 2024-02-20 by @gfwilliams Wow, that's awesome! I love the two displays. I'm not sure how the scanning is done, but there's a hack in the KeyPad module which (IMO) is quite nice: https://www.espruino.com/modules/KeyPad.js You basically just pull down and watch all rows, then set all columns high (or vice-versa). Then when a key is pressed down you see that a pin has changed state and at that point you scan to see what changed (and I guess maybe keep scanning until the key is released). That way you don't have to waste a bunch of power scanning - you know as soon as any key is pressed. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-20 by @fanoush Oh, missed this post completely. This is very nice. Love the dual display idea too :-) Few links |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-20 by @gfwilliams Those clones look crazy cheap, for example https://www.aliexpress.us/item/1005006035267231.html £4.90 - I can't even buy a nRF52840 chip for that from mouser/farnell/etc, let alone the whole board with charging circuit! I wish I knew who makes them and I could order a bunch and resell them |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-20 by jeffmer @gfwilliams Thanks, I missed the keypad module but that is exactly how my scanner works. To make sure nothing is missed, I keep the scanner active for 5 seconds from the last key event after the first keypress wakes it up then it goes back to waiting for a key interrupt as you describe. @fanoush In fact, I started with some of the Aliexpress modules and in some ways, you get what you pay for. The quiescent current of the nice!nano is around 10 microamps while the Aliexpress module is more than 140 microamps. I now have a basic editor working and I can now hack all its software on the device itself. Hope to post a video of it soon. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-20 by @fanoush yes, it is documented that scratching off some specific resistor near usb connector helps, it is 5K pull up to vcc by mistake but cpu can drive that pin too after the resistor is removed, have that cheap board too but did not test this yet. and the leak is when driving that pin low which turns off power to external stuff so if not used for anything it may be pulled high to prevent the leak(?) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-20 by jeffmer I saw that too but I think it’s related to switching off the 3.3V supply pin so I do not think it helps if you do not switch off the 3.3V. That is, it’s a pullup on the pin which controls the 3.3V |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-21 by @fanoush OK, so I had to scratch it off. When it was there and D13 was pulled down it draw like 500uA, when pulled up it was still about 145uA (from 4.2V battery). When I scratched it off it still draw about 145uA when pulled up as before however when pulled down it turned off power to VCC pin and went down to normal 5uA idle when radio is not used. So the 140uA is the 3.3V voltage regulator when it is turned on. Which is not that great if you need to power something from 3.3V like the display. Does nice!nano have more efficient 3.3V regulator going to EXT_VCC pin? Anyway, nrf52840 can produce 3.3V (or 1.8V) by itself too when powered from VDDH (5v from usb or 4.2 from battery). And indeed the VDD pad near SWD gives 3.2V even if the regulator is turned off so maybe it could handle that low power display more efficiently. So overall it is good board with that resistor scratched off. Also the antenna is as good as my other boards, better than watches like Magic3. It can find xiaomi thermometer advertising over coded phy behind several walls which Magic can't. And rssi for that thermometer is about the same as on my phone or 52840 dongle from same location. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-22 by jeffmer Thanks, that is interesting, I will try it on the boards I have. Yes, I think the main difference is the 3.3V regulator. The full schematic for the nice!nano can be found here https://nicekeyboards.com/docs/nice-nano/pinout-schematic. There are two versions. I think the AliExpress board is like V1 except that the resistor should be 2M not 5K. I have the V2 board which has a different circuit for the external 3.3V. Can you post a photo of the location of the 5K resistor. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-22 by @fanoush It is marked in red on that wiki page https://github.com/joric/nrfmicro/wiki/Alternatives Also down on that page for nice!nano v1 "Regulator: AP2112K (code G3P, up to 600 mA, leaks 55uA), you can replace it with XC6220 (up to 1A, leaks 8uA)" so the voltage regulator leaks less than half of this cheap board. however if you power LED from it it draws much more anyway and if you need much less then the VDD pad could work (or GPIO pins). |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-03-01 by jeffmer I have posted a more comprehensive description of this on Hackaday https://hackaday.io/project/195010-pocket-pad/ . It has also been picked up by a Hackster writer here. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-03-01 by @gfwilliams That's excellent! Really glad hackster picked it up too! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-03-04 by jeffmer Here is the video of the editor in action writing the traditional hello world program. The typing is a little painful as I am used to using this keyboard with my thumbs. https://youtu.be/eWG1iZ8Woz0?si=R9hkCvVP_7za8025 There is an example of cut and paste at the end of the video. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-04-14 by @joakim That's really cool! I like the "split screen" layout, sort of a physical IDE. Something I've been dreaming of for a while is a mobile LoRa texting device with a low-power display and a Blackberry keyboard. It could be a Pixl.js + BB Q20 keyboard + LoRa + antenna + battery in a handheld format. A bit like the old Cybiko, which had two-way text messaging over radio as early as 24 years ago. Or like an early Blackberry, only with LoRa. A related idea is to build a rudimentary social mesh network on top of this. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-23 by user122597 Do you have a PROMICRO/SUPERMINI.py board version for this board? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-24 by jeffmer Promicro is a clone of the Nice!Nano so its the same board description. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-25 by user122597 I have built the promicro. Hex-file according: Checking the file with uf2conv.py -i espruino_2v25.13_promicro.uf2 results in error: Traceback (most recent call last): When I do the same procedure for the NRF52840DK.py, then everything goes well |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-25 by @fanoush it is probably because the hex file you start with contain also bootloader (and softdevice). easiest is probably to copy paste final mergehex line and omit everything except first two inputs (=softdevice hex and the espruino app_hex) and then uf2conv such merged hex file without the -b address. or if you know you already have correct softdevice s140 6.0.0-6.1.1 flashed you can uf2conv just the app_hex file EDIT: attached is my current board file, building bootloader is disabled so converting may be easier with this oneAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-26 by @fanoush And BTW this board is pretty good overall, one cheap source is the twin pack here https://www.aliexpress.com/item/1005008144734921.html , the resistor is fixed on this one so power consumption in idle is about 5uA I like how this board is powered from battery, it uses internal nrf52840 VDDH regulator and battery is directly connected to it so there is little loss, one can measure battery voltage via internal VDDH reference and the gpio voltage can be set between 1.8 - 3.3V via UICR REGOUT0 setting. Apart from Espruino I also have DAPLink ported to this board and use it as SWD/JTAG probe. DAPLink can optionally have hardcoded target board and then it provides USB storage for easy flashing of hex files to the target, I have a build for nrf52832 and 52840 targets and it is kind of nice to just drop hex file to flash e.g. Bangle 2. It also works with newly merged SWDCON https://github.com/espruino/Espruino/tree/master/libs/swdcon console over the charging cable with Bangle 2 so devices with broken bluetooth can be somehow used as ordinary watch. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-27 by user122597 I have bought already a couple of these devices: https://www.aliexpress.com/item/1005008144734921.html This INFO_UF2.txt of Nicenao-disk: I assume, that I can do the following: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-28 by @fanoush yes, unless it gets confused by the app_hex file not having .hex suffix and taking it as a binary, then rename it to app.hex first |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-12-28 by user122597 I believe it went well and I can still use the UF2-disk after the double reset: uf2conv.py -i espruino_2v25.13_nano.app_hex.uf2 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2025-01-03 by yngv126399 Anyone having an issue with the Nice!Nano bootloader after updating app to Espruino(app only)? I short RST to GND 2x and it displayed a drive, copied the espruino.uf2 to it, works great! When I try to short the pins again, I see the device reboot, but it doesn't enter bootloader. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2025-01-03 by @fanoush the double reset is a bit tricky, too slow or too fast and it boots into espruino. you can also poke this magic value https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/main.c#L112 to GPREGRET and BTW I started to get those two red boards in the 3 item bundle offer for $4.49, this is pretty insane |
Beta Was this translation helpful? Give feedback.
-
Posted at 2025-01-05 by user122597 I had the same problem when using the app.hex file. However using the procedure as mentioned above it works very well. Short the RST to GND 2x and the drive appears. Unplug and plug the device, the drive disappears and Espruino is active. Real super!!! Many thx to @fanoush for his nicenano.py file and his suggestions for using the app_hex file |
Beta Was this translation helpful? Give feedback.
-
Posted at 2025-01-05 by @fanoush
As mentioned (in a bit cryptic way) you can also run Just tried and when USB is not connected it reboots back to Espruino after few seconds, but when it is plugged to USB it stays in bootloader and drive appears. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-13 by jeffmer
I could not resist this PocketType keyboard kit from Mechboards when I saw it advertised at a very reduced price. I wanted to see if I could program it in Espruino as the sockets on the keyboard for a Pro Micro ATmega32U4 board are also compatible with a nice!nano board based on an NRF52840 processor.
When I got the kit, I realised that there were enough spare pins to drive a display - in fact two low power ST7302 based displays as can be seen in the photo below.
The top display in the picture is running a Bangle style launcher and the bottom display is a Terminal console. The bottom right key can be used to direct the keyboard output to an app running in the top display or to the console in the bottom display. In addition, the device can be made to appear as a bluetooth keyboard to another computer by running the keyble app.
The keyboard is powered by a rechargeable LIPO battery. The keyboard matrix scanner is activated by pressing any key and I was pleased that it starts fast enough to capture the first key press. The end result is that the overall standby current consumption is less than 100 microamps. The spare lipo battery I used is 1200mah, so with light use, I will next have to charge it again some time in 2025.
PocketType is a 40% keyboard with numbers and symbols accessed by using layer keys. The kit comes with blank keycaps which I have labelled with transfers and then sealed with clear nail varnish. The transfer set was for a standard set of characters - thus the creative use of orientation to label arrow keys etc.
With the addition of a simple text editor, the device is definitely a candidate for a deckchair/sun lounger programming tool - although it has to be said that typing on the microswitch based PocketType keyboard is thumb based and fairly slow.
Beta Was this translation helpful? Give feedback.
All reactions