questions on connecting potentiometer(s) to Cyton

DarwinzDarwinz France
edited December 2022 in Cyton

Hey there,
Thanks for the great job done here.
I'am having trouble finding where the D17 digital input are in the datafile "openbci format".
Actually i'am using an Arduino uno that read analog data from a 10kOhm potentiometer, convert it to digitalvalue and send it all through D17 pin on Cyton board.
I have activated the digital read, I also setup the arduino to send data at the same rate as Cyton Board.
Problem is that I can't actually see any data being written in the csv file. (should see int the in the range 0-676).

If you have any advice that would be awesome.



  • wjcroftwjcroft Mount Shasta, CA

    Hi KL,

    I am not sure when the documentation will be updated to list all the extra fields,

    Until that time, one suggestion would be to temporarily switch the pin to operate in "analog mode" instead of digital. Then send voltage values from 0V to 3.3V to that pin. These will convert to 10 bit ADC values 0 to 1023. By turning your knob back and forth, you will be able to see which CSV register is responding.

    Additionally, connecting directly to a Cyton pin like this, from another piece of equipment that is independently powered -- is NOT a good idea. See this page:

    Regards, William

  • wjcroftwjcroft Mount Shasta, CA

    If you don't really need the Arduino, it is possible to hook up a 'voltage divider' using a resistor and a potentiometer, that would read the setting of the pot from 0 to 1023, using the Cyton ALONE, no external board needed.

  • Hi William,
    Thank you for your fast answer.
    For now i've try the first part where i send voltage value from 0v to 3.3v to the D11 pin on Cyton Board (Analog read mode being activated).
    Here is a little sample of what I get with potentiometer on analog D11 :

    and there you have a sample of what I get when analog read mode is OFF.

    Not sure if you will be able to see uploaded images so here is a bit of explanation :
    First it' seems to work because I came from x,y,z value in the analog OFF dataframe to 0 value in the D11 datafram (so it seems like Analog read is working).
    Also, it look like other_1 to other 7 channels have changed there output.
    And finally, Analog_1 to Analog_3 came from 0 value in the analog OFF dataframe to Float for the 3 columns, wich is strange since i'm only sending 1 flow of information.
    So maybe there is something I don't get...

    For the second message :
    I do not need to have arduino especially, but as i'am working with VR_haptic glove and I absolutly need to have 5 potentiometer that send continuous information at 256hz, so if it's possible to have 5 pot in the headset without arduino need that would be amazing. But as far as i understand SDK only go for 3 analog input even if there is in theory 5 digital pins.

    Kevin Lopez

  • wjcroftwjcroft Mount Shasta, CA
    edited December 2022

    You can only have 3 Analog values in the Aux channels. But you have 8 channels of ExG available. So if you use 2 of those channels that will give you 5 total.

    You are not explaining how you are connecting the potentiometer to the Cyton pin. You need to use a voltage divider arrangement (calculator link previously mentioned) with the top resistor connected between Vdd and the pot. I suggest say a 5K or 10K resistor. (Assuming your pot is also in this range.) The wiper/center connection on the pot then connects to your sensing pin on the PIC32. The other side of the pot connects to GND. Be extra careful that you are not shorting out anything on the Cyton board, such as Vdd.

    The pins available for analog mode are shown below: D11, D12, D13:

    If you use an ExG channel you will have to setup a divider that takes your pot voltage down to microvolts range. I suggest nominal 50 microvolts.

  • Thank you for your answer. Before going into physical adjustement I would like to be sure about what i'am doing.
    So I made a little schematic to see where i'am planning to connect things in the same way as you suggested (I think).
    PS : I'am using Green Potentiometer in range 0 - 10kOhm.
    Here is the scheme, if you can confirm (or deny) :

    what about using only ExG channel ?
    Thank you in advance,
    Kevin Lopez

  • wjcroftwjcroft Mount Shasta, CA
    edited December 2022

    Kevin, hi.

    Your diagram is a good "starting" configuration. You will probably adjust values when you see how it operates. However, on the ExG channels, you need ratios that get you into microvolts or millivolts range. I am pretty sure your current resistor and pot values for those channels is NOT going to do that. Use the voltage divider calculators to find combinations that will. For example in your current ratio: 55K, 10K, when the pot wiper arm is at minimum (closest to fixed resistor), the 3.3V will be at about 10/55 of 3.3V. Or .6V, 600 millivolts or 600,000 microvolts. That's still too high, but should not fry the ADC. I'd shoot for 5 millivolt range.

    Actually my initial guess on the ExG voltage range was a bit tight. You can widen that to say zero to 5 millivolts. That would be the range you see with EMG or ECG. The point is, you just don't want your range to be the same as the PIC32 0 to 3.3V, as that will be more than the ExG ADC (ADS1299) can handle.

    Regards, William

  • wjcroftwjcroft Mount Shasta, CA

    @Darwinz said:
    what about using only ExG channel ?

    Yes, you could use 5 ExG channels, leaving you with 3 left for EEG.

  • Hi William,
    Thank you for your answer.
    After some modification I should use a combination of resistor to reach 6590000 Ohms.
    here is the new diagram :

    As I understand, ExG Pins are the one that are already used by the 8 electrodes. I also have a Daisy module.
    Can i use ExG channels from that one ?
    Or should I use ExG channels from Cyton and use the rest of ExG channels (including Daisy one) for EEG ?

    Thanks a lot !

  • wjcroftwjcroft Mount Shasta, CA

    Yes, but note that resistors only come in specific values. You are not going to find a 6.59Mohm resistor. But you can use a 5M or 1M instead.

    Yes, you can use any of the channels on either the mainboard or Daisy board.

    Note that your schematic is now wrong. The first schematic was more correct. The channel pins need to be connected to the pot wiper arms. The other fixed end of the pots needs to go to GND.

  • Hi William,
    Thanks for all the advice. Here is a sample of what I'am able to look at using 8 channels EEG with ThinkPulse electrodes, 5 potentiometer to record hand mouvement and 3 EMG sensor for forearm.

    Everything seems to work according to what I would have expected. Here you can see the technical setup :

  • wjcroftwjcroft Mount Shasta, CA

    Cool, congratulations. Glad you got your setup to work.

    So the string of resistors is because you did not have in stock the ohms value you needed?

  • retiututretiutut Louisiana, USA
    edited January 2023

    Woah! This is some serious hacking. Made my day to see this cool thread. :smiley:

Sign In or Register to comment.