User Tools

Site Tools


jansonntag:attempt4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
jansonntag:attempt4 [2021/03/13 13:58]
jan created
jansonntag:attempt4 [2021/03/24 17:58]
jan
Line 1: Line 1:
 ====== Analog Cherry Keyboard Attempt 4 ====== ====== Analog Cherry Keyboard Attempt 4 ======
 +
 +As I wrote in attempt number 3 at the end, this is the plan for attempt number 4:
 +<WRAP center round info 60%>
 +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. 
 +</WRAP>
 +I´ve got the needed parts some weeks ago (thanks [[projects:ferdinandmeier|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. 
 +{{ :jansonntag:ldc1314_solder_1.mp4 |}}
 +Here are a bit more details about the LDC1614. First of all, you can find the documentation here: [[https://www.ti.com/lit/ds/symlink/ldc1614.pdf?ts=1615644625265|Documentation LDC1614]]. The main advantage is of course the higher resolution of 28-bit. It´s even advertised as a high-resolution option: {{:jansonntag:screenshot_2021-03-13_151600.png?400 |}} 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:
 +  - There is no gain option (Compare Chapters LDC1314: 7.6.26 and LDC1614: 7.6.30)
 +  - 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: [[https://github.com/SirSundays/LDC1614-Arduino|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:
 +<file ino 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);
 +}
 +</file>
 +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:
 +
 +^ This one is mid-air  ^ This one is on my table  ^
 +|{{:jansonntag:2021-03-24_18-01-36_trim.mp4 | Mid-air}}|{{:jansonntag:2021-03-24_18-01-36_trim_3_.mp4 | On the table}}|
 +
 +Yes, there are still a lot of interferences, but nonetheless, I think the result of this first test is really promising. Because of the different behavior when in mid-air or with a surface under it, I will 3d-print a little (and first of all simplistic) case and make some experiments with that. I even think about adding some aluminum foil into that case maybe this will reduce interference as well. Furthermore, I will have to work on the software as well. Right now it's very rough but I also want to implement some kind of smoothing (possibly after I build the case) and I have to work on reading out all four keys at the same time. Therefore I will have to dig deeper into the documentation. My understanding right now is that I need to change some of the MUX settings.
 +
 +As a little bonus I tried what happens when I touch the coil with my finger:
 +{{ :jansonntag:2021-03-24_18-01-36_trim_2_.mp4 | LDC and fingers}}
 +Maybe this has a function for someone as well. Could be useful in some situations, but I don't know. (Free real estate ;-))
 +
 +
 +
jansonntag/attempt4.txt · Last modified: 2021/03/25 17:56 by jan