Question

In: Computer Science

Using arduino 1 In a certain chemical processing plant, a liquid chemical element is used in a manufacturing process.

 Using arduino 1  In a certain chemical processing plant, a liquid chemical element is used in a manufacturing process. This chemical element is stored in three different tanks. A level sensor in each tank according to the figure generates a HIGH level voltage when the liquid level in the tank falls below 25%. Design a circuit with Arduino to monitor the level of the chemical element that will trigger an alarm when the level of AT LEAST 2 tanks drops below 25%. Note: Simulate the sensors with switches or cables connected directly to 5V or Ground and the alarm with an LED. and make a flow chart

Solutions

Expert Solution

Note : check attached image for output and program .Schematic designed in Proteus and Flow chart in Paint.

Schematic :

  1. ALARM LED connected to PIN 2 of Arduino Uno Baord.
  2. Level switch 1,2,3 cpnnected to PIN 3,4,5, of Arduino UNO Board.

FlowChart :

Program :

const int LED= 2; //Pin LED

int button1=3; //switch Pin
int button2=4;
int button3=5;

int buttonStatus=0;

int switchFlag1=0;
int switchFlag2=0;
int switchFlag3=0;

void setup()

{

pinMode(LED, OUTPUT); //set OUTPUT to LED PIn

pinMode(button1, INPUT); //set INPUT to switch pin
pinMode(button2, INPUT);
pinMode(button3, INPUT);


delay(100);

}

void loop()
{
buttonStatus = digitalRead(button1); //read button 1 status
if (buttonStatus == HIGH)
switchFlag1=1; //set flag
else
switchFlag1=0;
  
  
  
  
buttonStatus = digitalRead(button2); //read button 2 status
if (buttonStatus == HIGH)
switchFlag2=1;
else
switchFlag2=0;
  
  
  
buttonStatus = digitalRead(button3); //read button 3 status
  
if (buttonStatus == HIGH)
switchFlag3=1;
else
switchFlag3=0;
  
if(switchFlag1==1 && switchFlag2==1) //if tank1 and tank 2 have less than 25%
{
   digitalWrite(LED,HIGH);
   switchFlag1=0;
   switchFlag2=0;
   switchFlag3=0;
}
else if(switchFlag1==1 && switchFlag3==1) //if tank1 and tank 3 have less than 25%
{
   digitalWrite(LED,HIGH);
   switchFlag1=0;
   switchFlag2=0;
   switchFlag3=0;
}
else if(switchFlag2==1 && switchFlag3==1) /if tank 2 and tank 3 have less than 25%
{
   digitalWrite(LED,HIGH); //set led high
   switchFlag1=0; reset flag of switch
   switchFlag2=0;
   switchFlag3=0;
}
else //no one than set led low
{
   digitalWrite(LED,LOW);
   switchFlag1=0;
   switchFlag2=0;
   switchFlag3=0;
}
  
  
delay(1000);
  
  
}


Related Solutions

A new chemical plant will be constructed. The following data is used for this construction. Using...
A new chemical plant will be constructed. The following data is used for this construction. Using this data; Draw the Cumulative Cash Flow Diagram for Nondiscounted and Discounted after-tax cash flows. Define the profitability criteria for each Cash Flows (Nondiscounted and Discounted) Calculate and show, PBP, CCP, CCR, ROROI, DPBP, NPV, DCFROR on the Cash Flow Diagram. DATA: Cost of Land, L           : 5x106 TL FCI, during year 1       : 7x106 TL FCI, during year 2       : 30x106 TL FCI,...
3) Ego Manufacturing produces a pesticide chemical and uses process costing. There are three processing departments—Mixing,...
3) Ego Manufacturing produces a pesticide chemical and uses process costing. There are three processing departments—Mixing, Refining, and Packaging. On January 1, the Refining Department had 2,000 gallons of partially processed product in production. During January, 33,000 gallons were transferred in from the Mixing Department, and 29,000 gallons were completed and transferred out. At the end of the month, there were 6,000 gallons of partially processed product remaining in the Refining Department. See additional details below. Refining Department, beginning balance...
Zymosis Manufacturing produces a pesticide chemical and uses process costing. There are three processing departmentslong dash​Mixing,...
Zymosis Manufacturing produces a pesticide chemical and uses process costing. There are three processing departmentslong dash​Mixing, ​Refining, and Packaging. On January​ 1, the Refining Department had 4 comma 000 gallons of partially processed product in production. During​ January, 35 comma 000 gallons were transferred in from the Mixing​ Department, and 31 comma 000 gallons were completed and transferred out. At the end of the​ month, there were 8 comma 000 gallons of partially processed product remaining in the Refining Department....
Ego Manufacturing produces a pesticide chemical and uses process costing. There are three processing departmentslong dash—​Mixing,...
Ego Manufacturing produces a pesticide chemical and uses process costing. There are three processing departmentslong dash—​Mixing, ​Refining, and Packaging. On January​ 1, the Refining Department had 3 comma 0003,000 gallons of partially processed product in production. During​ January, 33 comma 00033,000 gallons were transferred in from the Mixing​ Department, and 29 comma 00029,000 gallons were completed and transferred out. At the end of the​ month, there were 7 comma 0007,000 gallons of partially processed product remaining in the Refining Department....
4. A manufacturing plant produces memory chips to be used in cardiac pacemakers.The manufacturing process produces...
4. A manufacturing plant produces memory chips to be used in cardiac pacemakers.The manufacturing process produces a mix of “good” chips and “bad” chips. The lifetime of good chips follows an exponential law with a rate of failure ??, that is: P[chip still functioning after time ?] = ?−?t The lifetime of bad chips also follows an exponential law, but with a much faster failure rate of 500*?. a. Suppose the fraction of bad chips in a typical batch is?.What...
suppose that a food processing plant and a chemical factory are located close to each other...
suppose that a food processing plant and a chemical factory are located close to each other on the banks of a river. The chemical factory uses the river to discharge its emissions. The food processing plant (located somewhere downstream) suffers damages from the emissions as it requires clean water for its operations. Assuming MAC = 240-2E and MD = 3E, answer the following questions. Draw this diagram before answering the questions below. You will be asked to upload the diagram...
Suppose that a food processing plant and a chemical factory are located close to each other...
Suppose that a food processing plant and a chemical factory are located close to each other on the banks of a river. The chemical factory uses the river to discharge its emissions. The food processing plant (located somewhere downstream) suffers damages from the emissions as it requires clean water for its operations. Assuming MAC = 240-2E and MD = 3E, answer the following questions. Draw this diagram before answering the questions below. You will be asked to upload the diagram...
Using Arduino to blink an LED in morse code. Morse code is used as one of...
Using Arduino to blink an LED in morse code. Morse code is used as one of the methods for communications. It consists of a series of “dit” and “dah” symbols. (i) Develop an Arduino program to produce a Morse code to express the phrase “We are students” using Pin #13 (connect an LED that is in series with a 220-Ω resistor to Pins #13 to view the information sent via the Morse code). Express one “dit” with LED on for...
Three return steam lines in a chemical processing plant enter a collection tank operating at steady...
Three return steam lines in a chemical processing plant enter a collection tank operating at steady state at 5 bar. Steam enters inlet 1 with flow rate of 2 kg/s and quality of 0.9. Steam enters inlet 2 with flow rate of 2 kg/s at 200°C. Steam enters inlet 3 with flow rate of 1.2 kg/s at 95°C. Steam exits the tank at 5 bar. The rate of heat transfer from the collection tank is 40 kW. Neglecting kinetic and...
What are the two principle methods for the layout of process equipment in a chemical plant?
What are the two principle methods for the layout of process equipment in a chemical plant?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT