Pages

Friday, December 18, 2020

Nice oxidation

Applied liver of sulfur to exposed copper

As an experiment I used liver of sulfur to apply a forced patina to the exposed copper layer to highlight the legends on the Feegle XS.

The shiny copper turned almost black. It looks very good against the white soldermask.

The all white PCB is what it looked like originally. I carefully sanded off the raised areas of the solder mask to expose the copper. Laying a piece of 1000+ grit sandpaper on a flat piece of glass is the quickest way to only sand off the raised areas.

The forced patina compared the the naturally occurring oxidation on another Feegle XS.

I will probably spray a layer of clear lacquer over the top to protect the thin oxidized layer.
 

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.


Wednesday, December 9, 2020

ORTHOPI rotary encoder

Rotary encoder connected and setup as volume control

I connected the encoder to the GPIO header with the same 30awg wire I used for the other connections.

There are 4 connections, Ground (black), Encoder A (yellow), Encoder B (orange), Switch (blue).The ground connection is shared for the encoder and the switch.

I soldered directly to the GPIO header. I chose GPIO 17, 27, and 22 since they are easy to access.

I followed the instructions and modified the script I found here: https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1

Change the GPIO pin definitions in the script https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L33-L38

Also change all references to the "PCM" device to "HDMI". https://gist.github.com/savetheclocktower/9b5f67c20f6c04e65ed88f2e594d43c1#file-monitor-volume-L188-L223

I had Encoder A and Encoder B swapped so had to swap GPIO 17 and 27 to get the volume to go up when turned clockwise.

Friday, December 4, 2020

ORTHOPI

Raspberry Pi 400 mechanical keyboard mod

I integrated the ORTHOPI mechanical keyboard PCB with the Raspberry Pi 400 keyboard matrix into the top half of the Raspberry Pi 400 case. The top was gutted, completely removing the old keyboard. The connection between the Raspberry Pi 400 and the keyboard is detailed here.

Works like the original. The power on/off (FN+F10), and the LEDs.

The keyboard is a grid layout. All keys on the original Pi 400 keyboard are represented. The space bar is duplicated as two 2U keys. 4U space bars are uncommon. The Return and Right Shift keys are also 2U.

I also added a rotary encoder. It is a EC12 type. EC11 should also fit.

Since there is no plate, the switches are PCB mount Gateron clears. These are light linear switches. Gateron PCB mount switches fit very snug in these PCB mount holes, other brands are much looser. The 2U PCB mount stabilizers are standard Cherry ones.

Most of the plastic from the center of the top part of the case was removed. Holes were drilled and notches ground to accommodate the switch pins on the top row and the clips on the stabilizers on the bottom row.

Heavy duty, double sided 3M VHB tape was applied to the PCB.

PCB stuck to top plastic case. I ended up removing all the remaining plastic, leaving only the edges.

Assembled. The VHB tape is very strong. It is still easy to separate the top half of the case from the bottom.

The PCB is a little smaller than the case top.


The PCB ended up very slightly crooked on the case. Removing the VHB tape is a major effort and not worth it to do over.

DSA style keycaps from a cheap ortholinear set from Amazon. It had most of the keys needed. There were only one CTRL and ALT keycaps so I used the symbol ones for the right CTRL and right ALT. Also there was only two 2U key caps, one convex (rounded) and one concave top, I used these for the space bars. The 2U Return and right Shift are from the Lepton set I bought a long time ago.

The switches/keycaps double the height of the Pi 400.

You can see the PCB is stuck to the case slightly crooked.

I removed the status LEDs and soldered 30awg wires to the pads. Cathode on the left, anode to the right.

The Capslock, Numlock and Esc key switches have pads for LEDs. I soldered the 30awg wires directly to the LED pins.

The PCB footprint for those LED switches is very slightly off center from the rest of the switches. It does not make a difference with PCB mount switches, but a plate might have slight alignment problems.

Routing the wires is the most tedious part. There is quite a lot of space between the heatsink and PCB, but there are some pinch points that you want to avoid.

LEDs functioning. The Power LED is much brighter than the Capslock and Numlock. It may just be the cheap 3mm LEDs I am using.

The only thing left to do is to connect the rotary encoder to the GPIO pins. These will have to be manually wired like the LEDs.

The PCB should also be grounded like the original one was (conductive foam pad near Ethernet port). The two mounting lugs on the rotary encoder are connected to the ground plane on the PCB. A drain wire from there to a suitable ground point should work.

Gerber on git.

Wednesday, December 2, 2020

Raspberry Pi 400 matrix verified

Tested with prototype PCB

Made a simple PCB layout with all of the same key positions as the original Pi 400 keyboard. The matrix keymap is correct.

As long as you use the available keys in the matrix you can make a replacement keyboard connected to the Holtek controller.

Connections to the Pi 400 PCB were made with 30awg wires. I got these on Amazon, it is a roll of 8 different colors bundled together.

The keyboard end with labeled pads.

The Pi 400 matrix pads. I labeled the pads on some masking tape.

The 8 different wire colors in 3 sets, total of 24 connections.

The completed ORTHOPI is here.


Monday, November 30, 2020

PCB copper lead test

Lead test of exposed PCB copper layer

I have several of the 3M Lead Check tests and used one on the exposed copper layer of a PCB. 

As expected there was no reaction. Which is good since I've been carrying this Feegle XS around with me for a while now.

A patina has formed on the copper surface. I replaced the steel screws with some brass ones, the outline of the old screws is still visible.

Thursday, November 12, 2020

Raspberry Pi 400 keyboard matrix keymap

The diodeless matrix

Like most rubber dome keyboards, there are no anti-ghosting diodes. Instead, the matrix is arranged in a way that it is unlikely to be able to press any combination of keys that would cause ghosting, or blocking.

The matrix on the Raspberry Pi 400 keyboard is 8x16. 24 total io pins used. The connector is 26 wide, 2 are not used (H and J in my numbering).

This is for the ANSI layout keyboard. Someone with the ISO version will need to compare.

The order of the pins on the bottom of the PCB are not in the same order as the ribbon connector.

My original labeling using A through Z on the ribbon connector.

This matrix/keymapping has not yet been verified. I have tested the matrix here.

ORTHOPI PCB that uses this matrix here.

Tuesday, November 10, 2020

Raspberry Pi 400 keyboard controller

HOLTEK HT45R0072

The keyboard of the Raspberry Pi 400 is connected to a dedicated MCU that uses one of the 4 ports of the built in USB hub.

D+ and D- USB data lines are circled. They go through the vias to the other side of the board and run across to the VLI USB chip. The large test pad is VBUS.

On the other side of the board the D+ and D- lines connect to the VLI chip.

On the bottom of the PCB under keyboard ribbon connector the matrix pins are broken out. If you could reprogram the Holtek controller you could connect a custom keyboard matrix. Unfortunately this is a OTP (one time programmable) device, so unless you can work with the existing matrix the Holtek is not very useful.

The easiest way to replace the keyboard would be to cut the traces between the USB hub and the Holtek chip. Then connect the D+ and D- to a separate controller.

The keyboard has a power key (Fn+F10). This functions similarly to the modification I did on the Flirc case. A custom replacement keyboard could use an io pin to trigger the power on/off the same way.

ORTHOPI PCB that connects to the Holtek controller here.

Thursday, November 5, 2020

feegle XS

SSL

A tinier Feegle. This is the same design as the Feegle but using 4.5x4.5mm tactile switches instead of 6x6mm. The only functional difference is the lack of a RESET button. There is only a USBASP button. Holding the USBASP button while plugging in the USB cable will enter bootloader mode.

Originally planned to use the same through hole PTC fuse I use on most V-USB boards, but with it overlapping the resistors. This turned out to be too thick and would require 6mm spacers. To keep to the 4mm spacer thickness I used a surface mount PTC fuse.

Uses the same blue LEDs for the V-USB circuit and miniature 16MHz crystal.

The switches are tiny. 6mm height for the keys and 5mm for the USBASP button. I used the top plate to hold the switches in place while soldering. It would be impossible to keep them all aligned without the plate holding them in place. Since the base of the switches are shorter than most of the other components I soldered them on first, so the plate could rest against the switches firmly.

Wookie for scale. 63x46.5mm. The holes in the top plate are 2.5mm for the switches. 3mm holes for the LEDs. Flat laptop style M2 screws.

With 4mm M2 spacers the total thickness is about 9mm. I found some aluminum M3 spacers on Digikey that look much better than the transparent nylon ones and fit right over the M2 brass spacer.

I sanded one the top plates to expose the copper layer.

6mm switch on the left, 4.5mm on the right. 4.5mm through hole switches are not very common. Surface mount versions are easy to find. I found these at lcsc.com. They are available in a few different heights and in two different actuation weights (160g/250g).

The 4.5mm switch is only 3mm tall at the base. The mini USB connector and ATmega328 are both about 4mm tall so the board can't be made any thinner.


Monday, October 26, 2020

Pogo Pin Lobot

Lobot with Pogo Pins

For programming boards that don't have the ICSP header pins installed.

Same Lobot PCB as before. Pogo pins installed in the ICSP header instead of the Pro Micro footprint. Cheap Tiny AVR ISP programmer board installed.

Spring pressure makes contact with the unpopulated (no pin header installed) ICSP pads on the PCB.

The pins are delicate. I store this in an Altoids tin. More info on the pogo pins can be found in the Lobot post.

The pogo pins are soldered to the top PCB (bottom in this picture). This has to be done with the two PCBs assembled. I used a piece of kapton tape to keep the pins from falling out while soldering. Solder the back row first without the front row in place, there isn't a lot of room to work.

The pins are not soldered at all to the bottom PCB (top in this picture).