How to Use 5 Volt Relay Modules with Arduino and ESP8266
Gadget Reboot
Taking a look at an opto isolated relay module and examining how it works: -what does the control circuit look like? -what is the rating on the relays, what voltages are required to use it? -how can we use it with a PCF8574 gpio expander to use up to 8 relays per expander from the I2C bus if we don't have enough pins? -can we run it at both 5V and 3.3V for modules that only support 3.3V? (both direct control and through the PCF8574) -how simple is it to use a PCF8574 Arduino library to control the relays and read in buttons with the gpio expander? -gotcha: making sure the relay module is properly configured for isolation if that is a desired use case. Just having opto isolators on board isn't all that's required
8 channel relay module Amazon affiliate link: Amazon.com: https://amzn.to/2ldR8LB Amazon.ca: https://amzn.to/2ldSEgL
Sketch and Schematic:
https://github.com/GadgetReboot/Arduino/tree/master/Uno/PCF8574_Relays
Datasheets: http://www.ti.com/lit/ds/symlink/pcf8574.pdf https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf
Fritzing part for 4 relay module: https://timgolisch.wordpress.com/2015/09/12/fritzing-4-channel-relay-part/
Note: If you make a purchase through my affiliate links, I will earn a small commission which helps the channel but doesn’t cost you anything extra. Patreon: https://www.patreon.com/gadgetreboot Pinterest: https://www.pinterest.ca/GadgetReboot Twitter: @GadgetReboot https://twitter.com/gadgetreboot ... https://www.youtube.com/watch?v=nMgvKgqA0JI
170622109 Bytes