Friday, December 18, 2020

ROT XIAO

Rotary encoder soldered directly to a XIAO

Small, with the encoder sitting directly on top the metal shield on the XIAO and soldered directly to the pins.

The encoder is connected to pins 8, 9, 10. The switch is connected to pins 3 and 5.

Pins 9 and 5 are set as output low to behave as ground pins.

The solder lugs were bent and trimmed. I soldered this side to the metal case of the XIAO.

The other lug I soldered to the top of the USB-C connector.

I taped the bottom of the XIAO when soldering the pins so that solder would not flow out the bottom. This left the bottom perfectly flat.

I added heavy duty 3M VHB tape to the bottom. I can now add an encoder anywhere.

It runs a simple Arduino script. It uses the HID-Project and CommonBusEncoders libraries. 

You can get 3 packs of XIAO on Amazon and Digikey sometimes has them in stock.

Pro Micro version

I had to trim off the mounting lugs since they would short out on the components on the Pro Micro. I also used a small square of VHB tape between the encoder and the ATmega32u4.

Same as the XIAO version, but the encoder is connected to pins 15, 18, 19. The switch is connected to 4 and 6. It runs the same Arduino script as the XIAO, with only the pin definitions changed.