<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-04-03T04:06:28+00:00</updated><id>/feed.xml</id><title type="html">Oleg Parashchenko, fullstack developer in lead roles. LLMs, AWS, Kubernetes, TypeScript, Python, Rust</title><subtitle>advocating my software, tools and thoughts; sharing insights</subtitle><entry><title type="html">Home PC in cloud</title><link href="/vibecoding/2025/12/24/cloud-instance.html" rel="alternate" type="text/html" title="Home PC in cloud" /><published>2025-12-24T00:00:00+00:00</published><updated>2025-12-24T00:00:00+00:00</updated><id>/vibecoding/2025/12/24/cloud-instance</id><content type="html" xml:base="/vibecoding/2025/12/24/cloud-instance.html"><![CDATA[<p>I do vibe coding on Android phone while walking. The biggest challenge was setting up a development environment. While I haven’t finished perfecting it yet, I’ve made enough progress that the remaining issues are less critical. Let me share what I’ve learned so far.</p>

<p>My first obvious attempt was to install Termux (<a href="https://termux.dev/">https://termux.dev/</a>), a terminal emulator with a full Linux environment. It works incredibly well. All the standard development tools are available as packages, and I was able to write Rust and Python programs without issues.</p>

<p>The only important configuration step is setting up Termux’s extra keyboard row, which adds symbols we use constantly in programming: different sorts of brackets, semicolons, and so on.</p>

<p>The real showstopper, however, is AI development. Even in a normal environment, finding a compatible set of Python modules is a special skill. NumPy, SciPy, PyTorch, TensorFlow, the list goes on. For an unconventional environment like Android, it’s practically mission impossible, though I’ve seen some developers manage to compile and run everything.</p>

<p>Instead of solving these exciting technical problems, I took the cloud route.</p>

<p>The idea was simple: before each coding session, start a server in the cloud that would automatically shut down after a couple of hours. Additionally, a cloud volume would be attached automatically, providing persistent file storage.</p>

<p>This setup works perfectly.</p>

<p>But as soon as I realized that the smallest Hetzner (<a href="https://www.hetzner.com/">https://www.hetzner.com/</a>) instance is enough for 99% of my tasks and costs very little, I just let the cloud instance run continuously. The convenience of having the system available at any moment under the same IP address outweighs the under 10€ cost.</p>

<p>I still use temporary servers for heavy ML workloads on AWS.</p>

<p>For those who would like to work in a similar way, feel free to check out my Terraform files: <a href="https://github.com/olpa/dot_files/tree/master/cloud-instance">https://github.com/olpa/dot_files/tree/master/cloud-instance</a>. There are also snippets for SSH config and Ansible. The code is in “works for me” state, but it’s a solid foundation for other use cases.</p>]]></content><author><name></name></author><category term="vibecoding" /><summary type="html"><![CDATA[I do vibe coding on Android phone while walking. The biggest challenge was setting up a development environment. While I haven’t finished perfecting it yet, I’ve made enough progress that the remaining issues are less critical. Let me share what I’ve learned so far.]]></summary></entry><entry><title type="html">Fast converter between DynamoDB typed JSON and normal JSON</title><link href="/rust/2025/12/03/dynamodb-convert-tool.html" rel="alternate" type="text/html" title="Fast converter between DynamoDB typed JSON and normal JSON" /><published>2025-12-03T00:00:00+00:00</published><updated>2025-12-03T00:00:00+00:00</updated><id>/rust/2025/12/03/dynamodb-convert-tool</id><content type="html" xml:base="/rust/2025/12/03/dynamodb-convert-tool.html"><![CDATA[<p>Amazon DynamoDB API uses <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.LowLevelAPI.html">JSON with type annotations</a>. The conversion between this format and normal JSON is mostly simple, but as soon as we work with gigabytes of data, a specialized tool becomes more and more useful.</p>

<p>I’ve developed a fast converter:</p>

<ul>
  <li><a href="https://github.com/olpa/streaming_json/tree/master/examples/dynamodb"><code class="language-plaintext highlighter-rouge">ddb_convert</code> source code</a></li>
  <li><a href="https://hub.docker.com/r/olpa/ddb_convert"><code class="language-plaintext highlighter-rouge">ddb_convert</code> on Docker Hub</a></li>
</ul>

<h2 id="usage-docker-hub-version">Usage (Docker Hub version)</h2>

<p><strong>Convert to DynamoDB format (stdin/stdout)</strong></p>

<p>Command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo '{"name":"Alice","age":30}' | docker run --rm -i olpa/ddb_convert to-ddb
</code></pre></div></div>

<p>Output:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"Item":{"name":{"S":"Alice"},"age":{"N":"30"}}}
</code></pre></div></div>

<p><strong>Convert from DynamoDB format (using file mount)</strong></p>

<p>Input file <code class="language-plaintext highlighter-rouge">data.json</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"Item":{"name":{"S":"Alice"},"age":{"N":"30"}}}
</code></pre></div></div>

<p>When working with files, mount your working directory to <code class="language-plaintext highlighter-rouge">/data</code>. Command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker run --rm -v $(pwd):/data olpa/ddb_convert from-ddb -i data.json
</code></pre></div></div>

<p>Output:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>{"name":"Alice","age":30}
</code></pre></div></div>

<h2 id="performance">Performance</h2>

<p>For benchmarks, I used 10GB JSON fixture from <a href="https://business.yelp.com/data/resources/open-dataset/">Yelp Academic dataset</a>. I’ve vibe coded a few alternatives for comparison:</p>

<ul>
  <li>Rust tool using <code class="language-plaintext highlighter-rouge">json_serde</code>, mapping JSON records to memory dictionaries, and transforming dictionaries between formats</li>
  <li>Python “noboto” tool: similar to the Rust code but implemented in Python</li>
  <li>Python “boto”: uses the <code class="language-plaintext highlighter-rouge">boto3.dynamodb</code> library for conversion</li>
</ul>

<p>The default approach to do conversion is the version using the boto library.</p>

<p><img src="/assets/2025/ddb_convert_performance.png" alt="" /></p>

<p><code class="language-plaintext highlighter-rouge">ddb_convert</code> is twelve times faster than the boto version. Where Python works for an hour, <code class="language-plaintext highlighter-rouge">ddb_convert</code> finishes in 5 minutes.</p>

<p><a href="./streaming-json-transform-is-fast.html">Read more about fast JSON conversion here</a></p>]]></content><author><name></name></author><category term="rust" /><summary type="html"><![CDATA[Amazon DynamoDB API uses JSON with type annotations. The conversion between this format and normal JSON is mostly simple, but as soon as we work with gigabytes of data, a specialized tool becomes more and more useful.]]></summary></entry><entry><title type="html">Streaming JSON parsing and processing is very fast</title><link href="/rust/2025/12/03/streaming-json-transform-is-fast.html" rel="alternate" type="text/html" title="Streaming JSON parsing and processing is very fast" /><published>2025-12-03T00:00:00+00:00</published><updated>2025-12-03T00:00:00+00:00</updated><id>/rust/2025/12/03/streaming-json-transform-is-fast</id><content type="html" xml:base="/rust/2025/12/03/streaming-json-transform-is-fast.html"><![CDATA[<p>Rust library for <a href="https://github.com/olpa/streaming_json">streaming JSON processing</a> is suddenly very fast:</p>

<p><img src="/assets/2025/ddb_convert_performance.png" alt="" /></p>

<p>The initial goal of the <code class="language-plaintext highlighter-rouge">rjiter</code> and <code class="language-plaintext highlighter-rouge">scan_json</code> was to parse json through a sliding window and transform json even before the complete document is loaded. While working on WebAssembly version I tried to minimize the Rust runtime as much as possible.</p>

<p>As result, the libraries are now <code class="language-plaintext highlighter-rouge">no_std</code>, alloc-free and zero-copy (not 100% true, but close). Having these properties, it’s reasonable to expect that the performance should be good.</p>

<p>As a test, I’ve developed a <a href="./dynamodb-convert-tool.html">converter between the normal JSON and DynamoDB JSON with type annotations</a>, and vibe coded a few alternatives for comparison. For benchmarks, I used 10GB JSON fixture from <a href="https://business.yelp.com/data/resources/open-dataset/">Yelp Academic dataset</a>.</p>

<h2 id="reduce-the-cloud-bill">Reduce the cloud bill</h2>

<p>The exact performance gain depends on the task, but I think the order is plus minus the same. Then:</p>

<p>It makes difference if a task runs 1 hour using a custom tool with <code class="language-plaintext highlighter-rouge">scan_json</code> inside or 12 hours using a Python converter.</p>

<p>Even if processing time is reduced only twice, it’s already twice less money for the cloud compute. For some tasks it can be a significant difference.</p>

<p>“For some tasks” &lt;– which ones? It’s something I want to hear from you. Please share your use cases. I need a collection to eventually decide if further work is possible.</p>

<h2 id="further-work">Further work</h2>

<p>There are at least two obvious directions.</p>

<p>First one is getting more speed. The integration of the json parser “<a href="https://crates.io/crates/jiter">jiter</a>” brings overhead of extra copies and moves. A fine-tuned clone of it would drop unneeded inefficiencies.</p>

<p>Second is the usability. The current interface for matchers is too low level. Instead, it could be possible to develop a domain-specific language, so that many practical applications could be easily written: specialized converters, schema validators etc.</p>

<p>Unfortunately, this all doesn’t fit to a weekend project and I can’t afford spending time on it. Pity, because the resulting library can be fantastic.</p>

<p>Anyone from VC or cloud providers would like to sponsor?</p>]]></content><author><name></name></author><category term="rust" /><summary type="html"><![CDATA[Rust library for streaming JSON processing is suddenly very fast:]]></summary></entry><entry><title type="html">U8pool, a stack for u8 slices in a client-provided buffer</title><link href="/rust/2025/10/23/u8pool-crate.html" rel="alternate" type="text/html" title="U8pool, a stack for u8 slices in a client-provided buffer" /><published>2025-10-23T00:00:00+00:00</published><updated>2025-10-23T00:00:00+00:00</updated><id>/rust/2025/10/23/u8pool-crate</id><content type="html" xml:base="/rust/2025/10/23/u8pool-crate.html"><![CDATA[<p>I’ve just published a new crate <code class="language-plaintext highlighter-rouge">u8pool</code>:</p>

<ul>
  <li>Uses preallocated memory to store byte slices</li>
  <li>Optionally with a companion <code class="language-plaintext highlighter-rouge">Sized</code> object</li>
  <li>The interface is stack-based, with forward and reverse iterators</li>
  <li>The code is <code class="language-plaintext highlighter-rouge">no_std</code>, without dependencies</li>
</ul>

<p>Links</p>

<ul>
  <li><a href="https://crates.io/crates/u8pool">u8pool on crates.io</a></li>
  <li><a href="https://github.com/olpa/streaming_json/tree/master/u8pool">subproject on github</a></li>
</ul>

<p>I use <code class="language-plaintext highlighter-rouge">u8pool</code> in a json processing library, to store the path from the top to the current nested json element, together with the parser state on each level. I suppose all recursive parsers need something like it.</p>

<p>Please try, review, tell about your use cases! If you liked <code class="language-plaintext highlighter-rouge">u8pool</code>, please star the github repo: <a href="https://github.com/olpa/streaming_json/">https://github.com/olpa/streaming_json/</a>.</p>]]></content><author><name></name></author><category term="rust" /><summary type="html"><![CDATA[I’ve just published a new crate u8pool:]]></summary></entry><entry><title type="html">Opposite of EEG and black projects</title><link href="/bci/2025/07/16/ems-opposite-of-eeg.html" rel="alternate" type="text/html" title="Opposite of EEG and black projects" /><published>2025-07-16T00:00:00+00:00</published><updated>2025-07-16T00:00:00+00:00</updated><id>/bci/2025/07/16/ems-opposite-of-eeg</id><content type="html" xml:base="/bci/2025/07/16/ems-opposite-of-eeg.html"><![CDATA[<p>After technical posts, Michal shares non-technical notes on the opposite of EEG, namely using electical signals to affect brain activity.</p>

<p>This device is a voltmeter. <a href="https://en.wikipedia.org/wiki/Hans_Berger">Prof. Dr. Berger</a> called the voltmeter an <a href="https://en.wikipedia.org/wiki/Electroencephalography">electroencephalogram</a>. Long words in German are common, so he took the word electric and the word encephalus (brain in Latin) and the word gram (short name for a diagram). By connecting these 3 words, Prof. Dr. Berger invented a complicated name for a voltmeter that’s designed for measuring the brain voltage and showing it as a diagram where the voltage fluctuates.</p>

<p><img src="/assets/2025/typical_eeg.png" alt="Typical EEG" /></p>

<p>He also used the opposite of EEG, electric stimulation to alter the brain activity. He worked on synthetic telepathy (transferring brain signal through a wire from one subject to another subject, so that he measured voltages of one dog and electrically stimulated another dog with voltages from the first one. He succeeded. He was able to trigger certain behaviors in the 2nd dog that exactly copied the 1st dog.). Other researchers continued and tried it on monkeys, etc.</p>

<p>I found there is also <a href="https://en.wikipedia.org/wiki/Electrical_muscle_stimulation">EMS</a>. Basically, when you send some particular voltage to a location in your elbow, for example, your arm closes. And when you send a different specific voltage to that location, your arm opens. So, it’s possible to control your own, or anybody elses, movements via EMG.  Some location has the nerve. And the nerve conducts electricity that you can measure with EEG sensors. When you use electric stimulation, it can be simply a wire or an EEG electrode that you attach to your arm, near the nerve, and then you send some small voltage that you previously measured from it while you were opening your arm, or closing your arm.</p>

<p>This way, if you were lazy and didn’t want to do i.e. abdominal crunch exercises, you’d be able to fit yourself with electrodes and after sensing voltages from a real exercise, you’d be sending voltages there to make yourself exercise automatically.</p>

<p>And this is part of what I’m investigating. Someone has been abusing a more advanced technology that’s wireless. It’s ahead of the publicly known state of the art by several decades. And most people never heard of it, and unless they witness it themselves they won’t believe it exists. If you read about <a href="https://www.sciencenews.org/article/hans-berger-telepathy-neuroscience-brain-eeg">Prof. Dr. Berger’s story when he fell from a horse</a>, you will find he witnessed it. And that’s what made him work on EEG to prove synthetic telepathy is possible. And he proved it. He read via EEG from one subject and stimulated another subject with the first subject’s thoughts. The wireless BCI that doesn’t require any physical contact with the body is futuristic and unknown. One explanation is that it’s a <a href="https://en.wikipedia.org/wiki/Black_project">https://en.wikipedia.org/wiki/Black_project</a> that was researched and developed in a locked R&amp;D lab by some clandestine unit of the military that does espionage, sabotages and assassinations with a plausible deniability. Whoever witnesses this working from a distance ends up like Prof. Dr. Berger without any evidence and it takes many years to prove at least a bit more than is already publicly known. The clandestine unit had to employ teams of professional scientists for many decades, throughout WW1 and later, in order to have such tools and weapons for black ops. It’s like a nuclear bomb, but for the brain. Unlike a nuclear bomb, I don’t think this will get declassified.</p>

<p>In 1994, one computer scientists whom I knew personally, has estimated the technology was 5 decades ahead, back then. Now it’s 2025 and it still appears to be, in ChatGPT’s estimate still at least 50 years ahead of today. So, I’m afraid nobody publicly worked on it over the last 31 years at all. I’d like to distinguish between publicly known science, such as published breakthroughts, and private/unknown science that includes unpublished breakthroughs exploited for an asymmetric warfare.</p>]]></content><author><name></name></author><category term="bci" /><summary type="html"><![CDATA[After technical posts, Michal shares non-technical notes on the opposite of EEG, namely using electical signals to affect brain activity.]]></summary></entry><entry><title type="html">Analysis of EEG signals</title><link href="/bci/2025/07/15/evaluation-of-eeg-signal.html" rel="alternate" type="text/html" title="Analysis of EEG signals" /><published>2025-07-15T00:00:00+00:00</published><updated>2025-07-15T00:00:00+00:00</updated><id>/bci/2025/07/15/evaluation-of-eeg-signal</id><content type="html" xml:base="/bci/2025/07/15/evaluation-of-eeg-signal.html"><![CDATA[<p>Michal Oblastni published a <a href="https://github.com/michaloblastni/local-neural-monitoring/blob/main/EEG_data_analysis.ipynb">Jupyter Notebook for EEG signal analisys</a>. Here are his comments:</p>

<p>For data collection, just attach a wire or a small metal object to your head. It will have conductivity.</p>

<p>When voltage from your scalp is conducted through a wire, amplify it from microvolts to millivolts, and convert analog millivolts to digital information.</p>

<p>Finally, expose digital information as bytes of data via a USB controller for a computer to be able to see the measured voltage. Different positions on your scalp have different voltages depending on electrical <a href="https://en.wikipedia.org/wiki/Cell_signaling">https://en.wikipedia.org/wiki/Cell_signaling</a>.</p>

<p><a href="https://www.olimex.com/Products/EEG/OpenEEG/EEG-SMT/open-source-hardware">EEG-SMT</a> measures voltage 256 times per second. It’s only a 2 channel device, hence suitable for a PoC.</p>]]></content><author><name></name></author><category term="bci" /><summary type="html"><![CDATA[Michal Oblastni published a Jupyter Notebook for EEG signal analisys. Here are his comments:]]></summary></entry><entry><title type="html">EEG-SMT that works, not just a proof of concept</title><link href="/bci/2025/07/13/eeg-smt-that-works.html" rel="alternate" type="text/html" title="EEG-SMT that works, not just a proof of concept" /><published>2025-07-13T00:00:00+00:00</published><updated>2025-07-13T00:00:00+00:00</updated><id>/bci/2025/07/13/eeg-smt-that-works</id><content type="html" xml:base="/bci/2025/07/13/eeg-smt-that-works.html"><![CDATA[<p><a href="https://www.olimex.com/">Olimex</a> sells electrodes that are only good for a PoC, but since they aren’t fitted into any headset they make any real-world work nearly impossible. The story by Michal Oblastni:</p>

<p>To solve this problem professionally, I’ve empirically evaluated different options. I ended up 3d printing Mark 3 Nova from <a href="https://github.com/OpenBCI/Ultracortex/tree/master/Mark_III_Nova">https://github.com/OpenBCI/Ultracortex/tree/master/Mark_III_Nova</a> using Creality Ender-3 V3 KE and gluing it together with Loctite:</p>

<p><img src="/assets/2025/printed_headset.jpg" alt="3d printed headset" /></p>

<p>To make it work properly, there are spiky sensors that touch your head when you put it on. Those sensors, incl. springs and other required parts are available at the Ali Express. I’ve just ordered those.</p>

<p>Notice I screwed in one of the 3d printed bolts that touches the middle of your forehead. Four bolts will be screwed in (CH1+, CH1-, CH2+, CH2-). Their position can be changed any time.</p>

<p>While waiting for parts to arrive, I already got some stereo 3.5 jacks. I chose gold plated even though it’s not needed:</p>

<p><img src="/assets/2025/jack_2.jpg" alt="jacks" /></p>

<p>These stereo jacks support 3 wires. Only one wire is mandatory (signal). When you purchase an audio cable with shadowing, it will have two wires. If you wanted to attach an amplifier to have active electrodes you’d use 3 wires.</p>

<p>It is possible to use custom jacks instead of dying a wire directly to each EEG-SMT electrode:</p>

<p><img src="/assets/2025/eeg_1.jpg" alt="" /></p>

<p><img src="/assets/2025/eeg_2.jpg" alt="" /></p>

<p>These are gold cup electrodes from AliExpress for experiments connected using my new 3.5 jacks. They are small enough to fit inside an elastic headband without discomfort. They can be easily taped on your head as well. They also fit inside an EEG cup which I dislike though because it compresses your head which is uncomfortable.</p>

<p>Taping of electrodes is impractical for daily brain training. Hence, Mark 3 sensors and headset win. The benefit is that you simply put on the headset and those electrodes already touch your head. They always touch the exactly correct location. No need to tape anything, and no need to compress your head with an uncomfortable elastic headband. I chose DRY electrodes that don’t require any gel or water. Because the position is fixed, yet the whole headset is easily and quickly attachable/removable, you can use AI/ML with this and it will work consistently after you remove the headset and attach it again.</p>

<p>The 3D Printed Mark 3 is a professional solution that costs absolutely nothing because it is Open Source. I didn’t find any disadvantage. It’s extremely comfortable. You simply put it on, then you can exercise or research, and later just take it off. No need to glue anything, compress your head, etc. It doesn’t require changing your haircut either because those DRY electrodes are spiky and the spikes touch your scalp even through hair, without any discomfort (they are dull spikes). It’s suitable for a daily hassle-free use.</p>

<p>Of course the standard EEG-SMT DLR electrode is absolutely awful. To solve it, I got this earclip electrode that holds properly on your ear. There are two, but only one is needed. It came with a minijack, so I’ll cut the wire and solder it to one of my 3.5” stereo jacks for plugging it into EEG-SMT:</p>

<p><img src="/assets/2025/earclip_electrode.jpg" alt="earclip electrode" /></p>

<p>It’s unbelievable how much effort went into figuring it out and testing different options. This is, I believe, how everyone can turn EEG-SMT into an EEG solution that can be used for daily work, not just as a one-time PoC.</p>

<h3 id="update">Update</h3>

<p>I’m so glad I got rid of the original electrodes and figured out how to use professional EEG electrodes instead. The original electrodes are the worst product I’ve ever used. Three sprawling wires that don’t even hold together, and huge PCBs.</p>]]></content><author><name></name></author><category term="bci" /><summary type="html"><![CDATA[Olimex sells electrodes that are only good for a PoC, but since they aren’t fitted into any headset they make any real-world work nearly impossible. The story by Michal Oblastni:]]></summary></entry><entry><title type="html">Exploration of BCI headbands, headsets and electrodes</title><link href="/bci/2025/06/18/exploration-bci-accessories.html" rel="alternate" type="text/html" title="Exploration of BCI headbands, headsets and electrodes" /><published>2025-06-18T00:00:00+00:00</published><updated>2025-06-18T00:00:00+00:00</updated><id>/bci/2025/06/18/exploration-bci-accessories</id><content type="html" xml:base="/bci/2025/06/18/exploration-bci-accessories.html"><![CDATA[<p>Towards BCI (Brain-Computer-Interface): At this point the small electrodes with a headband that supports repositioning seem to be the best option for simple use cases. Below is a longer story by Michal Oblastni.</p>

<h2 id="first-attempt-ask-those-who-did-it">First attempt: ask those who did it</h2>

<p>There is an article by Giovanni Acampora, Pasquale Trinchese and Autilia Vitiello, “A Dataset of EEG Signals from a Single-Channel SSVEP-Based Brain-Computer Interface”, <a href="https://www.researchgate.net/publication/349023244_A_Dataset_of_EEG_signals_from_a_single-channel_SSVEP-based_Brain_Computer_Interface">https://www.researchgate.net/publication/349023244_A_Dataset_of_EEG_signals_from_a_single-channel_SSVEP-based_Brain_Computer_Interface</a>.</p>

<p>Michal contacted the authors with questions, to be answered yet:</p>

<ul>
  <li>I was especially interested in the EEG-SMT headset you used. Would you mind
sharing the 3D model you used for printing it?</li>
</ul>

<p><img src="/assets/2025/eeg_paper_headset.png" alt="EEG paper headset" /></p>

<ul>
  <li>I also really liked how you enhanced the electrode using gold-plated pins,
very clever.</li>
</ul>

<p><img src="/assets/2025/eeg_paper_electrodes.png" alt="EEG paper electrodes" /></p>

<p>What are these pins typically called when ordering them online or from
electronics suppliers? The closest match I’ve found so far is this:
<a href="https://www.amazon.co.uk/MicroMaker-Adafruit-Accessories-Through-Inline/dp/B0CVMCXD8V">https://www.amazon.co.uk/MicroMaker-Adafruit-Accessories-Through-Inline/dp/B0CVMCXD8V</a></p>

<h2 id="headband">Headband</h2>

<p>After doing some digging, I found out you can use the EEG-SMT like this:</p>

<p><img src="/assets/2025/headband_example.png" alt="EEG headband example" /></p>

<p>A cheap elastic headband (under 10 EUR) works well. The EEG-SMT electrodes have 4 small holes, so you can sew them onto the band using a needle and thread.</p>

<h2 id="electrodes">Electrodes</h2>

<p>While playing with my EEG-SMT device, I found it’s possible to solder an ordinary wire to the electrode, and touch your head with that wire. It seems to work the same.</p>

<p>That means it’s possible to buy a 4 gold plated electrodes. One costs  €2.95.  They are single wire electrodes. The single wire can be soldered to the EEG-SMT electrodes and everything works. <a href="https://www.aliexpress.com/item/1005008999662099.html">https://www.aliexpress.com/item/1005008999662099.html</a></p>

<p><img src="/assets/2025/electrodes_set.png" alt="Electrodes set" /></p>

<p>And I also found a cheap, adjustable EEG headband that allows repositioning these electrodes quickly and easily. <a href="https://www.aliexpress.com/item/1005008922828624.html">https://www.aliexpress.com/item/1005008922828624.html</a></p>

<p><img src="/assets/2025/ali_headband1.png" alt="Sample headband" /></p>

<p><img src="/assets/2025/ali_headband2.png" alt="Sample headband" /></p>

<p>Then, I found an earclip electrode which can, again, be used and the wire can be soldered to the EEG-SMT DLR electrode: <a href="https://www.aliexpress.com/item/1005005883419082.html">https://www.aliexpress.com/item/1005005883419082.html</a></p>

<p><img src="/assets/2025/earclip.png" alt="Earclip electrode" /></p>

<p>With the earclip and small, normal electrodes the signal will be really good. I can also see how comb shaped dry electrodes could be used: <a href="https://www.aliexpress.com/item/1005008709097720.html">https://www.aliexpress.com/item/1005008709097720.html</a></p>

<p><img src="/assets/2025/comb_electrodes.png" alt="Comb shaped electrode" /></p>

<p>So, at this point the small electrodes with a headband that supports repositioning seem to be the best option for simple use cases.</p>

<h2 id="learning-to-3d-print">Learning to 3D print</h2>

<p>If you’ve got a soldering iron and some solder, you can attach gold-plated pins (or even basic ones) directly to the electrodes. It’s a quick fix, but not ideal long term.</p>

<p>A custom 3D-printed headset is obviously a better and more comfortable option, but it does mean modeling it properly in CAD first.</p>

<p>I ended up buying a Creality Ender-3 V3 KE 3D printer. The print area is 220x220x240 mm, so I had to split the headset into two pieces using Creality Print.</p>

<p>After printing both parts, I realized the design is pretty basic and still needs some CAD work—mainly to make it easier to mount the electrodes.</p>

<p>This YouTube video gives a good overview of different CAD tools: <a href="https://www.youtube.com/watch?v=IUoTKbGAlhk&amp;ab_channel=MakeWithTech%28MakeWithTech%29">https://www.youtube.com/watch?v=IUoTKbGAlhk&amp;ab_channel=MakeWithTech%28MakeWithTech%29</a></p>

<p>One great option is TinkerCAD. It’s 100% free, browser-based, used by students worldwide, and you can log in with a Google account—no separate signup needed: <a href="https://www.tinkercad.com">https://www.tinkercad.com</a></p>]]></content><author><name></name></author><category term="bci" /><summary type="html"><![CDATA[Towards BCI (Brain-Computer-Interface): At this point the small electrodes with a headband that supports repositioning seem to be the best option for simple use cases. Below is a longer story by Michal Oblastni.]]></summary></entry><entry><title type="html">Choices to fix electrodes for EEG-SMT</title><link href="/bci/2025/06/08/holding-eeg-smt-electrodes.html" rel="alternate" type="text/html" title="Choices to fix electrodes for EEG-SMT" /><published>2025-06-08T00:00:00+00:00</published><updated>2025-06-08T00:00:00+00:00</updated><id>/bci/2025/06/08/holding-eeg-smt-electrodes</id><content type="html" xml:base="/bci/2025/06/08/holding-eeg-smt-electrodes.html"><![CDATA[<p>When <a href="/blog/category/bci/">experimenting with neurofeedback</a> I failed at the cap step. I got medical gel for the electrodes, realized I need to fix them, but then priorities changed and I dropped the project. Today I’d try to use a swimming cap or a sport/physio tape to fix the electrodes.</p>

<p>I’m not the only one to face this problem. I’ve got a question from <a href="https://github.com/michaloblastni/local-neural-monitoring">Michal Oblastni</a>:</p>

<blockquote>
  <p>were you ever able to find or make a cap for it? I’m using
active electrodes, but they’re flat and pretty large. Most EEG caps don’t
have openings big enough, and even when they sort of fit, the electrodes
don’t stay in place well.</p>
</blockquote>

<p>After I answered with the first paragraph of this post, Michael shared his research. The rest of this post is his text.</p>

<p>I tried using tape to hold the electrodes in place, but it doesn’t work
very well. It keeps shifting slightly each time, and as a result, advanced
algorithms like AI-based feature detection can’t get a stable signal,
especially when the tape starts peeling off.</p>

<p>I’ve been doing some design science research and found quite a bit of
existing knowledge on how to keep EEG sensors steady.</p>

<p>Here are some of the approaches I came across:</p>

<ul>
  <li>EEG headset: using a regular headset with headphones and a mic, modified
to hold electrodes</li>
  <li>EEG glasses: attaching sensors to the sides of standard eyeglasses</li>
  <li>EEG halo: a ring-shaped wire or plastic frame worn like a crown</li>
  <li>EEG headband: a stretchable sports headband (like from Nike or Adidas)
with sensors attached</li>
  <li>EEG cap: a swimming cap with holes for sensors, which you mentioned</li>
  <li>Diving goggles: sensors mounted onto the frame</li>
</ul>

<p>Most of these are plastic, but some are textile (like the headband), or
even basic metal wire shaped into a ring that sits around the head with
sensors attached.</p>

<p>And one more option, that’s creative, customizable, and easier: You can ask
ChatGPT to design an artifact for 3d printing.</p>

<p>Tell it to design an EEG
headset. It will ask for your head circumference. So, use a tape measure
and find when you put it on your eyebrows, and all the way behind your back
of the head that you need i.e. 60cm. Then, tell it that you will be
attaching EEG-SMT electrodes to the headset in positions F7 and F8 based on
the 10/20 international system.</p>

<p>And it will design small circular edges
where the EEG-SMT sensors can be glued. Or, you can design it to slide them
in, so that only the conductive bottom part of the electrode is visible.
The rest is inserted into the plastic EEG headset.</p>

<p>And finally, ChatGPT can
give you the exact <code class="language-plaintext highlighter-rouge">eeg_headset.stl</code> that you can open with FreeCAD and print
on a 3d printer, or email it to some shop in your city that offers a cheap
3d printing. They will print it for you, very cheap, and then you can use
it for hassle-free experiments.</p>

<p>Unlike other solutions, this is based on
the exact size of your head, so everything fits 100% perfectly. ChatGPT
does all the work, so there should not be anything needed except emailing
it to someone who will print it. But as always with AI, one has to validate
it’s correct before depending on its answer.
<a href="/assets/2025/eeg_headset_f7_f8.stl">I am attaching</a> what ChatGPT
designed in 5 minutes. FreeCAD is Open Source and it’s at
<a href="https://www.freecad.org/downloads.php">https://www.freecad.org/downloads.php</a>.</p>]]></content><author><name></name></author><category term="bci" /><summary type="html"><![CDATA[When experimenting with neurofeedback I failed at the cap step. I got medical gel for the electrodes, realized I need to fix them, but then priorities changed and I dropped the project. Today I’d try to use a swimming cap or a sport/physio tape to fix the electrodes.]]></summary></entry><entry><title type="html">On hunt for better electrodes</title><link href="/bci/2025/06/08/on-hunt-for-better-electrodes.html" rel="alternate" type="text/html" title="On hunt for better electrodes" /><published>2025-06-08T00:00:00+00:00</published><updated>2025-06-08T00:00:00+00:00</updated><id>/bci/2025/06/08/on-hunt-for-better-electrodes</id><content type="html" xml:base="/bci/2025/06/08/on-hunt-for-better-electrodes.html"><![CDATA[<p>After fixing EEG noise <a href="">using software</a> and <a href="">fixing electrodes</a>, the next step is to upgrade electrodes.</p>

<p>Once again, the text below is from <a href="https://github.com/michaloblastni/local-neural-monitoring">Michal Oblastni</a>:</p>

<p>I’ve also looked at the EEG-SMT electrodes themselves. Based on other EEG
designs, I think they need a small hardware mod. One option is to add
short, blunt pins that can grip the scalp better—even through hair. Here’s
an example with gold pins:</p>

<p><img src="https://raw.githubusercontent.com/splithor1zon/EEG-ReMake/refs/heads/master/img/1.jpg" alt="eeg-rm" /></p>

<p>These could replace the flat default electrodes.</p>

<p>Alternatively, I found some other compatible electrodes that are pretty
cheap. I use the active ones from Olimex, which don’t need gel and include
a built-in amplifier:</p>

<p><a href="https://www.olimex.com/Products/EEG/Electrodes/EEG-AE/open-source-hardware">https://www.olimex.com/Products/EEG/Electrodes/EEG-AE/open-source-hardware</a></p>

<p>All it really takes is a soldering iron and a few basic parts. Even
standard electrodes can work fine with EEG-SMT, since they just connect the
scalp to the amplifier. As long as the signal path is preserved, we’re good.</p>]]></content><author><name></name></author><category term="bci" /><summary type="html"><![CDATA[After fixing EEG noise using software and fixing electrodes, the next step is to upgrade electrodes.]]></summary></entry></feed>