Brain Controlled Wheelchair with TI Eval module > Arduino Uno > PC

Hey Guys,

Me and my friends are working on a project for highschool, we wanted to make a prototype brain controlled wheel chair
since your Open BCI isn't available here we had to go with the TI eval module. we wanted to use the same technique 

in spite of reading quite a lot, we haven't got far on the stps and things we need to do to get this done
I intend to use the arduino to interface with the ADS1299 and Motor Driver IC,
we're using 12v DC motors, and some passive electrodes from a local supplier.

we're stuck on 

>what code to upload to the arduino and which pins to connect ( will i need a voltage divider ?)
>what software to run on the PC ? can we use matlab ? which is the least complex (a gui would be nice to show teachers the raw input )?
>how to use FFT as demonstrated by chip and send the command back to arduino to turn on one or both the motors (left right or straight)
>configuring the ADS with the arduino setting bias and reference electrodes ill be using a maximum of 4 or 5 electrodes.
>electrodes double ending or single ending and how??

i would love fast answers cos we need to put this together before saturday morning gmt+5:30

Thanks in advance !!

Comments

  • biomurphbiomurph Brooklyn, NY
    we have some deprecated code that we used at the beginning of this project
    I can tell you that if you use an Arduino UNO, you will need to level shift the data lines.
    You are better off using a version of Arduino that already runs on 3V3, like a Pro or something.

  • Thanks biomurph, yes I was looking at the code I can't seem to understand how to change numer of channels i want and also is there any difference between single ending and double ending the input if yes which is less complex and gives viable signals

    Also what software do I need to run on my PC ?
  • wjcroftwjcroft Mount Shasta, CA
    @gokul_96, hi.

    > what software to run on the PC ? can we use matlab ?

    Why not just modify Chip's Processing code, which includes the GUI?

    https://github.com/chipaudette/OpenBCI/tree/variant_hexBugControl_visualEntrainment/Processing_GUI/OpenBCI_GUI

    If your Arduino sends out packets in OpenBCI format, all of the other OpenBCI compatible apps should work, such as neuromore, etc.

    Have you looked over all the other TI Eval board tips in Other Platforms?

    Regards,

  • Hello Wjcroft thanks for the reply,
    yes I have seen and tried to make sense of all other discussions here, I still seem to be lost, what about the pin connections ? Is there any document which explains that? And as for chips code what would I have to change to make it work ?

    Thank you
  • wjcroftwjcroft Mount Shasta, CA
    When you say pin connections, are you referring to the channel to 10-20 locations? Just mimic what Chip was using. If you have similar code in the arduino and on the PC, Chip sends the commands to the board to start data flow and do any channel setup. Though I imagine he uses mostly the defaults.

    re: adding robot commands. Here you will need to invent some serial port commands that control your motors. Look over the OpenBCI commands and pick some unused bytes to do that. Then in the command parser in the arduino, do your motor control when you see those commands.

    Alternately, use a SECOND arduino (separate from the EEG arduino) on a SECOND serial port to control your motors. Microvolt EEG signals and noisy motor control signals may interfere with each other. This would also be possibly easier to code, since you don't have to integrate your motor commands and timing into the OpenBCI firmware.
  • Thanks for the input Wjcroft, ill be trying it right away and ill let you know about what hapened

    what command to use to set which are reference and bias electrodes and number of channels to use ?

    also single-end electrodes or double end electrodes ?
  • wjcroftwjcroft Mount Shasta, CA
    Did you read Chip's blog entry? It states:

    EEG Setup:  I'm going to be measuring my Alpha waves and I'm going to be measuring the brain waves induced through visual entrainment.  Based on my previous experience, I know that both are best recorded using an electrode on the back of the head (at the "O1" position, if you're into your 10-20 electrode placement standard).  I do not need electrodes all over my head.  That's the only sensing electrode that I'm using.  That's it.  Of course, EEG also requires a reference electrode, which I put on my left earlobe.  And, finally, EEG often has a third electrode ("bias" or "driven ground"), which I placed on my right earlobe.

    So that's only 3 electrodes, O1 on IN1N, SRB2 on L ear, Bias on right ear. SRB2 reference is the default for OpenBCI firmware.


  • edited April 2016
    Hello Wjcroft, so after many hours of experimentation and using variations of chips code, it does not really seem to be working i think we are going wrong somewhere in connecting the pins from the arduino to the ADS1299PDK the TI software which i finally figured out how to use on windows 8 seems to be able to access it fine so the ADS is good.

    also will i need a level shifter for ADS 3.3v to Arduino 5v communication ? ive made voltage divider network for the other way around.

    also sorry for the late reply i was stuck up with school life.
  • wjcroftwjcroft Mount Shasta, CA
    > using variations of Chip's code, it does not really seem to be working.

    Not sure how it could work unless it was supplied with a serial data stream that matches OpenBCI.

    You may want to use a 3.3 v based microcontroller to avoid all the level shifting. chipKIT makes dev boards,

    https://www.adafruit.com/products/949

    For your initial testing it sounds like you are using the complete TI Eval kit, which includes a motherboard and the ADS1299 "shield". If you look at the other Eval Kit tips in the Other Platforms Category, everyone ditches the motherboard since it is closed source and undocumented. Instead they just wire up the SPI bus on the "shield" to their Arduino microcontroller.

  • biomurphbiomurph Brooklyn, NY
    When I used the TI eval board years ago, I set up a level shifter to make the 3.3V compatible with the 5V arduino. At the very least, you will need a voltage divider going from 5V to 3.3V. The other direction is ok to go straight through if you are in a pinch. If you have driven any of the ADS communication lines with 5V, I would be concerned about damage to the chip.

    The basic connections of the SPI bus that you would need to make are
    SCK
    MISO
    MOSI
    SS
    DRDY

    You can find the pin positions on the documentation of the TI dev board, and the pinout for Arduino is here


  • Thanks for the reply Wjcroft and Biomurph,

    So if I set up a separate power supply for the ADS daughter card and give the pin connections as mentioned above with a level shifter and flash chips code to my arduino uno it should work straightaway?
  • wjcroftwjcroft Mount Shasta, CA
    Although not a requirement electrically, a USB isolator such as this can provide a greater margin of safety,

    http://www.amazon.com/HifimeDIY-Isolator-ADUM4160-signal-isolation/dp/B00F4SCCR2

    Adafruit has a model also,

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

    These are all based on the Analog Devices part,

    http://www.analog.com/en/products/interface-isolation/isolation/usb-isolators.html

Sign In or Register to comment.