• sgprojects.co.in.jpg
  • Slide_Show_1.jpg
  • Thermal_power_plant.jpg

Projects & Articles

LPG Sensor Alarm

LPG gas detection project’s main idea is to implement the security system for detecting leakage of liquid petroleum gas in closed environment. In this project gas leakage is identified by using MQ6 gas sensor. A simple circuit with an Op-Amp IC is powered by a step down transformer and finally the alarm produces on detecting gas.


Required Components :

  • LM358 Op-amp IC
  • MQ6 Sensor module
  • LM2596 buck converter
  • Buzzer 5V
  • Transformer 12V/1A
  • NPN Transistor BC547
  • Preset 10K (variable resistor)
  • Capacitors & resistors etc.

Note : 6V Transformer can also be used but remember about the current rating of transformer must be of minimum  1A. Since the sensor heated up so it requires large working current.

Circuit Schematic

Circuit Schematic

The 5V power supply for the above circuit is provided by IC LM2596 based buck converter. It is highly efficient than LM78XX series ICs. You can get this readymade power supply board from the market. It has an adjustable range for better voltage regulation.

PowerSupplyLM2596 power supply

Working principle :

The MQ6 sensor has an ceramic crystal coated with a sensing material is a metal oxide, mostly SnO2. During power supply the heater gets heated up for faster chemical reaction. The oxygen gets adsorbed on the crystal surface with a negative charge when the metal oxide is heated at a particular temperature in air. The donor electrons on the crystal surface are then transferred to the adsorbed oxygen which results in leaving positive charges in the space charge layer. Thus the surface potential serves as a potential barrier against the electron flow.

                  In presence of the gases the electric current flows in the sensor through the reaction of SnO2 molecules. Adsorbed oxygen forms a potential barrier at the grain boundaries which prevents carriers to move freely. The electrical resistance of the sensor is recognized by this potential barrier. The surface density of the negatively charged oxygen decreases in the presence of deoxidizing gas which reduces the barrier height in the grain boundary. This reduced barrier height decreases the sensor resistance.

If you have made this project, please share your personal experience about this project. Also you can send your own project photographs to view on this page.

This video shows the working and configuration of the project.

Servo Based Thermometer

This is a classical analog type thermometer but the design technique used in this project is completely digital. The reading of the thermometer is shown by a screw driver which is attached with the servo horns to move through the scale in degree centigrade(°C). We have set the range from 0-50°C. For reducing the cost of the project, we used an 8-pin PIC microcontroller from Microchip. Due to the internal architecture of this RISC(Reduced Instruction Set Computer) microcontroller, we do not need any crystal or resistors.

ThermoFront ThermoThermo3Thermo4



Required Components :

  • PIC12F675 Microcontroller
  •  LM35 Temperature Sensor
  • Servo motor
  • 5V DC power supply source
  • Breadboard & wires etc.
  • PIC microcontroller Programmer

Circuit Schematic

PIC ServoBasedThermometer

A 5V DC power supply is suitable for the circuit as here all the electronics work on 5V. After connecting the system you just need to calibrate the °C scale aligned with the servo horn.

Working :

Temperature sensor LM35 provides the analog voltage output with 10mV/0°C scale factor. This output is connected to pin7(analog 0 pin) of the microcontroller. Hence the servo position depends on the output voltage of LM35. The mechanics of the project is based on the servo motor. These motors are generally used for angular movement. We are using the servo motor for 0° - 180° movement. Servo motor's angular  position are controlled by PWM(Pulse Width Modulation) technique.

Calibration :

Start the project by adjusting the servo to 0° angular position matching with the 0°C temperature scale without power supply. This calibration process is required for the first time only. That's it, now play the project.

The program is compiled using "mikroC PRO for PIC" compiler. You must be aware to the setting of the compiler while using the internal oscillator. Also disable the MCLR pin function.

Project : Analog type servo temperature indicator
Developer : Sameer Gupta (sgprojects.co.in)
MCU : PIC12F675
XL : Internal 4MHz osc with disabled MCLR pin function
Date : Jan 2016
Description : AN0(GP0) pin input from LM35, GP2 pin output for servo
We've set the temperature maxRange at 50°C Centigrade.
sbit Pulse at GP2_bit;
unsigned short delay;
unsigned long temp_value;
unsigned short multiplier = (250-60)/50; //Servo varies from 60 to 250 machine cycle with 50°C Max temp. range
void interrupt() {
Pulse = 1;
Pulse = 0;
TMR0 = 180; // TMR0 returns to its initial value
INTCON.T0IF = 0; // Bit T0IF is cleared so that the interrupt could reoccur
void main() {
CMCON = 0x07; // Disable Comparators
TRISIO = 0b00000001;
OPTION_REG = 0x07; // Prescaler (1:256) is assigned to the timer TMR0
TMR0 = 180; // Timer T0 counts from 180 to 255 to create ~20 ms period
INTCON = 0xA0; // Enable interrupt TMR0 and Global Interrupts
ANSEL = 0b00000001;
temp_value = ADC_Read(0);
temp_value = temp_value*488;
temp_value = temp_value/1000; // This line gives two digit temp. value
temp_value = temp_value*multiplier;

Download the source code.



Ultrasonic Repeller for Mosquito & Rat

This is an ultrasonic sound based project which can be directly connected to an AC line. Ultrasonic means out of human hearable of frequency above 20kHz because human can hear sounds in the range of 20Hz to 20kHz. The project is made to generate a frequency around 40kHz through a piezo buzzor or speaker.

Ultrasonic generator

This ultrasonic sounds of high amplitude can be able to disturb some creatures like mosquito, rat and some bugs. I can't say about its 100% working for all type of creatures but I got it's function when trying on rats. To change the ultrasonic frequency, vary the 47k preset in a suitable position. Use good quality speaker for better accuracy. Do not touch on the pcb during operation as it is directly connected with high voltage AC line.

Circuit Schematic

Ultrasonic Generator Circuit

If you have made this project, please share your personal experience about this project. Also you can send your own project photographs to view on this page.


SD Card Data Recorder

We always try to know the physical and electrical data like temperature, pressure, current, ac voltage etc. In this project, I'm going to display these data in the real time as well as I'ill record it to a memory card(SD/microSD/MMC card). Here the project can display four different things; ac voltage, environment temperature, relative humidity and the real time in 12 hrs format.


We can display more physical & electrical data by adding more sensors to the project. The project is made by arduino programming hardware. I am using "arduino uno R3".

Required components :

Any arduino board(UNO/pro/mini/nano/duemilanove etc.),

power supply kit,

DHT11(temp. & humidity sensor),

IC DS1307(Real Time Clock),

Crystal 32.768kHz,

3V battery(for RTC back-up),

transformer 6V/200mA,

LCD 16x2,

SD/microSD/MMC card,

card holder,

diode bridge,

zener diode 5V,

capacitor 100uF,

10k resistance(1/4W) x 6,

10k variable resistance x 2,

toggle switch x 4

For achieving the value of ac voltage we need a 6V transformer. This transformer is not for the power supply of the project but it is used to measure ac voltage in terms of low secondary voltage as shown in the figure below. Secondary voltage is rectified, filtered and limited to a range of 5 Volts with a zener diode then it is applied to the analog pin 0(AN0/pin14) of the arduino board. 

arduino data measurement

For achieving the value of temperature we are using DHT11 sensor which provides a single data line. It is connected to analog pin 1(AN1/pin15) of the arduino board.

Circuit diagram :

data recorder schematic

A card holder holds the card and it communicates with harware SPI port of the arduino.

SD card attachements : MOSI = arduino pin 11, MISO = arduino pin 12, CLK = arduino pin 13, CS = arduino pin 10 
LCD connections : RS = arduino pin 7, EN = arduino pin 6, D4 = arduini pin 5, D5 = arduino pin 4, D6 = arduino pin 3, D7 = arduino pin 2, D0 to D3 = ground.

DS1307 connections : SCL = arduino pin 19(AN5), SDA = arduino pin 18(AN4)

Button connections : Up = arduino pin 8, Down = arduino pin 9, Menu = arduino pin 16(AN2), OK = arduino pin 17(AN3)

Operation : The whole data is recorded to the memory card as a text file. A 1GB card is sufficient to record many years of data. In the below figure, you can see the snapshot of the recorded data.

recorded data

There are four functional buttons on the project :

MENU : By pressing a long time you'ill enter the setting zone.

UP : To increase the value.

UP : To decrease the value.

OK : To save/select the value.

When you enter the setting zone, you can set different things as shown in the LCD picture below.


The time is for 12 hrs format but during the setting it is set as 24 hrs of format. For example, if you want to save 3:00pm then it is set to be 15:00. The interval is the time delay between each recording of data. The recording interval setting is from 1 to 300 seconds. By refreshing the card, all past data are erased.

Instead of buying a new arduino board, you can also make your own arduino board by using a pre-programmed chip.

Front view 1Front view 2

side view

side view 2

Download the program and upload it to the arduino chip.

The program is written for the older version of arduino software so use arduino 1.0.6 or lower version and do not use the latest arduino 1.6.4 or higher version software. Since the program takes approximately 23kB so use ATmega328 or higher flash memory chip based arduino hardware.

Water Level Indicator using LCD

Water level indicator plays a vital role in the world of water saving technology. It indicates five different level of water in a tank mostly used in housing water tank,cooler tank etc. The circuit is based on the microcontroller AT89S52 which is brain of the whole system. A CMOS IC4049 is used as a water sensor which provides input signals for the MCU. The output of microcontroller is connected to an LCD and a buzzor. LCD shows the water level in five steps. When the tank gets full of water,an alarm produces.


                                                                                                                                                                                                                     (Photo By Qamar Shaikh)

The gerber files of pcb is as shown below.

WLI PCB                 WLI PCB 2

Project Board

WLI Project Board

Download the complete code with pcb files.


Visitors Today46
Visitors Yesterday113

  • Your IP Address :


SG Templetes by Sameer Gupta