I try to control some 12V LEDs with an IRF3708 mosfet and a esp8266 (wemos d1 mini) and try to use a touch button to set the PWM frequency. Therefore I connected the pins like this:
D0 - 220kOhm - D6
|
Metal sheet
As long as the mosfet gets no signal, everything is working nicely and i can clearly set a threshold for the touch pin when it is touched. However, as soon as I give a signal on to the mosfet, no matter if very low or high frequency, the values read at the touch pin drastically change and there is almost no detectable change between "touched" and "not touched".
It seems that the IRF3708 produces a lot of noise and was wondering if there is a way to get rid of it in an elegant way? Im not very much into electronics and i am quite lost on this. Any hints are welcome!
Thanks!