element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog Sci Fi Your Pi: PiDesk - Guide: Capacitive Touch with Atmel's AT42QT1070 Touch Sensor IC
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fvan
  • Date Created: 15 Jun 2015 10:09 AM Date Created
  • Views 3570 views
  • Likes 6 likes
  • Comments 18 comments
  • design_challenge
  • touch_motion_controls
  • touch_motion_control
  • sci_fi_your_pi
Related
Recommended

Sci Fi Your Pi: PiDesk - Guide: Capacitive Touch with Atmel's AT42QT1070 Touch Sensor IC

fvan
fvan
15 Jun 2015

  • Touch Sensor IC
    • Atmel AT42QT1070
    • Operating modes
    • Different versions
  • Schematic and Board
  • PCB
  • Code
  • Video

 

Rather than using an out-of-the-box capacitive touch solution for my projects, I thought I'd attempt making my own little breakout board. The idea is to use a sensor capable of triggering normal digital input pins using touch.

This post covers the selected touch sensor IC, the circuit used, getting a custom PCB made and how to use it in a project. At the end of this post, you'll find a video covering the soldering and a brief demo of the custom board.

 

Touch Sensor IC

 

While searching for capacitive touch solutions, I quickly came across two different ICs: the Freescale MPR121 (as used in the Touch Board) and the Atmel AT42QT10XX. The MPR121 comes in a QFN package, immediately making it more difficult to use. It has up to 12 inputs and an I2C interface. It can operate from 1.7 to 3.6V making it slightly more difficult to work with when using a 5V host.

 

Comparing the specs of the MPR121 with the AT42QT10XX IC, I decided to pick the latter.

 

Atmel AT42QT1070

 

Some of the features worth mentioning are:

  • SOIC14 package
  • up to seven inputs
  • fully debounced outputs
  • suppresses effects of external noise
  • touch sensing using single pin
  • different operation modes (see next paragraph)

 

According to the datasheet, the keys can also be operated behing panels of glass (up to 10mm thick) or plastic (5mm).

 

And finally, because it can operate at voltages from 1.8V to 5.5V, it can be used in combination with a wide variety of boards, such as Arduino (5V logic level) or Raspberry Pi (3.3V logic).

 

Operating modes

 

There are two modes the touch sensor IC can operate in:

  • comms mode
  • standalone mode

 

In comms mode, the sensor can have up to seven input keys and interfaces with a master microcontroller or SBC via I2C. The I2C interface can for example also be used to configure sensitivity of the different input keys. A typical connection diagram for comms mode is the following (as provided in the datasheet):

image

 

The other mode, standalone mode, does not make use of the I2C interface but rather converts up to five capacitive touch inputs into digital outputs. This is useful to convert digital inputs on a microcontroller board or SBC into capacitive touch inputs. Because the I2C interface is not used, sensitivity of the touch inputs cannot be configured and is static. The connection diagram for standalone mode is the following:

image

 

Different versions

 

Depending on the application's required number of inputs, different ICs of the same family can be used.

 

Just to name a few:

  • AT42QT1010: single channel
  • AT42QT1040: four channels
  • AT42QT1111: eleven channels

 

A full list can be found here: Dedicated Touch Devices

 

Schematic and Board

 

I chose to make a breakout board for the standalone mode. The circuit is simple as it only involves the touch IC, a couple of resistors and a capacitor. It was a bit trickier to fit everything in the smallest form factor possible, but that worked out well as you can see below.

 

The schematic and board were created using Eagle and the AT42QT1070 component was downloaded from the Farnell page of the part (AT42QT1070-SSU - ATMEL - SENSOR, QTOUCH, 7-KEY, 14SOIC | Farnell element14).

imageimage

This is only a first version. I'll be releasing the files after some possible improvements, such as:

  • including pull-up resistors for the input pins rather than relying on the attached microcontroller board/SBC using internal pull-ups
  • LED indicators to show which input is active, as this may be useful for easy troubleshooting

 

 

PCB

 

To get the PCB done, I used SeeedStudio. The service is cheap, at about $12 for 10 boards, including shipping. The only downside is perhaps the fact that it takes two weeks between ordering and receiving the boards. While waiting for the PCB to arrive, I ordered the parts so I could populate the board once it got here. I purchased the AT42QT1070AT42QT1070 from Farnell, the other bits I had available.

 

Once all the pieces were available, I took out the soldering paste, heated the pre-heater and hot air rework station, laid out the components on the board and reflowed the solder. The result can be witnessed in the pictures below. To see the whole process, be sure to watch the video at the end of this post.

imageimage

 

Before hooking up the board to something else, I used my multimeter to check all the connections were correct and no shorts were introduced while soldering.

 

Code

 

For testing, I decided to used the breakout board in combination with a Raspberry Pi. The board was powered using the Raspberry Pi's 3.3V and GND pins. The touch sensor's first output was connected to the Pi's GPIO17 and the sensor's first input to a jumper wire.

 

Using the code below, GPIO17 is configured with internal pull-up resistor and is pulled low when the sensor's first input is touched.

 

import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(17,GPIO.IN,pull_up_down=GPIO.PUD_UP)

#initialise a previous input variable to 1 (assume button not pressed last)
prev_input = 1
while True:
  #take a reading
  input = GPIO.input(17)
  #if the last reading was high and this one low, print
  if ((not input) and prev_input):
    print("Button pressed")
  #update previous input
  prev_input = input
  #slight pause to debounce
  time.sleep(0.05)

 

The code can easily be extended to support all five inputs, as long as the GPIO pins are configured with internal pull-up.

 

Video

 

In the video below, you can see me populating and soldering the custom PCB, followed by a little demo of the board used with a Raspberry Pi.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply

Top Comments

  • Workshopshed
    Workshopshed over 10 years ago +2
    Nice circuit, I'd be interested to know how the chip compares to the Cypress ones CapSense Evaluation Kit - Gloves
  • balearicdynamics
    balearicdynamics over 10 years ago +1
    Very well done guide, Frederick! I am curious of what is the tool you are using for smd soldering and eventually its limits. I have not yet afforded this problem but this remain a problem that in some…
  • shabaz
    shabaz over 10 years ago +1
    Hi Frederick, Nice job!! I've been meaning to try out Atmel's touch IC for quite some time, but never got around to it. This is a great set of information.
Parents
  • balearicdynamics
    balearicdynamics over 10 years ago

    Very well done guide, Frederick!

     

    I am curious of what is the tool you are using for smd soldering and eventually its limits. I have not yet afforded this problem but this remain a problem that in some cases creates very big difficulties.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • balearicdynamics
    balearicdynamics over 10 years ago

    Very well done guide, Frederick!

     

    I am curious of what is the tool you are using for smd soldering and eventually its limits. I have not yet afforded this problem but this remain a problem that in some cases creates very big difficulties.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • fvan
    fvan over 10 years ago in reply to balearicdynamics

    Thanks Enrico image

     

    The tool I'm using is the following: TENMA  21-10130 UK+EU  REWORK STATION, 900W, 220V, UK/EUTENMA  21-10130 UK+EU  REWORK STATION, 900W, 220V, UK/EU

     

    It's only my second time using it, and so far it has gotten the job done.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago in reply to fvan

    Thank you Frederick, I have searched a lot for this average price tools but as I have 000 experience in SMD soldering I was not sure what to choose. So until now I have always delayed the buying until it is not absolutely indispensable and until I had not found someone with a decent advice. So... expect boring questions in a near future image I'll be back soon with soldering problems !

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 10 years ago in reply to balearicdynamics

    This was merely my second time doing it. The first time can be witnessed here: [AirCare] InTheAir - Week 17: Surface Mount Soldering

     

    If you take care of the temperature and making sure the hot air's flow rate is not too high, the solder should reflow almost instantly without blowing the components off the board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to fvan

    Frederick

    Out of curiousity it seemed you had to go back over the parts and do it again.

     

    Was this just to ensure they flowed correctly, or was it at a lower temperature.?

     

    It does make it look easy and I'm glad I brought both bits of kit.

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 10 years ago in reply to mcb1

    That was some doubt from my side. I wanted to make sure that everything was soldered on properly.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube