ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Using General Purpose Inputs and Outputs (GPIOs) on the GateTel EZ863 / EZ863 GPS

Updated on February 2, 2009
GateTel EZ863
GateTel EZ863

The EZ863 provides access to various General Purpose Inputs and Outputs (GPIO) via the 24-pin GPIO interface connector.  The following sections provide examples of how control and feedback of various external components can be achieved by connecting them to this device.

Section 1.1 discusses some of the available outputs, including four 500mA outputs and a single relay output rated at 1A 30V.  The six low-voltage inputs are covered in section 1.2.

EZ863 GPIO Outputs

There are four general purpose output channels on the EZ863. They are GPIO2, GPIO5, GPIO6, and GPIO7, which are all accessible through the 24-pin connector on pins 6, 7, 8, and 5, respectively. They are all open-collector type, and capable of driving 500mA at up to 50VDC each. All four may be on simultaneously at full current (for a total of 2A). Each channel also includes suppression diodes so inductive loads may be controlled directly without additional suppression components. Sections 1.1.1, 1.1.2, and 1.1.3 show three ways these outputs can be used.

There is also one relay internal to the EZ853 that allows the control of an external device, such as a buzzer, lamp, or other low-voltage equipment, with no additional components. The maximum ratings for this relay are 1A at 30V, and it is normally open. I.e. turning on the output will close the connection between the terminals. See section 1.1.4 for a sample circuit.

1.1.1 EZ863 GPIO Output Connected to a Relay

Figure 1.1 gives an example of how one or more of the GPIO outputs may be used to control a high power device (such as a lamp, heater, or motor) using a relay. In this example GPIO6 is used, however the same circuit could be connected similarly to any or all of the other outputs. The part specified in this example (Maplin N17AW) is a commonly available DPDT relay which is capable of switching 2A at up to 250VAC (or 220VDC). It has a coil voltage of 12V, which may be fed from the same supply used to power the EZ863. (If a relay is selected with coil voltage different from the power supply for the EZ863, a different power source will be required.) An external device is wired through the contact terminals of the relay, to a power source suitable for the device. For example, if the load was a 230VAC lamp, the external source would be 230VAC.

Figure 1.1: GPIO Output Example Using a Relay
Figure 1.1: GPIO Output Example Using a Relay

1.1.2 EZ863 GPIO Output Connected to a MOSFET

Figure 1.2 shows how these outputs may also be used to control high power devices using a solid-state MOSFET.  The main advantages of a MOSFET over a relay are much faster switching times, and no contact arcing, which will lead to longer life and better reliability.  They are generally only suitable for DC operation however.  Since the GPIO outputs of the EZ863 are open-collector (i.e. the voltage is pulled low when the output is turned on), a P-channel MOSFET is used.  The device labeled Q1 in the schematic (Fairchild Semiconductor part number NDP6020P), is rated at 24A and 20V.

The resistor R1 pulls the MOSFET gate voltage high when the GPIO output is off, which prevents it from conducting.  When the GPIO output turns on, the gate voltage is pulled low and the MOSFET allows current to flow through the load.  Note that since the maximum GPIO output voltage is 50V, the power controlled by the MOSFET cannot exceed 50V using the circuit shown.  This restriction can be avoided by using an N-channel MOSFET where the voltage would only be limited by the specifications of the MOSFET, although the logic would be reversed (the load would turn off when the GPIO output is turned on, and vice versa).

The load is a 12VDC motor and since it is inductive, the flyback diode D1 is used to prevent high-voltage transients from damaging the MOSFET, the EZ863, and any other connected components.  The load is driven by the MOSFET from a 12VDC supply in this example, which as in the example in section 1.1.1 may be the same supply used to power the EZ863. 

Figure 1.2: GPIO Output Example Using a MOSFET
Figure 1.2: GPIO Output Example Using a MOSFET

1.1.3 EZ863 GPIO Output Connected to an LED

Often it is desirable to get a simple visual indication of the state of an output, especially during development and testing of systems.  Figure 1.3 shows a simple method of attaching an LED to an output for such a purpose.  The LED shown is a typical part (Maplin WL27E) with a forward voltage of 2.5V, and maximum current of 25mA.  It is important therefore that the resistor R1 is connected in series to reduce the voltage for the LED.  The value is chosen to limit the current and provided adequate brightness.  As the LED is a rectifier, connecting it backwards will cause it to not light.

Figure 1.3: GPIO Output Example Using an LED
Figure 1.3: GPIO Output Example Using an LED

1.1.4 EZ863 Internal Relay Output Connected to a Buzzer

Figure 1.4 provides an example of the use of the internal relay to turn on a 12V buzzer (Maplin part number CR34M).  Pin 13 and 14 are not polarized, so they can be interchanged.  When the output is turned on, the relay closes and current flows through the buzzer causing it to sound.

Figure 1.4: GPIO Relay Output Driving a Buzzer
Figure 1.4: GPIO Relay Output Driving a Buzzer

1.2 EZ863 GPIO Inputs

There are six general purpose input channels on the EZ863.  They are GPIO1, GPIO8, GPIO11, GPIO12, GPIO15, and GPIO16, which are all accessible through the 24-pin connector on pins 3, 4, 16, 15, 17, and 18, respectively.  They are all ESD and short-circuit protected, and include 47kOhm pull-up resistors.  A high state is achieved with voltage above 2.1V and the inputs are designed to operate at typical 2.6V CMOS levels, but can accept input voltages up to 3.6VDC.  Section 1.2.1 provides a simple example.

1.2.1 EZ863 GPIO Input Connected to a Switch

The most common device that may be tied to a GPIO input is a switch. This may be a toggle switch, momentary switch (or button), emergency contactor, or key switch for example. It may also be mechanically linked to a device rather than designed for human operation, such as a limit switch or door-ajar type device. Because the switch is passing negligible current (< 1mA), almost any switch may be used. The GPIO may also be used to receive signals from other electronic devices, provided that the proper voltage levels are used.

Figure 1.5 shows the connection of an input to a basic SPST toggle switch (Maplin part FH97F). When the switch is in the closed position it ties the pin to ground so the input reads a low level. When the switch is opened, the input will read a high level because the pin is pulled up internally.

Figure 1.5: GPIO Input Example Using a Switch
Figure 1.5: GPIO Input Example Using a Switch

TModSoft provides a range of Python software (including GPIO SMS Remote Control and Monitoring Software) suitable for the Telit embedded hardware modules that takes advantage of the inbuilt Python interpreter negating the need and extra integration cost of an additional micro controller. For more information see


    0 of 8192 characters used
    Post Comment

    • profile image

      Peter Enmore 7 years ago

      Thanks for including charts with your description, it makes it easier to explain and understand to others.