9 Replies Latest reply on Jan 6, 2015 10:31 AM by DinoT_Intel

    Need UART0 to drive 5 volts on pin 0/1 of I/O header

    xthunderheartx

      Can the GPIO be configured to drive 5v instead of 3.3v when UART0 is configured on pin 0&1 of the I/O header? I have a several 5 volt devices that are used in our product and some will accept 3.3v as a one and some won't.

       

      KurtE you seem to understand libmraa and the GPIO well.  Can ya hook me up? arfoll? Tingleby@Intel?  Anybody?

       

      Thanx,

       

      Dallas

        • 1. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
          Tingleby@Intel

          I am unaware of a method to get the UART driven at 5v. I've sent some emails internally and will let you know if anything comes back.

          • 2. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
            KurtE

            I assume from your question that you are using the Arduino breakout board as you mention pins 0, 1...

             

            The Breakout board has a jumper that either puts 3.3v or 5v to the IOREF pin of the system.  It is my impression that this jumper will set the level converters that are part of the Arduino board to that IO level and as such if your board is set for 5v, I would assume you will get 5v on pins 0 and 1...  I have not measured to verify.

             

            Note the jumper is logically shown in figure 2 of the Hardware Breakout manual

             

            Kurt

            • 3. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
              Tingleby@Intel

              I had always been under the assumption that the IOREF is more related to the reference voltage for the ADC.

              • 4. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
                KurtE

                I see that Tingleby has answered, and probably knows this a lot better than I do!

                If it is true and you have a device that you need to hookup that does not work at the lower voltage, you can always use a simple level shifter.  I have a few of them from Adafruit, Sparkfun, Amazon.com...

                • 5. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
                  KurtE

                  With arduino Uno Rev 3 boards, there are a couple different pins:  From Arduino.cc

                   

                  IOREF. This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V

                   

                  AREF. Reference voltage for the analog inputs. Used with analogReference();

                  • 6. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
                    xthunderheartx

                    Tom/Kurt,

                     

                    Thanx for the quick reply.  Kurt I'm sorry I didn't mention that our project is on the Galileo GEN2.  I did know about the IOREF jumper and it's associated appearance on the I/O Header.  I actually do have that set to 5v.  However it has no affect on the level that the UART drives TX (I/O pin 1) to when you expose it to the I/O header.  Here is a capture from my little USB Scope with channel 1 connected to the I/O pin 1 (TX):

                     

                    Galileo_UART_levels.jpg

                     

                    The scope is set to 1 volt/division and that is an "AT" followed by a carriage return.  Spot on 3.3 volts.  Our application is a controller which sits in very remote locations with no internet connectivity.  It uses a couple of different variants of SocketModem to dial in to a central hub.  I have one 5v variant (from Silicon Labs) that works fine with the 3.3v levels that the Galileo provides.  However, other variants don't recognize 3.3v as a logic 1.

                     

                    I could of course stick a level shifter on the shield we will are designing. But I thought I had read somewhere that a level shifter already existed on the Galileo and that it was a simple matter of configuring the GPIO  for 5v levels via libmraa.  I did a little back reading and I may have gotten this impression from Sergey's blog.  Maybe I misunderstood what he was saying.

                     

                    In any event I mentioned you folks because I know Tom works directly on libmraa and Kurt I see that you contribute to that repo.  Also you gave me some good intel back when I was looking at problems with mraa_uart_init.  Figured you all could straighten me out.

                     

                    So if no level-shifter exists on the Galileo we will have to incorporate one in our design and my question is answered.  I'll see if I have something in my bag-o-tricks that I can stick on a breadboard for the time being so I can continue testing. Unfortunately, as my lab is in the foothills of the Blue Ridge and is shall we say, isolated, I may have a bit of a wait for the post to bring me a part .

                     

                    Thanx,

                     

                    Dallas

                    • 7. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
                      KurtE

                      Sorry, you might try working your way through the schematic to see what it thinks should be the output voltage.

                       

                      Kurt

                      • 8. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
                        Tingleby@Intel

                        Internally I heard back that the IOREF should be perfectly fine for setting the UART voltage at least on the edison ardunio board.

                        For the Gen 2 i would assume the same, but if not, a level shifter is probally going to be your best best ...

                        • 9. Re: Need UART0 to drive 5 volts on pin 0/1 of I/O header
                          DinoT_Intel

                          Hi,

                          How are you powering your Galileo Gen2?

                          Also try measuring the 5V rail/pin on your board.