Posts

Showing posts from November, 2017

Control a Relay with Arduino according to the Temperature

Image
Control a Relay with Arduino according to the Temperature Control a Relay with Arduino according to the Temperature Sometimes it is necessary to check high voltage equipment (such as appliances, lights, etc.) based on values. Today we will see how to control a Relay, which can turn on other high voltage equipment, via an Arduino card according to the temperature values. For my tutorial I will use a Dallas Ds18b20 temperature sensor but any sensor will be fine by changing the code appropriately. What is needed:  x 1 Ds18b20 temperature sensor.  x 1 Relay Module.  x 1 Arduino Card whatever it is.  Cables for connection. Assembling We connect components in this way: Temp Vcc Sensor --- Arduino 5V Temp GND Sensor --- Arduino GND Temp Data Sensor --- Arduino Pin 2 Relay Vcc --- Arduino 5V GND Relay --- Arduino GND Signal Relay --- Arduino Pin  Source code Conclusions The circuit and the program is very simple, hence it