Skip to content

Commit

Permalink
readme.md
Browse files Browse the repository at this point in the history
Written readme
Added repo link to library.properties
  • Loading branch information
Harijs Zablockis committed Mar 30, 2018
1 parent d9c9073 commit 17e0beb
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 17 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ maintainer=Harijs Zablockis
sentence=TI FDC2214 capacitative sensor library
paragraph=Library to support Texas instruments capacitative sensors. Supports FDC2112, FDC2114, FSC2212 and FDC2214 chips.
category=Sensors
url=http://example.com/
url=https://github.com/zharijs/FDC2214
architectures=avr
includes=FDC2214.h
62 changes: 46 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,60 @@
# FDC2214 Arduino Library
Library for Texas Instruments FDC2112, FDC2114, FDC2212 and FDC2214 capacitative sensor front-ends.

Library for Texas Instruments FDC2xxx family capacitative sensor front-ends.

# Supported devices
>* FDC2112
>* FDC2114
>* FDC2212
>* FDC2214
# Usage
Include header, Make instance, Init and acquire data.

```cpp
#include "FDC2214.h"
FDC2214 capsense(FDC2214_I2C_ADDR_0); // Use FDC2214_I2C_ADDR_1 for ADDR = VCC
...
void setup() {
...
Wire.begin();
bool capOk = capsense.begin(0x3, 0x4, 0x5); //setup first two channels, autoscan with 2 channels, deglitch at 10MHz
...
}
void loop(){
...
unsigned long capa[i] = capsense.getReading28(i);
...
}
```
# Hardware
Tested on YB1F2 contproller.


# Protocol
The protocol is similar to NEC with different timing and data fields. Low level decode is implemented. High level protocol decode shows about hald of data fields. Other half is missing. It seems that there might be a block with checksum that has to be decoded.

FDC2xxx family is 3.3V powered, unlike most of Arduinos, that are powered form 5V.
**To use this chip with Arduino, you will have to either:**
> 1. use 3.3V version of Arduino, like Arduino Pro Mini 8MHz 3.3V
> 2. use I2C level shifter to interface the FDC chip with arduino.
**To run examples, connect FDC with arduino as follows:**
>* ARDUINO <--> FDC
>* A4 <-------> SDA
>* A5 --------> SCL
>* GND -------> ADR
>* GND -------> SD
# Tools
To view nice real-time graph of the sensor output, it is highly recommended to use tool like SerialPlot.
https://bitbucket.org/hyOzd/serialplot
Binary downloads avialable here: https://bitbucket.org/hyOzd/serialplot/downloads/
Settings for SerialPlot:
![Transmitter Front](https://raw.githubusercontent.com/zharijs/AlpicAir-Remote-Pulseview/master/pics/aa-front.jpg "Transmitter Front")
![Transmitter Back](https://raw.githubusercontent.com/zharijs/AlpicAir-Remote-Pulseview/master/pics/aa-back.jpg "Transmitter Back")
**Setting up port:**
![Port](https://github.com/zharijs/FDC2214/blob/master/extras/images/fdc-on-serialplot-port.PNG?raw=true "Port")
**Setting up data format:**
![Data Format](https://github.com/zharijs/FDC2214/blob/master/extras/images/fdc-on-serialplot-dataformat.PNG?raw=true "Data Format")
**Proximity sensing waveform:**
![Signal](https://github.com/zharijs/FDC2214/blob/master/extras/images/fdc-on-serialplot-signal.PNG?raw=true "Signal")
# Usage
Add to your Sigrok/PulseView install directory.
**Noise waveform:**
![Noise](https://github.com/zharijs/FDC2214/blob/master/extras/images/fdc-on-serialplot-noise.PNG?raw=true "Noise")
Example:
C:\Program Files (x86)\sigrok\PulseView\share\libsigrokdecode\decoders\
This
#Have Fun

0 comments on commit 17e0beb

Please sign in to comment.