Showing posts with label Digital Electronics. Show all posts
Showing posts with label Digital Electronics. Show all posts

Wednesday, December 6, 2023

Water Level Indicator Digital Logic Design based with Alarm

 

Water Level Indicator Digital Logic Design based with Alarm

What is a Water level Indicator?

A water level indicator is a device used for an indication of the water level in the water tank. So that the operator of the water pump knows the level and operates the motor to fill it again or take any particular required action.

Application of Water Level Indicator

Mostly this device is used as an assignment for Digital Logic Design students to complete. But this is very useful at the domestic level as well as for small industry for to automate the water level of water tanks.

Water level indicator circuit story

Here we have used only the logic gates game to complete this Project. It was very complicated to make the logic in the scenario of the water tank.

look at the scene here

Water level sensor

Water Level Sensor

we have used PVC pipe in the tank and adjusted wires according to the diagram of the tank. all wire connections are terminated at PNP Transistor 3906 Q1, Q2,Q3 and Q4 base terminal through resistor.

Water level sensor principle 

GND wire is in the bottom of the tank and other wires are at different water levels. when any level wire connects with GND through water then that PNP transistor switches ON and current flow through the emitter to the collector Max voltage drop across the 1k ohm resistor at the collector. 
when the water level drops from the wire approximately 0 voltage appears across a 1k ohm resistor.
So now it's simple to make the logic that could be in the form of DLD, any Microcontroller, Arduino, etc.
So here we are making the logic of the water tank.

Truth Table

When the Tank is at 0% (empty) the Motor will start using NAND Logic and stop when the tank will touch 100% (Full).

DLD based Water level Indicator with an alarm

The motor is not only dependent on the NAND gate because if the level drops from 100% then again motor will start but we want to ON the motor again at 0%. So we apply NAND output at the input of D Flip Flop. Now the rising edge is required to pass the logic.

For the D-FF clock signal we use the AND gate and NOR gate at the same inputs (Table of all Gates is given above Table) 
see the working
At 0% NAND gate sends logic 1 at D and at the same time, XOR will send an enable rising signal to D-FF So the output of D-FF will be high due to which the motor starts by the motor driver circuit. The motor will remain ON until the status of D-FF is changed. 
So Now when the tank reaches 100% of the level the NAND gate sends 0 at D-FF and again XOR gate will send the rising signal at the clock and D-FF will transfer 0 at output and the motor will stop until again status of D-FF changes. The status of D-FF will change at 0% or at 100%.

ALARM: The alarm will start by NOR Gate Output because here water tank is at 0%.

Motor Driver Circuit

Motor Driver Circuit


D-FF output terminated at R5. An NPN transistor 3904 uses BJT as a Switch to operate the SPDT relay to drive the motor. 

Water Level Indicator 

Water level Indicator

LEDs are used to indicate the percentage level of the water. All LEDs are connected with respective water-level transistors through 220 ohms resistors. 

Now here is the full Circuit of DLD based Water level Indicator with an alarm 

DLD based Water level Indicator with an alarm

 
Read More

Sunday, July 17, 2022

RTC and Arduino Based Adjustable Motor Timer

RTC and Arduino Based Adjustable Motor Timer
Hi after a long time I am here with a timer for you which's very useful for home appliances as you can see in title.

In daily life we analyze that some appliances are helping in human life to overcome the human efforts and struggles like water pump, washing machines refrigerator's etc. but we also concern with utilization of power as well. So we want to manage these things in a good and desire manners.

So here is a Arduino and real time clock RTC based adjustable timer for your appliance. You Just set you desire minutes to ON the appliance in each hour then save that. Than you will be feel easy.

This Circuit is especially design for water pump to suck the water from the ground after each hour.

Function buttons:

set: Press to enter in setting mode for timer ON and OFF minutes, Real time setting, Day setting then saving that values

++ : is use to increase values

-- : is use to decrease values

AOM : is empty right now for one more advancement I want to do (I will share in next version)

Components used:

  •     Arduino Uno
  •     RTC (DS1307)
  •     LCD 16x2
  •     Push button
  •     7805 Regulators
  •     SPDT Relay 12v operated
  •     TIP147
  •     Optocoupler 817
  •     Resistors 10k, 220
  •     Pot-meter 5k for Contrast control with LCD
  •     12v adopter 2A
  •     Li cell for RTC
You can get all the components online from Electronics world by just clicking here

Circuit diagram: Proteus file

RTC and Arduino Based Adjustable Motor Timer

Arduino program:

// RTC and Arduino based Motor timer //
//  FHQ Design, 30 July,2022         //
//www.elektronicsgarage1.blogspot.com//
 
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include 
#include 
#include "RTClib.h"

RTC_DS1307 rtc;
const int rs = 2, en = 3, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
//RTC_DS1307 RTC;

//************Button*****************//
int Bset  =8; // Button SET MENU'
int Binc  =9; // Button +
int Bdec  =10; // Button -
int Baom  =11; // Auto or Manual
int motor =12; // motor control pin
int LED   =13;   // led



 //void now_time();
int manu=0,hr=0,mint=0,mintcheck=0,On_time=3,daycheck=0;
int ONt,OFFt;
int yearm, monthm, daym=daym+2, hourm=12, minutem=12, secm=12;
char daysOfTheWeek[7][12] = {"Sun   ", "Mon   ", "Tue    ", "Wed      ", "Thu     ", "Fri   ", "Sat     "};
//#define label;
void setup () 
{
  lcd.begin(16,2);
  lcd.clear();
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("Goodnight moon!");
  
  pinMode(Bset,INPUT); 
  pinMode(Binc,INPUT);
  pinMode(Bdec,INPUT);
  pinMode(Baom,INPUT);
  pinMode(LED,OUTPUT);
  pinMode(LED, OUTPUT); // Set buzzer as an output
  pinMode(motor, OUTPUT);
  digitalWrite(motor, HIGH);  
  Wire.begin();
//  RTC.begin();
  //Serial.begin(9600);
   
  if (! rtc.begin()) 
  {
    lcd.print("Couldn't find RTC");
    while (1);
  }

  if (! rtc.isrunning()) 
  {
    lcd.print("RTC is NOT running!");
  }
  
   rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));//auto update from computer time
  // rtc.adjust(DateTime(yearm, monthm, daym, hourm, minutem, secm));// to set the time manualy 
  //setTime(varHr, varMin, varSec, vardd, varmm, varyy);
}

void loop () 
{
  // Function Modes changing //
  //delay(10);
  //int sw = digitalRead(Bset);delay(100);
  if (digitalRead(Bset) == LOW){
  //for (int x=0;x<=1000;x++){}
  delay(500);manu++;
  //lcd.print("Function #");
  //lcd.print(manu);
   if (manu>6){
    manu=0;}
  }

  // Functions //
  
    if (manu==0){
    now_time();
    setmotor();
   delay(10);
   }
//label:   
    if (manu==1){
      motor_ONtime();}

    if (manu==2){
      motor_OFFtime();}
      
    if(manu==3){
      sethr_T();} 
    
    if(manu==4){
      setmin_T();}

     if(manu==5){
      setday_w();}
      
    if(manu==6){
    Save_Prog();}
}
    void now_time()
    {
    DateTime now = rtc.now();
    
    lcd.setCursor(0, 0); // 12:45:78 * * mon
    
    /* Serial.print(now.hour());
     Serial.print(":");
     Serial.print(now.minute());
     Serial.print(":");
      Serial.print(now.second());
     Serial.println();*/
    
    lcd.print(now.hour());
    hr=now.hour();
    lcd.print(':');
    lcd.print(now.minute());
    mint = now.minute();
    mintcheck=now.minute();
    lcd.print(':');
    lcd.print(now.second());
    lcd.print(" *_* ");
    lcd.print(daysOfTheWeek[now.dayOfTheWeek()]);
    daym=now.dayOfTheWeek();
   // daym=daym-2;
    //lcd.setCursor(0, 1);
   // lcd.print("                ");
    delay(10);
    }
    /*
    lcd.setCursor(0, 1);
    lcd.print(now.day());
    lcd.print('/');
    lcd.print(now.month());
    lcd.print('/');
    lcd.print(now.year());
   */
   
   void setmotor(){ // 0
     lcd.setCursor(0, 1);
   lcd.print("Motor.T =   ->  ");
   lcd.setCursor(10, 1);
   lcd.print(ONt, DEC);
   lcd.setCursor(14, 1);
   lcd.print(OFFt, DEC);    
   
   if ((ONt<= mintcheck)&&(mintcheck60){lcd.setCursor(11, 1);lcd.print("(^_^)");delay(1000);OFFt=0;}}
           if (digitalRead(Bdec)== LOW)
                {delay(500);OFFt--;
                if (OFFt<0 0="" 1="" 3="" delay="" digitalread="" hours="" hr="" if="" inc="" lcd.print="" lcd.setcursor="" low="" motor="" n_time="OFFt;" set="" sethr_t="" t="60;}}//" time="" void="">24){lcd.setCursor(10, 1);lcd.print("(^_^)");delay(1000);hr=1;}}
           if (digitalRead(Bdec)== LOW)
                {delay(500);hr--;
                if (hr<0 1="" delay="" digitalread="" hr="24;}}" if="" inc="" lcd.print="" lcd.setcursor="" low="" mint="" minute="" ours=");
   lcd.setCursor(10, 1);
   lcd.print(hr);
   //now.hour()=hr;
   delay(10); }
  
   void setmin_T(){ // 4
      lcd.setCursor(0, 0);
   lcd.print(" set="" time="">60){lcd.setCursor(11, 1);lcd.print("(^_^)");delay(1000);mint=1;}}
           if (digitalRead(Bdec)== LOW)
                {delay(500);mint--;
                if (mint<0 1="" day="" daycheck="" daym="" delay="" digitalread="" if="" inc="" inute=");
   lcd.setCursor(11, 1);
   lcd.print(mint);
   delay(10); }

  void setday_w(){ // 5
   //int mint;
   lcd.setCursor(0, 0);
   lcd.print(" lcd.print="" lcd.setcursor="" low="" mint="24;}}" set="" week="">6){lcd.setCursor(10, 1);lcd.print("(^_^)");delay(1000);daym=0;}}
           if (digitalRead(Bdec)== LOW)
                {delay(500);daym--;
                if (daym<0 0="" 1="" atetime="" ay=");
   lcd.setCursor(10, 1);
  lcd.print(daysOfTheWeek[daym]);       // sun mon tue wed thu fri sat
   delay(10); }                         //  0   1   2   3   4   5   6
                                        //  2   3   4   5   6   0   1
   void Save_Prog(){ // 6
   lcd.setCursor(0, 0);
   lcd.print(" data="" daym="" delay="" hourm="" if="" lcd.print="" lcd.setcursor="" manu="0;" manualy="" minutem="" monthm="" otor.t="-" rtc.adjust="" saving="" secm="" set="" t="" the="" time="" to="" wait="" yearm="">  ");
                lcd.setCursor(10, 0);
                lcd.print(ONt, DEC);
                lcd.setCursor(14, 0);
                lcd.print(OFFt, DEC);   
                lcd.setCursor(0, 1);
                lcd.print("Error::OFFt>ONt");
                delay(1000);
                manu=1;
                }
                
  // On_time = ONt;
  delay(1000);  }
  
If you like my project ! Plz share it and comment me 
Thanks
Read More

Sunday, September 20, 2020

Electronic - II Notes For DAE 2nd Year


Electronic - II Notes For DAE 2nd Year

Electronic - II Notes For DAE 2nd Year


Digital electronics are those electronics systems that use a digital signal instead of an analog signal. Digital electronics are the most common representation of Boolean algebra and are the basis of all digital circuits for computers, mobile phones, and numerous other consumer products.

The most common fundamental unit of digital electronics is the logic gate. By combining numerous logic gates (from tens to hundreds of thousands) more complex systems can be created. The complex system of digital electronics is collectively referred to as a digital circuit.

To most electronic engineers, the terms "digital circuit", "digital system" and "logic" are interchangeable in the context of digital circuits
These notes are intended to familiarize you with the elementary principles of this field. 


  • You Can Download Notes From the Below Link
 

Read More

Friday, May 22, 2020

D - Flip Flop Ring Counter (LED Flasher)



Hi here is new one topic related to Flasher circuit but this circuit is belongs to digital electronics theory. 
It today I am sharing D - Flip Flop based 4 bit ring Counter. Its very simple and easy to built and understand its working. 

Inputs of ring counter are
1. Clock Pulse
2. Preset
3. Reset 

Outputs are
A,B,C and D at which LEDs are Connected to show Logic.

Truth Table:

Clock   Preset   Reset       A   B   C   D
  1            1          0            0   0    0   0
0 - 1        0           1            1   0    0   0
0 - 1        1           1            0   1    0   0
0 - 1        1           1            0   0    1   0
0 - 1        1           1            0   0    0   1 

1st Case: at 1st clock:

2nd Case at 2nd Clock:

3rd Case at 3rd clock:

4th Case at 4th Clock:

above all slides are taken from Electronic Workbench simulation Software.

Read More

Important Artical

Popular Articals

Total Page views in This Month

© 2019-20 Electronics Garage. Designed by Uzma 0101 & Distributed by elektronicsgarage1.blogspot.com