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

This is the place for all suggestions, releases and feedback regarding Milovana Hardware efforts.
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 »

Good catch, I just fixed it.
lorada
Explorer
Explorer
Posts: 15
Joined: Sun Feb 04, 2024 3:28 am

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

Post by lorada »

diglet wrote: Thu Feb 13, 2025 4:12 pm
Pinco wrote: Thu Feb 13, 2025 2:42 pm Hi, just started to work on this, I got the firmware built and updated.
It looks like it connects restim but the LEDs do nothing
Is there a way to check if the board is working without connecting coils, transformers, 12v power supply etc?
Not really, the software doesn't do much without connecting 12v.
lorada wrote: Sat Feb 08, 2025 11:48 pm Just attempted my first build, and it didn't go well. I printed edger477's case, and it was too small to fit the ESC board. I must have screwed up the scaling somewhere.

I assembled everything via breadboard, and got the firmware built and updated. I was even getting data in teleplot, but I couldn't feel any output at all. I was trying to calibrate with the circle pattern in Restim, but I got no sensation through the electrodes.

Any tips on how to begin troubleshooting?
Sorry for the delay I missed your comment.

You can try to short all the outputs and observe the values R_neutral/left/right in the console, this is the estimated resistance of the circuit. These should go down to 0.8 or 1.0 when you play a signal.

If you leave all outputs open, the estimated resistance should go to 15 (the maximum).

Make sure the pot isn't set to 0.
I finally got around to a second attempt with everything soldered properly. The R_neutral/left/right stay at 15, even when I play a signal. I'm not sure what you mean by shorting the outputs. Just connect the leads? The pot is set to 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 »

lorada wrote: Thu Feb 27, 2025 5:58 pm I finally got around to a second attempt with everything soldered properly. The R_neutral/left/right stay at 15, even when I play a signal. I'm not sure what you mean by shorting the outputs. Just connect the leads? The pot is set to 1.
Yes, connect all the leads together (at low volume), the R_ values should decrease.

If they stay at 15, it suggests there is no circuit (soldering mistake) or the transformer is connected in reverse (the side marked P should be the output).
splentis
Explorer
Explorer
Posts: 6
Joined: Thu Feb 01, 2024 11:55 pm

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

Post by splentis »

I finished building a FOC-Stim yesterday, and I'm really impressed. Thanks to Diglet for sharing this creation and the excellent Restim app with the community! As others have mentioned, it feels much smoother than traditional stereo stim, is a fraction of the size and cost, and is nearly silent (unlike my DIY stereo stim, which sometimes emits a high-pitched coil whine).

I'm using the 42TU400-RC transformers, SBCP-11HY221H inductors, and FG18X5R1E106MRT06 caps from the recommended BOM, powered by a 12V 2A DC PSU. With the onboard pot wide open (CW), I'm controlling the volume through Restim. I’ve only tested it once, but at 100% volume, it feels comparable to about 80% on my DIY stereo box in terms of intensity. Does that sound about right? Is there anything I can do to increase the power by around 10%? I think that would be the perfect sweet spot.
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 »

splentis wrote: Fri Feb 28, 2025 9:31 am I finished building a FOC-Stim yesterday, and I'm really impressed. Thanks to Diglet for sharing this creation and the excellent Restim app with the community! As others have mentioned, it feels much smoother than traditional stereo stim, is a fraction of the size and cost, and is nearly silent (unlike my DIY stereo stim, which sometimes emits a high-pitched coil whine).

I'm using the 42TU400-RC transformers, SBCP-11HY221H inductors, and FG18X5R1E106MRT06 caps from the recommended BOM, powered by a 12V 2A DC PSU. With the onboard pot wide open (CW), I'm controlling the volume through Restim. I’ve only tested it once, but at 100% volume, it feels comparable to about 80% on my DIY stereo box in terms of intensity. Does that sound about right? Is there anything I can do to increase the power by around 10%? I think that would be the perfect sweet spot.
If you open config.h, there is this line:

Code: Select all

// current limits
#define TCODE_MAX_CURRENT 1.2f              // in amps
This can be changed to increase the maximum power output. The maximum is limited by the saturation current of your inductors, which is about 2A.

If you still don't reach the desired power output, the power may be limited by the input voltage or transformer size, but try this first :-)
splentis
Explorer
Explorer
Posts: 6
Joined: Thu Feb 01, 2024 11:55 pm

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

Post by splentis »

diglet wrote: Fri Feb 28, 2025 12:32 pm
splentis wrote: Fri Feb 28, 2025 9:31 am I finished building a FOC-Stim yesterday, and I'm really impressed. Thanks to Diglet for sharing this creation and the excellent Restim app with the community! As others have mentioned, it feels much smoother than traditional stereo stim, is a fraction of the size and cost, and is nearly silent (unlike my DIY stereo stim, which sometimes emits a high-pitched coil whine).

I'm using the 42TU400-RC transformers, SBCP-11HY221H inductors, and FG18X5R1E106MRT06 caps from the recommended BOM, powered by a 12V 2A DC PSU. With the onboard pot wide open (CW), I'm controlling the volume through Restim. I’ve only tested it once, but at 100% volume, it feels comparable to about 80% on my DIY stereo box in terms of intensity. Does that sound about right? Is there anything I can do to increase the power by around 10%? I think that would be the perfect sweet spot.
If you open config.h, there is this line:

Code: Select all

// current limits
#define TCODE_MAX_CURRENT 1.2f              // in amps
This can be changed to increase the maximum power output. The maximum is limited by the saturation current of your inductors, which is about 2A.

If you still don't reach the desired power output, the power may be limited by the input voltage or transformer size, but try this first :-)
Fantastic, thank you Diglet :love: I've bumped this up to 1.4f which I think will be more than enough.
icehash23
Explorer
Explorer
Posts: 33
Joined: Fri Nov 18, 2022 2:56 am

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

Post by icehash23 »

diglet wrote: Thu Feb 20, 2025 9:10 am
icehash23 wrote: Thu Feb 20, 2025 1:30 am
Thanks for the feedback. I've been seeing more people hitting the current limits, I think I made the limits a bit too low for some electrode placement and/or bad boards.

I increased the current limit margin from 0.2A to 0.3A, reduced the minimum resistance from 0.8 to 0.7, and also expanded vbus and temperature limits. Let me know if you encounter more issues.
This worked, I haven't had any issues since. Thank you!
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, I finished building it and I'd like to test before connecting to my body...
In previous posts you suggested
You can try to short all the outputs and observe the values R_neutral/left/right in the console, this is the estimated resistance of the circuit. These should go down to 0.8 or 1.0 when you play a signal.

If you leave all outputs open, the estimated resistance should go to 15 (the maximum).

Make sure the pot isn't set to 0
Yes, connect all the leads together (at low volume), the R_ values should decrease.

If they stay at 15, it suggests there is no circuit (soldering mistake) or the transformer is connected in reverse (the side marked P should be the output)
What is the console you mention? How can I enable it and look for the values ?

Thanks
senorgif2
Explorer At Heart
Explorer At Heart
Posts: 205
Joined: Sat Jul 22, 2017 1:51 am

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

Post by senorgif2 »

Pinco wrote: Sat Mar 15, 2025 9:41 am Hi, I finished building it and I'd like to test before connecting to my body...
In previous posts you suggested
You can try to short all the outputs and observe the values R_neutral/left/right in the console, this is the estimated resistance of the circuit. These should go down to 0.8 or 1.0 when you play a signal.

If you leave all outputs open, the estimated resistance should go to 15 (the maximum).

Make sure the pot isn't set to 0
Yes, connect all the leads together (at low volume), the R_ values should decrease.

If they stay at 15, it suggests there is no circuit (soldering mistake) or the transformer is connected in reverse (the side marked P should be the output)
What is the console you mention? How can I enable it and look for the values ?

Thanks
this is probably referring to the teleplot instance you can have running to monitor the board.
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 »

Yes. I don't know why I said console, I meant teleplot.
ridgeracer
Explorer
Explorer
Posts: 88
Joined: Thu Mar 05, 2020 10:17 pm

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

Post by ridgeracer »

So I have a question.
I'm using a BT stereo box now.
Is this FOC compatible with all mp3 stim files or do you have to download an app for it to work? And will I benefit building and trying this style box? What would the benefits be?
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 »

The FOC-Stim cannot play audio files, it can only play funscripts with Restim. It is possible to implement (some form of) audio playback, but don't expect this soon.

The main advantage of the FOC is current control. Meaning that minor changes in skin contact, skin moisture, body positioning no longer results in a large change in intensity.
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 Mar 15, 2025 7:08 pm Yes. I don't know why I said console, I meant teleplot.
Ok, I got it working now and I see all the waveform in teleplot.

I did a quick real life test with the same trodes and placement but so far I am not getting the right calibration (TBH neither on DIY box is perfect ). BTW I read many times the procedure for it, at which volume carrier frequency etc are you calibrating?

Thanks
splentis
Explorer
Explorer
Posts: 6
Joined: Thu Feb 01, 2024 11:55 pm

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

Post by splentis »

splentis wrote: Fri Feb 28, 2025 5:09 pm
diglet wrote: Fri Feb 28, 2025 12:32 pm
splentis wrote: Fri Feb 28, 2025 9:31 am I finished building a FOC-Stim yesterday, and I'm really impressed. Thanks to Diglet for sharing this creation and the excellent Restim app with the community! As others have mentioned, it feels much smoother than traditional stereo stim, is a fraction of the size and cost, and is nearly silent (unlike my DIY stereo stim, which sometimes emits a high-pitched coil whine).

I'm using the 42TU400-RC transformers, SBCP-11HY221H inductors, and FG18X5R1E106MRT06 caps from the recommended BOM, powered by a 12V 2A DC PSU. With the onboard pot wide open (CW), I'm controlling the volume through Restim. I’ve only tested it once, but at 100% volume, it feels comparable to about 80% on my DIY stereo box in terms of intensity. Does that sound about right? Is there anything I can do to increase the power by around 10%? I think that would be the perfect sweet spot.
If you open config.h, there is this line:

Code: Select all

// current limits
#define TCODE_MAX_CURRENT 1.2f              // in amps
This can be changed to increase the maximum power output. The maximum is limited by the saturation current of your inductors, which is about 2A.

If you still don't reach the desired power output, the power may be limited by the input voltage or transformer size, but try this first :-)
Fantastic, thank you Diglet :love: I've bumped this up to 1.4f which I think will be more than enough.
I'm running into a current limit exceeded error whenever the volume reaches 90-100%. This is using default settings, uploaded straight from github. If I bump the TCODE_MAX_CURRENT up to 1.4f I get the same error just at a lower volume, >74% ish. Have I reached the limitations of the hardware I've used in my build or is there something else at work here?

The spoiler below is the error message output from Restim. This example is without any electrodes connected and happens within a few seconds from a "cold start" going to 100% volume in Restim. I'll get the same thing with electrodes connected, give or take a few % in volume.

I t seems to function just fine sub 85% volume using the default settings but I'm hoping to see a little more if at all possible?
Spoiler: show
Pulse generation started
L 0.001498
R_n 14.987183
R_l 14.987352
R_r 14.974631
index Va Vb Vc Ia Ib Ic xHat_a xHat_b xHat_c r_a r_b r_c
0 0.000000 0.000000 0.000000 0.036125 0.046322 0.056457 0.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000
1 0.134613 0.127437 -0.262050 0.006754 0.075693 -0.002295 0.002362 0.002236 -0.004599 0.040394 0.038241 -0.078635
2 0.236477 0.223871 -0.460348 0.065506 0.105073 -0.002295 0.005890 0.005576 -0.011466 0.065053 0.061585 -0.126638
3 0.349091 0.330481 -0.679571 0.036125 0.075693 -0.031666 0.010466 0.009908 -0.020374 0.090022 0.085223 -0.175245
4 0.469008 0.444005 -0.913013 0.065506 0.046322 -0.090409 0.015941 0.015091 -0.031033 0.114563 0.108455 -0.223018
5 0.592232 0.560660 -1.152892 0.065506 0.075693 -0.090409 0.022138 0.020958 -0.043096 0.137845 0.130497 -0.268342
6 0.715906 0.677741 -1.393647 0.036125 0.105073 -0.149161 0.028874 0.027334 -0.056208 0.159459 0.150958 -0.310417
7 0.834622 0.790128 -1.624750 0.065506 0.105073 -0.149161 0.035920 0.034005 -0.069925 0.178236 0.168735 -0.346971
8 0.945780 0.895360 -1.841139 0.036125 0.105073 -0.149161 0.043062 0.040766 -0.083828 0.193970 0.183629 -0.377599
9 1.044606 0.988917 -2.033522 0.124248 0.105073 -0.149161 0.050058 0.047390 -0.097448 0.205763 0.194794 -0.400556
10 1.127875 1.067747 -2.195621 0.065506 0.046322 -0.061038 0.056674 0.053653 -0.110328 0.213252 0.201884 -0.415136
11 1.192233 1.128674 -2.320906 0.065506 0.105073 -0.119789 0.062678 0.059337 -0.122016 0.216017 0.204502 -0.420519
12 1.233823 1.168046 -2.401869 0.094877 0.046322 -0.090409 0.067832 0.064216 -0.132048 0.213482 0.202101 -0.415583
13 1.250976 1.184285 -2.435261 0.124248 0.075693 -0.090409 0.071930 0.068095 -0.140025 0.205740 0.194772 -0.400513
14 1.239687 1.173597 -2.413284 0.065506 0.046322 -0.090409 0.074751 0.070766 -0.145518 0.192104 0.181863 -0.373966
15 1.199720 1.135762 -2.335483 0.065506 0.105073 -0.002295 0.076129 0.072070 -0.148199 0.173055 0.163830 -0.336885
16 1.126899 1.066823 -2.193722 0.036125 0.016950 -0.090409 0.075866 0.071821 -0.147687 0.147759 0.139882 -0.287640
17 1.029115 0.974251 -2.003365 0.006754 0.075693 -0.061038 0.073956 0.070013 -0.143969 0.119074 0.112726 -0.231800
18 0.890739 0.843252 -1.733991 0.036125 0.075693 -0.002295 0.070120 0.066382 -0.136503 0.082327 0.077938 -0.160266
19 0.722684 0.684155 -1.406839 0.006754 0.046322 0.056457 0.064346 0.060915 -0.125261 0.041490 0.039278 -0.080769
20 0.527544 0.499419 -1.026963 -0.051989 0.016950 0.056457 0.056666 0.053645 -0.110312 -0.002623 -0.002483 0.005107
21 0.305762 0.289460 -0.595222 0.006754 0.016950 0.056457 0.047117 0.044605 -0.091721 -0.049969 -0.047305 0.097275
22 0.059452 0.056281 -0.115733 -0.051989 -0.041793 0.144571 0.035758 0.033852 -0.069610 -0.099997 -0.094667 0.194664
23 -0.207343 -0.196290 0.403634 -0.051989 -0.041793 0.115200 0.022707 0.021497 -0.044204 -0.151653 -0.143568 0.295221
24 -0.491491 -0.465291 0.956783 -0.110740 -0.071173 0.262065 0.008105 0.007673 -0.015778 -0.204281 -0.193391 0.397672
25 -0.787915 -0.745912 1.533827 -0.081360 -0.100544 0.262065 -0.007856 -0.007437 0.015292 -0.256719 -0.243033 0.499752
26 -1.092836 -1.034577 2.127413 -0.169483 -0.159287 0.262065 -0.024967 -0.023636 0.048603 -0.308315 -0.291879 0.600194
27 -1.401207 -1.326505 2.727713 -0.110740 -0.188659 0.350188 -0.042988 -0.040696 0.083683 -0.358086 -0.338996 0.697082
28 -1.706794 -1.615799 3.322594 -0.140112 -0.129916 0.291437 -0.061629 -0.058343 0.119972 -0.404743 -0.383166 0.787909
29 -2.004645 -1.897770 3.902414 -0.140112 -0.100544 0.262065 -0.080590 -0.076294 0.156885 -0.447501 -0.423645 0.871145
30 -2.288548 -2.166537 4.455085 -0.110740 -0.129916 0.173942 -0.099544 -0.094237 0.193781 -0.485279 -0.459410 0.944689
31 -2.552274 -2.416203 4.968477 -0.110740 -0.041793 0.144571 -0.118136 -0.111838 0.229975 -0.517020 -0.489458 1.006479
32 -2.795047 -2.646030 5.441078 -0.081360 -0.041793 0.173942 -0.136096 -0.128840 0.264936 -0.543377 -0.514410 1.057788
33 -3.006953 -2.846645 5.853598 -0.081360 -0.100544 0.262065 -0.153046 -0.144888 0.297934 -0.562050 -0.532088 1.094138
34 -3.183389 -3.013676 6.197065 -0.169483 -0.129916 0.291437 -0.168631 -0.159641 0.328272 -0.572587 -0.542062 1.114650
35 -3.318439 -3.141523 6.459963 -0.169483 -0.247410 0.320808 -0.182480 -0.172752 0.355232 -0.574083 -0.543479 1.117562
36 -3.406833 -3.225187 6.632020 -0.228226 -0.188659 0.350188 -0.194234 -0.183879 0.378113 -0.565946 -0.535776 1.101723
37 -3.446263 -3.262512 6.708776 -0.228226 -0.188659 0.379560 -0.203585 -0.192732 0.396318 -0.548381 -0.519147 1.067528
38 -3.440169 -3.256723 6.696892 -0.228226 -0.247410 0.350188 -0.210366 -0.199152 0.409518 -0.523124 -0.495237 1.018361
39 -3.379241 -3.199027 6.578267 -0.228226 -0.247410 0.438303 -0.214293 -0.202869 0.417162 -0.487876 -0.461868 0.949745
40 -3.267625 -3.093359 6.360984 -0.286978 -0.247410 0.585169 -0.215227 -0.203753 0.418980 -0.444561 -0.420862 0.865423
41 -3.100840 -2.935463 6.036303 -0.345721 -0.306153 0.614540 -0.212989 -0.201635 0.414624 -0.392183 -0.371277 0.763460
42 -2.882253 -2.728527 5.610780 -0.375092 -0.335524 0.673292 -0.207505 -0.196443 0.403947 -0.332197 -0.314488 0.646685
43 -2.611562 -2.472269 5.083832 -0.433844 -0.394276 0.790786 -0.198713 -0.188120 0.386833 -0.264677 -0.250567 0.515244
44 -2.291631 -2.169395 4.461028 -0.463215 -0.423647 0.849529 -0.186624 -0.176675 0.363300 -0.190704 -0.180538 0.371243
45 -1.926155 -1.823407 3.749562 -0.492586 -0.453019 0.908272 -0.171304 -0.162172 0.333475 -0.111267 -0.105336 0.216603
46 -1.518897 -1.437865 2.956761 -0.463215 -0.482390 0.937652 -0.152866 -0.144717 0.297584 -0.027328 -0.025871 0.053199
47 -1.073761 -1.016457 2.090218 -0.492586 -0.482390 0.996395 -0.131468 -0.124459 0.255927 0.060184 0.056976 -0.117160
48 -0.595573 -0.563775 1.159348 -0.463215 -0.453019 0.996395 -0.107304 -0.101584 0.208889 0.150256 0.142246 -0.292502
49 -0.093690 -0.088655 0.182345 -0.433844 -0.453019 0.908272 -0.080688 -0.076387 0.157075 0.240527 0.227705 -0.468233
50 0.427306 0.404549 -0.831854 -0.345721 -0.394276 0.820157 -0.051931 -0.049163 0.101094 0.330369 0.312757 -0.643125
51 0.960611 0.909412 -1.870023 -0.316349 -0.335524 0.732034 -0.021383 -0.020243 0.041627 0.418509 0.396198 -0.814707
52 1.500184 1.420216 -2.920399 -0.257606 -0.188659 0.467674 0.010594 0.010029 -0.020623 0.504046 0.477175 -0.981221
53 2.035152 1.926658 -3.961811 -0.110740 -0.159287 0.291437 0.043545 0.041224 -0.084769 0.584656 0.553488 -1.138144
54 2.557230 2.420884 -4.978114 -0.051989 -0.071173 0.085828 0.076985 0.072881 -0.149867 0.658917 0.623790 -1.282706
55 3.057612 2.894587 -5.952199 0.036125 0.016950 0.027077 0.110406 0.104521 -0.214927 0.725467 0.686793 -1.412260
56 3.453379 3.269241 -6.722620 0.065506 0.046322 -0.002295 0.142306 0.134719 -0.277025 0.766290 0.725439 -1.491730
57 3.453381 3.269239 -6.722619 0.006754 -0.012421 -0.002295 0.168329 0.159355 -0.327684 0.729612 0.690717 -1.420328
58 3.453385 3.269229 -6.722614 0.036125 0.016950 0.027077 0.190934 0.180756 -0.371690 0.723209 0.684656 -1.407865
59 3.453382 3.269236 -6.722618 0.065506 0.016950 -0.002295 0.211045 0.199795 -0.410840 0.725769 0.687078 -1.412847
60 3.453379 3.269242 -6.722621 0.036125 0.075693 -0.090409 0.229022 0.216813 -0.445834 0.729483 0.690594 -1.420076
61 3.453379 3.269243 -6.722622 0.065506 0.134444 -0.090409 0.245017 0.231955 -0.476972 0.731562 0.692563 -1.424124
62 3.453373 3.269254 -6.722627 0.094877 0.105073 -0.149161 0.259139 0.245324 -0.504463 0.731523 0.692526 -1.424048
63 3.453373 3.269254 -6.722627 0.065506 0.105073 -0.119789 0.271393 0.256925 -0.528318 0.727825 0.689025 -1.416850
64 3.453370 3.269260 -6.722630 0.094877 0.075693 -0.149161 0.281788 0.266766 -0.548554 0.720539 0.682127 -1.402666
65 3.453370 3.269260 -6.722630 0.094877 0.075693 -0.149161 0.290241 0.274769 -0.565010 0.708124 0.670374 -1.378498
66 3.453375 3.269249 -6.722624 0.094877 0.163816 -0.178532 0.296633 0.280819 -0.577452 0.689779 0.653007 -1.342785
67 3.453379 3.269241 -6.722620 0.094877 0.163816 -0.207903 0.300722 0.284691 -0.585413 0.663199 0.627844 -1.291044
68 3.453383 3.269233 -6.722616 0.182991 0.163816 -0.207903 0.302147 0.286039 -0.588186 0.625798 0.592438 -1.218236
69 3.453390 3.269218 -6.722609 0.153620 0.105073 -0.207903 0.300284 0.284276 -0.584561 0.572450 0.541933 -1.114383
70 3.453394 3.269212 -6.722606 0.182991 0.163816 -0.266655 0.294152 0.278471 -0.572624 0.495710 0.469284 -0.964994
71 3.453402 3.269195 -6.722598 0.153620 0.163816 -0.296026 0.282029 0.266994 -0.549023 0.380991 0.360680 -0.741670
72 2.949023 2.791698 -5.740722 0.153620 0.134444 -0.266655 0.259637 0.245796 -0.505433 0.181159 0.171502 -0.352661
73 2.224023 2.105372 -4.329395 0.124248 0.105073 -0.149161 0.230408 0.218125 -0.448532 0.019450 0.018413 -0.037863
74 1.572546 1.488645 -3.061191 0.065506 0.016950 -0.002295 0.197429 0.186905 -0.384334 -0.103111 -0.097614 0.200724
75 0.885294 0.838040 -1.723335 -0.051989 -0.041793 0.085828 0.161063 0.152477 -0.313540 -0.227005 -0.214903 0.441908
76 0.174819 0.165466 -0.340285 -0.051989 -0.129916 0.203323 0.121786 0.115293 -0.237079 -0.349520 -0.330887 0.680407
77 -0.550604 -0.521270 1.071875 -0.169483 -0.159287 0.320808 0.080104 0.075834 -0.155937 -0.469187 -0.444175 0.913363
78 -1.282731 -1.214361 2.497091 -0.228226 -0.247410 0.467674 0.036537 0.034590 -0.071127 -0.584778 -0.553603 1.138381
79 -2.010008 -1.902861 3.912868 -0.375092 -0.247410 0.673292 -0.008336 -0.007891 0.016227 -0.694254 -0.657243 1.351497
80 -2.722424 -2.577289 5.299712 -0.345721 -0.335524 0.702663 -0.053905 -0.051031 0.104936 -0.795903 -0.753474 1.549377
81 -3.408973 -3.227219 6.636192 -0.198855 -0.188659 0.291437 -0.099532 -0.094226 0.193757 -0.888028 -0.840688 1.728716
82 -3.453369 -3.269264 6.722632 0.065506 0.075693 -0.090409 -0.136100 -0.128844 0.264944 -0.824381 -0.780434 1.604815
83 -3.453366 -3.269268 6.722634 0.094877 0.163816 -0.237275 -0.167082 -0.158175 0.325257 -0.801998 -0.759244 1.561242
84 -3.453366 -3.269268 6.722633 0.006754 -0.012421 -0.031666 -0.194325 -0.183965 0.378290 -0.800009 -0.757360 1.557369
85 -3.453366 -3.269269 6.722634 -0.198855 -0.159287 0.262065 -0.218595 -0.206942 0.425538 -0.803681 -0.760838 1.564519
86 -3.453366 -3.269269 6.722634 -0.228226 -0.247410 0.467674 -0.240282 -0.227472 0.467754 -0.808026 -0.764951 1.572977
87 -3.453366 -3.269269 6.722634 -0.228226 -0.188659 0.379560 -0.259635 -0.245794 0.505428 -0.811497 -0.768237 1.579734
88 -3.453366 -3.269268 6.722634 -0.140112 -0.100544 0.291437 -0.276824 -0.262066 0.538890 -0.813205 -0.769853 1.583058
89 -3.453366 -3.269268 6.722634 -0.110740 -0.071173 0.144571 -0.291968 -0.276404 0.568372 -0.812620 -0.769299 1.581919
90 -3.453366 -3.269268 6.722634 -0.081360 -0.100544 0.144571 -0.305159 -0.288891 0.594051 -0.809502 -0.766347 1.575849
91 -3.453366 -3.269269 6.722634 -0.169483 -0.129916 0.350188 -0.316469 -0.299598 0.616066 -0.803708 -0.760863 1.564571
92 -3.453366 -3.269269 6.722634 -0.228226 -0.247410 0.467674 -0.325912 -0.308538 0.634449 -0.794417 -0.752067 1.546484
93 -3.453366 -3.269269 6.722634 -0.257606 -0.247410 0.497054 -0.333459 -0.315682 0.649141 -0.780873 -0.739245 1.520118
94 -3.453363 -3.269274 6.722637 -0.198855 -0.247410 0.408931 -0.338994 -0.320922 0.659917 -0.761574 -0.720975 1.482550
95 -3.453358 -3.269284 6.722642 -0.228226 -0.247410 0.467674 -0.342301 -0.324053 0.666354 -0.734540 -0.695382 1.429921
96 -3.453357 -3.269287 6.722644 -0.316349 -0.276782 0.555797 -0.342932 -0.324650 0.667582 -0.695389 -0.658318 1.353707
97 -3.453354 -3.269291 6.722646 -0.375092 -0.306153 0.673292 -0.340145 -0.322012 0.662156 -0.638201 -0.604178 1.242379
98 -3.453351 -3.269298 6.722649 -0.551338 -0.453019 0.937652 -0.332483 -0.314758 0.647241 -0.549270 -0.519988 1.069258
99 -3.453346 -3.269308 6.722654 -0.551338 -0.599885 1.172632 -0.317139 -0.300233 0.617372 -0.402596 -0.381134 0.783730
100 -3.085439 -2.921026 6.006465 -0.639452 -0.717379 1.260751 -0.287831 -0.272487 0.560318 -0.133102 -0.126007 0.259109
101 -1.987343 -1.881471 3.868814 0.091800 0.042645 -0.110010 -0.246900 -0.233738 0.480637 0.124260 0.117635 -0.241895
102 -1.161528 -1.099720 2.261249 0.091800 0.072016 -0.198125 -0.202230 -0.191449 0.393679 0.270054 0.255658 -0.525712
mainloop timings:
start| compute| play| logs| skips|
45460229 578 7312 388 0
45479033 590 7323 2 0
45498751 578 7337 401 0
45517657 593 7322 2 0
45536441 579 7326 418 0
45555915 592 7322 2 0
45576426 666 7326 303 0
45597248 590 7326 2 0
45618076 579 7334 4 0
45637156 591 7305 3 1
45657390 665 7322 387 0
45677423 593 7319 2 0
45697090 578 7309 431 0
45717772 593 7305 3 0
45737982 633 7328 2 0
45757917 593 7337 2 0
45776950 578 7304 334 0
45795728 591 7313 2 0
45814570 579 7309 2 0
45834026 624 7319 2 0
45852860 577 7306 391 0
45872637 670 7323 5 0
45891374 578 7312 404 0
45910760 591 7318 2 0
45931390 578 7315 418 0
45952393 589 7337 2 0
45973072 579 7309 305 0
45993417 592 7302 3 0
46014263 576 7323 2 0
46033926 592 7312 2 0
46054757 577 7321 390 0
46073889 660 0 0 0
mainloop signals:
v_drive| max I_N| max I_L| max I_R| amplitude|
10.176001 1.234617 0.684615 0.581277 0.962940
10.176001 0.727312 0.392906 0.344199 0.962940
10.176001 1.167402 0.686440 0.529923 0.962940
10.176001 1.167402 0.686440 0.529923 0.962940
10.176001 1.167402 0.686440 0.529923 0.962940
10.176001 1.167402 0.686440 0.529923 0.962940
10.176001 1.167402 0.686440 0.562163 0.962940
10.176001 1.167402 0.686440 0.562163 0.962940
10.176001 1.167402 0.686440 0.562163 0.962940
10.176001 1.167402 0.686440 0.562163 0.962940
10.176001 1.167402 0.686440 0.562163 0.962940
10.176001 0.746049 0.423801 0.504057 0.962940
10.176001 0.746049 0.427939 0.504057 0.962940
10.176001 0.746049 0.502423 0.504057 0.962940
10.176001 0.746049 0.502423 0.687263 0.962940
10.176001 0.746049 0.502423 0.714006 0.962940
10.176001 0.746049 0.502423 0.714006 0.962940
10.176001 0.746049 0.502423 0.871216 0.962940
10.176001 0.746049 0.512127 1.134429 0.962940
10.176001 0.746049 0.512127 1.134429 0.962940
10.176001 0.746049 0.512127 1.134429 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.595707 1.220759 0.962940
10.176001 0.654423 0.597399 1.220759 0.962940
10.176001 0.654423 0.597399 1.220759 0.962940
10.176001 0.654423 0.597399 1.220759 0.962940
0.000000 0.000000 0.000000 0.000000 0.962940
mainloop MRAC:
R_neutral| R_left| R_right| L|
14.999577 14.999030 14.998777 0.001500
14.999820 14.999462 14.999546 0.001500
14.999691 14.999281 14.999592 0.001500
14.999716 14.999046 14.999319 0.001500
14.999855 14.999443 14.999580 0.001500
14.999553 14.999047 14.999425 0.001500
14.999925 14.999706 14.999681 0.001500
14.999680 14.999296 14.999052 0.001500
14.999702 14.999350 14.999494 0.001500
14.999779 14.999758 14.999803 0.001500
14.999556 14.999306 14.999506 0.001500
14.999896 14.999907 14.999907 0.001499
14.999485 14.999299 14.999561 0.001500
14.999913 14.999560 14.999843 0.001500
14.999628 14.999326 14.999669 0.001500
14.999330 14.998102 14.999691 0.001499
14.999556 14.999361 14.999828 0.001500
14.999284 14.999195 14.999402 0.001499
14.996815 14.997061 14.999851 0.001499
14.999346 14.999174 14.999620 0.001500
14.999516 14.999491 14.999710 0.001500
14.999469 14.999259 14.999772 0.001499
14.999159 14.998967 14.999474 0.001500
14.999728 14.999726 14.999932 0.001500
14.999500 14.998531 14.999836 0.001499
14.998600 14.998423 14.999634 0.001499
14.999680 14.999651 14.999924 0.001500
14.999371 14.999383 14.999470 0.001499
14.998514 14.998457 14.999929 0.001499
14.999327 14.999159 14.999792 0.001500
14.999338 14.999296 14.999565 0.001500
0.000000 0.000000 0.000000 0.000000
current limit exceeded: -0.639452 -0.717379 1.260751. Limit was 1.262940. Restart device to proceed
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 »

Pinco wrote: Sun Mar 16, 2025 11:30 am
diglet wrote: Sat Mar 15, 2025 7:08 pm Yes. I don't know why I said console, I meant teleplot.
Ok, I got it working now and I see all the waveform in teleplot.

I did a quick real life test with the same trodes and placement but so far I am not getting the right calibration (TBH neither on DIY box is perfect ). BTW I read many times the procedure for it, at which volume carrier frequency etc are you calibrating?

Thanks
Use whatever you want, I use 1300hz.

splentis wrote: Sun Mar 16, 2025 6:18 pm
It is normal that the current limit triggers when the outputs are not connected. The software only works correctly when the electrode resistance is below 1500ohm. I should implement a different error that complains the electrode resistance is too high, rather than the current limit.

Can you send me a log with the electrodes connected? Then I can diagnose the problem.
Post Reply