Week #15: (4/30-5/4) Microprocessor Interfacing

Post Reply
rjagodowski
Posts: 1412
Joined: Fri Sep 04, 2015 6:59 pm

Week #15: (4/30-5/4) Microprocessor Interfacing

Post by rjagodowski » Sun Apr 29, 2018 6:20 pm

Today we will investigate the concepts of interfacing microcontrollers to other devices. Some examples of interfacing are given in the experiments many of you are doing in the EET-250 Control Systems Incubator Project. The pictorial diagram for the circuits is here:
Fig. 6-18 Incubator Pictorial Diagram from Process Control Text.jpg
Fig. 6-18 Incubator Pictorial Diagram from Process Control Text.jpg (202.8 KiB) Viewed 101 times
An annotated schematic for the circuits is here:
Annotated_Incubator_Schematic.jpeg
Annotated_Incubator_Schematic.jpeg (64.33 KiB) Viewed 101 times
The Incubator circuit schematic shown above includes both bipolar junction transistor (2N3904) and a MOSFET (BS170) devices to control loads with current and/or voltage requirements greater than can be supplied by the BS2 I/O ports directly. Remember that from the BS2 Syntax and Reference Manual, the individual outputs of the BS2 are limited to 20/25 (sourcing/sinking) milliamps per output, and 40/50 (sourcing/sinking) milliamps per bank of 8. In both cases, the maximum output voltage of the BS2 is 5 volts. So from a power perspective, the maximum output power available from a single bit on the BS2 is I*V = (25mA)*(5V) = 0.125W = 125 mW. This is a pretty low power dissipation, so interfacing outputs to higher voltage/current loads is a common requirement.

As an example of the power controlled by the BS2 in the heater (100 ohm resistor) of the incubator can be calculated as such. Assuming the power supply to the heater circuit is 9V, the power dissipated by the 100 ohm resistor when the 2N2904 goes into saturation is approximately (9V)^2/100 = or about 810 mWatts. That's about 6.5 times more power than the BS2 output could provide without the aid of the transistor interface circuit.

The MOSFET does the same thing for the fan controller.

Another example of an interface circuit in this schematic is the LM358 being used as a Buffer Amplifier. The PWM output on P10 is filtered by the RC network to produce an approximate DC voltage of about 0.5V. The input impedance on Pin 5 of the ADC0831 has a fairly low impedance and it would load the RC filter output and cause too much variation (ripple). So by using the LM358 Buffer Amplifier, P10 "sees" a high-impedance op-amp input and the signal needed by the ADC0831 is supplied by the low output impedance of the op-amp.


Interfacing circuits is a common requirement in many areas. The evening students last year used a "Coin Acceptor" which operates on 9VDC. It creates output pulses between 0V and 9V depending upon the coin inserted. They need to connect this output to the PLC as the PLC is going to tally the money inserted to purchase the product. The PLC inputs required 24VDC. The "open collector" output of comparators such as the LM311 can be used to "translate" the 0-9VDC pulses to the 0-24VDC pulses required by the PLC inputs. Many integrated circuits are available with "O.C." (Open Collector) outputs to facilitate the interfacing between different signal levels. Even many of the TTL logic chips used in EET-210 have versions available with O.C. outputs.
LM311 Data Sheet.pdf
(1.76 MiB) Downloaded 10 times
Input Interfacing Circuits from Electronics-Tutorials.ws.

Output Interfacing Circuits from Electronics-Tutorials.ws.


Note that relays can often be used for input and output interfacing. The biggest detriment of relays is that they are slow compared to electronic switching methods and are subject to wear and deterioration over time due to contact point degradation. Here are some Relay Interfacing Circuits using the Arduino microcontroller. We'll be discussing the Arduino next class.

Here's how to Use the L293 to Create an H-Bridge for DC motor control. You should be familiar with the L293 as it was used to control the stepper motor in one of your experiments.

H-Bridges: The Basics and available for download as this pdf:
h-bridges-the-basics.pdf
(76.02 KiB) Downloaded 11 times

Post Reply

Return to “EET-260 Lecture”