📝 8085 Microprocessor Based Water Level Controller (18 MCQs)
Automatic Pump Control According to Tank Water Level
An 8085-based water-level controller monitors the amount of water in a tank and operates a pump according to predefined limits. Level sensors provide signals to the microprocessor through input ports, while output circuitry controls the pump contactor or relay. Software evaluates the sensor states and starts or stops pumping to maintain an adequate supply without unnecessary operation.
Level Sensors and Programmable Input Connections
Conductive probes, float switches or other level sensors can detect selected water positions. Their signals are connected to input ports, commonly through an 8255 PPI. Suitable input conditioning and electrical isolation protect the digital interface. Multiple sensors can represent low, intermediate and high levels for more detailed control.
Decision Logic for Pump Starting and Stopping
When the water falls below the low-level threshold, software activates the pump output. Pumping continues while the level rises, and the high-level sensor causes the controller to stop the pump. Using separate start and stop thresholds prevents frequent switching when the water level fluctuates around one boundary.
Example of Maintaining Water Between Two Sensor Levels
Suppose a tank has a lower probe and an upper probe. When the water falls below the lower probe, the 8085 activates the pump through a relay driver. When the upper probe becomes immersed, the controller deactivates the pump. The stored pump state maintains operation between the two thresholds.
Overflow Protection and Pump-Dry-Run Monitoring
An additional overflow sensor can provide an independent emergency stop, while a source-tank sensor can prevent pumping when supply water is unavailable. Software may also use a maximum run-time limit to detect abnormal filling. These protections improve reliability, but the pump's electrical power circuit must be isolated and rated separately from the microprocessor interface.
Correcting Errors in Water-Level Decision Logic
'One sensor always controls both starting and stopping' is incorrect because separate thresholds provide stable hysteresis. 'The 8085 can switch a pump directly' is incorrect because a rated contactor or relay driver is required. 'An upper-level sensor replaces overflow protection completely' is incorrect because an independent safety cutoff can protect against sensor failure.
Sensor-State Tables and Pump Logic in Examinations
Construct a truth table for low- and high-level sensor conditions and determine when the pump should run. Trace input signals through the 8255 and output driver, and explain the stored pump state between thresholds. Identify overflow, dry-run and maximum-time protection as separate reliability measures.
Water-Level Detection and Pump-Control Terms
- Level Probe - Detects water at a selected height.
- Float Switch - Changes state with water level.
- Low-Level Threshold - Pump-starting boundary.
- High-Level Threshold - Pump-stopping boundary.
- Hysteresis - Separates switching thresholds.
- Dry-Run Protection - Prevents operation without water supply.
📝 All 8085 Microprocessor Based Water Level Controller MCQs
Q1. Which microprocessor is commonly used in the water level controller design discussed?
📖 Explanation: The design relies on the 8085 because it provides an 8‑bit data bus, built‑in instruction set for I/O handling, and is widely supported in educational kits. The other processors either have a different architecture (8086, 8088) or lack the specific peripheral support needed (8051). Using the 8085 ensures compatibility with the monitor programs and display routines, making it the logical choice for this controller.
Q2. How many seven‑segment displays are used to show hours and minutes in the described system?
📖 Explanation: The system uses four seven‑segment units for the address field to represent the two‑digit hour and two‑digit minute values. Two additional displays show seconds, but the question focuses on hours and minutes only. Two displays would be insufficient for two‑digit values, while six or eight exceed the required count, leading to wasted resources. Therefore, four displays correctly match the design requirement.
Q3. Why is Binary‑Coded Decimal (BCD) conversion necessary when displaying time on seven‑segment displays?
📖 Explanation: Seven‑segment displays are driven by patterns that represent each decimal digit (0‑9). BCD stores each digit in a four‑bit nibble, allowing the microprocessor to translate the value directly into the segment code without additional arithmetic. The other options are unrelated: BCD does not affect power, execution speed significantly, nor does it involve networking. Hence, BCD conversion is essential for straightforward display driving.
Q4. What advantage does using a monitor program located at address 05D0H provide in the water level controller?
📖 Explanation: The monitor routine at 05D0H reads specified memory locations and updates the seven‑segment displays, allowing the current time or water level data to be shown without writing custom display code. It does not perform calibration, PWM generation, or power regulation, which are handled by separate routines. By reusing this routine, the programmer saves development time and ensures consistent display formatting.
Q5. In a scenario where the tank overflows, which instruction sequence correctly detects a high‑level signal and activates an alarm output?
📖 Explanation: The correct sequence reads the input port (IN 00H), compares the received byte with the high‑level pattern (CPI 01H), and jumps to the alarm routine when the zero flag is set (JZ ALARM). Option A merely moves data and jumps unconditionally, option B compares without reading the input, and option C uses logical AND which does not isolate the high‑level bit. Therefore, D implements the proper detection and response.
Q6. How does initializing registers A and B with 00 h or 01 h before calling the display routine affect program flexibility?
📖 Explanation: The monitor routine interprets the values in registers A and B as flags indicating which memory locations (address field versus data field) should be sent to the seven‑segment displays. By setting them to 00 h or 01 h, the same routine can be reused for different display purposes, enhancing modularity. The other choices involve unrelated system settings such as time format, clock frequency, or interrupt handling, which are not controlled by these registers in this context.
Q7. If a water‑level sensor outputs a voltage proportional to height from 0 V (empty) to 5 V (full) for a 0‑100 cm tank, which ADC resolution is required to distinguish 5 cm increments?
📖 Explanation: The ADC must differentiate 5 cm steps, which is 5 % of the 0‑100 cm range, requiring at least 20 distinct levels. A 6‑bit ADC provides levels, comfortably exceeding the minimum, while a 5‑bit (not offered) would also suffice but is not an option. Therefore, the 6‑bit resolution is the least that meets the requirement, making option A correct. The higher‑resolution choices are unnecessary and would increase cost without benefit.
Q8. A designer wishes to monitor a second tank using the same 8085 controller without adding many I/O pins. Which technique best achieves this goal?
📖 Explanation: Multiplexing allows several sensor signals to share a single input port by selecting them sequentially with a decoder, preserving the limited I/O lines of the 8085. Adding external RAM or increasing clock speed does not address the pin limitation, and switching to a 16‑bit processor would change the entire architecture, contrary to the goal of minimal hardware change. Thus, option A provides an efficient solution.
Q9. Why is it important to debounce the water‑level switch inputs in the controller circuit?
📖 Explanation: Mechanical switches tend to bounce, producing several quick on‑off pulses when actuated. Without debouncing, the microprocessor could interpret these as multiple level changes, causing false alarms or erratic pump operation. Debouncing circuits (hardware RC filters or software delays) filter out these spurious transitions, ensuring a single clean event is registered. The other options describe unrelated effects such as voltage scaling, signal amplification, or clock synchronization, which do not address the bounce issue.
Q10. During testing, the controller resets after exactly 60 seconds. Which cause is most likely?
📖 Explanation: A 16‑bit timer counting at 1 kHz will overflow after seconds, but many designs use a prescaler that results in a 60‑second overflow, causing the program to restart if not handled. Stack overflow typically manifests after many nested calls, not a fixed interval. Power sag would cause erratic behavior, not a precise reset, and an incorrect opcode would halt execution immediately. Therefore, the periodic reset points to a timer overflow, making option A correct.
Q11. How does the real‑time clock routine keep accurate one‑second intervals without an external crystal oscillator?
📖 Explanation: In many educational kits, a software loop counts a known number of instruction cycles that correspond to one second, based on the processor’s fixed clock frequency. This method does not rely on external crystal hardware. The other options involve hardware components (RTC chip), user interaction (button interrupts), or runtime clock adjustments, none of which are employed in the described simple clock implementation. Thus, the loop‑based timing is the correct mechanism.
Q12. In implementing a PID controller for water level, which term of the algorithm reacts to the rate of change of the level error?
📖 Explanation: The derivative component of a PID controller computes the slope of the error signal, providing a damping action that counteracts rapid changes in water level. The proportional term scales the current error, the integral accumulates past errors, and feed‑forward is an external prediction not part of classic PID. Recognizing the derivative’s role is essential for tuning the controller to avoid overshoot while maintaining responsiveness, making option B the accurate choice.
Q13. A pump delivers 10 L/min, while the tank receives an inflow of 6 L/min. To keep the water level steady, what PWM duty cycle should be applied to the pump driver assuming linear flow‑to‑duty relationship?
📖 Explanation: The pump must provide only the excess 4 L/min (10 L/min × duty = 6 L/min + excess). Setting duty = yields 60 % of the pump’s capacity, delivering exactly 6 L/min, matching the inflow and maintaining a constant level. A 40 % duty would be insufficient, 80 % and 100 % would cause overflow. Therefore, option B correctly reflects the required duty cycle.
Q14. Why is storing calibration constants in non‑volatile EEPROM preferable to RAM for this water level controller?
📖 Explanation: Calibration constants define sensor scaling and must persist across power cycles; EEPROM preserves these values without power, ensuring the controller resumes accurate operation after a shutdown. RAM loses its contents when power is removed, requiring re‑calibration each start‑up. EEPROM is generally slower and consumes more power than RAM, and it does not affect interrupt handling, so the other options are incorrect. Hence, data retention is the primary advantage, making option A correct.
Q15. The sensor outputs 0‑10 V but the microprocessor’s ADC accepts 0‑5 V. Which circuit should be placed before the ADC to adapt the signal?
📖 Explanation: A simple resistive voltage divider reduces the 0‑10 V range to 0‑5 V proportionally, matching the ADC’s input limits and protecting the microprocessor from over‑voltage. A step‑up transformer would increase voltage, a low‑pass filter only removes high‑frequency noise, and a voltage follower buffers the signal without scaling. Therefore, the voltage divider is the appropriate solution, making option D correct.
Q16. What effect does increasing the interrupt service routine (ISR) latency have on the accuracy of water‑level measurements?
📖 Explanation: ISR latency is the delay between an interrupt request and the execution of its handler. If the latency is too long, the controller may not service the sensor interrupt quickly enough to capture fast transients, leading to missed or outdated level readings. This does not enhance resolution, speed, or debouncing; rather, it degrades real‑time responsiveness. Consequently, option C correctly identifies the negative impact of increased latency.
Q17. To create a failsafe that shuts down the pump after five consecutive seconds of invalid sensor data, which logic sequence is most appropriate?
📖 Explanation: Maintaining a counter that increments only when the sensor data is flagged invalid and resets when valid data arrives ensures that only a sustained fault triggers the shutdown after exactly five seconds. A single flag would cause immediate shutdown, continuous polling lacks timing, and resetting the processor on the first error is overly drastic. The counter approach provides precise, time‑based fault detection, making option A the correct implementation.
Q18. When expanding the system to monitor three tanks, the programmer opts for a circular buffer to store time stamps. What is the primary benefit of this structure?
📖 Explanation: A circular buffer uses a fixed‑size array with head and tail pointers, allowing new time stamps to be inserted in O(1) time while automatically discarding the oldest record when the buffer is full. This prevents memory overflow and keeps recent data readily available. It does not provide unlimited memory, nor does it inherently simplify arithmetic or correct errors. Therefore, the efficient, constant‑time management of recent entries is the key advantage, making option A correct.