Direct feedback from Microcontrollers

edited February 2015 in Everything else
In order to design a proper circuit for implantation, one of the tasks I encountered was wiring up a microcontroller to the body, so you can get direct feedback without any pager motors, led's or other detours. This is the microcontroller => body part. Communication in the other direction is still on my todo.

Since my experiments worked out very well on the first try I decided to publish the basics so others can get started on it as well.
I'll give the setup, and circuits first, then the testing parameters, and the results and conclusion.

The basic idea was to use a programmable current driver to send a predefined current to the electrodes and through the tissue in between them.
On the meat side i used two hypodermic needles with 0.55mm diameter each. I pinched the skin on my forarm and pierced the two needles through the skin. After placing the first needle i clipped of the plastic part so i could place the other needle close to the first one. The needles ended up 2.5mm apart (which gives about 2mm gap due to the diameter) and went into the skin for about 8mm before they poke out again.

The circuit was a pretty textbook-like voltage to current source, build from 2 Op-amps.

The top-right part is responsible to keep the current constant according to the voltage set by the lower half. The switch is actually a pin from the Atmega, driven as 3-state output. Depending on the state of the output, high,low,high-Z, it'll set the current driver to a negative,positive, or no current through the electrodes. The potentiometer  and R1 can adjust the amount of the current.
There are NO SAFEGUARDS on this circuit and it's not suited for production the way it is. It was slammed together so figure out the rough operating parameters of an electrode driver, so I can build a proper one. So I don't recommend to use it, unless you know 100% perfectly what you are doing. I took necessary precautions so the experiment went with no incident.

I wired the circuit shown to an Atmega8, and used the following sequence to make up a single pulse:
300 μs in active low
300 μs in active high
5 ms high-z (atmega pin configured as input)

The potentiometer allowed me to test a wide range of currents. The most interesting ones would be:
400μA - first slight tingling sensation
~600μA - solid easy to feel tingling
1000μA - starting to feel slightly uncomfy
1500μA - pretty uncomfy, but still no pain associated, also about the maximum setting possible for the given circuit and electrode arrangement.

With a duty cycle of about 10% the average current demand for a strong feedback was still below 100μA.

What I learned:
1. Using a controlled current works better than a voltage-controlled electrode driver since it was easier to find the sweet spot between no sensation and pain.
2. It's is possible to operate this circuit on a single lithium battery.
3. Power demand is about 0.4% of an average LED, and can potentially be lowered by using smaller electrode geometry
4. It requires only few parts, and with a few parts added, it can easily drive 8 electrodes, maybe even more.
5. Direct feedback is possible, without triggering a painful sensation

For the actual circuit in the implant, the potentiometer will be replaced by a programmable, digital one. So the user can change the intensity of the feedback in software, within safe operating limits. Slight changes also allow for a variety of different electrode sizes and geometries.

Possible uses i could imagine in combination with an implant:
1 electrode based: Morse code based stuff
6-8 electrodes: Braille reader, compass

Comments, ideas, critics, all are welcome. If you can come up with a good reason/idea why you'd need a certain amount of electrodes in an implant, let me know so i can try to design the hardware for it to be ready.


  • The current source being better than a voltage source is interesting, given that the way action potentials are triggered is by voltages, not currents.

    Actually, for most purposes I think one electrode would be fine.  The only exceptions I can think of involve either transmitting an actual digital value (in which case you'd need as many electrodes as bits), or otherwise needing multiple channels of data simultaneously.  Even Kevin Warwick only needed one electrode for his purposes, even though he had twenty wired up (and only three remaining connected by the end of the experiment).

    Having said that, I think that higher resolution is better, all else equal.  How many output channels do you think we can fit on a small enough board (while still maintaining at least one input channel)?  While I'm on that subject, what board size do you think we can get away with?
  • At least i found it a lot easier to control the current. Having a given voltage it's quite easy to go from "no response" to "shit my arm moved on it's own". That's at least what i experienced.

    the current board size is about 22x24mm, containing wireless charging, battery management, main cpu, and enough space for the electrode driver. input channels would be separate from the outputs, they could be multiplexed tho. about the number of outputs, it's only really limited by the board space, but something like 32 or even 64 channels would be possible if there is a good reason to use up that much board space. for now i'd say 8 would be a good number for starters.
Sign In or Register to comment.