9 Replies Latest reply on Mar 19, 2015 9:09 AM by DaveInDurban

    Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board

    DaveInDurban

      I'm coming to the end of my first day with the Edison, and I still haven't connected anything to the GPIO, for fear of burning it out. I've seen examples for the Arduino board, but not for the mini-breakout board.

       

      I would like to turn on 12V power LEDs, solenoids and relays, etc., using P-Channel power MOSFETs, According to the Breakout Board Hardware Guide, January 2015, Revision 006, GPIO has some open collectors outputs. What is the voltage limit on these when turned off? If they can handle 12V when off, and sink about 1mA when on, then I can drive the MOSFETs directly. I've attached a diagram of what I'd like to do. Is there a better driver circuit for this?

       

      What are the characteristics of the ones that are not open collector? Can they source and sink current? If I add an external NPN driver transistor, I would want the Edison GPIO output not drawing current when the load is off.

        • 1. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
          DaveInDurban

          In addition to the electrical characteristics, is there a document that explains how to use the mini-breakout board with e.g. node.js? I found an example node.js app that blinks a led, and it works(!) But the comments include this useful bit of information: "... Gpio(13) equals J17 pin 14". So I would like to know how to map every pin from J17 - J20 to its GPIO(x) equivalent.

          • 3. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
            Tage

            if you want to control 12V loads with 1.8V rated GPIO you need to use MOSFETs that have Rdson rated at 1.8V. One example is ZXMN2B14FH. This is an n-channel MOSFET that is rated for 20V max and can drive about 3A with 1.8V at the gate. If you buy 100 pieces you pay about $42-$50 (about $0.50 a piece). just connect source to GND and gate to GPIO and drain to the load. connect the other end of the load to +12V. if your load current is larger than 3A you can connect several transistors in parallel (source to source, gate to gate, drain to drain). not that if the load is inductive, for example a motor or a relay coil, you need to connect a diode from drain to +12V to provide a path for the inductive current when you turn off the MOSFET transistor. otherwise there is a risk that there will be a voltage transient across the MOSFET at turn off, which could destroy the device. when a MOSFET fails, there can be a short circuit from drain to gate which means that the GPIO pin could see overvoltage, and this will destroy your Edison. you can reduce that risk by using a diode as mentioned, and to be even safer you could add a 100ohm resistor from GPIO to gate. if the MOSFET fails and 12V appears at the gate, there is a slim chance that the GPIO will not suffer damage because the resistor will limit the amount of current into the pin.

            • 4. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
              Bunsen

              The GPIO pins will not be happy with 12V on them, even if configured as open-collector.  GPIOs generally provide open-collector behavior by simply not using the pull-up FET, but the customary CMOS protection diodes are still present which means that any voltage significantly above VDD (i.e. 1.8V for the Edison) will cause current to flow into the GPIO pin.  Whether or not that damages the device depends on how much current is sunk, but it's best not to depend on it tolerating current through those diodes.

               

              First, I would ask if you really need high-side switching.  Low-side switching is generally cheaper and simpler, since each load only needs an N-channel MOSFET like Tage described.  If high-side switching is a requirement, then each load will need a P-channel MOSFET to control the load current and an N-channel MOSFET and pulll-up resistor (or NPN BJT I suppose, if that's what you like) to control the P-channel MOSFET.  There are devices ("load switches") that wrap the big P-channel and small N-channel FETs into one package for the sake of board area and convenience (FDC6324L or Si1869DH, for example), though the parts I've seen that support 1.8V signaling tend to be small and suitable only for low (<1A) currents.  If you need more current than that, then I guess you get to build your own.

               

              Finally, yes, GPIOs can both source and sink current.  The Edison Module Hardware Guide says +-3mA.

              • 6. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
                DaveInDurban

                Thanks! I'll bite the bullet and make the driver with discrete components. My reason for high-side switching is that I'm wiring up a house with low voltage DC instead of AC, and I need every light and device directly connected to ground on one side; with low-side switching they would all be connected to various power supplies (12V, 24V, 35V) and I might have to add a ground wire to ground the devices. So it makes wiring easier and cheaper and possibly safer.

                • 7. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
                  DaveInDurban

                  Thanks all - I made the driver board and tested it with some 12V LED lights, and it works like a charm. The parts were remarkably cheap - P-channel MOSFETs were $3.40 for 10 and NPN drivers were $0.30 for 10. Thanks to the NPN drivers, the MOSFETs get the full gate voltage, so should have no problem sinking several amps.

                  Driver board.jpg

                  All lights on:

                  Lights on.jpg

                  • 8. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
                    Frederick Blais

                    Just curious, which part number did you use for your FET and NPN transistors? What resistor value did you use for the base of the NPN and the gate of the FET?

                    • 9. Re: Electrical characteristics of GPIO outputs of Edison Mini-Breakout Board
                      DaveInDurban

                      FET: FQU11P06TU

                      NPN: 2N3904

                      R-base: 10k

                      R-gate: 2.2k

                       

                      I could have used bigger resistors, but these were in the original design - they work fine and don't draw too much current. The board works with my Raspberry Pi at 3.3V and the Edison at 1.8V.