GPIO Design Guidelines

Publisher:CreativeDreamerLatest update time:2018-07-11 Keywords:GPIO Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As a commonly used switch control signal, GPIO is widely used in data acquisition and drive control in the industrial field. When GPIO is configured as DI and DO, are the design specifications of dry nodes and wet nodes consistent? When GPIO is configured as DI acquisition, should the isolation solution be relay isolation or optocoupler isolation?


1. What is DI/DO?


DI: Digital input, which converts the digital signals in the production process into "0" and "1" signal states that are easily recognized by computers.


DO: Digital output, converts the weak digital signal output by the computer into "0" and "1" signal states that can control the production process.


2. Introduction of dry and wet nodes of DI/DO


Definition of dry contact:

Passive switch, with two states of closed and open, no polarity between the two contacts, can be interchanged;


    Common dry nodes: limit switches, travel switches, rotary switches, temperature switches, various buttons, and outputs of various sensors, etc.


The definition of a wet contact is: an active switch; it has two states: energized and de-energized; there is polarity between the two contacts and they cannot be reversed.


Common wet nodes include: the collector output and VCC of NPN transistor, the collector output and VCC of Darlington transistor, the output of infrared reflection sensor and through-beam sensor, etc.


3. DI/DO drive impedance design


Here we take NXP i.MX 6UL as an example. Generally, when GPIO is used as an output interface, the OVDD voltage is 1.8V or 3.3V. What should be paid attention to when GPIO is designed as DO?


Taking DO as an example here, Rpu/Rpd and Ztl form a voltage divider to define the specific voltage of the incident wave relative to OVDD, and the output drive impedance is calculated from this voltage divider.


image.png

Figure 1 Voltage divider equivalent circuit


image.png

image.png


image.png

Figure 3: Driving impedance table based on 3.3V


4. Recommended solutions for designing isolated DI/DO


In industrial applications, isolation must be considered in the design of DI/DO, and optocoupler isolation is the most commonly used isolation method.


Figure 4 is an optocoupler isolated digital dry node circuit, in which DIx and GIx are connected to the two ends of the contact switch. When the switch is closed, the optocoupler input circuit diode is turned on, the output circuit photoelectric receiving tube is turned on, and the input end GPIx is a low level; when the switch is opened, the optocoupler input circuit diode is cut off, the output circuit photoelectric receiving tube is cut off, and the input GPIx is pulled up to a high level by the resistor.


image.png

Figure 4 Schematic diagram of dry node transmission cable


Figure 5 is a reference circuit for the design of optocoupler isolated digital wet node, with an input voltage range of DC4V-18V and built-in filtering function. The user only needs to connect the positive end of the wet node to the DIx interface and the negative end to the GIx interface. When the input voltage is greater than 4V and less than 18V, the optocoupler is turned on; when the input voltage is less than 1V, the optocoupler is turned off.


image.png

Figure 5 Schematic diagram of optocoupler isolation DI input 1


DI is an isolated digital input interface. When connected to a switch input, the user must add a pull-up power supply to the external circuit. The simplified connection diagram is shown in Figure 6. VCC_GPI is an external isolated power supply with an input range of 4V~18V, GND_GPI is an external isolated ground, and resistor R1 ensures that GIx is at a low level when the switch is disconnected. The resistance value can be 100KΩ.


image.png

Figure 6 Optocoupler isolation DI input schematic diagram 2


When DO is used as isolated digital output, the chip provides a DO drive current of mA level and a drive voltage of 1.8V or 3.3V, which cannot meet all application environments. DO is used in the switch quantity design in the industrial field, and needs to be designed with relay isolation, level conversion, and resistor pull-up according to different application environments, which can effectively prevent the reverse injection of voltage signals and burn the chip.


image.png

Figure 7   Schematic diagram of DO input of isolation circuit


image.png

Figure 8 M6708U-T series industrial control core board


Keywords:GPIO Reference address:GPIO Design Guidelines

Previous article:Creating a 150V non-synchronous buck solution with a lower rated input voltage controller
Next article:Maxim releases ultra-low power management solution

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号