WiFi connection with different ESP8266 [resolved]

nejemianejemia argentina
edited March 2020 in Cyton

I am looking for a solution in order to connect the CYTON+DAISY (16 channels) to the GUI using WiFi BUT not with the WiFi official shield based on ESP8266.
Any idea how can I get the Data IN and OUT of the CYTON to be converted to TCP/IP Ethernet and then to a different WIFI AP like a standard WiFi router normally used at home?

Comments

  • wjcroftwjcroft Mount Shasta, CA

    Nejemia, hi.

    Do you already have the Wifi Shield? What has been your experience with that?

    William

  • nejemianejemia argentina

    Hi William. I do not have the WiFi shield, I personally have no experience with the ESP8266 itself. However, having the chance of getting the Data out of the CYTON and routing it to the Open-GUI using a standard home router/AP device will be great.

  • wjcroftwjcroft Mount Shasta, CA

    Ganglion users of the Wifi Shield have very good success. 'Some' Cyton users are also having success, but it may take more futzing around. Apparently especially for Cyton, the recommendation is to use separate battery power connections for both Cyton and the Shield. Because of glitches in the Shield power supply filtering / resilience. The ESP8266 has large power supply draw requirements, concentrated in a very short timespan.

  • wjcroftwjcroft Mount Shasta, CA

    Most success has also been had using UDPx3 mode, over TCP on Cyton especially. Since TCP causes the power spikes.

  • nejemianejemia argentina

    Hi William. UDP is also a good option. Standard Routers can handle UDP as well. If you can drop some lines explaining how can I get the data out of the Cyton and routing through UDP/ethernet protocol will be fantastic.

  • wjcroftwjcroft Mount Shasta, CA

    I suggest you try the Shield. There is no other 'easy' way to get data streams out of the Cyton. Especially at higher sample rates.

    There are some threads on a wired usb connection to Cyton. But this is highly technical and not recommended.

    https://www.google.com/search?as_q=wired+usb&as_sitesearch=openbci.com

  • nejemianejemia argentina

    dear William. the problem I have is that I am in Argentina and in quarantene... So getting a WiFi shield is very difficult or even impossible.
    I have some ESP 8266 modules. I will see if I can do some manual mounting but ... Let me see if I can solve something and will post results. All the best and take care!

  • wjcroftwjcroft Mount Shasta, CA

    If you have an ESP8266 breakout board, you may be able to repurpose the Shield firmware. As you can see the wiring of the Shield is not that complex. There are some old old posts on the forum regarding Bluetooth HC-xx breakout boards. But I recall those were using ancient Cyton firmware versions.

    https://www.google.com/search?q=cyton+bluetooth+breakout+HC-+site:openbci.com

  • nejemianejemia argentina
    edited March 2020

    Hello William. I made the CYTON work with the NODEMCU Ver. 0.9 as a WiFi Shield.

    I downloaded the firmware as an ARDUINO code and program the NODEMCU with the Arduino IDE.
    The source codes were downloaded from GIT repository.
    When I downloaded the ArduinoJson lib, the last version is 6.X.
    However, the source code of the WiFi shield available in Arduino format needs ArduinoJson lib version 5.X to compile.
    I replaced ArduinoJson ver 6.X (last version) with old version ArduinoJson ver 5.X and compiles OK and WiFi shield works.
    I was looking into the differences between ArduinoJson ver 6.X and ver 5.X and in order to use the last version, the WiFi shield code must be modified to meet the new definitions on ArduinoJson lib ver 6.X.
    QUESTION:
    Anybody thinks it is worthy to "touch" the WiFi Shield code to use the latest ArduinoJson lib or should I be happy using the old ArduinoJson ver 5.X ?
    Thanks a lot.

  • wjcroftwjcroft Mount Shasta, CA

    Nejemia, that's great you got the Shield firmware to run with your NODEMCU. Congrats.

    There is very little Shield development work happening at the moment, but feel free to open an issue on the repo:

    https://github.com/OpenBCI/OpenBCI_WIFI/issues

    If you have a Pull Request, you can submit that. But it will likely not be committed soon; because stability of the shipping boards is a primary concern.

    Regards, William

  • nejemianejemia argentina

    Oki D`Oki.
    BTW, any shortcut on how to save in my computer running the OpenBCI-GUI the received data by the WiFi shield for later analysis instead of saving in the uSD card on the CYTON board?

  • nejemianejemia argentina

    Wow! Fantastic I appreciate this very much.
    I will explore how to connect the CYTON-WIFI with the OpenBCI-GUI remotelly throug Internet. I want to explore the possibility of remote EEG control between any 2 points using the Internet. If I am reinventing the wheel, let me know (lol). All the best!

  • nejemianejemia argentina

    Wiliam, are you member of the OpenBCI Stuff in Brooklyn?
    If yes, could I have a chat with you outside the forum about no technical issues? & If U know if it possible to have remote connection between the CYTON and the main PC through internet, let me know. Tnxs a million. All the best.

  • wjcroftwjcroft Mount Shasta, CA

    I'm a staff member, but located in California. re: remote connection through Internet. Why would you want to do this? Latency and speed are going to be severely impacted.

    You might be able to figure something out using your router firewall. But performance would suffer.

    Generally best throughput is with Wifi Direct, from your shield to your laptop. Using UDPx3. Especially important at higher sample rates.

  • nejemianejemia argentina

    Thank U William. Since you are staff member, here is my question. I am working very hard, and basically alone with Prof. Martinez chief Neurologist of the British Hospital en the city of Buenos Aires.
    Wireless EEG seems to be an extraordinary tool in this times of epidemics.
    I am very happy with your solution, but we need to customize it to fit the Medical requirements.
    Is there any specific point(s) to address in order to consider the Front End based on the ADS1299 and its peripheral protective circuitry to be taken into account?
    Facing the crisis, the Direction of the Hospital is willing to help us to get approval at least by the Argentinian standard comitee.
    Second. I may need assistance customizing the PC side of the system (namely OpenBCI-GUI) the present version is over powered and over engineered for the basic clinical use we are looking.
    Third. We would like to explore the possibility of having 3 CYTON + DAISY board in Argentina as soon as possible, I know difficulties, but I can manage to collect the stuff in Miami.
    I do appreciate very much all your fantastic support and encouragement.
    All the best

  • wjcroftwjcroft Mount Shasta, CA

    Nejemia, hi.

    I assume you've read the Disclaimer on the Shop page,

    https://shop.openbci.com/collections/frontpage/products/cyton-biosensing-board-8-channel?variant=38958638542

    Disclaimer
    The Cyton Board is not a medical device nor is it intended for medical diagnosis and provided to you "as is," and we make no express or implied warranties whatsoever with respect to its functionality, operability, or use, including, without limitation, any implied warranties, fitness for a particular purpose, or infringement. We expressly disclaim any liability whatsoever for any direct, indirect, consequential, incidental or special damages, including, without limitation, lost revenues, lost profits, losses resulting from business interruption or loss of data, regardless of the form of action or legal theory under which the liability may be asserted, even if advised of the possibility of such damages.

    So none of the OpenBCI products have the extensive and costly certification that apply to hospital grade medical equipment.

    https://www.google.com/search?q=iec+60601

    However OpenBCI is being employed widely in university, Maker, and research environments. Because it is wireless and battery powered, there is extremely low probability that any circuit failure could expose the EEG subject to dangerous electrical conditions. But in the case of IEC 60601 devices, extensive protective circuit features are implemented (fail-safe) to guarantee safety, even when powered from mains voltage.

    The ADS1299 front end does have voltage transient protection on the inputs, so as to prevent damage from typical static discharges. But caution should still be applied to not expose the circuit board traces to static discharge and to minimize any static electricity exposures.

    This paper may be helpful for your committee,

    https://arxiv.org/abs/1606.02438

    Also see the citations list here,

    https://docs.openbci.com/citations

    For direct access to the data stream, to bypass the GUI, the new BrainFlow library is recommended,

    https://docs.openbci.com/docs/11ForDevelopers/SoftwareDevelopment

    re: delivery to Miami. I'm not sure how order fulfillment is happening at this time. Please email to contact at openbci.com.

    Regards,

  • nejemianejemia argentina

    William. As always your provided information is superb. I will move forward and keep the group updated. All the best for all the group and please, take a lot of care. Situation is not a joke.

  • wjcroftwjcroft Mount Shasta, CA

    Post a couple photos of your NODEMCU based Wifi Shield. I assume you've double-stick-foam-taped it to the Cyton mainboard. And run various jumpers.

  • nejemianejemia argentina

    I will do but tomorrow, it is very late in Buenos Aires now. Thank you.

  • nejemianejemia argentina

    As promised. Simple but works.
    QUESTION. Any reason for selecting the PIC32 MX 250 128 ? Has anybody migrated the software to a different micro?
    Would it work on PIC32MX340F512H (80 MHz 32 bits MIPS, 512K Flash, 32K SRAM)???

    I am thinking the Teensy LC ARM Cortex-M0+ processor at 48 MHz, 62K Flash, 8K RAM, 12 bit analog input & output, hardware Serial, SPI & I2C, USB, and a total of 27 I/O pins. Programmable with Arduino IDE as well.

  • wjcroftwjcroft Mount Shasta, CA

    How are you powering the NODEMCU? Connection to a laptop usb port will override the isolation of the subject from mains voltage anomalies. (Admittedly extremely rare and low probability. But relevant in IEC 60601 medical applications.) Does the NODEMCU allow direct connection of a lithium battery, say with a connector not visible on the back?

  • nejemianejemia argentina

    Hi William. BTW, thank you for your directions on OpenBCI-GUI. With reference to powering NodeMCU I am exploring a couple of options. My first attempt will be to use only the ESP8266 module and power the whole system with a "D" type Alkaline battery and a Step Up converter. However I need to explore the consequences of potential high freq noise introduced by the Step-Up module. So far, the experiment with the NodeMCU was only to see if I can have a WiFi connection with a standard off the shelves part and also to have full control of the Arduino IDE to get the ESP8266 loaded with the correct software. Will keep all of you posted on my progress!
    Stay tuned.
    Nelson.

  • nejemianejemia argentina

    Sorry for becoming a pest. Did you think about running the CYTON design on a different micro? Perhaps we can get better performance on 16 or even more channels... Food for thought. So far, the PIC32MX250 128 seems to be doing happily the task, but for my particular case, the Accelerometer eats resources and really I do not need it. I will put it out of business soon.

  • nejemianejemia argentina

    Miscellaneus question.
    Why the WiFi shield firmware starts searching for my home wifi network and only after succesful log in it switches to the AP mode to allow data from/to CYTON to PC??
    Why not start in AP mode ?
    Thanks.
    Nelson.

  • nejemianejemia argentina

    I am facing some stability issues with my solution using NodeMCU as WiFi shield.
    Main issue, the module hardly turns into AP mode, it insist on logging to my home WiFi router.
    Is there any way I can launch the WiFi shield in the AP mode? I do not care about my home WiFi router, it provides weak signal and is annoying.
    Once my PC connects to the AP provided by the WiFi shield, everything runs nice and smooth.
    Thanks a lot.
    Nelson

Sign In or Register to comment.