Ticker

6/recent/ticker-posts

Header Ads Widget

Relay interfacing with arduino

In Relay interfacing with arduino tutorial, we’ll learn to interface Relay with arduino to control electronics appliance like, AC, TV, Fan, Bulb etc. In this tutorial, we are working on SPDT  (single pole double through) relay to Switch on a bulb after every 5 Second.

Materials required:

  • Arduino uno
  • Relay (SPDT)
  • BC547 Transistor
  • 10k resistor
  • diode 1n4007

Code:

#define relay 13

void setup() 
{
pinMode(relay, OUTPUT);
}

void loop() {

digitalWrite(relay, HIGH);
delay(5000);
digitalWrite(relay, LOW);
delay(5000);

}

Post a Comment

0 Comments