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;

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);


Multipurpose Compact 16X2 LCD Shield For Arduino Nano

Compact multipurpose Arduino Nano 16X2 LCD shield can be used to develop various projects, shield provided with various things, LM 35 Temperature sensor, 3X Tactile Switch, Vertical Trimmer Potentiometer, 12V Relay with NO/NC output, power MOSFET, AC714 current sensor and 16X2 LCD.

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

Arduino Code for 16X2 LCD

LiquidCrystal Library – display() and noDisplay()

Demonstrates the use a 16×2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.

This sketch prints “Hello World!” to the LCD and uses the
display() and noDisplay() functions to turn on and off
the display.

The circuit:
* 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
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)

Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
modified 7 Nov 2016
by Arturo Guadalupi

This example code is in the public domain.



// include the library code:
#include <LiquidCrystal.h>

// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
// set up the LCD’s number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print(“hello, world!”);

void loop() {
// Turn off the display:
// Turn on the display:

Optical Reflective Line Sensor for Robotics and No Contact Surface Sensing QRE1113

The sensor circuit helps to sensing the line for robotics application and  no contact surface sensing. The mini line sensor provides analog voltage output and can work with 3.3V and 5V DC. Analog output voltage is proportional to IR reflected to the senor. Resistor R1 controls the current  to IR LED, R2 provided as pull up resistor. Sensor contains Infra-Red led and photo transistor detector.

Download PDF Schematic


Schematic Line Sensing Sensor QRE1113



PCB layout QRE1113 Optical Sensor




Pin Configuration

10 LED Bar-Graph Display- 10 Segment Bar-Graph Voltmeter Arduino Nano

Turns on a series of 10 Segments of LEDs based on the value of an analog sensor. This is a simple way to make a bar graph display. This method can be used to control any series of digital outputs that depends on an analog input. Trimmer Potentiometer and Analog joystick used to test the code.


  • 10 3MM LEDs
  • 470 E Series Resistor to limit the current to LED
  • 5K Ohms Trimmer Potentiometer/10K Joystick used to test the code


Video Available Here







Arduino Code 10 LED Bar-Graph Display / Bar-Graph 5 Voltmeter 

LED bar graph

Turns on a series of LEDs based on the value of an analog sensor.
This is a simple way to make a bar graph display. Though this graph uses 10
LEDs, you can use any number by changing the LED count and the pins in the

This method can be used to control any series of digital outputs that depends
on an analog input.

The circuit:
– LEDs from pins D2 through D11 to ground
-Trimmer Potentiometer 5K on A0


// these constants won’t change:
const int analogPin = A0; // the pin that the potentiometer is attached to
const int ledCount = 10; // the number of LEDs in the bar graph

int ledPins[] = {
2, 3, 4, 5, 6, 7, 8, 9, 10, 11
}; // an array of pin numbers to which LEDs are attached

void setup() {
// loop over the pin array and set them all to output:
for (int thisLed = 0; thisLed < ledCount; thisLed++) {
pinMode(ledPins[thisLed], OUTPUT);

void loop() {
// read the potentiometer:
int sensorReading = analogRead(analogPin);
// map the result to a range from 0 to the number of LEDs:
int ledLevel = map(sensorReading, 0, 1023, 0, ledCount);

// loop over the LED array:
for (int thisLed = 0; thisLed < ledCount; thisLed++) {
// if the array element’s index is less than ledLevel,
// turn the pin for this element on:
if (thisLed < ledLevel) {
digitalWrite(ledPins[thisLed], HIGH);
// turn off all pins higher than the ledLevel:
else {
digitalWrite(ledPins[thisLed], LOW);



L298 Dual/Single DC Motor Driver Shield Arduino Nano

Dual Motor L298 H-Bridge Control project can control two DC motors OR single motor with 2X current. The circuit is designed around popular dual H-Bridge L298 from ST. This board can be configured to drive a single motor with high current rating also. This can be achieved with the help of jumpers on the board. An onboard 5V regulator can take a maximum of 18V of DC input. Should you wish to drive this board with higher voltage then 18V, you will need to connect a external 5V regulated source to the logic circuit. For this you will need to remove J-5V. This board can fit in any small toy or robot due to small size and very low profile. L298 IC is mounted under the PCB in horizontal position to make board small and low profile to fit any small robot. On board 5V regulator can be used to power up external Micro-Controller board as well as internal logic supply.




Motor supply: 7 to 46 VDC
Control Logic Input: Standard TTL logic level
Output DC drive to motor: up to 2 A each (Peak)
On Board 5V Regulator (Close J-5V to Use On Board 5V Regulator)
Enable and direction control pins available
External Diode Bridge for protection
Heat-sink for IC
Power-On LED indicator
Header Connector for Inputs and PWM
On Board PCB Solderable Jumpers for Enable
Screw terminal connector for easy input supply (PWR) / output (Motor) connection


L298 to Arduino Nano Connections>I1>D4,I2>D5,E1>D6,I3>D9,I4>D10,E2>D11




4 Channel Relay Driver Shield For Arduino Nano



Quad Channel Relay Board Arduino Nano Shield is a simple and convenient way to interface 4 relays for switching application in your project.


     Input supply 12 VDC @ 170 mA

     Output four SPDT relay

     Relay specification 5 A @ 230 VAC

     Trigger level 2 ~ 5 VDC from Arduino I/O D2,D3,D4,D5 Digital Lines

     Power Battery Terminal (PBT) for easy relay output and aux power connection

     LED on each channel indicates relay status

Applications: Robotics, Electronics projects, Industrial controls, Microwaves Oven, Fans, DC Motor, AC Lamp, Solenoids Remote Controls etc.

Relay Load (Contact Capacity of Relay)


  •     7 A @ 230-250 VAC
  •     10 A @ 120 VAC
  •     10 A @ 24 VDC
  •     CN1 – CN4 Connector : Relay 1 to 4 (S1 to S4) Output (Normally Open/Normally Close)
  •     CN5 Connector : Control Signal Input, Trigger 2 to 5 VDC and Supply Input 12 VDC
  •     D2,D4,D6,D8 : Relay On/Off LED Indication
  •     CN6 , CN7 12V DC Input





Universal Dual Op-Amp Development PCB & Schematic using THT Components

The Universal Op-Amp Development board is a general purpose blank circuit boards that simplify prototyping circuits for a variety of Op-Amp circuits. The evaluation module board design allows many different circuits to be constructed easily and quickly.

Universal Dual Operational Amplifier (Op-Amp) board is designed to aid in the evaluation and testing of the low voltage/low power and some precision operational amplifiers. This board will accommodate Dual op amp that are assembled in a 8 Pin Dip package. This board is designed to use single or dual amplifiers. Many different circuits can be made such as inverting, non-inverting, differential-In amplifiers and low-pass, band-pass, band reject, or notch second order filters. The amplifier can be powered with single or dual supplies. These circuits can be configured without any modifications to the board, all that is necessary is to select the correct resistors and capacitors. The other optional components can be left open or shorted depending on the configuration desired.

Power is applied to the Header connector pins labeled VCC,-VEE, GND, If a single supply is used, then -VEE should be connected to GND.

This board mainly support lots of Texas instruments Op-Amps, On Semi, Analog Devices

List Of Op-Amps Can be use

  • OPA2350
  • OPA2340
  • LM358
  • LF422






Inverting Operational Amplifier Circuit ( Universal Op-Amplifier Development Board)

This is most widely used operational amplifier circuit.  It is an amplifier whose closed-loop gain is set by R27 & R18. It can amplify AC or DC Signal.

Non Inverting Operation Amplifier ( Universal Op-Amplifier Development Board)

This simple circuit is a non-inverting Operation Amplifier can be made using universal Op-Amplifier Development Board. Output voltage has same phase as the input voltage ( For DC Input)


What is STEM

Science + Technology + Engineering + Math

STEM encompasses fields that are collectively considered the core technological underpinnings of an advanced society. Co-founders, Melissa and Lavanya, are mechanical engineers with a passion for promoting STEM literacy for all. They believe in exciting students about STEM through fun, hands-on experiences where real learning occurs.

1 2