FOC-Stim: a new approach to DIY stim hardware.

This is the place for all suggestions, releases and feedback regarding Milovana Hardware efforts.
User avatar
edger477
Experimentor
Experimentor
Posts: 1114
Joined: Mon Nov 29, 2021 8:24 pm
Location: underfloor

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by edger477 »

nopr4me wrote: Fri Oct 10, 2025 6:25 am Hi edger,

A quick question about your breadboard: it looks as though you have connected together the number 3 input terminals of the transformers at F2, Q2, A2 compared to diglet's schematic where the number 2 terminals are connected. And your inputs come in on the number 2 terminals at F4, Q4 and A4. Is this correct?

Thanks
Hey, I think I understand what are you asking, although, I think it would take great mental effort to verify it (it is easy to see the diglet's schematic but I'd have to process my own pictures)... however I can avoid spending that effort by stating that I never cared whether I connect 1 or 3, because transformer is a passive component that is symmetrical in regards to input (another way to say "ac component lol", I am sure other engineers here can try to make me speak "proper" academic language). So, it functions the same in both ways, I only cared to make sure all 3 transformers are wired consistently - meaning that I cared about wiring inputs the same on all 3, and outputs the same on all 3, to make sure signal phases are not inverted for only one channel somewhere (if you invert all 3 - it is still same complex signal).

Since you seem very capable of reading the schematics properly and mapping them to actual breadboard/wires, feel free to build your box according to the actual schematic, I can guarantee you that it will not make it any worse (and it might make it better in a sense that you will feel achievement from not simply reproducing something in identical manner but building your own).
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090

Try creating your own estims with my restim script generator!
Spoiler: show
You can also thank me with crypto: https://trocador.app/anonpay?ticker_to= ... e+a+coffee
diglet
Explorer At Heart
Explorer At Heart
Posts: 390
Joined: Sun Dec 11, 2022 5:43 pm

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by diglet »

As long as you wire up all transformers in the same way, it does not matter with the current version of the FOC-Stim software.
nopr4me
Curious Newbie
Curious Newbie
Posts: 4
Joined: Tue Sep 10, 2024 10:49 am

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by nopr4me »

Thank you both for your help :) I previously made a Stereostim box and I've been building up to transitioning to FOC. Started the project today: so far I've updated the board, built and uploaded the firmware and wired together the components on protoboard. Twice! My stereostim box used two amps and two instances of restim for two sets of triphase outputs. I'm hoping to recreate this with FOC.
User avatar
edger477
Experimentor
Experimentor
Posts: 1114
Joined: Mon Nov 29, 2021 8:24 pm
Location: underfloor

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by edger477 »

nopr4me wrote: Sat Oct 11, 2025 9:07 pm My stereostim box used two amps and two instances of restim for two sets of triphase outputs. I'm hoping to recreate this with FOC.
Sounds like my setup. I guess you use my recommended config for 2nd restim to pick up -prostate scripts?
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090

Try creating your own estims with my restim script generator!
Spoiler: show
You can also thank me with crypto: https://trocador.app/anonpay?ticker_to= ... e+a+coffee
nopr4me
Curious Newbie
Curious Newbie
Posts: 4
Joined: Tue Sep 10, 2024 10:49 am

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by nopr4me »

edger477 wrote: Sat Oct 11, 2025 10:02 pm Sounds like my setup. I guess you use my recommended config for 2nd restim to pick up -prostate scripts?
I do, but often it defaults to the incorrect script (like volume in example below) and I have to manually deselect the incorrect script for the prostate scripts to be active from the list (it autoloads both normal and prostate scripts). It seems to do this regardless of which order I have the Funscript names listed in the Funscript/T-Code Tab in Preferences.

Slightly inconvenient but not the end of the world!

Restim.png
Restim.png (284.57 KiB) Viewed 7590 times
User avatar
edger477
Experimentor
Experimentor
Posts: 1114
Joined: Mon Nov 29, 2021 8:24 pm
Location: underfloor

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by edger477 »

nopr4me wrote: Sun Oct 12, 2025 7:38 am It seems to do this regardless of which order I have the Funscript names listed in the Funscript/T-Code Tab in Preferences.
From my experience, "last" item in the comma-separated list is the one that has highest priority (first it tries to load that one). i.e. for volume my config is
VOLUME_API\funscript_names="volume, volume_foc, volume-prostate"

I recommend to try editing these thigns in config.
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090

Try creating your own estims with my restim script generator!
Spoiler: show
You can also thank me with crypto: https://trocador.app/anonpay?ticker_to= ... e+a+coffee
phoopha
Explorer At Heart
Explorer At Heart
Posts: 150
Joined: Sat Mar 22, 2008 12:33 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by phoopha »

My head is still spinning from trying to understand all of this!🤔🙄

I was able to follow the instructions and diagram to build a DIY stereo box, but for whatever reason (maybe too thick!?🤔) I still either can't fathom the FOC out or simply haven't found a complete idiots guide for building and using one.

I had a look on github and noticed different versions being mentioned. Might I ask what is the most recent one that is tested and reliable?

Does anyone have a link, maybe, to a components shopping list? I managed to source the parts for my stereostim box, though some did have to come from the USA. I'm also capable of basic soldering, if that's required?

Once the parts are bought, is there then an idiot's guide to assembly and use?

Unfortunately, I'm not particularly technically minded when it comes to writing scripts, playing with parameters, etc... That's one of the reasons I so love the community here on Milovana - people tend to be so helpful and generous with sharing their expertise and creations.

Regarding cables, I saw something, somewhere, talking about not skimping, this is possibly an area where I can help.

I have built several sets of cables, suitable for use with both my E-stim systems 2B and my DIY box. I made several sets so that I can cover multiple permutations, such as dual channel with/without a bipolar insertable. Triphase using an insertable, or not. Indcables for other situations, etc...

Everything I need came from Amazon. I used some of their speaker cable (not the very cheapest stuff, but reasonable low cost stuff) bought plugs for both 3.5mm and whatever size banana plugs are, plus the jacks to connect to electrodes. I also used some heat shrink sleave to try to keep things a bit tidier.

The construction was really straightforward, as the various jacks all had easy attachment options, though I think I might have used solder on the 3.5mm ones.

I used to regularly need to replace the standard cables that came with my various toys. Since making my own, the only issues I encountered are that some electrodes seem to need the female connector squishing slightly to get a tight fit on the male end of the cable, and occasionally I have to just check that the banana plugs are nice and tight, as over time the screw-down sheath can work loose.

I'm happy to make a separate thread on this if anyone would like, complete with shopping list, instructions, and photos?
diglet
Explorer At Heart
Explorer At Heart
Posts: 390
Joined: Sun Dec 11, 2022 5:43 pm

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by diglet »

V1 is the original I made about a year ago using only off-the-shelf parts. It has served me and other users well.


V4 is what we are developing now, it has gone through several revisions and several boards out in the wild. I hope to gather enough confidence to publish the board files early January. The V4 is overall a nicer box, it outputs the same signals but it being smaller/lighter/wireless makes a big difference in usability, so I would recommend to wait until V4 is ready.
phoopha
Explorer At Heart
Explorer At Heart
Posts: 150
Joined: Sat Mar 22, 2008 12:33 pm
Gender: Male
Sexual Orientation: Straight
I am a: Submissive

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by phoopha »

diglet wrote: Fri Dec 26, 2025 8:22 pm V1 is the original I made about a year ago using only off-the-shelf parts. It has served me and other users well.


V4 is what we are developing now, it has gone through several revisions and several boards out in the wild. I hope to gather enough confidence to publish the board files early January. The V4 is overall a nicer box, it outputs the same signals but it being smaller/lighter/wireless makes a big difference in usability, so I would recommend to wait until V4 is ready.

Sounds like an exciting development.
Pinco
Explorer
Explorer
Posts: 91
Joined: Wed Mar 20, 2024 12:41 pm

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by Pinco »

Hi diglet,
I am a very happy user of ver 1 FOC; I saw that you introduced a few improvements since Jan 25 so I wanted to update the fw to the latest release but after compiling it does not upload and there is the following

*** [.pio\build\disco_b_g431b_esc1\firmware.elf] Error 1

Am I doing something wrong? how can I fix this?

The information that restim shows at connection is
board: BOARD_FOCSTIM_V4 stm32_firmware_version: "1.0"

Thanks
Pinco
Explorer
Explorer
Posts: 91
Joined: Wed Mar 20, 2024 12:41 pm

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by Pinco »

Pinco wrote: Sat Dec 27, 2025 1:38 pm Hi diglet,
I am a very happy user of ver 1 FOC; I saw that you introduced a few improvements since Jan 25 so I wanted to update the fw to the latest release but after compiling it does not upload and there is the following

*** [.pio\build\disco_b_g431b_esc1\firmware.elf] Error 1

Am I doing something wrong? how can I fix this?

The information that restim shows at connection is
board: BOARD_FOCSTIM_V4 stm32_firmware_version: "1.0"

Thanks
more precisely

The terminal process "C:\Users\abcde\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'upload', '--environment', 'disco_b_g431b_esc1'" terminated with exit code: 1.
diglet
Explorer At Heart
Explorer At Heart
Posts: 390
Joined: Sun Dec 11, 2022 5:43 pm

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by diglet »

I don't have enough information to see what's wrong.

But since relatively recent, you can download the firmware from github and upload it with stm32cubeprogrammer, this might be easier than trying to figure out what is wrong with your setup.

https://github.com/diglet48/FOC-Stim/releases
Pinco
Explorer
Explorer
Posts: 91
Joined: Wed Mar 20, 2024 12:41 pm

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by Pinco »

diglet wrote: Sat Dec 27, 2025 2:40 pm I don't have enough information to see what's wrong.

But since relatively recent, you can download the firmware from github and upload it with stm32cubeprogrammer, this might be easier than trying to figure out what is wrong with your setup.

https://github.com/diglet48/FOC-Stim/releases
done, it works thanks
bindweed2007
Curious Newbie
Curious Newbie
Posts: 4
Joined: Mon Nov 01, 2021 10:23 am

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by bindweed2007 »

edger477 wrote: Sat Oct 11, 2025 10:02 pm
nopr4me wrote: Sat Oct 11, 2025 9:07 pm My stereostim box used two amps and two instances of restim for two sets of triphase outputs. I'm hoping to recreate this with FOC.
Sounds like my setup. I guess you use my recommended config for 2nd restim to pick up -prostate scripts?
Edger477 I am very grateful for your commitment and hard graft producing software and educating us 'stimmers' in the ways to extract the maximum pleasure from our electrons. I also, following your guidance, run 2 boxes and editions of restim with great success . However, I have been bedevilled with he problem of auto loading funscripts and distinguishing between normal and prostate. I have trawled your posts, but seem unable to find the reference to your recommended config for the 2nd restim to pick up prostate scripts. I would be most grateful if you could point me in the right direction.
User avatar
edger477
Experimentor
Experimentor
Posts: 1114
Joined: Mon Nov 29, 2021 8:24 pm
Location: underfloor

Re: FOC-Stim: a new approach to DIY stim hardware.

Post by edger477 »

bindweed2007 wrote: Wed Dec 31, 2025 4:18 pm I am very grateful for your commitment
Hey, you are welcome!

I posted funscripts section of my config in this thread, but here fresh one from my current ini for 2nd restim instance (since I reset parameters - the foc doesn't support pulse freq above 100, and I tried to make defaults in the restim-processor produce nice results with restim defaults):

Code: Select all

[funscript_configuration]
POSITION_ALPHA\funscript_names="alpha, alpha-prostate"
POSITION_ALPHA\limit_min=-1
POSITION_ALPHA\limit_max=1
POSITION_ALPHA\auto_loading=true
POSITION_BETA\funscript_names="beta, beta-prostate"
POSITION_BETA\limit_min=-1
POSITION_BETA\limit_max=1
POSITION_BETA\auto_loading=true
VOLUME_API\funscript_names="volume, volume_foc, volume-prostate"
VOLUME_API\limit_min=0
VOLUME_API\limit_max=1
VOLUME_API\auto_loading=true
CARRIER_FREQUENCY\funscript_names="frequency, frequency_foc, frequency-prostate"
CARRIER_FREQUENCY\limit_min=500
CARRIER_FREQUENCY\limit_max=1500
CARRIER_FREQUENCY\auto_loading=true
PULSE_FREQUENCY\funscript_names="pulse_frequency, pulse_frequency-prostate"
PULSE_FREQUENCY\limit_min=1
PULSE_FREQUENCY\limit_max=100
PULSE_FREQUENCY\auto_loading=true
PULSE_WIDTH\funscript_names="pulse_width, pulse_width-prostate"
PULSE_WIDTH\limit_min=3
PULSE_WIDTH\limit_max=10
PULSE_WIDTH\auto_loading=true
PULSE_INTERVAL_RANDOM\funscript_names=pulse_interval_random
PULSE_INTERVAL_RANDOM\limit_min=0
PULSE_INTERVAL_RANDOM\limit_max=1
PULSE_INTERVAL_RANDOM\auto_loading=false
VIBRATION_1_FREQUENCY\funscript_names=vib1_frequency
VIBRATION_1_FREQUENCY\limit_min=0
VIBRATION_1_FREQUENCY\limit_max=100
VIBRATION_1_FREQUENCY\auto_loading=false
VIBRATION_1_STRENGTH\funscript_names=vib1_strength
VIBRATION_1_STRENGTH\limit_min=0
VIBRATION_1_STRENGTH\limit_max=1
VIBRATION_1_STRENGTH\auto_loading=false
VIBRATION_1_LEFT_RIGHT_BIAS\funscript_names=vib1_left_right_bias
VIBRATION_1_LEFT_RIGHT_BIAS\limit_min=0
VIBRATION_1_LEFT_RIGHT_BIAS\limit_max=1
VIBRATION_1_LEFT_RIGHT_BIAS\auto_loading=false
VIBRATION_1_HIGH_LOW_BIAS\funscript_names=vib1_up_down_bias
VIBRATION_1_HIGH_LOW_BIAS\limit_min=0
VIBRATION_1_HIGH_LOW_BIAS\limit_max=1
VIBRATION_1_HIGH_LOW_BIAS\auto_loading=false
VIBRATION_1_RANDOM\funscript_names=vib1_random
VIBRATION_1_RANDOM\limit_min=0
VIBRATION_1_RANDOM\limit_max=1
VIBRATION_1_RANDOM\auto_loading=false
VIBRATION_2_FREQUENCY\funscript_names=vib2_frequency
VIBRATION_2_FREQUENCY\limit_min=0
VIBRATION_2_FREQUENCY\limit_max=200
VIBRATION_2_FREQUENCY\auto_loading=false
VIBRATION_2_STRENGTH\funscript_names=vib2_strength
VIBRATION_2_STRENGTH\limit_min=0
VIBRATION_2_STRENGTH\limit_max=1
VIBRATION_2_STRENGTH\auto_loading=false
VIBRATION_2_LEFT_RIGHT_BIAS\funscript_names=vib2_left_right_bias
VIBRATION_2_LEFT_RIGHT_BIAS\limit_min=0
VIBRATION_2_LEFT_RIGHT_BIAS\limit_max=1
VIBRATION_2_LEFT_RIGHT_BIAS\auto_loading=false
VIBRATION_2_HIGH_LOW_BIAS\funscript_names=vib2_up_down_bias
VIBRATION_2_HIGH_LOW_BIAS\limit_min=0
VIBRATION_2_HIGH_LOW_BIAS\limit_max=1
VIBRATION_2_HIGH_LOW_BIAS\auto_loading=false
VIBRATION_2_RANDOM\funscript_names=vib2_random
VIBRATION_2_RANDOM\limit_min=0
VIBRATION_2_RANDOM\limit_max=1
VIBRATION_2_RANDOM\auto_loading=false
POSITION_ALPHA\tcode_axis=L0
POSITION_BETA\tcode_axis=L1
VOLUME_API\tcode_axis=V0
CARRIER_FREQUENCY\tcode_axis=C0
PULSE_FREQUENCY\tcode_axis=P0
PULSE_WIDTH\tcode_axis=P1
PULSE_INTERVAL_RANDOM\tcode_axis=P2
VIBRATION_1_FREQUENCY\tcode_axis=V1
VIBRATION_1_STRENGTH\tcode_axis=V2
VIBRATION_1_LEFT_RIGHT_BIAS\tcode_axis=
VIBRATION_1_HIGH_LOW_BIAS\tcode_axis=
VIBRATION_1_RANDOM\tcode_axis=V3
VIBRATION_2_FREQUENCY\tcode_axis=V4
VIBRATION_2_STRENGTH\tcode_axis=V5
VIBRATION_2_LEFT_RIGHT_BIAS\tcode_axis=
VIBRATION_2_HIGH_LOW_BIAS\tcode_axis=
VIBRATION_2_RANDOM\tcode_axis=V6
PULSE_RISE_TIME\funscript_names="pulse_rise_time, pulse_rise_time-prostate"
PULSE_RISE_TIME\tcode_axis=P3
PULSE_RISE_TIME\limit_min=1
PULSE_RISE_TIME\limit_max=20
PULSE_RISE_TIME\auto_loading=true
VOLUME_EXTERNAL\funscript_names=
VOLUME_EXTERNAL\tcode_axis=V9
VOLUME_EXTERNAL\limit_min=0
VOLUME_EXTERNAL\limit_max=1
VOLUME_EXTERNAL\auto_loading=false
POSITION_GAMMA\funscript_names=gamma
POSITION_GAMMA\tcode_axis=
POSITION_GAMMA\limit_min=-1
POSITION_GAMMA\limit_max=1
POSITION_GAMMA\auto_loading=true
I guess the secret is to have the -prostate 2nd - this seems counterintiutive, but it is how they are prioritized - when available prostate scripts are loaded, when they are not provided, it will fall back to the normal ones.
My estim creations: https://mega.nz/folder/73pxmBBQ#X6ylDzRafzTt9wanZ0dacw
And in E-Stim Index: viewtopic.php?t=27090

Try creating your own estims with my restim script generator!
Spoiler: show
You can also thank me with crypto: https://trocador.app/anonpay?ticker_to= ... e+a+coffee
Post Reply