September 2018

Tuesday, September 25, 2018

Liquid Filling Machine Using Arduino Flow Rate Sensor

35 comments :

Liquid Filling Machine Using Arduino Flow Rate Sensor





CODING OF THIS PROJECT:-
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
#include <Keypad.h>
#define Password_Length 4

int signalPin = 12;

char Data[Password_Length]; 
char Master[Password_Length]; 
byte data_count = 0, master_count = 0;
bool Pass_is_good;
int customKey;
int sum=0;
const byte ROWS = 4;
const byte COLS = 4;

char hexaKeys[ROWS][COLS] = {
  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins[ROWS] = {9, 8, 7, 6};
byte colPins[COLS] = {5, 4, 3, 1};

Keypad customKeypad = Keypad(makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);

byte statusLed    = 13;
byte sensorInterrupt = 0;  // 0 = digital pin 2
byte sensorPin       = 2;

// The hall-effect flow sensor outputs approximately 4.5 pulses per second per
// litre/minute of flow.
float calibrationFactor = 1;

volatile byte pulseCount;  

float flowRate;
unsigned int flowMilliLitres;
unsigned long totalMilliLitres;

unsigned long oldTime;
LiquidCrystal_I2C lcd(0x3F, 16, 2);

void setup()
{
  lcd.begin();
  lcd.backlight();
  pinMode(signalPin, OUTPUT);
  
  // Initialize a serial connection for reporting values to the host
  Serial.begin(9600);
   
  // Set up the status LED line as an output
  pinMode(statusLed, OUTPUT);
  digitalWrite(statusLed, HIGH);  // We have an active-low LED attached
  
  pinMode(sensorPin, INPUT);
  digitalWrite(sensorPin, HIGH);

  pulseCount        = 0;
  flowRate          = 0.0;
  flowMilliLitres   = 0;
  totalMilliLitres  = 0;
  oldTime           = 0;

  // The Hall-effect sensor is connected to pin 2 which uses interrupt 0.
  // Configured to trigger on a FALLING state change (transition from HIGH
  // state to LOW state)
  attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
}

/**
 * Main program loop
 */
void loop()
{
      lcd.setCursor(0,0);
  lcd.print("Entr Amont in ml");
customKey = customKeypad.getKey();
  if (customKey){
    Data[data_count]=customKey-48; 
    lcd.setCursor(data_count,1); 
    lcd.print(Data[data_count]); 
    sum=sum+Data[data_count];
    data_count++; 
    }
    if( data_count==3)
    {    
 digitalWrite(signalPin, HIGH);
 delay(990*sum);
  sum =sum*100;
 lcd.setCursor(0,1);
lcd.print(sum); 
digitalWrite(signalPin, LOW);
     clearData();  
  }
   
   if((millis() - oldTime) > 1000)    // Only process counters once per second
  { 
    detachInterrupt(sensorInterrupt);
    flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor;
    oldTime = millis();
    flowMilliLitres = (flowRate / 60) * 1000;
    // Add the millilitres passed in this second to the cumulative total
    totalMilliLitres += flowMilliLitres;
     unsigned int frac;
     // Print the flow rate for this second in litres / minute
    Serial.print("Flow rate: ");
    Serial.print(int(flowRate));  // Print the integer part of the variable
    Serial.print("L/min");
    Serial.print("\t");       // Print tab space
    // Print the cumulative total of litres flowed since starting
    Serial.print("Liquid Quantity: ");        
    Serial.print(totalMilliLitres);
    Serial.println("mL"); 
   Serial.print("\t");       // Print tab space
  Serial.print(totalMilliLitres/1000);
  Serial.print("L");
    
   
    
// Reset the pulse counter so we can start incrementing again
    pulseCount = 0;
    
    // Enable the interrupt again now that we've finished sending output
    attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
  }
  if(sum < totalMilliLitres ){
      digitalWrite(signalPin, LOW);
    lcd.clear();
      lcd.setCursor(0,1);
   lcd.print ("In=");
     lcd.setCursor(3,1);
lcd.print(sum); 
     lcd.setCursor(0,0);
  lcd.print ("Amount Delivered");
    lcd.setCursor(6,1);
   lcd.print (",Out=");
  lcd.setCursor(11,1);
  lcd.print(sum,DEC);   // print the Flow Rate
  lcd.setCursor(14,1);
  lcd.print ("ml");
   delay(60000);
   lcd.clear();
    clearData();
   } 
}
void pulseCounter()
{
  // Increment the pulse counter
  pulseCount++;
}
void clearData(){
  while(data_count !=0){
    Data[data_count--] = 0; 
  }
  return;
}



Friday, September 21, 2018

PCB Making Tutorial

No comments :

Proteus is very user friendly software for simulation and PCB designing as well. Consider following points In ISIS while placing a component, make sure your components have PCB packages (Shown in PCB preview), otherwise you have to add it manually. After building you circuit in ISIS, to to Tools Netlist to ARES In ARES, first draw the border of PCB. Place the components manually or you can use ‘Auto placer’, Tools Auto Placer Now wire all the components manually, by following connection guiding lines or you can use ‘Auto router’, Tools Auto router After placement and routing, you PCB is ready, now you can visualize you PCB using 3D visualizer, which is really a great feature of proteus. You can export your design in PDF to take printout for actual PCB manufacturing from Output Export graphics Export PDF file facebook page link https://www.facebook.com/projectnprod...

Volt Amp Meter Circuit

No comments :
DC 0-100V 10A Digital Voltmeter Ammeter Dual Display 10A Voltage Detector Current Meter Panel Amp Volt Gauge 0.28" Red Blue LED Features: Size: 48mm x 29mm x 21mm. Display color: Red & Blue LED (dual display). Display: 0.28" LED digital. Operating voltage: DC 4.5 ~ 30V. Measure voltage: DC 0 ~ 100V. Minimum resolution (V): 0.1V. Refresh rate: ≥500ms / times. Measure accuracy: 1% (± 1 digit). Minimum resolution (A): 0.01A. Operating Current: 20mA. Measure current: 10A (direct measurement, built-in shunt). Operating temperature: -10 to 65°c. Operating Humidity: 10 to 80% (non-condensing). Mounting cutout: 45.5mm x 26.1mm. NOTE: The voltage between the thin red and thin black lines must be within DC 4.5-30V The ammeter can only be connected to the negative of the device under test It is unsuitable to use this meter to test current less than 1A ,if you use it to test ampere below 1A,it will have big error.

Home Automation Circuit

2 comments :
Home automation on the other hand involves automating the household environment. This is possible because of the smartphones and internet that we are widely using. Home automation can be again divided in to just controlling the appliances using a smartphone from a remote location and another type filled with sensors and actuators which controls the lighting, temperature, door locks, electronic gadgets, electrical appliances etc. using a “Smart” system.
In this project, we will design a simple home automation project using simple components using which different electrical appliances can switched on or off. The project is based on Arduino and we have used Arduino UNO for the project.


Thursday, September 20, 2018

Variable Power Supply

No comments :
A power supply can be given from the battery or from a hardware circuitry which converts the AC supply into the DC supply or step-down AC to step-up AC and vice-versa. A variable power supply is one which facilitates the user to vary and adjust the desired output voltage and output current.