Tag Archives: Solid State Relay for ESP-01


8-pin chipThe PR26MF22NSZ and it’s larger cousin the PR39MF22NSZ  are miniature 8-pin devices which look for all the world like any other 8-pin chip – but are able to switch mains power at up to 0.9amps – i.e. up to 200w. Seems unbelievable but that’s the claim – sensible you could certainly run a typical mains light.

Given the very small size of our ESP-01 boards and the equally small size of the mains power supplies I found earlier, these would appear to be an ideal companion. Right now they are marginally more expensive than the cheapest Chinese relays and even very slightly more expensive than some solid state relays – but the size has to make it all worthwhile?

Digikey have the larger one at 1.18 but the postage kills that option – you have to wonder what their marketing people are thinking about – 1.18 for the chip – 12.00 for postage – come on guys – it’ll fit in an envelope!!!


The best I’ve seen up to now is £1.97 with free postage here..


 Here is some more info and a diagram.

So – the one I ordered turned up and has 7, not 8 pins. It is marked R39MF5. It is the surface mount version but in this case is no smaller, just has short leads, flattened for SM use. Pin 7 is missing.  I went out and bought the highest power bulb I could  - a halogen 75w lamp. I attached one end of the lamp to LIVE mains, the other end of the lamp to pin 8 of the chip and connected NEUTRAL to pin 6.   DO NOT DO THIS AT HOME UNLESS YOU ARE HAPPY TO DIE or know what you are doing.

I connected pin to a 330r resistor… so that the resistor would be + input and pin 3 would be – input.

That’s it. I tried with an isolated battery first – fine, checked with a meter, fine,  put pin 3 to GPIO0 on the ESP8266 and the resistor to the 3v3+ supply.   Works perfectly with the light going on and off on demand.

Finally, I left the light on for 10 seconds, disconnected the mains and immediately felt the chip – freezing cold.  So would I be happy to put some more power in there? YES. Mounted on a board with some copper to get rid of any heat I see no reason why this chip should not handle a 100w lamp. For the size I think that’s pretty good.