How to get serial ouput for debugging: WiFi shield + daisy

drivasdrivas Montreal CA

Hi!

I was wondering if you could provide guidance or setup instructions (for example in the docs) on how to get serial output from the OpenBCI boards during streaming and while using the WiFi shield (the docs already show how to do this through the BLE dongle I think). I am currently investigating 2 bugs that could merit their own post later (allocated file size on SD card hardcoded to use 250Hz sample rate & WiFi shield reporting 8 channels with daisy only on the first connection attempt) and being able to read all the print statements of the firmware code would come in handy.

Can you still get Serial output through the dongle with WiFi? I assume not since I tried and failed to stream regular EEG data through the dongle while the WiFi shield was connected and turned on. If not, I see that the shield seems to have Rx and Tx passthrough pins, how would one connect to them in order to get serial output on PC (Windows) ?

Thanks!

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Daniel, hi.

    Have you looked at this section of the repo? 'beginDebug()' section.

    https://github.com/OpenBCI/OpenBCI_Cyton_Library#referenceGuide

    It explains how to use pins D11 (located on female header J4) and D12 (J3), plus GND (J3) on the Cyton mainboard for debug output / input. These pins are bussed up to the Shield if it is attached. You would run wires from these pins over to a usb serial port board with 3.3V signals. Then use a "terminal emulator" type app on the laptop to connect to that debug serial port.

    re: debug output / input through BLE dongle.

    NO, there are two serial ports on the chipKIT/PIC32. 'serial0' is how the PIC32 communications with the mainboard RFduino. 'serial1' is this second serial port on pins 11 & 12; used mainly for debug. This debug serial port runs independently of the Bluetooth or Wifi radios.

    Regards, William

  • drivasdrivas Montreal CA

    I will try to get a hold of such USB to serial board, thank you for your precisions!

  • wjcroftwjcroft Mount Shasta, CA

    This is the one Adafruit sells,

    https://www.adafruit.com/product/954

    Be very careful NOT to connect the red wire, it is 5V power. The other Tx Rx signals are 3.3V. Tape over the 5V red wire so it does not accidentally touch anything.

  • drivasdrivas Montreal CA

    Got it! the docs also say to make sure the grounds are in common, if I understand correctly, this means that I should power the FTDI friend with the same battery used to power the Cyton? or the reverse, find a way to power to board with my computer?

  • wjcroftwjcroft Mount Shasta, CA

    The Adafruit product link I gave is actually NOT the official "FTDI Friend".

    ANY laptop-attached USB interface is going to be presenting the power and ground from the perspective of the laptop. However the Tx Rx outputs are driven only with respect to ground line. So no, the usb serial adapter is getting power from the laptop and cannot be battery powered.

    A good safety measure would be to use this other Adafruit board, which acts as a usb isolator. Between the laptop and the usb serial adaptor.

    https://www.adafruit.com/product/2107

    There are other usb isolators available on Amazon,

    https://www.amazon.com/s?k=usb+isolator&ref=nb_sb_noss_2

Sign In or Register to comment.