Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A certain chemical processing plant has different chemicals stored in three diff

ID: 3731561 • Letter: A

Question

A certain chemical processing plant has different chemicals stored in three different tanks as shown in Fig 1. A level sensor in each tank produces a digital output HIGH when the level drops below a specified level. A microcontroller is required to control three valves (V1, V2 and V3) when any two or all the tanks drop below the minimum level. To open a valve the corresponding digital output should be HIGH and it should be LOW to close it The mbed microcontroller is used to control the system Write the program that can be used to control the system. Use buses to solve the problem V1 mbed Sensor 3 Sensor 2 Sensor 1 Tank 3 Tank 2 Tank 1 26 25

Explanation / Answer

CODE:

#include “mbed.h”

Int main ( )

Digital out D out (A 18);

Digital in Din (A16);

Digital in Din (A17);

{

                If

                (A15 & A16)/(A16 & A17)/(A17 & A15)=1

                Dout (A18)=1;

                Else

                Dout (A18)=0;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote