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);
lcd.begin(16,2);
}
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
lcd.print(“FAN:ON/OFF”);
lcd.print(“”);
delay(300);
lcd.clear();
}

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

Temperature Meter using LM35 Analog Sensor and Arduino Nano LCD Shield

Another project which display the ambient temperature on 16X2 LCD, Project is based on compact multipurpose Arduino Nano LCD shield and LM35 analog temperature sensor, shield also provided with 3 Tactile Switches, Relay, Power MOSFET, Trimmer Potentio-meter to create multi projects. Circuit works with 5V DC, can be power up from USB or separate header connector.  

Download PDF Document

Download Arduino Code for LCD Based Temperature Meter

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 Potentio-Meter Arduino Pin A0
  • LM35 Sensor Arduino Pin A4
  • Power MOSFET Arduino Pin D9
  • Relay Arduino Pin D8

The LM35 series are precision integrated-circuit temperature devices with an output voltage linearly-proportional to the Centigrade temperature. The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does not require any external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost is assured by trimming and calibration at the wafer level. The low-output impedance, linear output, and precise inherent calibration of the LM35 device makes interfacing to readout or control circuitry especially easy. The device is used with single power supplies, or with plus and minus supplies. As the LM35 device draws only 60 µA from the supply, it has very low self-heating of less than 0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C temperature range, while the LM35C device is rated for a −40°C to 110°C range (−10° with improved accuracy). The LM35-series devices are available packaged in hermetic TO transistor packages, while the LM35C, LM35CA, and LM35D devices are available in the plastic TO-92 transistor package.

LM35 Features
Calibrated Directly in Celsius (Centigrade)
Linear + 10-mV/°C Scale Factor
0.5°C Ensured Accuracy (at 25°C)
Rated for Full −55°C to 150°C Range
Suitable for Remote Applications
Low-Cost Due to Wafer-Level Trimming
Operates From 4 V to 30 V
Less Than 60-µA Current Drain
Low Self-Heating, 0.08°C in Still Air
Non-Linearity Only ±¼°C Typical
Low-Impedance Output, 0.1 Ω for 1-mA Load

Arduino Code


#include<LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2);
const int inPin = A4;
void setup()
{
lcd.begin(16,2);
}
void loop()
{
int value = analogRead(inPin);
lcd.setCursor(0,1);
float millivolts = (value / 1023.0) * 5000;
float celsius = millivolts / 10;
lcd.clear();
lcd.setCursor(0,0);
lcd.print(celsius);
lcd.print(“C”);
lcd.setCursor(0,1);
lcd.print((celsius * 9)/5 + 32);
lcd.print(“F”);
delay(1000);
}

Type K Thermocouple Sensor Amplifiers with Cold Junction Compensation Using AD595-AD594

The sensor project is based on AD595 IC from Analog devices.  AD595 is a complete instrumentation amplifier and thermo-couple cold junction compensator on a monolithic chip. It combines an ice point reference with a pre-calibrated amplifier to produce a high level (10 mV/°C) output directly from a thermo-couple signal. Pin-strapping options allow it to be used as a linear amplifier-compensator or as a switched output set point controller. It is amplify its compensation voltage directly, thereby converting it to a stand-alone Celsius transducer with a low impedance voltage output. The AD595 includes a thermo-couple failure alarm that indicates if one or both thermo-couple leads become open. The alarm output has a flexible format which includes TTL drive capability.

NOTE : Refer AD595 Data sheet for supply input and other information, The circuit works with single supply, same board also support AD594 IC which can support type J sensor.

Features

  • Supply 15V DC
  • Supports Type K Thermocouples
  • Provides 10 mV/Centigrade

Download PDF Schematic

 

What is Thermocouple??

A thermocouple is an electrical device consisting of two dissimilar electrical conductors forming electrical junctions at differing temperatures. A thermocouple produces a temperature-dependent voltage as a result of the thermoelectric effect, and this voltage can be interpreted to measure temperature. Thermocouples are a widely used type of temperature sensor

What is Type K Thermocouple Sensor??

Type K Thermocouple (Nickel-Chromium / Nickel-Alumel): The type K is the most common type of thermocouple. It’s inexpensive, accurate, reliable, and has a wide temperature range. Type K thermocouples usually work in most applications as they are nickel based and exhibit good corrosion resistance. It is the most common sensor calibration type providing the widest operating temperature range. Due to its reliability and accuracy the Type K thermocouple is used extensively at temperatures up to 2300°F (1260°C). This type of thermocouple should be protected with a suitable metal or ceramic protection tube, especially in reducing atmospheres. In oxidizing atmospheres, such as electric furnaces, tube protection is not always necessary when other conditions are suitable; however, it is recommended for cleanliness and general mechanical protection. Type K will generally outlast Type J because the JP wire rapidly oxidizes, especially at higher temperatures.

Type K Thermocouple Range

  • Thermocouple grade wire, –454 to 2,300F (–270 to 1260C)
  • Extension wire, 32 to 392F (0 to 200C)

 

AD595 Output Voltages

 

Various Type K Temperature Sensors

 

 

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

Quadrature Encoder to Clock and Direction Signal Converter Using LS7084/LS7184

The quadrature LS7084/LS7184 Module is a CMOS quadrature clock converter. Quadrature clocks derived from optical or magnetic encoders, when applied to the A and B inputs of the LS7084 are converted to strings of a Clock and an Up/down direction control. These outputs can be interfaced directly with standard Up/Down counters for direction and position sensing of the encoder.

J1 Jumper input selects between x1 and x4 modes of operation. A high level selects x4 mode and a low-level selects the x1 mode. In x4 mode, an output pulse is generated for every transition at either A or B input. In x1 mode, an output pulse is generated in one combined A/B input cycle.

Resistor R7-RBIAS (Pin 1) Input for external component connection. A resistor connected between this input and VSS adjusts the output clock pulse width (Tow). For proper operation, the output clock pulse width must be less than or equal to the A, B pulse separation (TOW £ TPS).

 

Features

  • Supply 5V DC
  • +4.5V to +10V operation (VDD – VSS)
  • On Board Power LED
  • J1 Encoder pulse multiplication ( Jumper JL Close =1X, Jumper JH Close = X4)
  • Header Connector for Encoder Interface
  • X1 and X4 mode selection
  • Programmable output clock pulse width
  • On-chip filtering of inputs for optical or magnetic encoder applications.
  • TTL and CMOS compatible I/Os
  • Up to 16MHz output clock frequency

 

Note : Circuit uses LS7084 IC , which is CMOS IC and working voltage range 4.5V to 10V and it has two scale up  range.X1 and X4. The board can be used with LS7184 which can work with lower supply range 3.3V to 5V and it can provide X1,X2,X4 resolution, refer data sheet of LS7184 for more information.

 

 

 

 

 

 

 

Note: Check Graph for R7- Bias Selection

 

 

 

 

What is Quadrature Encoder?

The most common type of incremental encoder uses two output channels (A and B) to sense position. Using two code tracks with sectors positioned 90 degrees out of phase, the two output channels of the quadrature encoder indicate both position and direction of rotation. If A leads B, for example, the disk is rotating in a clockwise direction. If B leads A, then the disk is rotating in a counter-clockwise direction.

By monitoring both the number of pulses and the relative phase of signals A and B, you can track both the position and direction of rotation.

Some quadrature encoders also include a third output channel, called a zero or index or reference signal, which supplies a single pulse per revolution. This single pulse is used for precise determination of a reference position.

How Quadrature Encoder Works?

The code disk inside a quadrature encoder contains two tracks usually denoted Channel A and Channel B. These tracks or channels are coded ninety electrical degrees out of phase, as indicated in the image below, and this is the key design element that will provide the quadrature encoder its functionality. In applications where direction sensing is required, a controller can determine direction of movement based on the phase relationship between Channels A and B. As illustrated in the figure below, when the quadrature encoder is rotating in a clockwise direction its signal will show Channel A leading Channel B, and the reverse will happen when the quadrature encoder rotates counterclockwise.

Apart from direction, position can also be monitored with a quadrature encoder by producing another signal known as the “marker”, “index” or “Z channel”. This Z signal, produced once per complete revolution of the quadrature encoder, is often used to locate a specific position during a 360° revolution.

Magnetic Field Sensor With Linear Output Using AD22151

Magnetic field sensor project using AD22151 IC from Analog Devices, The AD22151 is linear magnetic field transducer. The sensor output is a voltage proportional to a magnetic field applied perpendicularly to the package top surface. The sensor combines integrated bulk Hall cell technology and instrument technology to minimize temperature related drifts associated with silicon Hall cell characteristics.

Features

  • Supply 5V DC @ 25mA
  • Power Led On Board
  • Header connector for supply and output
  • Normal Output 1.800V
  • South side Magnet Output 4.800V
  • North side Magnet Output 0.042V

Applications

  • Throttle Position Sensing
  • Pedal Position Sensing
  • Suspension Position Sensing
  • Valve Position Sensing
  • Absolute Position Sensing
  • Proximity Sensing

 

Download PDF Schematic

Download Document

Download Datasheet AD22151

Video With Bar-Graph Display

 

 

 

 

 

 

 

 

 

 

Metal Detector Schematic and PCB layout Using TDA0161

The Metal detector project is designed for metallic body detection by sensing variations in high frequency Eddy current losses. Using an externally-tuned circuit, they act as oscillators. The output signal level is altered by an approaching metallic object. The output signal is determined by supply current changes. Independent of supply voltage, this current is high or low, according to the presence or absence of a closely located metallic object Between pins 3 and 7, the integrated circuit acts like a negative resistor with a value equal to that of the external resistor R3 and trimmer potentiometer PR1 (connected between pins 2 and 4). The oscillation stops when the tuned circuit loss resistance (Rp) becomes smaller than R3. As a result, ICC(close) = 10mA (pins 1 and 6). The oscillation is sustained when Rp is higher than R3, and ICC(remote) = 1mA (pins 1 and 6). Eddy currents induced by coil L1 in a metallic body determine the value of Rp.

  • Supply 5-12V DC
  • Output Normally High , Provide Low output in presence of Metal
  • LED Sensor Active Indicator
  • Sensing Distance 5-15mm

Download PDF Schematic & PCB Layout

 

 

 

 

MPXM2010GS 0 To 10kPa (0 To 1.45 PSI) Pressure Sensor Module

The MPXM2010GS silicon piezoresistive pressure sensors provide accurate and linear voltage output directly proportional to applied pressure. These sensors house a single monolithic silicon die with strain gauge and thin film resistor network integrated. The sensor is laser trimmed for precise span, offset calibration and temperature compensation. The series includes a strain gauge and thin-film resistor network integrated on each chip

 

Features

  • Temperature Compensated over 0 to +85 C
  • 0 To 10kPa (0 to 1.45psi)
  • Output 25mV Full Scale
  • Supply 10V DC (10-16V Possible)

Applications

  • Respiratory Diagnostics
  • Air Movement Control
  • Controllers
  • Pressure Switching

This Details is from NXP Application AN1950

The resolution of the system is determined by the mm of water represented by each A/D count. As calculated above the system has a span of 226 counts to represent water level up to and including 40cm. Therefore, the resolution is:

Resolution=mm of water/Total # counts=400mm/127 counts=3.1 mm per A/D count

 

Bellow Schematic from NXP Application Note

Reflective Object Sensor- Infra Red Optical Proximity Switch Using PLL LM567

Reflective Object Sensor- Optical Proximity Switch Using PLL LM567

The simple circuit is based on LM567 PLL IC and optical sensor QRD1114 from Fairchild semiconductor. The QRD11114 reflective sensor consists of an infrared emitting diode and an NPN silicon photo Darlington mounted side by side in a black plastic housing. The on-axis radiation of the emitter and the on-axis response of the detector are both perpendicular to the face of the QRD1113/14. The photo Darlington responds to radiation emitted from the diode only when a reflective object or surface is in the field of view of the detector.

  • Supply 5V DC
  • Output LED
  • Output TTL 5V
  • Sensing Distance Up to 15MM
  • Sensing Distance Adjustable

reflactive-object-sensor-infra-red-optical-proximity-switch-using-lm567-2

reflactive-object-sensor-infra-red-optical-proximity-switch-using-lm567-1

1 2 3