Saturday 30 July 2016

PURE SINEWAVE WITH LCD USING DSPIC30F2010

DSP30F2010 SINEWAVE INVERTER

TECHNICAL SPECIFICATIONS:

VOLTAGE LIMITS (INVERTER MODE) :
    Mains A.C. Lower Voltage Limit :110+ 5V Lower Recovery Voltage :120+ 5V
    Mains A.C. Higher Voltage Limit : 275+ 5V Higher Recovery Voltage : 265+ 5V
    Output Voltage in Inverter Mode : 210V+5%

VOLTAGE LIMITS (UPS MODE) :
    Mains A.C. Lower Voltage Limit :180+ 5V Lower Recovery Voltage : 190+ 5V
    Mains A.C. Higher Voltage Limit : 255+ 5V Higher Recovery Voltage : 245+ 5V

 Output Frequency :
   Main Output Frequency : Same as Input Inverter, Output Frequency : 50.0+0.3Hz

CHARGER:
   DSP controlled CC/CV Charger with Soft Start

TECHNOLOGY :
    Processor: DSP
    Conversion: Full H bridge
    Switching: 20 Khz Modulation
    Charging: Dynamic five stage charger to decrease charging time and increase battery life

PROTECTIONS:
Battery voltage
Inverter output voltage
Percentage of load
Mains voltage
Changer on/off
Solar charging /mains charging
Inverter standby on/off
UPS mode / inverter mode
Phase input output reverse : whether mains is connected to inverter output
Neutral and phase reverse : whether neutral and phase is connected reverse
Overload
Short circuit
Overload trip
Heavy load trip
Short circuit trip

 

 

Fig 1... dsp empty panel


Fig 2... testing o/put frequency


Fig 3... testing and loading


Fig 4... old dsp empty panel 


Fig 5... assembling



Fig 6... 3500va 48v dsp design

 
Fig 7... 3.5kva 48v dsp on calibration


Fig 8... complete dsp inverter 2  


Fig 9... 2400va dsp inverter  

 

 

dsp inverter card video link


To purchase new dsp green inverter panel (empty & complete)
Call- 08123206299, 08134573457

 If you have any question, feel free to comment on this post.... acecct.18f4550@gmail.com OR whatsapp me on :  +2348123206299
 
 DSP30F2010 SINEWAVE
Configuration video (30mins): https://www.youtube.com/watch?v=RijSafGgB1c

HEART BEAT PROJECT USING ATMEGA328

HEART BEAT PROJECT USING ATMEGA328P


PROJECT DESCRIPTION:

Heart rate, body temperature and blood pressure monitoring are very important parameters of human body. Doctors use various kind of medical apparatus like thermometer for checking fever or body temperature, BP monitor for blood pressure measurement and heart rate monitor for heart rate measurement.  Here we have used a heartbeat sensor module which senses the heartbeat by the pulse in ear, Heart rate ear clip kit contain a ear clip and a receiver module. The heart rate measure kit can be used to monitor heart rate of patient and athlete. The result can be displayed on a screen via the serial port and can be saved for analysis. The entire system has a high sensitivity, low power consumption and is very portable.

This simple project will allow you to visualize your heart rate result  through a  Bluetooth connection with an  android moblie phone using hc-06  Bluetooth module

COMPONENT:


  1. Atmega328p
  2. Heart rate ear clip
  3. LCD 16X 2
  4. Bluetooth module


Fig 1...  Heart rate ear clip






Fig 2...  HC-06 Bluetooth module





Fig 3... PCB design 


Fig 4... First test


Fig 5... Testing 1



Fig 6... Testing 2


Fig 7... Testing 3 

Here is the code:

//ACE TECHNOLOGY '15
//HEART BEAT AND BLUETOOTH RECIEVER
//AKINSINMIDE IMOLEAYO
//ATMEGA328
//ACECCT.BLOGSPOT.COM

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

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(5,6,7,8,9,10);

#include <SoftwareSerial.h>// import the serial library

SoftwareSerial Genotronex(12, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on / off
int BluetoothData; // the data given from Computer

#define LED 4 //indicator, Grove - LED is connected with D4 of Arduino
boolean led_state = LOW;//state of LED, each time an external interrupt
                //will change the state of LED
unsigned char counter;
unsigned long temp[21];
unsigned long sub;
bool data_effect=true;
unsigned int heart_rate;//the measurement result of heart rate

const int max_heartpluse_duty = 2000;//you can change it follow your system's request.
            //2000 meams 2 seconds. System return error
            //if the duty overtrip 2 second.
void setup()
{
    Genotronex.begin(9600);
  Genotronex.println(" HEART RATE MONITORING PROJECT ");
  delay (500);
  Genotronex.println(" BLUETOOTH DEVICE CONNECTED... "); 
  pinMode(ledpin,OUTPUT);
 delay (1000); // delay for lcd to boot up
    // initialize LCD and set up the number of columns and rows:
  lcd.begin(16, 2);
  delay (1000);
 
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("   HEART RATE   ");
  lcd.setCursor(0,1);
  lcd.print("    MONITOR     ");
  delay (2500);
   Genotronex.println(" HEART RATE MONITORING PROJECT ");

  pinMode(LED, OUTPUT);
  Serial.begin(9600);
  arrayInit();
    lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("   HEART RATE   ");
  lcd.setCursor(0,1);
  lcd.print(" TEST BEGIN.... ");
 
   Genotronex.println(" SCANNING PULSE BEGIN..... ");

  delay (2500);
  attachInterrupt(0, interrupt, RISING);//set interrupt 0,digital port 2



}
void loop()
{
  digitalWrite(LED, led_state);//Update the state of the indicator
}
/*Function: calculate the heart rate*/
void sum()
{
 if(data_effect)
    {
      heart_rate=1200000/(temp[20]-temp[0]);//60*20*1000/20_total_time
          lcd.clear();
    lcd.setCursor(0,1);
    lcd.print("Heartrate_is: ");
    lcd.print(heart_rate);
   Genotronex.println(" YOUR HEART_RATE IS: ");
   Genotronex.println(heart_rate);

   delay (1000);
    }
   data_effect=1;//sign bit
}
/*Function: Interrupt service routine.Get the sigal from the external interrupt*/
void interrupt()
{
    temp[counter]=millis();
  Serial.println(counter,DEC);    Serial.println(temp[counter]);
    digitalWrite(13, HIGH);
        lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(" SCANNING ......");
      lcd.setCursor(0,1);
    lcd.print("Heartrate_is: ");
    lcd.print(heart_rate);
  delay (50);
 digitalWrite(13, LOW );
    switch(counter)
  {

   case 0:
      sub=temp[counter]-temp[20];
      Serial.println(sub);
      break;
    default:
      sub=temp[counter]-temp[counter-1];
      Serial.println(sub);
      break;
  }
    if(sub>max_heartpluse_duty)//set 2 seconds as max heart pluse duty
  {
    data_effect=0;//sign bit
    counter=0;
       Genotronex.println(" HEART BEAT SENSOR IS NOT WELL CONNECTED.. ");
    lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("   HEART RATE   ");
  lcd.setCursor(0,1);
  lcd.print("  READS  ERROR  ");
  delay (2500);
arrayInit();
  }
    if (counter==20&&data_effect)
    {
    counter=0;
    sum();
    }
    else if(counter!=20&&data_effect)
    counter++;
    else
    {
    counter=0;
    data_effect=1;
    }
   
}
/*Function: Initialization for the array(temp)*/
void arrayInit()
{
  for(unsigned char i=0;i < 20;i ++)
  {
    temp[i]=0;
  }
  temp[20]=millis();
}
 


 If you have any question, feel free to comment on this post.... acecct.18f4550@gmail.com OR whatsapp me on :  +2348123206299
 
Heart rate project complete file can be downloaded  in the link below:
Link: Pcb design and code

Thursday 28 July 2016

SOLAR CHARGE CONTROLLER USING PIC16F876A (ZERO DROP)

ZERO DROP SOLAR CHARGE CONTROLLER

 

PROJECT DESCRIPTION:

This circuit degisn is called ‘zero drop solar charger’ because it doesn't have any diode drop of 0.7v. This is a mosfet based design which has very negligible voltage drop of  0.05v or less which means the loss is very less, ideal for solar applications.
       Since the drop is less, the losses are negligible so the efficiency achieved is > 99.5%

      In this the two n channel mosfets are connected in such a way that their sources become common and the drains will be connected to the negatives of battery and solar panel respectively and the gate will be triggered by the microcontroller (pic16f876a).

     The positives of solar panel and battery will be joined directly and the circuit was powered from that joint.

      When the solar power was present the circuit gets activated and micro-controller will pumps the signals that to trigger the gate of mosfet, when the gate was triggered the negative voltage will flow through the mosfet and then the battery will be charged through solar panel.
Specification: 
Voltage         12v - 96v
Current        10A - 60A
Efficiency    > 99.6%
Protection against : Panel reverse
                                   Battery reverse
                                   Battery Overcharge ( full charge cut - off level is settable )
Charger monitor  - 16 x 2 lcd display
Other feature - Opto - Coupler output for Charging signal to external circuits (like inverters)




fig 1... First design


fig 2... Connection and configuration


fig 3...Model design 



 fig 4... 12V - 48V design 



fig 5... configuration 1


fig 6... configuration 2


fig 7... configuration 3 




To purchase ZERO DROP SOLAR CHARGE CONTROLLER (empty & complete) 
Lagos (nigeria): Call- 09020322481
Akure (nigeria): Call- 08123206299
Email :  acecct.18f4550@gmail.com 

 If you have any question, feel free to comment on this post.
 
Zero drop charging complete file can be downloaded  in the link below:

 

Tuesday 2 February 2016

FINGER PRINT ACCESS CONTROL LOCK


FINGER PRINT ACCESS CONTROL USING FPM10A

In some situations, the use of keycards may not be suitable or sufficient. They can be lost, forgotten, given to someone else or manipulated. Some security environments require an exact verification of the user’s identity, which adds significantly to costs when done manually.
The most accurate and cost-efficient way to identify people is through biometric fingerprint system. A fingerprint cannot be stolen, which reduces security risk. It cannot be given to a colleague (by an employee), hence no more buddy punching. And a biometric fingerprint system costs a lot less than security guards.
     The featuring  mircontroller is the atmega326p with 32kb program memory size.

Fingerprint Recognition Module is : FPM10A which as the follwoing features:

Power supply voltage: DC 3.6~6.0V
Supply current: working current: <120mA
peak current: <140mA
The time of fingerprint image input: < 1 seconds
The window size: 14 x 18 mm
Profile: 256 bytes
Template file: 512 bytes
Storage capacity: 1000
False accept rate (FAR): < 0.001% (safety grade 3)
FRR (FRR): < 1% (safety grade 3)
The search time: < 1 seconds (1:500, mean)
Computer interface: UART (TTL logic level)
The communication baud rate (UART): (9600 x N) BPS where N=1 ~ 12 (the default value of N=6, namely 57600bps)
Working environment: temperature: -20°C to +50°C
Relative humidity: 40%RH to 85%RH (no treatment)
Storage conditions: temperature: -40°C to +85°C
Relative humidity: < 85%H (no treatment)
Dimensions (L * W * H):56 x 20 x 21.5mm



FPM10A  - Fingerprint Recognition Module



IST TEST WITH UNO AS SERIAL COMMUNICATOR


CIRCUIT DIAGRAM

COMPONENT SIDE 

 
 COPPER SIDE



PCB BOARD PRINTED


ASSEMBLING 1


 ASSEMBLING 2


FINISHED FINGER PRINT ACCESS CONTROL LOCK 



CODE:  // code written in c language

//ACE TECHNOLOGY '14
//FINGER PRINT ACCESS CONTROL
//ATMEGA328
//ACECCT.BLOGSPOT.COM

// set pin numbers:
const int ADD = 4;  // Funtion as both add and up key
const int  DELETE = 5; // Funtion as both delete and down key
const int  OK1 = 6; // ok KEY Funtion as both ok/ 1
const int DOWN0 = 7;  // down/0
int ID2 = 0;  

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

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);

int getFingerprintIDez();
//uint8_t getFingerprintEnroll(int id);

// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino  (YELLOW wire)
SoftwareSerial mySerial(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

// CUSTOM LCD CHARACTERS  -------------------------
byte LOCK[8] = {
  0b00000,0b01110,0b10001,0b10001,0b11111,0b11011,0b11011,0b11111,};
byte UNLOCK[8] = {
  0b00000,0b01110,0b10000,0b10000,0b11111,0b11011,0b11011,0b11111,};
//--------------------------------------------------

int buzzerdelay = 150; // delay funtion 1
int buzzerdelay2 = 200; // delay funtion 2

void setup() {

  //PIN MODES DEFINATION AND RESETING ALL VARIBLES TO ZERO
  pinMode(A0, OUTPUT);  // LED
  pinMode(A1, OUTPUT);  // BUZZER
  pinMode(A2, OUTPUT);  // RELAY1
  pinMode(A3, OUTPUT);  // RELAY2

  pinMode(ADD, INPUT); // input for the ADD KEY
  pinMode(DELETE, INPUT); // input for the DEL KEY
  pinMode(OK1, INPUT); // input for the UP/1 KEY
  pinMode(DOWN0, INPUT); // input for the DOWN/0 KEY

  digitalWrite(A0, LOW);  // DEACTIVATED DOOR_LED>>>     OFF
  digitalWrite(A2, LOW);  // DEACTIVATED DOOR_RELAY1>>>  OFF
  digitalWrite(A3, LOW);  // DEACTIVATED DOOR_RELAY2>>>  OFF

  // initialize LCD and set up the number of columns and rows:
  lcd.begin(16, 2);

  //DEFINE CGRAM CREATED CHAR
  lcd.createChar(1, LOCK);
  lcd.createChar(2, UNLOCK);
  //---------------------------------------------------------------

  //---------------- QUICK INTRO -------------------

  lcd.setCursor(2,0);
  lcd.print("FINGER PRINT");
  lcd.setCursor(1,1);
  lcd.print("ACCESS CONTROL");
  delay (2500);
  //------------------------------------------------

  // set the data rate for the sensor serial port
  finger.begin(57600);

  // Cheak if fp is well connected
  if (finger.verifyPassword()) {
    delay(1000);
    lcd.setCursor(0,1);
    lcd.print("  Sensor Found  ");
    delay (2500);
    BUZZ();   
    delay(2500);

  }
  else {
    lcd.setCursor(0,1);
    lcd.print("Sensor not Found");
    delay (2500);
    while (1);
  }


}


//----- BUZZING FUNTION ---------------
void BUZZ()
{
  digitalWrite(A1, LOW);
  delay(buzzerdelay2);
  digitalWrite(A1, HIGH);
  delay(buzzerdelay);
  digitalWrite(A1, LOW);
  delay(buzzerdelay2);
}
//-------------------------------------------


//----- DELETING COMMAND ---------------
void DELETE2()
{
  uint8_t id = 0;
  int count = 0;
  lcd.clear();
  lcd.setCursor(0,1);
  lcd.print(" Deleting  Mode ");
  delay (2500);

  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(" Type in the ID ");
  lcd.setCursor(0,1);
  lcd.print("You want to Del.");
  delay (2800);

  lcd.clear();
  for (int count = 0; count < 2000; count++) {
    //+++++++++++++++++++++++++++++++++++++++++++++++++++++
    if ( digitalRead(ADD) == LOW)
    {
      id = ++ID2;
    }
    //-------------------------------------------------
    if ( digitalRead(DELETE) == LOW)
    {
      id = ID2--;
    }
    //-------------------------------------------------
    lcd.setCursor(0,1);      
    lcd.print("Deleting ID: ");
    lcd.print(ID2);
    delay (250);
    //-------------------------------------------------
    if ( digitalRead(OK1) == LOW) // OK  KEY IS PRESSED
    {
      count = 2000;
      BUZZ();
    }

  }
  delay (3500);
  if ( digitalRead(OK1) == LOW )
  {
    lcd.clear();   //    WRONG COMBINATION....... KEY
    lcd.setCursor(0,0);
    lcd.print("     WRONG      ");
    lcd.setCursor(0,1);
    lcd.print("  COMBINATION   ");
    delay (2500);
    count = 2000;
  }
}

//----- ADDING COMMAND ---------------
void ADD2()
{
  uint8_t id = 0;
  int count = 0;
  lcd.clear();
  lcd.setCursor(0,1);
  lcd.print("Enrollment  Mode");
  delay (2500);

  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Enter the ID  #");
  lcd.setCursor(0,1);
  lcd.print("For this finger");
  delay (2500);

  lcd.clear();
  for (int count = 0; count < 2000; count++) {
    //+++++++++++++++++++++++++++++++++++++++++++++++++++++
    if ( digitalRead(ADD) == LOW)
    {
      id = ++ID2;
    }
    //-------------------------------------------------
    if ( digitalRead(DELETE) == LOW)
    {
      id = ID2--;
    }
    //-------------------------------------------------
    lcd.setCursor(0,1);      
    lcd.print("  Adding ID: ");
    lcd.print(ID2);
    delay (250);
    //-------------------------------------------------
    if ( digitalRead(OK1) == LOW) // OK  KEY IS PRESSED
    {
      count = 2000;
      BUZZ();
    }

  }
  delay (3500);
  if (digitalRead(OK1) == LOW )
  {
    lcd.clear();   //    WRONG COMBINATION....... KEY
    lcd.setCursor(0,0);
    lcd.print("     WRONG      ");
    lcd.setCursor(0,1);
    lcd.print("  COMBINATION   ");
    delay (2500);
    count = 2000;
  }
}

//_______________MAIN PROGRAM________________

void loop()  // Main loop
{
  uint8_t id = 0;
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(" Place Your  ");
  lcd.write(byte(1));
  lcd.setCursor(0,1);
  lcd.print("Finger To Unlock");

  //+++++++++++++++++++++++++++++++++++++++++
  if ( digitalRead(ADD) == LOW)
  {
    uint8_t id = 0;
    ID2 = 0;
    delay(1000); // wait for 1 second
    digitalWrite(A0, HIGH);  // ACTIVATED DOOR_LED
    BUZZ();
    delay(1000); // wait for 0.5 seconds
    digitalWrite(A0, LOW);  // ACTIVATED DOOR_LED
    ADD2();

    getFingerprintEnroll(id);
  }

  //+++++++++++++++++++++++++++++++++++++++++++++++

  //+++++++++++++++++++++++++++++++++++++++++
  if ( digitalRead(DELETE) == LOW)
  {
    uint8_t id = 0;
    ID2 = 0;
    delay(1000); // wait for 1 second
    digitalWrite(A0, HIGH);  // ACTIVATED DOOR_LED
    BUZZ();
    delay(1000); // wait for 0.5 seconds
    digitalWrite(A0, LOW);  // ACTIVATED DOOR_LED
    DELETE2();

    deleteFingerprint();
  }

  //+++++++++++++++++++++++++++++++++++++++++++++++

  getFingerprintIDez(); 
  delay(30);  // get finger print id(S) 
}


//___________________ADD____________________________

int getFingerprintEnroll(int id) {
  uint8_t p = finger.getImage();
  while (p != FINGERPRINT_OK) {
    p = finger.getImage();
     
    if (p == FINGERPRINT_OK) {// GET IMAGE ON WINDOW
      lcd.clear();
      lcd.setCursor(0,1);
      lcd.print("  Image  taken  ");
      BUZZ();

    }
    if (p == FINGERPRINT_NOFINGER) {// GET IMAGE ON WINDOW
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("   Place Your   ");
      lcd.setCursor(0,1);
      lcd.print("Finger To Enroll");
    }

  }

  p = finger.image2Tz(1);
  if (p == FINGERPRINT_OK) {//  convertion of image
    lcd.clear();
    lcd.setCursor(0,1);
    lcd.print("Image  converted");
    delay (1800);
    lcd.clear();
  }
  lcd.clear();
  lcd.setCursor(0,1);
  lcd.print(" Remove  finger ");
  delay (1800);
  lcd.clear();

  p = 0;
 
  while (p != FINGERPRINT_NOFINGER) {  //check if no finger on fingerprint
    p = finger.getImage();
  }
  p = -1;

  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print(" Place the same ");
  lcd.setCursor(0,1);
  lcd.print("  finger again  ");
  delay (2000);

  while (p != FINGERPRINT_OK) {
    p = finger.getImage();
    if (p == FINGERPRINT_OK) {// GET IMAGE ON WINDOW
      lcd.clear();
      lcd.setCursor(0,1);
      lcd.print("  Image  taken  ");
      BUZZ();
      delay (2000);
      lcd.clear();
    }

    if (p == FINGERPRINT_NOFINGER) {// GET IMAGE ON WINDOW
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("   Place Your   ");
      lcd.setCursor(0,1);
      lcd.print("Finger To Enroll");
    }
  }
   p = finger.image2Tz(2);
   if (p == FINGERPRINT_OK) {//  convertion of image
    lcd.clear();
    lcd.setCursor(0,1);
    lcd.print("Image  converted");
    delay (2200);
   }
  
  // convertion OK 
   p = finger.createModel();
  if (p == FINGERPRINT_OK) {
    lcd.clear();
    lcd.setCursor(0,1);
    lcd.print("Prints  matched!");
    delay (2500);
  }
  if (p == FINGERPRINT_ENROLLMISMATCH) {
    lcd.clear();  
    lcd.setCursor(0,0);
    lcd.print("  Fingerprints  ");
    lcd.setCursor(0,1);
    lcd.print(" did not match! ");
    delay (2500);
    return p;
  }
      lcd.clear();  
    lcd.setCursor(0,0);
    lcd.print("Ur  Fringerprint");
    lcd.setCursor(0,1);
    lcd.print(" ID Is:   ");
     lcd.print(ID2);
    delay (2500);
  p = finger.storeModel(ID2);
  if (p == FINGERPRINT_OK) {
    lcd.clear();
    lcd.setCursor(0,1);
    lcd.print(" Prints Stored! ");
    delay (3000);
  }
 
}

//___________________________________________________



//___________________DELETE____________________________
int deleteFingerprint( ) {
  uint8_t p = finger.deleteModel(ID2);
  p = finger.deleteModel(ID2);

  if (p == FINGERPRINT_OK) {// GET IMAGE ON WINDOW

    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("  Finger Print  ");
    lcd.setCursor(0,1);
    lcd.print("    Deleted!    ");
    delay (2800);
  }
}
//___________________________________________________


//Scan and search id image in database
int getFingerprintIDez() {
  uint8_t p = finger.getImage(); //=====

  if (p != FINGERPRINT_OK)  return -1;
  p = finger.image2Tz(); //=====
  if (p != FINGERPRINT_OK)  return -1;

  //--------- CONFIRMATION BUZZ ---------------- 
  digitalWrite(A1, HIGH);
  delay(buzzerdelay);
  digitalWrite(A1, LOW);
  delay(1500);    
  //--------------------------------------------

  p = finger.fingerFastSearch(); //=====

  if (p == FINGERPRINT_OK) {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("  Finger Print  ");
    lcd.setCursor(0,1);
    lcd.print("   Id Matched  ");
    delay (2000);
    lcd.clear();
    lcd.setCursor(0,1);
    lcd.print(" Your ID is: ");
    lcd.print(finger.fingerID);
    delay (2000);

    lcd.setCursor(0,0);
    lcd.print("Access Granted ");
    lcd.write(byte(2));
    lcd.setCursor(0,1);
    lcd.print("  DOOR  OPENED ");
    delay (1000);

    // Activate lock system
    delay(500);        //DELAY 0.5 Sec
    digitalWrite(A0, HIGH);  // ACTIVATED DOOR_LED
    digitalWrite(A2, HIGH);  // ACTIVATED DOOR_RELAY1>>>  ON
    digitalWrite(A3, LOW);  // DEACTIVATED DOOR_RELAY2>>>  OFF  
    delay (1500);
    digitalWrite(A0, HIGH);  // ACTIVATED DOOR_LED
    digitalWrite(A2, LOW);  // ACTIVATED DOOR_RELAY1>>>  ON
    digitalWrite(A3, LOW);  // DEACTIVATED DOOR_RELAY2>>>  OFF
    delay(500);        //DELAY 0.5Sec

    for (int count = 11; count >=0; count--) {
      lcd.clear();
      lcd.setCursor(0,0);
      lcd.print("Activating  lock"); // DISPLAY THE AMOUNT OF SECONDS
      lcd.setCursor(0,1);           // REMAINING
      lcd.print("In: ");
      lcd.print(count);
      lcd.print(" second(s)");
      delay(1000);        //DELAY 1 Sec
    }

    delay(500);        //DELAY 0.5 Secs
    digitalWrite(A0, HIGH);  // ACTIVATED DOOR_LED
    digitalWrite(A2, LOW);  // DEACTIVATED DOOR_RELAY1>>>  OFF
    digitalWrite(A3, HIGH);  // ACTIVATED DOOR_RELAY2>>>  ON
    delay(1500);

    //  DEFAULTING LOCK
    digitalWrite(A0, LOW);  // DEACTIVATED DOOR_LED>>>     OFF
    digitalWrite(A2, LOW);  // DEACTIVATED DOOR_RELAY1>>>  OFF
    digitalWrite(A3, LOW);  // DEACTIVATED DOOR_RELAY2>>>  OFF
    delay(2000); 
  }
  else if (p == FINGERPRINT_NOTFOUND) {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("  Finger Print  ");
    lcd.setCursor(0,1);
    lcd.print("  Not  Matched  ");
    delay (2000);
    return p;
  }

  return finger.fingerID;
}



Featured post

PURE SINE WAVE INVERTER WITH LED AND LCD

The inverter PCB is easy to assemble by following the label of the components to be inserted. The choice of the voltage to be used to power ...