PsyLink: Gyroscope + Accelerometer

I fixed up the PsyLink UI. It was so broken after the rewrite to Bluetooth Low Energy, I'm once again stunned that I got ANY useful results before. But now it receives the transmissions from the Arduino properly. I also added 6 more signal channels: The x/y/z-axes from the Gyroscope and from the Accelerometer that are built in to the Arduino Nano 33 BLE Sense. All put together finally allowed me to singlehandedly drive through the finish line of my favorite racing game F-Zero!

Read more...

PsyLink: Wireless Prototype

Hell yeah! The PCBs arrived: Soldering & Sewing I never soldered such tiny SMD parts before, and didn't have proper tools, way too thick soldering tin and solder iron tip. I was also too impatient to order some, so after hours of torture, I produced this batch: The new prototype was to be a forearm sleeve of modal fabric once again, with snap buttons for electrodes which will also hold the signal processing PCBs in place.

Read more...

PsyLink: Power Supply Module

I made an updated schematic (psylink6) that shows more clearly how the modules are connected. Also corrected an error with the feedback of the voltage follower, and changed values of some resistors/capacitors: I also constructed the power supply module: but for some reason it didn't work. All the parts seemed to have been connected the right way, I couldn't find a short circuit, but the output voltage was ~0.5V instead of ~5V, and the reference voltage was just 0.

Read more...

PsyLink: New Name

After some brainstorming, I changed the working title of this project from Myocular to ✨PsyLink✨. The close second favorite was FreeMayo (thanks to Vifon for the suggestion). Free as in free speech/software/hardware, and mayo as a play on myo (ancient greek for "muscle"). But somehow I liked PsyLink more. It's inspired by the Psionic Abilities from the 1999's game System Shock 2. FYI, this is the list of words that I considered, although unfortunately many of the coolest combinations were taken:

Read more...

PsyLink: Finished new UI

The new user interface now supports all previous features! Capturing muscle signals Capturing the keys that the user is pressing Training a neural network to predict key presses from given signals Auto-pressing keys based on incoming signals using said neural network to predict which keys the user wants to press It's sooo much more pleasant to have a direct view on the state of the application and an instant visualization of the signals.

Read more...

PsyLink: Higher Bandwidth, new UI

Hah, I managed to raise the Bluetooth bandwidth from ~1kB/s to 6-7kB/s with this one magic line: BLE.setConnectionInterval(8, 8); It raises the power consumption by 4% (3.5mW), but that's totally worth it. I can now get all 8 channels in 8-bit resolution at 500Hz across the aehter. Eventually I should aim for 10-bit at 1kHz, but I think that can wait. This is the GNURadio flowgraph and the resulting output. (I only have hardware for 2 electrode pairs, so even-numbered and odd-numbered signals are wired to the same input.

Read more...

PsyLink: PCB Time

Today I made a new version of the PCB that processes the signals from one electrode pair: Actually, several versions. This is the 4th iteration, and let's not even look at the previous ones because they were just plain wrong. I stared at this design for a long time though and couldn't find another problem, so I went ahead and ordered 30 pieces of it. Can't wait to find out in what way I messed up :'D And hey, maybe it'll actally work.

Read more...

PsyLink: Soldering the Processing Units

The plan was to split the circuit into: 1 central part including the Arduino, power supply and the OpAmp that generates the signal ground, and 8 distributed signal processing units, embedded in hot glue for stability and electrical insulation, consisting of an instrumentation amplifier and related components, close to the electrodes to avoid signal degradation. Here's my try to solder one of those units: This took me over an hour, during which I began questioning various life choices, started doubting this whole project, poured myself a Manhattan cocktail, wondered how long it would take to complete all eight of these, whether it will even be robust enough to withstand regular usage of the device (NO, IT WON'T), and how I'm going to fix the inevitable broken solder joints when the entire thing is in fucking hot glue.

Read more...

PsyLink: Going Wireless

I've been battling with reducing the power line noise for too long, so I thought screw it, let's go off the power line entirely. I put the circuit on two 3V CR2032 coin cells and wrote BLEpipe2.ino to transmit the signals via BLE (Bluetooth Low Energy) using the ArduinoBLE library. Since I can not plot the signals via the Arduino IDE plotter anymore, I switched to GNURadio and wrote a plugin that establishes the BLE connection and acts as a signal source in the GNURadio companion software

Read more...

PsyLink: First Amplifier Circuit

I had my head stuck in electronics lectures, datasheets, and a breadboard to figure out a decent analog circuit for amplifying the signal. It sounds so straight forward, just plug the wires into the + and - pin of an operational amplifier, add a few resistors to specify the gain of the OpAmp, and feed the output to the analog input pin of the Arduino... But reality is messy, and it didn't quite work out like that.

Read more...

PsyLink: Amplifiers

I have the feeling that before building the next prototype, I should figure out some way of enhancing the signal in hardware before passing it to the microcontroller. It's fun to hook the 'trodes straight to the ADC and still get results, but I don't think the results are optimal. So these days I'm mostly researching and tinkering with OpAmps.

Read more...

PsyLink: Multiplexers

The analog multipexers (5x DG409DJZ) and other stuff arrived! I almost bought a digital multiplexer, because I didn't know there were various types... But I think that these will work for my use case. The raw signal that I get out of it looks a little different, but when I filter out the low & high frequencies with TestMultiplexer2.ino, the direct signal and the one that goes through the multiplexer looks almost identical =D.

Read more...

PsyLink: Data Cleaning

The arduino code now produces samples at a consistent 1kHz. I also moved the serial read operations of the calibrator software into a separate thread so that it doesn't slow down on heavy load, causing the buffer to fill up, and the labeling to desynchronize. I am once again confused and surprised that I got ANY useful results before. I disconnected analog input pin 7 from any electrode, and used it as a baseline for the other analog reads.

Read more...

PsyLink: Cyber Gauntlet +1

So if you ever worked with electromyography, this will come to no surprise to you, but OMG, my signal got so much better once I added a ground electrode and connected it to the ground pin of the Arduino. I tried using a ground electrode before, but connected it to AREF instead of GND, which had no effect, so I prioritized other branches of pareto improvement. I am once again confused and surprised that I got ANY useful results before.

Read more...

PsyLink: Adding some AI

Most neural interfaces I've seen so far require the human to train how to use the machine. Learn unintuitive rules like "Contract muscle X to perform action Y", and so on. But why can't we just stick a bunch of artificial neurons on top the human's biological neural network, and make the computer train them for us? While we're at it, why not replace the entire signal processing code by a bunch of more artificial neurons?

Read more...

PsyLink: F-Zero

The look of the first device was way too unprofessional, so I pulled out my sewing machine and made a custom tailored sleeve from comfortable modal fabric. On the inside, I attached some recycled studs that served as electrodes. Who needs that expensive stuff they sell as electrodes when a piece of iron suffices? This time it had 4 electrodes. I targeted the middle and the distal end of two muscles, the Brachioradialis and the Extensor carpi radialis longus.

Read more...

PsyLink: Baby Steps

The Arduino arrived. I have no electrodes though. But what are electrodes, just some pieces of metal taped to your skin, right? Let's improvise that: There are two pieces of aluminum foil taped to my skin, held together with blue medical wrap. The educational material about electromyographs that I've seen described a chain of hardware elements to process and clean up the signal: amplification filtering rectification antialiasing smoothing averaging etc. But I thought, let's focus on the MVP.

Read more...

PsyLink: The Idea

On this day, I got the idea and started researching EMG design and signal processing, motor neurology basics, as well as existing projects. Soon I realized that I will need a microcontroller to record and process the signals. I considered the Raspberry Pi Pico and Arduino Nano 33 BLE Sense, and chose the Arduino because: Bluetooth More analog-to-digital converter inputs support, which would allow me to leverage neural networks for signal processing.

Read more...