Turns out having an additional microcontroller in a raspberry pi project is pretty useful. I was able add backlight control and low battery monitoring to the keyboard with these connections. The Teensy is happy to output a PWM signal for backlight control. You can bind any key combination to change the PWM duty cycle and change the backlight brightness without any RPi intervention.
Low battery monitoring currently looks at the LBO pin that is pulled low if the battery dips below 3.2v. Alternative would be to have a voltage divider monitoring the BATT pin directly to get the full range of battery voltages similar to https://jeelabs.org/2013/05/16/measuring-the-battery-without-draining-it When the the LBO pin is low the Teensy can output serial message (over the default USB serial) that the RPi could monitor and then display a notification to the user.
Here are all the connections:
Rpi3B+ PowerBoost PP2 5V PP3 GND
Rpi3B+ Teensy 3.2/LC USB Surface Pads PP48 GND PP47 D+ PP46 D- PP27 VBUS
Low battery monitoring: Teensy D22 to Powerboost LBO Backlight control: Teensy D23 to BCM19 (GPIO pin 35 hyperpixel4 backlight control)
Rpi Power Test points from: https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/README.md
Teensy 3.2/LC Pinout: https://www.pjrc.com/teensy/pinout.html
Hyperpixel4 Pinout: https://pinout.xyz/pinout/hyperpixel4
Powerboost 1000c Pinout: https://learn.adafruit.com/adafruit-powerboost-1000c-load-share-usb-charge-boost/pinouts
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.