FOC-Stim: a new approach to DIY stim hardware.
FOC-Stim: a new approach to DIY stim hardware.
Over the past years, I spent a lot of time researching estim theory. It became apparent to me that stereostim boxes have big limitations when it comes to generating precise and repeatable sensations. Recently, I realized that this problem can be solved with cheap hardware that was collecting dust in my drawers.
The result is FOC-Stim: a cheap and efficient signal generator based on a BLDC development kit from ST. Costing only €25, this board is capable of generating the analogue waveforms you love. Software on the board creates current-controlled signals, eliminating variations in sensation due to nonlinear skin resistance, contact area, body position changes and moisture.
Details and build instructions can be found here: https://github.com/diglet48/FOC-Stim
On Joanne's discord, about 5 people have built and tested the hardware with positive results. There are a few minor issues related to vbus and temperature sensing variations between boards.
The result is FOC-Stim: a cheap and efficient signal generator based on a BLDC development kit from ST. Costing only €25, this board is capable of generating the analogue waveforms you love. Software on the board creates current-controlled signals, eliminating variations in sensation due to nonlinear skin resistance, contact area, body position changes and moisture.
Details and build instructions can be found here: https://github.com/diglet48/FOC-Stim
On Joanne's discord, about 5 people have built and tested the hardware with positive results. There are a few minor issues related to vbus and temperature sensing variations between boards.
Re: FOC-Stim: a new approach to DIY stim hardware.
I am one of those who built these and can confirm, my stereostim box is already retired :)
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090
And in E-Stim Index: viewtopic.php?t=27090
- Spoiler: show
Re: FOC-Stim: a new approach to DIY stim hardware.
I've subscribed to this thread as I'm fascinated by the approach and the science behind it. Hopefully, the build and software is 'simple' for simple people 

Re: FOC-Stim: a new approach to DIY stim hardware.
It is faster and simpler to build than stereostim. There is bom of necessary components and 3d-printed case cad on my fork of repo: https://github.com/edger477/FOC-Stim/tree/master/case (rest of repo is identical, I only added this folder)
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090
And in E-Stim Index: viewtopic.php?t=27090
- Spoiler: show
Re: FOC-Stim: a new approach to DIY stim hardware.
Damn, that's really cool! I think I'll build one of these and use in parallel with my existing DIY box, instead of continuing my research into 4-channel boxes.
Any time I find something I'm excited about a million questions and feature suggestions pop into my head, I hope you have patience :)
- How powerful is it? E.g. is there a risk that some find it not delivering enough juice? Or the opposite, is there's a risk of injury if you accidentally push it to the max?
- Github recommends 12V power supply, but the linked product page says "Designed for drones with up to 6S LiPo battery pack or equivalent suitable DC supply" and a quick googling suggests that those are 22V. Does it have a wide range of accepted voltages? Can't see any numbers in the tech spec.
- Has anyone tried running it off batteries? I've got some Arduino-compatible boards with wifi that would be interesting to combine with this.
- I assume you've done a thorough electrical safety analysis of the build. The tech specs claim 40A peak, and while I know there are transformers involved, that _sounds_ like quite a lot. Are you sure a firmware error in this won't kill you? :D Maybe possible to add some fuses or analogue current limiters on the outputs for the paranoid? I mean if you don't fully trust the built-in digital current limiter.
Any time I find something I'm excited about a million questions and feature suggestions pop into my head, I hope you have patience :)
- How powerful is it? E.g. is there a risk that some find it not delivering enough juice? Or the opposite, is there's a risk of injury if you accidentally push it to the max?
- Github recommends 12V power supply, but the linked product page says "Designed for drones with up to 6S LiPo battery pack or equivalent suitable DC supply" and a quick googling suggests that those are 22V. Does it have a wide range of accepted voltages? Can't see any numbers in the tech spec.
- Has anyone tried running it off batteries? I've got some Arduino-compatible boards with wifi that would be interesting to combine with this.
- I assume you've done a thorough electrical safety analysis of the build. The tech specs claim 40A peak, and while I know there are transformers involved, that _sounds_ like quite a lot. Are you sure a firmware error in this won't kill you? :D Maybe possible to add some fuses or analogue current limiters on the outputs for the paranoid? I mean if you don't fully trust the built-in digital current limiter.
Re: FOC-Stim: a new approach to DIY stim hardware.
I buily 3 of these, stimmed with 2 at same time, even created that restim-controller app that allows controlling 2 instances of restim at same time.
successfully, 2 boxes from one IUNU powerbank that provides up to 1.5A on 12 (usb-c PD)
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090
And in E-Stim Index: viewtopic.php?t=27090
- Spoiler: show
Re: FOC-Stim: a new approach to DIY stim hardware.
Sounds awesome! Did you measure or calculate how long you could run on a charge? Seems like 12V was removed from PD 2.0, but perhaps it's still easy to find a power bank which supports the older standard. Unless ofc. it works equally well to run the board off 15V, since that seems to be one of the voltages offered by the newer PD standards.
Re: FOC-Stim: a new approach to DIY stim hardware.
You could configure foc to run off 15v too, but I have the usb-c => 12v cables already.darthjj wrote: ↑Mon Dec 16, 2024 5:28 pm Sounds awesome! Did you measure or calculate how long you could run on a charge? Seems like 12V was removed from PD 2.0, but perhaps it's still easy to find a power bank which supports the older standard. Unless ofc. it works equally well to run the board off 15V, since that seems to be one of the voltages offered by the newer PD standards.
It consumes maybe few watts, I think 20% of 10Ah powerbank should last for a session.
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090
And in E-Stim Index: viewtopic.php?t=27090
- Spoiler: show
Re: FOC-Stim: a new approach to DIY stim hardware.
It is very powerful, the output current is limited by software (default 80mA peak). With a 12v power supply, about 10v is available for actual waveforms and I only use about 2-3v. The removal of the 4-ohm series resistor present in most builds really amps up the available power and efficiency.
The minimum input voltage is 10v. Below that, the gate drivers stop working, The maximum is around 25-35v, I'm not exactly sure which component on the board has the lowest voltage rating, you can find it in the schematics on ST's website.
The average consumption of the device is less than 2w, you can run it off batteries with an USB-C to 12v trigger cable. The device can be controlled over wifi, to do this you need any 3.3v or 5v microcontroller with wifi. There are pads between the V+ and V- that supply 5v 0.5A, ground and rx/tx. Here is a demo with an esp32. However, wifi reliability with this chip is an issue. I use the T-code protocol and it was not designed for lossy transmission channels. If you are serious about controlling this box wirelessly, the protocol will need an update.

I did my best to program the software in such a way that it can handle errors. The software handles over-current, over-voltage, under-voltage and temperature errors. If any of the limits are exceeded it just shuts off. There are a few other protections that can be implemented (loose electrode?).
I have not performed a thorough safety analysis. My gut feeling is that the transformers are not large enough to kill you even if the box fails catastrophically. The mosfets are rated for 40A which actually means they are a lot safer than the models found in most audio devices, that fail and remain in an open state at much lower current...
I won't claim this hobby is perfectly safe, but neither is a stereostim box with oversized transformer and a chinese TPA3116 clone chip

-
- Explorer
- Posts: 7
- Joined: Sun Dec 31, 2023 9:07 pm
- Gender: Male
- Sexual Orientation: Straight
Re: FOC-Stim: a new approach to DIY stim hardware.
Another builder/tester here, and this is a wonderful device with novel software. It really packs a punch but is super smooth at the same time. The ability to track your session in teleplot is amazing. Way To Go Diglet!
I attempted this and did not like it. The stereostim was painful compared to the FOC-stim. I went back to 2x stereostim and will build another FOC box. YMMV.
Re: FOC-Stim: a new approach to DIY stim hardware.
I suppose there are degrees of thoroughness when doing a safety analysis. The ReStim wiki is one of the best estim safety resources I've seen, so I assumed you'd approach a new electronics project with the same caution :)
I've seen a thread somewhere where people who were good at electronics were discussing different safety measures one could add to a DIY stim box. Unfortunately I don't remember if it was here or some other forum.. The digital safety features are of course very nice to have, but personally I would like something analog/mechanical on top of it. Perhaps I'll add a large off switch that I can slap in case of emergency :P I've got unpleasant shocks from my stereostim box once or twice, either due to a bad signal or electrode wire breakage. Nothing serious, but enough to make me realize how difficult it is to hit a normal sized power button while being zapped.
Ah, so 40A peak is just the max rating for the hardware? I thought the product page meant that this board could deliver that if given sufficient power
I could probably wrap the t-code in some other protocol when it comes to that. It's a future project, but having a fully wireless box would be great for VR usage for example.
Well, that's the reason I built my sterostim using an enclosed amp from a known manufacturer, which was recommended by people who know more about circuit design than me. I don't know how much difference it makes, but buying the cheapest stuff from Amazon/Aliexpress seems like an unnecessary risk IMO.
That's interesting.. Could it be that it's current driven that makes it feel different? I was thinking of using the FOC-stim as a stroker, with one of the stereostim channels to a bi-polar prostate probe, and the other channel attached to either balls or butt cheeks for some BDSM possibilities. So with such setup, perhaps it's less of an issue if the stereostim signals feel rougher?
Re: FOC-Stim: a new approach to DIY stim hardware.
I understood him as saying that using stereostim and foc box at same time made stereostim stingy, and that is probably because it doesn't have current control like FOC so it will be stingier by comparison.darthjj wrote: ↑Fri Dec 20, 2024 8:45 am That's interesting.. Could it be that it's current driven that makes it feel different? I was thinking of using the FOC-stim as a stroker, with one of the stereostim channels to a bi-polar prostate probe, and the other channel attached to either balls or butt cheeks for some BDSM possibilities. So with such setup, perhaps it's less of an issue if the stereostim signals feel rougher?
I'd suggest to just start with 2 FOC in any case as you need 50$ from Mouser for free shipping anyway :D
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090
And in E-Stim Index: viewtopic.php?t=27090
- Spoiler: show
Re: FOC-Stim: a new approach to DIY stim hardware.
I think so too, I'm just curious to what could explain the difference. I can imagine that FOC 3-phase feels different from stereostim where you just join the channels together into a common electrode, but I'll have to do my own experiments after I build it :)edger477 wrote: ↑Fri Dec 20, 2024 9:18 am I understood him as saying that using stereostim and foc box at same time made stereostim stingy, and that is probably because it doesn't have current control like FOC so it will be stingier by comparison.
I'd suggest to just start with 2 FOC in any case as you need 50$ from Mouser for free shipping anyway :D
Can you use just 2 of the outputs on a FOC-stim? Not sure what kind of electrode configuration I could use with 2x triphase
-
- Explorer
- Posts: 7
- Joined: Sun Dec 31, 2023 9:07 pm
- Gender: Male
- Sexual Orientation: Straight
Re: FOC-Stim: a new approach to DIY stim hardware.
correct, stereostim was just not pleasurable in comparison.
As noted, your experience may differ. I had already been hooked up to the FOC-stim for an hour when I decided to add the stereostim. So I would say if you're going to warm up with one box, use the stereostim for that and then add in the FOC. Both my setups were triphase with stereostim on "lower" and playing matching scripts.darthjj wrote: ↑Fri Dec 20, 2024 8:45 am
I was thinking of using the FOC-stim as a stroker, with one of the stereostim channels to a bi-polar prostate probe, and the other channel attached to either balls or butt cheeks for some BDSM possibilities. So with such setup, perhaps it's less of an issue if the stereostim signals feel rougher?
Re: FOC-Stim: a new approach to DIY stim hardware.
Parts have been ordered, ought to be delivered next week but not sure when I'll have time to build it. Going for a single device to begin with, when adding connectors and cables the total ended up around €90 after VAT. Had to quickly research different capacitor classifications, chose X7R which sounded like the best option when filtering for the other parameters. Btw. I guessed that the recommendation was for 50VDC, as Mouser didn't have any ceramic capacitors rated for exactly 50VAC as far as I could see.
Who is online
Users browsing this forum: No registered users and 1 guest