Using a Trigger Pin with Analog Read Programmed Board, Trigger Data Showing Up In All Data Streams

JkempelJkempel United States
edited October 2018 in Cyton

I am using the Cyton board with the daisy board. I have updated all my firmware to the most recent versions. I am using channel A7 with the analog read program on my headset to read a signal coming in from an Optoisolator like in the tutorial (http://docs.openbci.com/Tutorials/06-External_Trigger_Cyton_Example).  Everything is working except the trigger data appears to be showing up in my other 16 channels as seen in this image. Once it triggers it causes a spike in all channels. Does anyone have any input on this? Thanks.

image

Comments

  • wjcroftwjcroft Mount Shasta, CA
    JKempel, hi.

    Have you tried using shielded cable (2 conductors and a braided or foil shield) for the incoming analog signal? The proximity of the trigger cable to your EEG cables, may be causing capacitive or inductive coupling into the EEG leads. For example are channels 16, 14, 12 cables anywhere near your trigger cable? Why those channels and not the others?

    Another approach you might try is to use a voltage divider to make the trigger signal as LOW as you can, even millivolt range, instead of volts. The lower the amplitude, the less coupling will happen. Lower signal level plus shielding and proper cable routing (away from EEG leads), should eliminate the coupling. Try some combination of any or all of these.

    Regards,

    William

  • JkempelJkempel United States
    Hi wjcroft,
    Thanks for your input. I did switch to a shielded cable and it helped filter out most of the interference.
    JKempel
  • wjcroftwjcroft Mount Shasta, CA
    J, thanks.

    You said previously you were using the optoisolator example circuit in the trigger tutorial example.


    That example shows reading the pin in 'digital' format, which differentiates between logic values 0 volts and 3.3 volts.

    Another choice on your breadboard, would be to send an 'analog' signal, to a pin that accepts analog values. D17 and D18 are digital only pins. But D11, D12, or D13 can read analog values.

    This page shows a simple "voltage divider". The input is your trigger generator circuit. The tutorial shows that output generating between zero and 3.3 volts. If you then connect that output to this divider, that 3.3 volt value can be stepped down much lower, say to 3 millivolts. Which would have even less potential for interfering with your other channels.


    In the calculator, set voltage source to 3.3 volts. Set R1 to 10000 ohms, R2 to 10 ohm. Output voltage will then be .0033 volts, 3.3 millivolts. That is the signal value you could send over your coax cable to the Cyton.

    Regards,

    William

  • wjcroftwjcroft Mount Shasta, CA
    edited March 2019
    Correction to the previous voltage divider post. The PIC32 analog input channels convert 0 to 3.3v input signals into 10 bit values in the range 0 to 1023. So 1023 = 3.3v.

    3.3 / 1023 = .0032. That means an input value of 3.3 mV, would produce an A/D conversion of '1'. So the previous divider circuit I mentioned is a bit too close to the 'noise' floor. Instead of outputting 3.3 mV and 0 V as the end points, 33 mV will be a better choice. That will produce an analog conversion value of approximately '10'. So your test code would check if the analog value is say greater or less than 5.

    So in the previous post just change R2 to 100 instead of 10 ohms.
Sign In or Register to comment.