Hey there,
my name is Maik and I´m from germany. Sorry for it in advance, but my english is not the best. During my studies, I have to work on a research project. My theme is the development of a sensor to determine the relative amount of water in the body. This has to be done over a capacitive change. For this I first got the FDC1004 concerned. We have to complain about the software correctly. The programming language is python. Here is our source code:
import smbus
import time
FDC = 0b1010000 # 7-bit Adresse für FDC1004 Slave
MEAS1_VAL = 0b0000010110000000 # 16-bit Schlüssel zur Konfigurierung der Messung -
FDC_VAL = 0b0000110110000000 # 16-bit Schlüssel zur Konfigurierung des FDC
MEAS1_MSB = 0x00 # Zeiger für Register MSB Messung Kanal1
MEAS1_LSB = 0x01 # Zeiger für Register LSB Messung Kanal1
CONF_MEAS1 = 0x08 # Zeiger für Register der Konfigurationseinstellung Kanal1
FDC_CONF = 0x0C # Zeiger für die Konfiguration der Messung
fdc1004 = smbus.SMBus(1) # Erzeugt eine I2C-Instanz und öffnen des Busses/ 1 für eine der beiden I2C schnitstellen (den mit NR1)
#Messung Konfiguration
fdc1004.write_word_data(FDC,CONF_MEAS1,MEAS1_VAL)
fdc1004.write_word_data(FDC,FDC_CONF,FDC_VAL)
time.sleep(0.2)
#Messung
MSB2 = fdc1004.read_byte_data(0x50,MEAS1_MSB)
LSB = fdc1004.read_byte_data(FDC,MEAS1_LSB)
print ((MSB), hex(LSB))
The central processing unit is the Raspberry pi model 3. Now, to our problems with the software. In our view, all the configurations we have chosen are written into the respective registers. When configuring, we do not know exactly how the byte for writing and reading is to be sent as described in section 8.5.2 of the data sheet. Also we do not know exactly how we should continue to program the data of the FDC1004 correctly. Could we possibly get a source code from you to have a template? The programming language would not matter.
Since we did not get any further on our own software, we still bought the FDC1004 EVM. We thought that we could at least carry out the measurements. Unfortunately this did not work as planned.
On the two pictures you can see our measuring plate. On the left picture the shield electrode is shown. To the right, the other side of the measuring unit is shown with two additional electrodes. This is attached to the forearm by means of a bracelet, in order to detect liquid changes there.We now only do not know exactly whether this is the correct or suitable construction of the measuring unit at all. And we also do not know how we should connect the respective electrodes with the FDC1004. In addition to that, we do not know how to configure the FDC. I know these are quite a few questions at once but I would be grateful for any info.
Best regards
Maik Nuyken