Replacement firmware for iSpindel (GravityMon)

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
JTAG is a hardware setup not software, the LED is defined as PIN_LED which is the same pin used for the Gyro in the ispindle design. This is defined in the header for your board.
thanks @mper will have to do my homework on jtag as I haven't had issues with it on the 1.4 version, I haven't had the LED activated on any of the super minis I have programmed so far and version 1.4 worked with gpio6 and 7 but not on version 2 so somehow jtag must have been activated and switched the i2c to 8 and 9 which would cause an i2c error as it is not connected.
 
thanks @mper will have to do my homework on jtag as I haven't had issues with it on the 1.4 version, I haven't had the LED activated on any of the super minis I have programmed so far and version 1.4 worked with gpio6 and 7 but not on version 2 so somehow jtag must have been activated and switched the i2c to 8 and 9 which would cause an i2c error as it is not connected.
Lets move this discussion to a thread on github instead of here.
 
New beta out now, hopefully the last one before release. I have had some issues with temperature sensor (sensor not found) on some devices so if you have issues let me know. I'm considering switching to another onewire library that seams to fix the problem. I finally go the C3 version to work now as well..

Release v2.0.0 beta 3 · mp-se/gravitymon (github.com)
 
Last edited:
New beta out now, hopefully the last one before release. I have had some issues with temperature sensor (sensor not found) on some devices so if you have issues let me know. I'm considering switching to another onewire library that seams to fix the problem.

Release v2.0.0 beta 3 · mp-se/gravitymon (github.com)
I have just finished a brew using s2mini/ v2.0.0b2. No temp issues with that one, except the "Force Gravity Mode" button still wanted to change status after switching between menus.
I'll check out if it is connected to high battery voltage.

The oddest thing brewing "Oktoberfest", was the hybrid Fermentis K-97.
Never used it before. Finished off in 4 days @18C with lots of krausen giving the spindel a challenge reporting correct values
 
I have just finished a brew using s2mini/ v2.0.0b2. No temp issues with that one, except the "Force Gravity Mode" button still wanted to change status after switching between menus.
I'll check out if it is connected to high battery voltage.

The oddest thing brewing "Oktoberfest", was the hybrid Fermentis K-97.
Never used it before. Finished off in 4 days @18C with lots of krausen giving the spindel a challenge reporting correct values
The force gravity is fixed in the new version, so that should work now.

You should try Kveik some time, one time it was done after 36 hours.... That was like a volcano eruption... And a thick krausen will make it hard to get some correct angles, even so if there is some that sticks to the tube.
 
The force gravity is fixed in the new version, so that should work now.

You should try Kveik some time, one time it was done after 36 hours.... That was like a volcano eruption... And a thick krausen will make it hard to get some correct angles, even so if there is some that sticks to the tube.
I can confirm force gravity is working fine in v2.0.0b3. Excellent work!

I normally take out the spindel(s) and clean it/them when primary fermentation is nearly over to get more correct readings the rest of the time.

Kveik: Yes, it is a "different league". Need to use two 50W tubular heaters in my fridge to get high enough temperature
 
I'm on the latest beta firmware, is it normal for this error only when plugged into USB-C? "No gyro is detected. Try to reboot / power-off. If this persists, check for hardware issues." I will also randomly get no temperature sensor found.
 
I'm on the latest beta firmware, is it normal for this error only when plugged into USB-C? "No gyro is detected. Try to reboot / power-off. If this persists, check for hardware issues." I will also randomly get no temperature sensor found.
You should not get any errors when charging, unless the output voltage is too high and causes issue with the gyro, see if you can check the voltage on the gyro board.

The temp sensor is probably related to the library im using which, i have switched too an alternative in the dev branch which you can test. Just select dev branch in github and download the bin you need from the bin directory

I will do a release when im back from vacation
 
I had an odd issue with an ESP32-S2 mini. I installed the firmware on the board before soldering to the PCB to test it out. Powering it up via USB-C on the computer, the program wouldn't execute. Nothing shows up via serial monitor.

When I downgraded to 1.4, the GravityMon AP point popped up, but when I tried to select the configuration mode, it did the WiFi scan, then immediately disconnected. I can pull up the serial log later if that would help.
 
I had an odd issue with an ESP32-S2 mini. I installed the firmware on the board before soldering to the PCB to test it out. Powering it up via USB-C on the computer, the program wouldn't execute. Nothing shows up via serial monitor.

When I downgraded to 1.4, the GravityMon AP point popped up, but when I tried to select the configuration mode, it did the WiFi scan, then immediately disconnected. I can pull up the serial log later if that would help.
Try to do a full erase, sometimes that helps with wifi issues if the flash has become corrupted
 
Without resetting the whole device, is there a way to reset the 0 degree setting (flat on a table)?
Yes trigger the mode where you access the ispindel 192.168.4.1 web page ( usually using reset button a couple of times) then it's in the configuration menu.

You don't lose your data with this reset. Is this what you mean?
 
Yes trigger the mode where you access the ispindel 192.168.4.1 web page ( usually using reset button a couple of times) then it's in the configuration menu.

You don't lose your data with this reset. Is this what you mean?
Not with gravitymon, this is only required before wifi is configured
 
Last edited:
Big thanks, it appreciated.
One thing it'd be nice to implement if you ever get time; I use a third order polynomial for my tilt formula. It'd be nice if the built in polynomial calculator had an option to use third order polynomial so I don't have to use an external system to generate it.
 
One thing it'd be nice to implement if you ever get time; I use a third order polynomial for my tilt formula. It'd be nice if the built in polynomial calculator had an option to use third order polynomial so I don't have to use an external system to generate it.
If you data is a good match for a third order formula you will get that, but you cannot force it to that level. It will actually try 1st, 2nd, 3rd order and return the first good match that you get based on the validation and maximum allowed deviation.

But I have been thinking of changing that procedure, options could be:

* Let the device choose (as it works today).
* Let the user force the formula to a certain degree
* Generate 2nd and 3rd degree formulas and let the user choose the optimal one (show in graph).

Would be interesting to do some more testing on that topic. Would you mind sharing your calibration points for me to do some testing ?

I have done some testing on the topic and implemented an test in my logging software and this is how I present the different options for now, this could be moved over to Gravitymon once i'm happy with the feature.

1729056755287.png
 
I went looking for it now and can't find an explicit mention, but what does the "science" say about the expected linearity of the mechanism ("metacentric height")? I can see additional complication due to a imperfect cylinder shape, and any non-linearity of the gyroscope. But I'm looking for some conclusion like "2nd- (or 3rd-) order should be sufficient and additional variation is most likely due to calibration measurement inaccuracies".

Perhaps there's no such comfort to be found. But in my case I only calibrated up to 1.090 and am concerned about the 3rd-order non-linearity up to 1.100 or 1.110 and whether I ought to recalibrate in that range.

All this is for "fun" as I really use these things for FG detection (trend) and secondarily for any potential stalled fermentation.
 
If you data is a good match for a third order formula you will get that, but you cannot force it to that level. It will actually try 1st, 2nd, 3rd order and return the first good match that you get based on the validation and maximum allowed deviation.

But I have been thinking of changing that procedure, options could be:

* Let the device choose (as it works today).
* Let the user force the formula to a certain degree
* Generate 2nd and 3rd degree formulas and let the user choose the optimal one (show in graph).

Would be interesting to do some more testing on that topic. Would you mind sharing your calibration points for me to do some testing ?

I have done some testing on the topic and implemented an test in my logging software and this is how I present the different options for now, this could be moved over to Gravitymon once i'm happy with the feature.

View attachment 860103

Sure mate. Here are my current calibration points:

25.6 1.008
27.400 1.011
31.750 1.020
37.080 1.030
44.900 1.041
51.450 1.051
59.760 1.061
65.240 1.069
69.620 1.079
 
Sure mate. Here are my current calibration points:

25.6 1.008
27.400 1.011
31.750 1.020
37.080 1.030
44.900 1.041
51.450 1.051
59.760 1.061
65.240 1.069
69.620 1.079
I did some testing with your data and think I have a good approach for a new formula editor, here are a few screenshots of the way it looks now. You can see the result in 3 different ways. Graphical, Table or the formulas.

I will still do validation of the values and as you can see a fourth degree would not work at all.

On the table view I added the maximum deviation on the top row so one can see which gives the best results. Using your data its easy to see that a third degree will be more accurate even if the current version would choose the second since that is within the allowed deviation. There will be a drown down so you can easily just choose the formula to use.

Any thoughts on this approach ? Would one need more than 10 data points ? I can easily extend that.

Screenshot 2024-10-18 at 10.34.20.png
Screenshot 2024-10-18 at 10.32.26.png
Screenshot 2024-10-18 at 10.33.24.png
 
I did some testing with your data and think I have a good approach for a new formula editor, here are a few screenshots of the way it looks now. You can see the result in 3 different ways. Graphical, Table or the formulas.

I will still do validation of the values and as you can see a fourth degree would not work at all.

On the table view I added the maximum deviation on the top row so one can see which gives the best results. Using your data its easy to see that a third degree will be more accurate even if the current version would choose the second since that is within the allowed deviation. There will be a drown down so you can easily just choose the formula to use.

Any thoughts on this approach ? Would one need more than 10 data points ? I can easily extend that.

View attachment 860198View attachment 860200View attachment 860199
Fantastic mate. I think your approach of allowing to choose is best as you can see there are corner cases where it won't choose right! I'd allow more than 10. Maybe 20 cal points? I don't see people doing more than that.
 
Fantastic mate. I think your approach of allowing to choose is best as you can see there are corner cases where it won't choose right! I'd allow more than 10. Maybe 20 cal points? I don't see people doing more than that.
Perfect, i will add 20 points. I saw you used all 10 so thats why I asked. I will do some more testing and then release a beta for this. Changes are in the UI only so there should not be any long term testing needed. Thanks for the idea and input!
 
Here's my recent calibration data for two devices on 2.0.1, if that's still of use. "Black" and "Blue" are the two cap colors and reported angle in sugar tap water. Hydrometer reading is 0.001 high, so subtract that to get the actual SG.
 

Attachments

  • smaller.jpg
    smaller.jpg
    274.8 KB
Here's my recent calibration data for two devices on 2.0.1, if that's still of use. "Black" and "Blue" are the two cap colors and reported angle in sugar tap water. Hydrometer reading is 0.001 high, so subtract that to get the actual SG.
Great, thanks. Would be interresting to check how much temp would affect the readings
 
Back
Top