2 Replies Latest reply on Aug 6, 2014 9:19 AM by stragen

    How to use the UART(stereo jack) for other purposes?

    stragen

      Hello together,

      is it possible to connect the UART (3.5mm stereo jack) with a RS232 Adapter also for other purposes than the Arduino sketches on the PC?

      Do i have to quit a progress before or is it reserved for the Arduino-IDE only? Do i have to use a FTDI or MAX232 workaround instead?

      Because im trying to connect the UART to a Transformator to regulate the output voltage. The Trafo datasheet says this:

      Buerger Electronic - ST800:


      Baudrate 19200

      Parity N

      Bits 8

      Stop 1

      Puffer 100

      no Handshakes


      Example:

      16 Enter 1 Enter      Remote control activated

      16 Enter 0 Enter      Remote control disabled

      48 Enter                   Response: Voltage-value 8 Bit

      49 Enter                   Response: Current-value 8 Bit

      64 Enter 255 Enter  = Ua max

      65 Enter 255 Enter      = Ia max


      When i change the baudrate to 19200 and just send a single byte, the shell is just in an endless idle state.

      $stty 19200

      $echo "48" > /dev/ttyS1


      So i'm not sure if im using the commands right or if its just not working, because the stereo jack is not intended to work with other devices.


      Thanks for your help in advance.

        • 1. Re: How to use the UART(stereo jack) for other purposes?
          flummer

          Hi Stragen,

           

          The RS232 serial port that terminates in the 3.5mm stereo jack is called /dev/ttyS1 in Linux and is hooked up in Serial2 in the Arduino sketch in the latest firmwares (wasn't in the earlier versions).

           

          It's RS232 voltage levels, so you need to check your transformer, but if it's the regular D-Sub 9 you should be able to connect it directly to the jack connector on the Galileo, without any electrical conversion just a slightly odd cable (there is a MAX232x on the Galileo).

           

          On the Galileo Gen 2 you will need to use a MAX232x or similar since the serial port is TTL level and not RS232.

           

          The RS232 serial port is normally hooked up in the console in Linux, but in the latest firmware you can use it for other stuff too.

           

          Hope it helps.

           

          /Thomas

          • 2. Re: How to use the UART(stereo jack) for other purposes?
            stragen

            Thanks for your response flummer, that worked for me. Just that the Serial2 blocks the terminal got me to use the Tx and Rx Pins with a MAX232 now.