Hey guys I need a little help with multiple touch sensors. The idea is to have multiple sensors each activates his own ws1812 strip, and all strips are connected to same d4 pin on esp8266.
The problem is when i connect two sensors they are working as an AND gate (both need to be pressed for strips to activate) I presume i need to put some kind of resistor somewhere but to be honest i don't know that much about electronics.
Thanks in advance
I'm surprised it even works. You control the LED strips by turning on/off their power directly with the TTP223 buttons. According to the TTP223 datasheet, its output can withstand a load of less than 10mA. Try adding a logic level FET transistor.
https://components101.com/sites/default/files/component_datasheet/TTP223-Datasheet.pdf - page 3.
it works because there is only 5 LED's per strip, i was thinking of cutting data line with sensor and keep +5 and gnd always connected but did not know how to manage that. Sorry i forgot to mention in original post when i removed esp from equation and replaced strips with pc fans sensors worked as expected so i came to conclusion somethings wrong with gpio pin on esp
Here is the link to youtube video of how it works it may be easier if everyone sees what's the problem
The more common method would be to connect the ttp223 outputs to input pins on the ESP8266, then run the LED strips as a single long strip, turning on the appropriate segment of LEDs from the code.
Did you mean ws2812? Your post says ws1812, I'm not familiar with that type LED strip.
yeah sorry typo strip is 2812. I would do as you said but there will be around 80 sensors in a project so putting them all on esp i think is a monumental if not impossible task. I know it can be done this way (i have seen it on a video but guys that did it did not explain this part)
10 shift registers to sense the inputs (3 pins total)
1 WS2812 LED strip (1 pin)
Damn i should be ashamed of myself as software developer so much time spent programing in higher languages i completely forgot about basic components thnx man marking it as solved
10 shift registers still sounds quite clumsy but could be made to work. What exactly is the application for what you are doing and how exact does the relationship between which sensor is touched and the exact LEDs illuminated have to be ? How far apart will the sensors be in practice ?
The reason that I ask is because there may be other ways of sensing where along its length a handrail, for instance, is touched perhaps based on resistance. Is o, then you would only need a single analogue input to determine which LEDs to light
Yeah its a lot of work and a lot of wiring but cant run away from that hah
i'm building a table something like this https://www.youtube.com/watch?v=VrpQNb7vrAA
Of course I'll try to simplify everything and make PCB's
no worries I was thinking of using these ttp223 because i have around 300 of them laying around and not getting used for anything, of course i don't need to do this but its a really complicated and fun project. If its finished in few hours its no fun, there has to be blood,sweat and tears spilled otherwise its not fun hahah (you have to be a little masochist to be a software developer ). I'm all ears if you have any suggestion for how to do this, they have been using simple RGB strip where they can address every channel separately and they have switches on underside of table (my idea is to use Bluetooth app and control colors from mobile)
do you have any shift register to recommend? MCP23016 looks expensive and cant get it locally, 74HC595 looks like it can be used only for output, and last one pcf8574 looks pretty good to me 8x8 can be quite enough for my use case and i can get it locally
No specific recommendations but how about the 74HC165 which I believe is the equivalent of the 595 but allows input of data rather than output ?
looks good but need to order it from aliexpress, it even has a library like a pcf8574 so it will be easy to use (don't really have mental strength to code everything from scratch when i get home so good library is welcomed) man thanks for everything... I'll post update here when everything arrives and when i manage to get everything sorted. Wood and epoxy part are over just need to finish this part and put everything together
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.