User Tools

Site Tools


jansonntag:attempt3

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jansonntag:attempt3 [2021/02/08 10:40]
jan
jansonntag:attempt3 [2021/03/24 17:10] (current)
jan
Line 1: Line 1:
-====== Analog Cherry Keyboard Attempt 3 (WIP) ======+====== Analog Cherry Keyboard Attempt 3 ======
  
 After a while of looking at it, this seems far too complicated! There have to be simpler, cheaper, and more accurate solutions. I started searching for some ICs that maybe can do the trick but didn't found any good other than the links I posted above. But then Henrik found something great: The LDC1314 After a while of looking at it, this seems far too complicated! There have to be simpler, cheaper, and more accurate solutions. I started searching for some ICs that maybe can do the trick but didn't found any good other than the links I posted above. But then Henrik found something great: The LDC1314
Line 117: Line 117:
 Let's go through this code step by step: Let's go through this code step by step:
   - Import the library and the Wire library (I2C)   - Import the library and the Wire library (I2C)
-  - Then instantiate an LDC131X Object (the false means now alternative address)+  - Then instantiate an LDC131X Object (the false means no alternative address)
   - The lastTen and pointer variables are needed later to calculate an average of 10 measurements   - The lastTen and pointer variables are needed later to calculate an average of 10 measurements
   - The setup starts with initiating the Wire and Serial communication   - The setup starts with initiating the Wire and Serial communication
Line 186: Line 186:
 As you may have seen I set the LDC to not use the external oscillator I put on the PCB. This is because I miss understood the reason for this pin to exist. It´s an alternative to the internal oscillator. I thought I would have to put in the value I calculated for ƒSENSOR in Webench. That's why I have a 6Mhz input now. This is not needed! The LDC will compare the oscillating frequency that comes back from the coil (this is the 6MHz I calculated) with the internal oscillator (40 MHz) or a given external oscillator. But the oscillating frequency should be greater than 4 x 6MHz. Because this isn't the case with the one I got, I´m just using the internal one. This works so the external one does not have to be populated on the PCB. This also saves in cost on the final PCB. I hope this was understandable. As you may have seen I set the LDC to not use the external oscillator I put on the PCB. This is because I miss understood the reason for this pin to exist. It´s an alternative to the internal oscillator. I thought I would have to put in the value I calculated for ƒSENSOR in Webench. That's why I have a 6Mhz input now. This is not needed! The LDC will compare the oscillating frequency that comes back from the coil (this is the 6MHz I calculated) with the internal oscillator (40 MHz) or a given external oscillator. But the oscillating frequency should be greater than 4 x 6MHz. Because this isn't the case with the one I got, I´m just using the internal one. This works so the external one does not have to be populated on the PCB. This also saves in cost on the final PCB. I hope this was understandable.
  
-Here you can see both the board and the plotter in action:\\+Here you can see both the board and the plotter in action (recorded separately):\\
 {{:projects:20210208_113429.gif|}}{{:projects:com8_2021-02-08_11-28-45_trim.gif|}} {{:projects:20210208_113429.gif|}}{{:projects:com8_2021-02-08_11-28-45_trim.gif|}}
 +
 +As you may see the graph shows when the button is pressed and how far it is pressed. But the result is not very accurate and there is a lot of interference. This is because of the high gain I set. But otherwise, there wouldn't be a graph at all. The 12-bit resolution of the LDC1314 is just not accurate enough for this combination of coil and precision needed.
 +
 +So there will be an attempt 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.
 +
 +\\
 +[[JanSonntag:attempt4|Attempt 4]]\\
  
jansonntag/attempt3.1612780830.txt.gz · Last modified: 2021/02/08 10:40 by jan