This relay shield is designed to be used with the WeMos mini & mini Pro ESP8266 based development boards (see item HCWEMO0002). Adding this shield to your WeMos mini development board provides it with the ability to switch high voltage, or high power devices from a single digital pin. Included with the shield is a set of header pins which can be optionally fitted (soldering required) to allow for the shield to be easily inserted and removed from the D1 mini.
Although this module is intended for use with the Wemos development boards it can of course also be used as a standalone relay module requiring a single 5V supply and one digital pin (5V & 3.3V compatible) to control it.
Features:
NO: 5A(250VAC/30VDC), 10A(125VAC), MAX:1250VA/150W
NC: 3A(250VAC/30VDC), MAX:750VA/90W
Example Arduino Sketch:
Code: Select all
/* WeMos relay example - HobbyComponents.com */
#include <ESP8266WiFi.h>
#define PIN D1 // Relay shield is controlled by digital pin D1
void setup()
{
pinMode(PIN, OUTPUT); // Set the pin to an output
}
void loop()
{
digitalWrite(PIN, HIGH); // Energise the relay
delay(1000); // Wait for another second
digitalWrite(PIN, LOW); // De-energise the relay
delay(1000); // Wait for a second
}
Schematic:
Libraries, example code, and diagrams are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.
Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.