ESP8266 and CJMCU-1010 capacitive touch module example

In this example we look at the CJMCU-1010 module – this is based on the AT42QT101x

The AT42QT101x Single Key capacitive touch controller family provides an easy way to add a touch key to any application. It implements advanced filtering algorithm to offer robust operation in noisy environment. Sensitivity and low power modes can be configured as well.

The AT42QT1011 output will remain high as long as a touch is detected. No “Max On” time out.

Additional Features
    • Number of Keys: One – configurable as either a single key or a proximity sensor
    • Key outline sizes: 6 mm × 6 mm or larger (panel thickness dependent); widely different sizes and shapes possible
    • Electrode design: Solid or ring electrode shapes
    • PCB Layers required: One
    • Electrode materials: Etched copper, silver, carbon, Indium Tin Oxide (ITO)
    • Panel thickness:  Up to 12 mm glass, 6 mm plastic (electrode size and Cs dependent)
    • Key sensitivity: Settable via capacitor (Cs)
    • Power consumption: 17 µA at 1.8 V typical
    • Applications: Control panels, consumer appliances, IoT, proximity sensor applications, toys, lighting controls, mechanical switch or button replacement

 

Introduction:

1. Operating Voltage:2.0V-5.5V
2. Max Power Consumption:11.5uA;low power consumption 1.5uA
3. External Configure Pin Set Multiple Modes
4. High Reliability:chip built-in anti-shaking circuit
5. Can be used on glass,ceramic,plastic surface
6. Size:30*24mm

 

Connection

 

Wemos Mini CJMCU-1010 module
3v3 Vcc
Gnd Gnd
D0 OUT

Parts List

Here are the parts I used

Part name Link
Wemos Mini D1 mini – Mini NodeMcu 4M bytes Lua WIFI Internet of Things development board based ESP8266 by WeMos
 CJMCU-1010 module 1PC CJMCU-0101 Single Channel Inductive Proximity Sensor Switch Button Key Capacitive Touch Switch Module
Dupont cable Free shipping Dupont line 120pcs 20cm male to male + male to female and female to female jumper wire Dupont cablefor Arduino

 

Code

const int TOUCH_BUTTON_PIN = D0;  // Input pin for touch state
 
// Global Variables
int buttonState = 0;             // Variable for reading button
 
void setup() 
{
  // Configure button pin as input 
  pinMode(TOUCH_BUTTON_PIN, INPUT);
  pinMode(LED_BUILTIN, OUTPUT);
}
 
void loop() 
{
  // Read the state of the capacitive touch board
  buttonState = digitalRead(TOUCH_BUTTON_PIN);
 
  // If a touch is detected, turn on the LED
  if (buttonState == HIGH) 
  {
    digitalWrite(LED_BUILTIN, LOW);
  } 
  else 
  {
    digitalWrite(LED_BUILTIN, HIGH);
  }
}

 

 

Links

http://ww1.microchip.com/downloads/en/devicedoc/40001948a.pdf

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*