557

members

Medium Basics: Project 011c 5V relay and LM35 sensor - Temperature controlled relay

of Acoptex.com in UNO

Basics: Project 011c

Project name: 5V relay and LM35 sensor - Temperature controlled relay

Tags: Arduino, Arduino Uno, 5V relay, LM35 sensor, temperature controlled relay

Attachments: sketch

WARNING – THIS PROJECT INVOLVES HIGH VOLTAGES THAT CAN CAUSE SERIOUS INJURY OR DEATH. PLEASE TAKE ALL NECESSARY PRECAUTIONS, AND TURN OFF ALL POWER TO A CIRCUIT BEFORE WORKING ON IT. WE ARE NOT RESPONSIBLE FOR ANY DAMAGE, INJURY, DEATH AND OTHER THINGS CAUSED BY THIS PROJECT IMPLEMENTATION. 

In this project, you needed these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2.5V Relay module 1 pc 

 

3.Arduino IDE ( you can download it from here  )

4.Jumper cables

5.Light bulb 60 W 220 V with connector 1pc

6.LM35 sensor 1 pc

7.Resistor 1 KOm 1 pc

Understanding the Relay

You can read more about relay here.

You can find 5V relay module datasheet here.

Understanding the LM35 sensor

LM35 is a precision IC temperature sensor with its output proportional to the temperature (in oC). The sensor circuitry is sealed and therefore it is not subjected to oxidation and other processes. With LM35, temperature can be measured more accurately than with a thermistor. It also possess low self heating and does not cause more than 0.1 oC temperature rise in still air.   

The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in response to every oC rise/fall in ambient temperature, i.e., its scale factor is 0.01V/ oC.

You can find the datasheet here.

Signals and connections of 5V Relay module and LM35 sensor.

The SRD-05VDC-SL-C relay has three high voltage terminals (NC, C, and NO) which connect to the device you want to control. The other side has three low voltage pins (Ground, Vcc, and Signal) which connect to the Arduino.

5V Relay Pinout

NC: Normally closed 120-240V terminal
NO: Normally open 120-240V terminal
C: Common terminal
Ground: Connects to the ground pin on the Arduino
5V Vcc: Connects the Arduino’s 5V pin
Signal: Carries the trigger signal from the Arduino that activates the relay
Inside the relay is a 120-240V switch that’s connected to an electromagnet. When the relay receives a HIGH signal at the signal pin, the electromagnet becomes charged and moves the contacts of the switch open or closed.
NORMALLY OPEN VS. NORMALLY CLOSED
The relay has two different types of electrical contacts inside – normally open (NO) and normally closed (NC). The one you use will depend on whether you want the 5V signal to turn the switch on or turn the switch off. The 120-240V supply current enters the relay at the common (C) terminal in both configurations. To use the normally open contacts, use the NO terminal. To use the normally closed contacts, use the NC terminal.

The 5V Relay module has three high voltage terminals (NC, C, and NO) which connect to the device you want to control. The other side has three low voltage pins (GND (0V), VCC (+5V), and S(Signal)) which connect to the Arduino board.

  • NC: Normally closed 120-240V terminal
  • NO: Normally open 120-240V terminal
  • C: Common terminal

Wiring

Let us build a temperature controlled relay circuit that will turn off a light bulb when the temperature of a LM35 sensor reaches 30°C or 86 °F. LM35 sensors are really useful with 5V relays. You can use them to turn off a large motor if gets too hot or turn on a heater if the temperature gets too cold.

Make sure that the high voltage connections to the 5V relay module are very well secured.

Identify the hot power wire (red wire in the diagram above) in the cord leading to the light bulb and make a cut. Connect the side leading to the light bulb to the NO terminal of the 5V relay, and the side leading to the plug to the C terminal. This way the relay is on the hot side, and current is switched before it reaches the light bulb. It’s dangerous to put the relay on the neutral wire, since if the device fails current can still fault to ground when the relay is off.

The following picture shows the needed connections with the Arduino Uno 

Step by Step instruction

  1. Plug your Adruino Uno board into your PC and select the correct board and com port
  2. Open up serial monitor and set your baud to 9600 baud
  3. Verify and upload the the sketch to your Adruino Uno

Libraries:

  • No libraries required for this project

Sketch:

  • See attachment on the begining of this project description.


Other projects of Acoptex.com
Easy Merry Xmas to everyone of Acoptex.com, Not selected 24-12-2019

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 12-07-2017
Viewed: 5295 times