The serial communication does not work without the USB cable. [FEZ PANDA 2]

I am having problems with external power to the Fez panda 2. My program works well when the Fez Panda is powered by the usb cable but when I use an external power supply serial communications do not work in my program. To test I used a very simple program:


using System;
using System.Threading;
using System.IO.Ports;
using System.Text;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;

using GHIElectronics.NETMF.FEZ;

namespace FEZ_Panda_II_Application1
{
    public class Program
    {

        public static void Main()
        {
            int cont = 1;
            bool ledState = false;

            OutputPort led = new OutputPort((Cpu.Pin)FEZ_Pin.Digital.LED, ledState);
    
            byte[] rx_byte = new byte[1];
            string cadena;
            
            while (true)
            {
                SerialPort UART;
                UART = new SerialPort("COM3", 115200);
                cadena = "Funciona " + cont + "\r\n";
                byte[] buffer = Encoding.UTF8.GetBytes(cadena);

                UART.Open();
                UART.Write(buffer, 0, buffer.Length);
                UART.Close();
                // Sleep for 500 milliseconds
                Thread.Sleep(500);

                // toggle LED state
                ledState = !ledState;
                led.Write(ledState);
                cont++;
            }
        }

    }
}

This program makes blink led of Fez Panda and print in terminal an account (use a FTDI conversor). Once loaded the program in Fez, the program works perfectly if the USB cable is connected. If the cable is disconnected and use an external power source the LED blinks but does not work the serial communication. I used different sources of supply, 5V 2A, 9V, 1A, 7.4 v lipo pack and serial communication does not work ever. However, the LED blinks, so the Fez Panda it is working.
Another thing that not works is that I can not load a program by port COM1 without connecting the USB cable. With the USB cable connected I can load any program by serial port Com1. I have long with this problem and I’m desperate. Any idea what might be wrong? Is my board defective?

For a better response, you should put each question in a separate forum thread. The responses will be confusing.

Your serial problem sounds like it could be a ground issue? Are connecting three wires (RX, TX, GND) to the FDTI cable end? If you only connected RX and TX, then the USB cable would provide the ground, but there would not be a ground with an external power supply.

I’m betting like Mike - GND between Fez and the PC is no longer shared when you remove the USB cable, so you get weird behaviour that ends up with no data recieved. Check your FTDI cable GND has continuity through to your Fez, same with the metal connector shell I assume you have a USB FTDI connector) to the Fez.

Similar experience here with the GND connection.

I’ve got to Panda II’s connected via a serial connection. Their RX / TX pins connect to each other’s TX / RX COM ports. Communications work when I have them both powered by USB from the same computer.

However, when I power one via USB and the other via external power, serial communication doesn’t work.

To rectify, I’ve followed Brett’s advice (i think?). Basically, I ran a wire from one Panda’s GND pin to the other Panda’s GND pin. Same strategy seems to work when I have both Panda’s powered by individual external power supplies too.

There must be a common ground when connecting two devices. :stuck_out_tongue:

Yeah, that’s the simple stuff I’m learning while getting acquainted with hardware. Slowly.

Hi, I have a question, how I cant send one command ASCII of LCD 128x64 (https://www.sparkfun.com/products/9351) by serial port?

Hi there, not sure how your post is related to the original post of this topic, you should start your own topic I think.