Temperature Controlled Fan ON-OFF Switch Using Arduino Nano 16X2 LCD and LM35 Sensor


Compact Temperature controlled fan on/off switch is based on Arduino Nano multipurpose TWOVOLT shield, the circuit consist LM35 temperature sensor, 16X2 LCD, 12V relay including driver transistor, circuit works with 12V supply and can controlled any fan from 12V to 230V AC, for testing purpose I have connected 12V DC fan. At normally open switch of relay. The shield has many other parts can be omit if not required, refer circuit diagram for more info. Relay can switch load up to 7amps supply 5V to 230V AC.

Download PDF Schematic


Arduino Pins LCD

  • LCD RS pin to digital pin 12
  • LCD Enable pin to digital pin 11
  • LCD D4 pin to digital pin 5
  • LCD D5 pin to digital pin 4
  • LCD D6 pin to digital pin 3
  • LCD D7 pin to digital pin 2
  • LCD R/W pin to ground

Arduino Pins Various Devices

  • Switch 1 Arduino Pin A3
  • Switch 2 Arduino Pin D6
  • Switch 3 Arduino Pin D7
  • Current Sensor ACS714 Arduino Pin A5
  • Trimmer Potentiometer Arduino Pin A0
  • LM35 Sensor Arduino Pin A4
  • Power Mosfet Arduino Pin D9
  • Relay Arduino Pin D8


Default temperature trigger point is set to 35C, if you want to change the value , change here

Arduino Code for this project

Tempereture Controlled Fan ON/OFF using arduino tempereture display on 16X2
LCD, Arduino Code, Circuit Diagram, PCB Layout Available at www.twovolt.com.
The project switch on the Fan at max set point
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
int tempPin = A4; // LM35 Temp Sensor Analog Output
int Relay = 8; // Relay Pin
int temp;
int tempMin = 25; //
int tempMax = 35; // Switch On The Relay

void setup() {
pinMode(Relay, OUTPUT);
pinMode(tempPin, INPUT);
void loop() {
temp = readTemp(); // Temperature
if(temp < tempMin) { // if temp is lower than Minimum-Temp

if(temp > tempMax) { // if temp is higher than Temp-Max
digitalWrite(Relay, HIGH); // Turn on Relay
} else { // else Turn of The Relay
digitalWrite(Relay, LOW);
lcd.print(“TEMP: “);
lcd.print(temp); // Display Temp
lcd.print(“C “);
lcd.setCursor(0,1); // move cursor

int readTemp() { // Temperature and convert it to celsius
temp = analogRead(tempPin);
return temp * 0.48828125;

60V to 5V-2Amps USB Power Output DC-DC Converter for E-Vehicle

Tiny 60V to 5V USB power converter is based on TPS54560 IC, the projects provides 5V DC and peak current up to 5Amps, constant current up to 2Amps. It can be used in lots of application where high voltage to 5V DC USB power required, good use in automotive application. It can be used in E-vehicle for smart phone charger,  USB Hub connector mounted on board for easy connection, input has screw terminal.


  • Supply input 9V to 60V DC
  • Output 5V DC
  • Load Current 5 Amps Peak and 2Amps Constant
  • Onboard USB Hub Connector
  • Good for E-Vehicle, Carts, Trucks as for USB Charger

Watch Video Of This Project







LED Sequencer Using 10 White LEDs of Each 3W and Arduino

The 10 LED sequencer circuit published here is based on Arduino Uno and 10 White LED board. The project contains 10 LEDs of each 3W, provides high intensity, can be used in various applications. The board can be connected to Arduino Uno, Arduino Mega, Arduino Nano or Raspberry Pai , each LED can be controlled individually, I have connected LEDs to pin D2-D11 of Arduino. LED board required supply 5V DC, it can work with higher  supply by changing current resistor across LEDs, Large size Bar-graph monitor, led sequencer, strobe, LED light effects are possible applications with this board.

Note : Dont Power Up the LED Board from Arduino, LED board required separate 5V DC 3Amps.

Video Of this Project


  • Supply 5V DC
  • Maximum Load on each channel 300mA-400mA (Total 3Amps)
  • LED 1-10 Connected to D2,D3,D4,D5,D6,D7,D8,D9,D10,D11 of Arduino

Download Arduino Code

The 10X3W White LED board has been designed to create large size barograph meter and light effects generator.  The board contains 3W LEDs, D-Pak transistor as driver and current limiting resistor across each LED. Circuit works with 5V, each LED take approx. 300mA-400mA current, each LED can be controlled individually by applying TTL voltage, header connector provided to interface micro-controller. LED dimmer possible by applying PWM signal to each LED, Easy interface with Arduino.











Arduino Code for LED Sequencer

/* A simple program to sequentially turn on and turn off 10 LEDs
Code tested on 10X3W white LED board works with 5V DC,
all LEDs take approx 2Amp current, PCB Design , Schematic
and Arduno code for 10LED sequencer can be download from our
website www.twovolt.com */

int LED1 = 2;
int LED2 = 3;
int LED3 = 4;
int LED4 = 5;
int LED5 = 6;
int LED6 = 7;
int LED7 = 8;
int LED8 = 9;
int LED9 = 10;
int LED10 = 11;

void setup() {
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
pinMode(LED6, OUTPUT);
pinMode(LED7, OUTPUT);
pinMode(LED8, OUTPUT);
pinMode(LED9, OUTPUT);
pinMode(LED10, OUTPUT);


void loop() {
digitalWrite(LED1, HIGH);
digitalWrite(LED2, HIGH);
digitalWrite(LED3, HIGH);
digitalWrite(LED4, HIGH);
digitalWrite(LED5, HIGH);
digitalWrite(LED6, HIGH);
digitalWrite(LED7, HIGH);
digitalWrite(LED8, HIGH);
digitalWrite(LED9, HIGH);
digitalWrite(LED10, HIGH);
digitalWrite(LED1, LOW);
digitalWrite(LED2, LOW);
digitalWrite(LED3, LOW);
digitalWrite(LED4, LOW);
digitalWrite(LED5, LOW);
digitalWrite(LED6, LOW);
digitalWrite(LED7, LOW);
digitalWrite(LED8, LOW);
digitalWrite(LED9, LOW);
digitalWrite(LED10, LOW);