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

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

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