Capacitive keyboard TTP229

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Capacitive keyboard TTP229

Post by Genilsonsa »

Hello everyone I come again to ask for help to the Foristas Matrixs.I would like to know if anyone else has worked with this keyboard capacitive touch very used in the arduino.See the datasheet says that the serial communication is I2C.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

I would like to know the experience of you with this keyboard if the same is of good quality?If the durability is long in relation to defects?Because I've been thinking about replacing the keyboard all contacts to this of touch screen.Thanks to all
Attachments
tecladottp229.jpg
tecladottp229.jpg (11.16 KiB) Viewed 20795 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Capacitive keyboard TTP229

Post by Benj »

A capacitive keyboard should be more reliable than a physical moving parts keyboard as there is less mechanical wear.

However the capacitive approach is probably going to be more prone to interference from electrical noise and to software problems such as none touches and ghost/repeat touches.

So there are good points and bad for both types.

From my experience capacitive touch works very well if you can ensure the housing, e.g. on a mobile phone it works very well.

If you can put the circuit board behind a sheet of glass or plastic and provide some kind of electrical noise shielding (Faraday cage) then that should work well and provide protection for the PCB to allow for a long and reliable working life. The shielding may be optional depending on your application and working environment.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Thank you for answer me again.Here in the company uses this matrix keypad ignition,however the price for manufacturing is much higher than this keyboard capacitive.I'm thinking of changing all projects for this telados sensors .thanks the precious tips.Thankyou

Benj I ordered a piece of that keyboard and capacitive i am waiting anxious the arrival of him to do test.no doubt I will take with you here in the forum. Thanks again
Last edited by Genilsonsa on Thu May 19, 2022 1:56 am, edited 2 times in total.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Ola Benj was searching on the internet I saw the PIC 16F707 has this captouch already embedding in total of 32 . It is possible to implement this function in the pic 16f707 with flowcode ? Do you have any example or tutorial that can pass to study .While I await my keyboard TTP229 arrive.once again thank you

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Capacitive keyboard TTP229

Post by Benj »

Hello,

This might be along the lines of what you're after. It uses two analogue enabled input pins to allow for two digital cap touch inputs.

https://www.matrixtsl.com/wikiv7/index. ... 0167d41396

Using multiple of the component you could have any number of cap touch inputs up to the number of analogue input pins on your device.

When designing a cap touch PCB the switches are simply large pads on the top copper, the bottom copper is usually grounded and ideally in a grid layout rather than a solid flood fill.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Hi Benj was precisely what was looking for.When you get home i will do some testing with this program example . Thank you again for helping me.
:D

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Ola Benj did the exchange of the chip 16f707 is giving an error when you compile.But in the simulation runs .Can you help me?

C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:23): error: unknown identifier 'ADPREF1'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:23): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:23): error: invalid operand 'ADPREF1'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:18): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:16): error: invalid operand '1 << ( ADPREF1)'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:12): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:2): error: error in the body of 'if' expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:13): error: unknown identifier 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:13): error: invalid operand 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:20): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:13): error: invalid operand 'adresh << 2'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:10): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:23): error: unknown identifier 'adresl'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:23): error: invalid operand 'adresl'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:30): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:23): error: invalid operand 'adresl >> 6'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:20): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:20): error: invalid operand '| '
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:10): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:12): error: unknown identifier 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:12): error: invalid operand 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:10): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:2): error: error in the 'else' body of 'if' expression
Attachments
Touchpad 16f707.fcfx
(21.3 KiB) Downloaded 438 times

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

I managed to make the communication of module TTP229 with pic 16f628A. The biggest problem was with a datasheet that has many ,but only managed one that speaks directly as does the communication is that http://html.alldatasheet.com/html-pdf/8 ... TP229.html .pages 10 and 11.
In a superficial way step by step
1st -Start bit
2 - 0xA1 - Send to the device (Identifier command of reading)
3 - Read data bytes
4º - Read Data Bytes
5- Stop Bit
Attachments
read.FCM
(2.77 KiB) Downloaded 465 times

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Now I want to make test with pic 16f707 and this is giving problem which I quoted when compiled .Someone can take this question ?This pic with FLOWCODE does not have this function?
Erro

C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:23): error: unknown identifier 'ADPREF1'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:23): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:23): error: invalid operand 'ADPREF1'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:18): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:16): error: invalid operand '1 << ( ADPREF1)'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:12): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3164:2): error: error in the body of 'if' expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:13): error: unknown identifier 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:13): error: invalid operand 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:20): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:13): error: invalid operand 'adresh << 2'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3182:10): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:23): error: unknown identifier 'adresl'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:23): error: invalid operand 'adresl'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:30): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:23): error: invalid operand 'adresl >> 6'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:20): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:20): error: invalid operand '| '
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3183:10): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:12): error: unknown identifier 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:12): error: invalid operand 'adresh'
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:10): error: failed to generate expression
C:\Program Files\Flowcode 6\CAL\PIC\PIC_CAL_ADC.c(3186:2): error: error in the 'else' body of 'if' expression

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Capacitive keyboard TTP229

Post by LeighM »

Thanks for letting us know, I will see if it is quickly fixable.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Capacitive keyboard TTP229

Post by LeighM »

Could you please try replacing the file in your Flowcode 6 \CAL\PIC directory with the one attached.
Thanks
Leigh
PIC_CAL_ADC.c
(98.44 KiB) Downloaded 444 times

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Hello LeighM thank you did the exchange of the file and compiled normally.i am very happy to have helped me.Now i will simulate 16 keys to see if it will work and if cost-benefit will be better than the MODULO TTP229.When you have finished the test with pic 16f707 i postarei my experience here.Thank you . :D

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Hello i come once more to ask for help to you .i am trying to simulate the test program touchpad with the pic18f45k50 and the simulation of FLOWCODE works very well ,but in the Proteus appears not to work correctly when engaged the touch. When I fake with the pic 16f707 and 16F1932 operates in both flowcode and proteus correctly.Can someone save me once more
Attachments
PIC18F45K50.fcfx
(21.52 KiB) Downloaded 360 times

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

This is the edited in Proteus
Attachments
18F45K50.PNG
(19.02 KiB) Downloaded 13882 times

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Hello i just replaced the Microcontroller in the program example touch pad .With the pic 18f45k50 it does not work does not seem to identify the touch the proteus.I did the test with various AVR microcontrollers using the same program and works at the proteus.is it a bug with microcontroller 18F45K50 . Someone from the Team Matrix may I take this question ?

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Capacitive keyboard TTP229

Post by LeighM »

I've no experience with Proteus simulation, but I would have thought that it's going to be very tricky to get capacitive touch to simulate, it's very hardware dependent.
Flowcode simulation only proves the program flow, not the real world touch response of any particular design.
There might be some on this forum that have more experience with Proteus simulation, but most responses will be related to Flowcode simulation, code generation and target hardware issues.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Thank LeighM you for reply .Then I will do a test on the hardware to take is doubt and postarei my experience here.My question is to use this pic 18f45k50 because the datasheet informs that he has 32 capstouch input and also USB and this pic would be ideal to do a project that i'm in mind.However i will wait for the microcontroller to arrive to make a test.Thanks

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Hello to all Foristas of Team Matrix.I come once more take a doubt.I would like to know what is the purpose of the values in the component touchpad EBM013. Can someone give me an explanation?Thanks again.
Attachments
Capturar.PNG
(12.13 KiB) Downloaded 12862 times

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Good day to all someone can inform me if there is any material or tutorial explaining about.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Capacitive keyboard TTP229

Post by Benj »

Hello,

Have you seen the example file here.
https://www.matrixtsl.com/resources/get ... php?id=790

The on/off values are used to define the analogue threshold value to decide between a valid touch or no touch state. The example allows you to see the values so that you can correct define working thresholds for your specific hardware setup.

So you would download the example to your hardware and run through to allow you to see what value represents a press and no press. Once you have the calibration values you can plug them into the component properties and simply call the GetTouchPressed macros to detect if there is a touch or not.

Genilsonsa
Posts: 150
Joined: Mon Oct 15, 2012 5:19 pm
Has thanked: 12 times
Been thanked: 18 times
Contact:

Re: Capacitive keyboard TTP229

Post by Genilsonsa »

Ola Benj .now understood the operation will test in my Hardware .Thank You :D

Post Reply