Electronicdesign 4586 Xl analogmixedsignal150x155 3

Simple Interface Connects Sensor Output To Microcontroller

April 20, 2011
A way to apply the output of certain sensors to a TTL/CMOS-level iput on a microcontroller. Sensor must have an NPN output stage that can support a pullup to its power rail.

With just a few components, you can provide a translated signal from industrial and PLD sensors that connects safely to a microcontroller, with the added bonus of supplying 7.5 mA of regulated power.

It generally isn’t safe to connect programmable logic controller (PLC) and industrial sensor outputs directly to microcontrollers that need transistor-transistor logic (TTL) or CMOS signals, which can make such sensors difficult to use. This design (see the figure) provides a simple solution to the interface problem when the sensor uses an NPN output stage that can support a pullup resistor to sensor power (10- to 30-V range with 24 V typical). The translated signal output from this design is fully compatible with the input stages of TTL/CMOS circuits, can source 500 µA, and can sink over 100 mA.

The NPN pullup is split into two parts. The top part (R1) is a high-power, 1-W, 1k resistor. The lower part (R2) is a low-power, 1/4-W, 10k resistor that connects to the sensor’s NPN output transistor’s collector. Two additional parts finish the design: Zener diode D1 (with a value of either 5.1 or 3.3 V depending on the logic level required) and capacitor C1. Capacitor C2 is optional and only used for high-frequency noise suppression with sensors having low-frequency signal outputs.

The Zener diode serves two purposes in the design. Its main purpose is to set a constant, safe voltage for the translated signal output to protect the attached microcontroller. The diode’s other purpose is to provide, in combination with C1, a regulated output that can supply power to the microcontroller. The circuit’s current capacity is limited to 7.5 mA, but this is sufficient for running a low-power microcontroller and LCD display.

If used for noise suppression, C2 should have a value so the time constant R2 × C2 corresponds to one-third the sensor or PLC output’s maximum operating frequency. Sensors with a maximum frequency of 10 kHz and above do not need C2 because cable capacitance will provide sufficient filtering. A good quality twisted pair or coaxial cable on the signal output will provide the best results.

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

TTI Rail Transit Line Card

April 8, 2024
TTI stocks premier interconnect, passive and electromechanical components for rail systems as diverse as door control, HVAC and cabin entertainment, trackside safety, communications...

Littelfuse: Take Charge for Peak Performance in Material Handling Evs

April 8, 2024
As material handling electric vehicles such as automated guided vehicles (AGVs), autonomous mobile robots (AMRs) and forklifts become an integral part of Industry 4.0, Littelfuse...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!