Quick prototyping Robotdyn TTP229 LSF touch sensor board

I wanted to post quick small sketch I’ve put together today for working with the 16 channel capacitive touch sensor board TTP229 LSF from RobotDyn. I bought it from AliExpress and it will be part of an upcoming project.

Connected TTP229 LSF to arduino

 

I’ve been looking around for an example code ready made but I could only find examples for a similar board from aliexpress that is using a slightly different chip. So I will post my example in case somebody can benefit from it.

Here we can see the wiring connections for an arduino mega.

Arduino and TTP229 LSF

 

This particular board ( the TTP229 LSF) differs from other ones I’ve seen on the use of the i2C instead of a pulling mechanism. This makes the hole process much easier. Here we can see a screen capture from the oscilloscope with the actual I2C data transmission.

I2C comunication between TTP229 LSF and arduino

The first packet is the addressing where we tell the I2C bus we want to read from the sensor. The following 2 packets is the response, where each bit received is the status of each of the 16 capacitive sensors.

And, of course, a crude serial monitor output  with the data of the sensors.

Sketch serial output TTP229 LSF

 

And finally the code:

Soon I will upload it in github.

 

Notice that in this particular chip there is a pin that signals when a sensors changes making it really economic to checking the sensors with the use of interrupts.

More on that soon.

Leave a comment if you like it.

4 Responses to “ Quick prototyping Robotdyn TTP229 LSF touch sensor board ”

  1. great explanation,
    I have one this module and now I will continue in my touch project.
    thank you

  2. TTP229, not TTP299

Leave a Reply