Notifications
Clear all

ESP8266 Relay Trigger improvement

8 Posts
2 Users
1 Likes
4,006 Views
soumitra
(@soumitra)
Member
Joined: 5 years ago
Posts: 61
Topic starter  

Hi

All the relay modules from Amazon or ebay on 5 v , are very inconsistent even with seperate 5 v supply with low trigger from edp8266. Has any one worked to find a best way to improve the trigger ? Thanks .

20190621 194424

   
Quote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Hi sdey,

Is the trouble triggering off (GPIO set to HIGH) or on (GPIO set to LOW)?

Thanks,

Scott


   
ReplyQuote
soumitra
(@soumitra)
Member
Joined: 5 years ago
Posts: 61
Topic starter  

Hi scott

The problem occurs on GPIO 4 set to Low...

 

Regards


   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 
Posted by: sdey76

Hi scott

The problem occurs on GPIO 4 set to Low...

 

Regards

I see an optoisolator on the relay board, but can't tell if there is a transistor in front of that. It may be the opto's rating is more in line with 5v logic levels and not 3v.  I would use a logic level converter or at least a transistor to switch it. Go with the logic lvl converted if you have one. They are always handy to have on hand.

A 2N2222 transistor connected to the ESP GPIO via a resistor (3.3k or so) from its base and the ESP GND to the emitter and relay in gnd and then the collector to the relay input. There are probably schematics on the net I'm sure to use as examples.

 


   
soumitra reacted
ReplyQuote
soumitra
(@soumitra)
Member
Joined: 5 years ago
Posts: 61
Topic starter  

Hi

Thanks so much. The module has a jumper low level and a high level trigger. 

When i keep it at low, as soon as the esp powers the relay triggers. Which i dont want.

I am keeping the jumper at High trigger , i slightly increased the voltage to 5.2 v and it is working fine now!

And yes i would try a logic level shifter.

Am using this as a client - server Wi-Fi switch with two Nodemcu to turn appliances off when the main power switches off from the grid to DG..

 


   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Great!

Voltage tolerances are fun sometimes 🙂

I have had issues with the cheap jumper wires and some of the male pins. They can have a high resistance for there size. Some of the pins are made from iron/steel and I have measured 5-6 ohms just of one pin! 

I still use the cheap jumper wires, but try to get non-ferrous metals. 

Scott


   
ReplyQuote
soumitra
(@soumitra)
Member
Joined: 5 years ago
Posts: 61
Topic starter  

Hi scott!



Finally 2n222 helped! Thanks.....not its ok!


   
ReplyQuote
jscottbee
(@jscottbee)
Member
Joined: 5 years ago
Posts: 107
 

Glad it worked.


   
ReplyQuote