Thursday, March 30, 2017

White Panda Alien Gherkin Rainbow

Gherkin with Panda switches and Semiotic keycaps

White PCB and plates. EasyEDA recently lowered their prices and the price to have different color soldermask. It is now cheaper to order your own sets of PCBs/plates.

The Invyr Panda switches have very little wobble/twist. It is very obvious with the Semiotic keycap legends if your switches are not perfectly straight. I tried them on some Outemu Blue switches and it looked horrible with all the keys crooked. The keycaps look very straight and aligned on the Panda switches.

There are only 10 WS2812B LEDs instead of the 22 I used previously. The WS2812B LEDs are on rigid PCB strips, not the normal flexible adhesive strips. They are otherwise the same spacing as the 30/meter strips.

There are also blue 2x3x4 LEDs inside the switches. They shine up through the slot in the switch tops.







Tuesday, March 28, 2017

20 Pro Micros - 1

Ordered 20 Pro Micro's from Aliexpress


These were $35 for 10, with free shipping. Ordered on 3/5 and received 3/27. Three weeks in transit.

This is the typical packaging. Each in a little heat sealed bag with two 12pin headers.

They arrived loose in a small padded envelope. Sometimes I get them rolled up into a ball of foam sheet with tons of tape.

Removed all of them from their packaging. Did a visual inspection of each. These have the most orange capacitors I have seen, usually they are black or yellow.

2 had straight USB connectors. The rest were only slightly crooked. The PCB's are the thicker 1.6mm boards. I prefer the 1.2mm boards, but what you get is random.

The edges are rough. This one has some fiberglass splinters. I will pass all of them over a flat file to smooth out the edges.

These did not have any Arduino sketch preloaded. Usually they have the blink sketch preloaded. I programmed all of them with my modified blink sketch (blinks faster than normal so I can tell which ones have been reprogrammed.)

One was DOA. It was recognized as a serial port and would reset when programming, but would time out while being written to. So total cost is $3.69 each for 19, after factoring in the dead one.

Monday, March 27, 2017

EasyEDA lower prices

Prices much lower, shipping cost the same


It is now $58.09 for 5 sets of Gherkin PCBs with airmail shipping. $38.09 (down from $55.80) for the boards and $20 shipping. That's $11.62 per set, shipped.


If you get 25 sets its $5.76 a set including DHL shipping. $143.84 total, $91.94 + $51.90 shipping


The upcharge for different color soldermask is also lower. $8.21 instead of $10.

I don't think this a special. I don't see any announcement on their site, they did recently change their look though.

How to order a PCB from gerber files.

Sunday, March 26, 2017

Gas Guzzling Gherkin

Gherkin with aluminum plate base

Found a piece of aluminum plate just the right size for the Gherkin on eBay. First project with my Vanda-Lay drill press. Drilled the holes with a 5/64" bit. Just the right size for 2mm screws (1.984mm). Drilled out the bottom of the holes to 1/8" to hide the screw heads. The hex head nylon screws I had were slightly larger than 1/8" so I pounded them in with a mallet. They are very snug.

The aluminum pieces I bought were saw cut, they had very precise square edges. Sanded the edges and surface down with 220grit and then a scotchbrite pad to give a nice even finish.

Total weight with keycaps is 365grams.









Friday, March 24, 2017

Low effort Gherkin firmware

Using qmk.sized.io to create firmware for a Gherkin

Download the json file (click Raw and then save as file). Go to http://qmk.sized.io and upload the json file. The Wiring and Pins tabs are filled in and complete. You will need to complete the Keymap tab and anything else you want to edit.

I was going to create the same keymap as I have in TMK, but the clicking got tedious. Not my way of programming. This will however be useful for anyone who can't create a working dev environment to natively compile the TMK firmware.

Thursday, March 23, 2017

Gherkin in the wild

First real Gherkin I've seen


The Gherkin Pi by /u/willbill642.


I have seen a few boards built with the Gherkin PCBs, this is the first one that did something really different.

With this I consider releasing the gerber files as opensource a success. The PCB's are simple and cheap enough to try out new ideas.

I am looking forward to seeing what else the PCBs are made into. The cost to have your own PCBs made are relative low ($16 per set of plates shipped to just about anywhere) and you can sell the ones you don't use.

Thursday, March 16, 2017

Analog matrix keyboard

Keyboard using voltage dividers and analog inputs

This is a custom keyboard PCB that uses 12 analog channels on a Teensy LC. 4 switches are attached to each channel. Each switch when pressed connects to ground through a resistor. Each of the 4 switches has a different value resistor. Through parallel resistance the voltage divider produces a different voltage for each of the 16 possible combinations of the 4 keys being pressed. This voltage is sampled by the Teensy LC input pin and converted to a decimal value. These values are compared to an array and translated into keypresses.

The schematic shows the 12 channels and the resistors in the parallel resistor/voltage dividers. A Pro Micro was used to control the LEDs in the same way that the GNAP does.

An Arduino sketch was used to sample the analog inputs and output to serial monitor. The data was compiled and the values corresponding to the 16 different switch combinations identified. In the chart you can see the distribution of the 16 values. As more keys are pressed there is less separation of the values.

These are the 16 different analogread ranges for each of the 16 switch combinations. Resistor values must be selected so that the ranges never overlap.

The resistor values used were 1k, 2k, 3.9k, 8.1k. The pullup resistor is also 3.9k. Mathematically they should produce distinct voltages when combined in parallel in any combination in a voltage divider.

The matrix works, and my prototype can detect all 48 switches being pressed in any pattern. Currently there is no keyboard code, it is just a large board of switches that light up the corresponding LED when pressed.

There is a problem in that resistors are temperature sensitive, their resistance changes with temperature. The ones I used are metal film 1% tolerance with a 50ppm/C temperature coefficient. These were relatively inexpensive at 5 cents a piece. The problem is that there is sufficient drift with temperature that the readings on the lower end start to drift with temperature extremes. There are better resistors, 0.1% 15ppm/C, but they cost 7 times as much. Instead of $3 of resistors it would be $21.

Other possible solutions are to use a temperature sensor, switch to a Teensy 3.2, or add a better power supply. With a temperature sensor the readings can be adjusted to compensate for thermal drift. The Teensy 3.2 has an ADC with 1 more bit of resolution, which may or may not help. A better more stable power supply may remove some of the jitter in the readings. It is currently using the 3v regulator built into the Teensy LC.

I probably won't pursue this any further. Since I can't get 100% accurate output without modifications which may not help and it is cheaper and more reliable to use a conventional matrix. This uses 12 pins at 4 switches per pin for a total of 48 switches. A conventional matrix for the same number of switches can be made of a 8x6 grid, only 2 more pins.

Some pictures of the assembled prototype:

Keycaps are the X-Keys relegendable ones. I glued them shut since the tops pop off with the slightest pressure from the side. Probably fine when used with the X-Keys boards since they have very high bezels.

A second PCB was used as the bottom.

 You can see the Teensy LC and the Pro Micro between the two PCBs.

Wednesday, March 8, 2017

Ordering a PCB

How to order a PCB from EasyEDA.com from a gerber file

  • Download the zip file with the gerber files
The zip file contains multiple files each for a different layer of the PCB front/back. Do not edit these files. They have been tested as they are.
  • Go to EasyEDA.com and click "PCB Order"
  • Create an account or login
  • Upload the Zip file
  • Edit the length and width
  • Set the quantity, 5 piece minimum per board.
  • Set the color (anything other than green cost more, it's a flat fee regardless of quantity)
  • PCB should be 1.6mm. With only soldermask (no copper/silkscreen) the PCB will be 1.52mm thick.This matters if you are making a PCB switch plate for MX style switches.
  • Leave everything else at default
  • Add to cart
  • Repeat for additional boards
  • Checkout 
  • Select airmail or express (usually DHL). Airmail is only an option for lighter orders.
  • They take PayPal or credit card
  • The video below goes through all these steps.
The price of each individual board goes down dramatically with quantity. The cost of shipping also goes up dramatically, PCB's are heavy. Play with the quantities, you may be able to get many more boards for a few dollars more.

EasyEDA ships to most countries.
For an order of 5 sets of Gherkin PCB's it is $20 to most places via airmail. A total of $75.80 shipped ($55.80 for the 5 top/bottom/main PCBs)
5 mf68 PCB's are $28.60 plus $17.40 shipping, $46 total to most places.

EasyEDA has since lowered their prices.

Order PCB from gerber files from di0ib on Vimeo.

Gerber files I have released:
Gerber files released under https://creativecommons.org/licenses/by-sa/4.0/
You do not have to contact me for permission, the license is comprehensive. You can link back to the github page as an attribution.