JANGER wrote:Sorry, I missed my questions in the previous reply.You might use MOC30xx instead to use ESP timers to make zero crossing
Gani,
Could you share more details? any circuit diagram?
I fight with my ESP-12 version.
I try to force it to work with triac zero cross detection dimmer for 230V lights.
Together with simple web server is listening for remotely command.
And with local the one harware switcher with multiplied functions - I recognize the time of pressing.
It is written in LUA too.
ESP-12 has more free GPIO that's why I interested in use it for touch sensor.
But, the problem could be with many timers at once in such module.
Actually I have 3 timer,s and it seems to make problem.
1: the timer trigged by zero cross detection from GPIO input from transopt and 10k resistor to +Vcc.
the delay time is what it is changing the lights brightness.
2. the timer is a simple loop when I listen the status of the hardware switcher form another GPIO input
and change the above (1) delay time. Here I also generate some sequence of changes.
When I change the delay time from 0 to 100 (% of brightness) at once - it works.
When I change the dealy time from 0 to 100 in a sequence of, for example, 10 steps, 0, 10, 20.... 100 - it crash my code with error of memory overwrite, or something similar.
3. the timer of web server, where I create the server is listening for remote GET message to change the same delay time (1)
I tested: when I use only of my timer, all codes run very smoothly. none errors.
Web server listening - runs ok.
HArdware switcher listening -runs ok.
Triac controlers - runs ok.
The onnly common value between all of them is the one digital value which define the delay time of triac.
This is not a problem of general memory occupied by all my codes, because it takes only 8% of free space.
And when it is runinng it takes 25-35% - as I can only read in ESPlorer.
That's why I interested in any useful diagram of 230V dimmer controlled by ESP module.Gabi Mihai wrote:Hi,
I've designed a capacitive touch on ESP-01 and I hope that you enjoy it!
Here is the LUA code:
local send_pin = 4 --GPIO2
local float_pin = 3 --GPIO0
.....
Between pins 3 and 4 I put a 800k resistor and pin 3 is the capacitive foil
Value of resistor is variable depending by the foil surface, sensitivity etc
It works wery well for me despite of other posts related to this!
The result is variable comanda which is sent to tty!
can you please post the connections you made?
Because I've laoded your code on my NodeMCU but it does nothing. All I can see is that the blu led is always on.
The code doesn't print anything.
I've done this cionnection:
D4 ---- 1Mohm resistor ---- D3
________________________ |
_______________________Cable to the alluminium foil ----- GND
Thanks!
Andrea
My reason for going into the nodemcu is to expand my IoT at home.
How can i make the capacitivetouch send commands via mqqt when the sensor is touched?
If you dont like to write finished code to a "first-poster" do you have any pointers to where i can learn it?
I have looked at the mqtt codes and i can get my nodemcu to connect to the mqtt broker. But i dont know how to paste togheter my mqtt code made from tutorials and this one.
What i am trying to make is a touchpanel with multiple touchsensors to turn on and off different items in my house (touchsensor -> mqtt/mqttbroker -> openhab)