Grove - I2C Touch Sensor
The I2C Touch Sensor is based on FreeScale MPR121, it feels the touch or proximity of human being fingers. This sensor include 2 parts: one Touch Sensor controller, and 4 finger feelers. Insert the connectors of feelers into base of Sensor controller, and you can begin your touch controlling.
MPR121: The MPR121 is a capacitive touch sensor controller,features internal intelligence, include an hardware configurable I2C address, an expended filtering system with debounce, and completely independent electrodes with auto-configuration built in .
Touch Sensor feeler: The Touch Sensor feelers, which was 4 included in Touch Sensor module,can be set in any place you like, to feel your finger's touch or proximity. Notice it must not get in touch with any conductive material.
- Grove compatible interface
- Low power consumption
- I2C interface,with interrupt output
- 12 capacitance sensing inputs,besides,8 inputs are multifunction for LED driver and GPIO
- Complete touch detection,Include Auto-configuration and Auto-calibration
- Excellent temperature stability
- PC Peripherals
- MP3 Players
- Remote Controls
- Mobile Phones
Do not get in touch with any conductive material while installing the feeler, otherwise it will cause circuit short.
|Standby Mode Current||2||μA|
|I2C Address||0x5A - 0x5D|
The INT pin has to be led out by customers themselves if customers want to use the interrupt pin of MPR121.
The CH4~CH11 are for customer expanding the function, there are 4 feelers within the pack. If you needs more, you can make the feelers by yourself or buy them in the www.seeedstudio.com
The wires of feelers are twisted to reduce the impact of environment. The black(ground) wire can be cut off if high sensitivity is needed.
- 1.Connect the touch sensor controller to I2C Port of Grove-Base Shield and the feelers to the touch sensor controller as shown below.
- 2.Plug the Base Shield into Arduino/Seeeduino.
- 3.Download the library file:I2C Touch Sensor Library, Unzip it into the libraries file of Arduino IDE by the path: ..\arduino-1.0\libraries.
- 4.Open its demo and Upload the to seeeduino.Please click here if you do not know how to upload.
- 5.Touch the feelers, you would see the results via serial port tools(baud:9600).
NOTE: Because each electrode needs to be auto-configurated by the MPR121 when power up and there is no power reset on the touch sensor controller, Every time you insert or extract a feeler you need to reset the power of seeeduino.
The feelers can also feel the human being fingers with something between, that's to say, you do not need to touch the feelers with your fingers indeed.
With a paperboard about 3 mm thick, the feeler can feel the touch of fingers , makes it a good solution for many applications.
1.How to Measure Capacitance
The complete capacitance measurement system is composed by sensing electrode pads connected to MPR121 sensing inputs, and the MPR121 communicating with the host processor via I2C bus and interrupt output .
The capacitance measured on each sensing channel is the total capacitance to ground which can be the combination of background parasitic capacitance to ground(Cb) and finger touch induced capacitance to ground(Cx). The MPR121 uses a constant DC charge current scheme for capacitance measurement. Each channel is charged and then discharged completely to ground periodically to measure the capacitance. All the channels are measured sequentially, when one channel is in the charge/discharge and measurement period the other channels are shorted to ground.
The amount of charge(Q)applied is programmable by setting the charge current(I), And the charge time(T). Once the electrode is charged, the peak voltage(V)at the end of chage is measured by internal 10 bit ADC. This voltage V is reverse proportional to the capatance(C)on the sensing channel.
C = Q/V = (I*T)/V
That is, If charge the outside cap with a some value of current(I) and time(T), and get the voltage(V), We can get the value of captance, using this way, the C measureble range can be calculated.
2.How to Touch Sensing
The ADC raw data outputs run through 3 levels of digital filtering to filter out the high frequency and low frequency noise encountered. The first level filter is a simple running average filter, the second level filter result is 10bit and stored in the output data registers as the immediate capacitance of each sensing input, the third level filter result is an even lower frequency content of signal change using the second level filter output, mainly used as the baseline value representing the capacitance variation over the long term and slow environment change such as atmospheric moisture and dirt for touch detection.
Touch and release is determined by comparing the immediate capacitance deviation that is the electrode second level filtered output data deviation to the baseline value. If the deviation passed the setting threshold, then a touch or release status is detected and reported in the status register. The touch and release threshold are independent and individually programmable for each electrode, providing hysteresis and electrode independence. Debounce setting can be used for further noise filtering to provide glitch free touch and release detection.
|Grove - I2C Touch Sensor0.9b||Initial public release||April 12, 2011|