edurant.com > MSOE > SEED > Final > Design Documentation: Control Blocks: Supporting Subsystems

Control Blocks

The control subsystems work with the microcontroller to both receive input from the user and provide feedback to the user, as well as to control the actions of the supply subsystems. There are four control subsystems, the keypad, display, alarm, and master control relay. These subsystems are all connected directly to the microcontroller through various ports. Each is described in the following sections.

Supporting Subsystems

The control subsystems consist of a keypad, a keypad controller, an LCD panel, an alarm and a master control relay.

Keypad and Controller

The keypad is the input device for the system. It was determined that 20 keys would be required on the keypad. For the prototype only 16 have been used because the others are for scrolling between displayed screens of data and changing which variable supplies are selected. These functions do not have meaning in the prototype.

The keypad subsystem is comprised of the keypad and a keypad encoder. The keypad is a 5x4 matrix keypad, which has 9 pins as opposed to a single pole/common bus keypad, which would require 21 pins. The keypad encoder takes the 9-bit data from the keypad, debounces its response, and latches a 5-bit word which the processor can read. It then sends an interrupt signal to the processor to signify that data is available. The microcontroller requires an active low interrupt signal, so the signal from the keypad encoder must be inverted. The connections to the processor are shown in Table 2.

Table 2: Keypad I/O Configuration
Function Pins Direction
Keypad Data [MSB-LSB] Port F [5..1] Input
Keypad Interrupt Port F [7] Input

The schematic for the keypad subsystem is shown in Figure 7: Keypad Subsystem Schematic. The manufacturer's specifications for the components of the circuit are in Appendix G: Subsystem Hardware Specifications.

Keypad Schematic
Figure 7: Keypad Subsystem Schematic

LCD Display

The display is an Optrex DMC-40457 40 character by 4 line LCD panel (see specifications in Appendix G: Subsystem Hardware Specifications). The display is character-based and has features which minimize the work required of the processor. Some of these features include maintaining a cursor and being able to reset itself upon power up.

The display has eight data lines and four control lines. One of these control lines is not required since it is used for reading data from the display. Two of the remaining control lines are instruction start signals for each half of the display. The remaining control line selects between ASCII data input and function control input.

The display format is shown in Figure 2: Display Format on page 4 and the I/O configuration is shown in Table 3. The schematic is shown in Figure 8.

Table 3: LCD I/O Configuration
Function Pins Direction
Display Data [MSB-LSB] Port ADB [7…0] Output
Display Register Select Port G [7] Output
Display Enable 2 Port G [6] Output
Display Enable 1 Port G [5] Output

Display Schematic
Figure 8: LCD Display Schematic

Alarm

The alarm subsystem is quite simple. The alarm consists of an LED driven through an inverter by the microcontroller. The alarm is a visual cue to the user that an error condition has occurred. The alarm is activated by the firmware and remains on until the user intervenes and follows the instructions provided on the display. In future redesigns of the power supply an audio alarm can be integrated as well. The pin used by the alarm is described in Table 4.

Table 4: Alarm I/O Configuration
Function Pins Direction
Alarm Port G [4] Output

The schematic for the alarm is shown in Figure 9.

Alarm Schematic
Figure 9: Alarm Subsystem Schematic

Master Control Relay

The master control relay is used to interrupt the AC line voltage to the transformers for the supply output subsections. The relay does not interfere with the power provided to run the logic of the system, such as the power to the microcontroller or any of the supply subsystems. This is a solid state relay which allows the microcontroller to directly interrupt power any time the system is in the stopped state. In future updates a COP subsystem could also have control over this relay which would help ensure that if the microcontroller were to lose control of the system, the power would be interrupted as well. The pin assignment for the master control relay is shown in Table 5 and its schematic is shown in Figure 10.

Table 5: Master Control Relay I/O Configuration
Function Pins Direction
Master Control Enable Port F [0] Output

Master Control Relay
Figure 10: Master Control Relay Schematic

Summary of Support Subsystems I/O Utilization

Since the processor must be able to control a maximum variable supply of 35V in 50mV increments, [eqn] data bits are required. Depending on the calibration of the hardware, this means the actual precision on the variable supplies is better than 40mV.

Table 6 summarizes the required input and output pins. Although this number could be reduced through multiplexing, it was decided that avoiding multiplexing would greatly simplify the design and debugging of the prototype.

Table 6: I/O Pin Requirements
Description Type Pins
Supply Select O 2
Supply Polarity O 1
Supply I/V O 1
Data to Supply O 10
Data to Supply Latch (R/W) O 1
Data from Supply I 10
Data to Display O 8
Control Signals to Display O 3
Data from Keypad Controller I 5
Keypad Interrupt I 1
Alarm LED Control O 1
Cut-Off (On/Off) O 1
Total Output 28
  Input 16