Close

Proof of Concept: Raspberry Pi Handheld - Part 4 - Teensy to RPi Connections

A project log for Teensy Thumb Keyboard

Handheld tactile switch keyboard for Teensy 3.2 compatible boards.

anthony-digirolamoAnthony DiGirolamo 11/20/2018 at 02:430 Comments

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