Sonoff Touch Led Mod
Just like in all other Sonoff products one of the leds is hardwired to the relay and will lit up when the relay is switched on.
In my post over the Sonoff Wifi powerline switch mod I described how to put the led on a seperate IO pin of the Esp8266 so you can get full control over the led.
This post will do the same for the Sonoff touch led that’s behind the touch sensor.
The Sonoff touch has an Psf-a85 module on board from Itead, this module has the esp8285 inside. With the pinout and schematic available of the psf-a85 it’s easy to find the required pins.
You need to scratch the pcb track that’s going to the 1K resistor (see picture below). After that you need solder a thin wire between the 1K resistor and one of the free IO pins on the psf-a module, in the picture I choose pin 3 IO4.
Now you have full control over both (wifi and touch) led.
My idea was to let the touch led glow so you can find the touch button easy in the dark.
If you don’t know how to flash the esp8285 have a look at this.
Personally I add to all my ESPxx programs the OTA (over the air) flash capability’s so you can remove the usb to serial convertor and close up the housing for safety purpose and flash new firmware ota.
Arduino ide settings:
Generic Esp8285 Module
CPU Frequency: 80MHz
Flash Size: 1M (64K SPIFFS)
Upload Speed: 115200
Hi,
nice mod. Is worth trying. BTW you mention that you do an ota update of espeasy. How do you do it? I tried the procedure described at https://www.letscontrolit.com/wiki/index.php/ESPEasy#2.0.2B_firmware_on_1MB_modules and the first flash is successful but the second step where the upgrade happens ends with a blank screen and an unreachable switch. Only manual wired reflashing brings it back online.
How do you upgrade your switch? I’m goning nuts with this issue.
Any help is appreciated.
Hi Ludwig,
I’m using the ESP8285 1M(64KSpiffs) setting in the Arduino ide. This works fine for me. 1.0 that comes with the esp8266 by esp8266 community V2.3.0
As OTA I use
For this switch, just like my other nodes, I have written the firmware myself. Looking at the Espeasy firmware that you are linking it’s way overdone for switching a light on and off, but I can imagine that it’s not feasible for everybody to write there own firmware and want to use something easy like Espeasy.
Because you need 1/2 of the memory free for the OTA update the program can’t be bigger then 1/2 (1M – 64K Spiff) = 468K.
My firmware is at the moment 262K.
Evert
Hi Evert,
thanks for the fast reply. That explains it very well.
Ludwig
Hi, this is a really nice mod..
But is it possible to download your code somewhere?
Would like to use it for my sonoff’s aswell..
Greetings
Hi Jonathan,
Just uploaded a demo sketch to Github: https://github.com/EvertDekker/SonoffGlowLed
Have fun.
Great mod. Will definitely try.
I am going nuts trying to find a way to get the light that is controlled to slowly turn on and slowly turn off. Would this be possible with the Sonoff touch (by adding some circuitry) or is it something that needs to be done at the light end?
Hi Serge,
At the moment the Sonoff uses a relay to switch on and off the mains and therefore the lamp is not dimmable.
It’s on my todo list to modify the Sonoff so you can use it as dimmer. For this I have to remove the relay, add an solidstate relay or triac and some zerocross detection.
Due the lack of space and it also need to be keep safe it’s easier said then done.
I will let you know when it’s finished (if ever it will be finished) 😉
Hi Evert,
that is a great idea and i would like to add it to my sonoff´s. But i use the tasmota firmware and i would like to know, if it is possible to add the code in your ino file somewhere in there (arduino ide) to compile it with the tasmota stuff and use it after the hardwaremod?
Hey Guys. Can you tell me where I have the Code to put in Arduino IDE? I really got no idea how to use that sketch
Great mod. Will definitely try !
With this mod you have more bright to the led than the standard connection ? Because my led is not much bright.
No, this mod will not increase brightness.