User Tools

Site Tools


jansonntag:attempt4

This is an old revision of the document!


Analog Cherry Keyboard Attempt 4

As I wrote in attempt number 3 at the end, this is the plan for attempt number 4:

There I will test out the bigger brother of the LDC1314: The LDC1614. It has the same pinout and overall package, so it will be an in-place replacement. The big advantage is the 28-bit resolution. Hopefully, there is no gain needed then.

I´ve got the needed parts some weeks ago (thanks Ferdi for ordering them!), but didn't have time to solder or even start programming because of my bachelor thesis. After finishing most of the thesis I had a day off and at least desoldered the LDC1314 and soldered on the LDC1614 as a replacement. I made a short video about it as you can see below, which also contains a little overview of the gear that I´m using. Not gonna lie but I´m still not very good at soldering with hot air, but I hope that the circuit will work nonetheless. Here are a bit more details about the LDC1614. First of all, you can find the documentation here: Documentation LDC1614. The main advantage is of course the higher resolution of 28-bit. It´s even advertised as a high-resolution option: Otherwise it is pretty much the same, but because of the bigger registers the library has to be rewritten or even a completely new one has to be made. Another option would be to find an already existing library. So in the next couple of weeks, I will work on that.

My thesis is nearly finished so I had some spare time to read some of the documentation. To my surprise (and luck) the LDC1314 and LDC1614 have nearly identical register maps. There are only two differences:

  1. There is no gain option (Compare Chapters LDC1314: 7.6.26 and LDC1614: 7.6.30)
  2. The measured data is split into an MSB and LSB part (32-bit in total, 4-bit error flags, 28-bit measurement data)

And I thought I would have to rewrite the whole library. So I quickly (30 minutes max) modified the old library to account for the above-mentioned differences. You can find it here: LDC1614-Arduino Even the parameters you have to set are identical between them too. I then modified the script from attempt 3 to use the new library:

ldc1614.ino
#include <ldc1614_lib.h>
#include <Wire.h>
 
LDC161X ldc1614(false);
 
void setup() {
  Wire.begin();
  Serial.begin(9600);
  ldc1614.LDC_resetLDC();
  delay(500);
  ldc1614.LDC_setConversionTime(0, 0x2000);
  ldc1614.LDC_setSettleTime(0, 0x000F);
  ldc1614.LDC_setClockDividers(0, 0x1002);
  ldc1614.LDC_setErrorConfig(0x0000);
  ldc1614.LDC_setDriveCurrent(0, 0xE800);
  ldc1614.LDC_setMUXConfig(0x20D);
  ldc1614.LDC_setOffset(0, 0x4FFF);
  ldc1614.LDC_setConfig(0x0801);
}
 
void loop() {
  Serial.println(ldc1614.LDC_readData(0)/1000);
  delay(100);
}

I removed the process of making an average just for testing right now. With the new LDC, I also ordered four Cherry MX Blacks (MX1A-11NN) and soldered these onto the test board. I then tested the board. As it seems to me there is a difference if the board lays flat on my table or if I hold it mid-air. But see for yourself:

jansonntag/attempt4.1616607870.txt.gz · Last modified: 2021/03/24 17:44 by jan