• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

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.
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
 
Is there any way to add disable/enable to each profile that's sends gravitymon data; ex. Http 1, http 2, Mqtt, etc.. The reason is for testing without having to re-enter/remember each config info. I may want to use brewspy for one fermentation, and brewfather for another, and swap to mqtt. Just a thought, not necessary though. Great job on the progress! I used it successfully recently. One thing to note is the guide for Brewfather ispindel only works if the data is sent a Plato and Celsius. Otherwise you need to use the custom stream.
 
Is there any way to add disable/enable to each profile that's sends gravitymon data; ex. Http 1, http 2, Mqtt, etc.. The reason is for testing without having to re-enter/remember each config info. I may want to use brewspy for one fermentation, and brewfather for another, and swap to mqtt. Just a thought, not necessary though. Great job on the progress! I used it successfully recently. One thing to note is the guide for Brewfather ispindel only works if the data is sent a Plato and Celsius. Otherwise you need to use the custom stream.
The only way is to remove the URL for the service, thats how I detect if the profile is active or not.
 
Hi !

How can put my esp8266 (2.0.1) into force gravity mode ?


Thx for your awsome project !
 
version 2.1 is not released and available on github and brewflasher.

https://github.com/mp-se/gravitymon/releases/tag/v2.1.0

Main change is the new formula creator that is totally rewritten from the previous version. Now you will get all possible formula options with graphs and details on deviations from your measurement points.

Other changes include updates of Arduino libraries and a few bug fixes.
 
version 2.1 is not released and available on github and brewflasher.

https://github.com/mp-se/gravitymon/releases/tag/v2.1.0

Main change is the new formula creator that is totally rewritten from the previous version. Now you will get all possible formula options with graphs and details on deviations from your measurement points.

Other changes include updates of Arduino libraries and a few bug fixes.
Oops, small typo in the web interface home page?:

Device
Upgrade available
2.0.1 available on github.com

Should be 2.1.0, should it not?
 
Oops, small typo in the web interface home page?:

Device
Upgrade available
2.0.1 available on github.com

Should be 2.1.0, should it not?
I have not yet published the 2.1 on the homepage for automatic (OTA) updates or updated the homepage, thats on my todo list...
 
I would like to make use of the Bluetooth feature using an ESP32s3 mini. I'm wondering how to use it beside building a gravitymon-gateway. I saw that the firmware supports the TILT format, so I tried the TILT app on Android but didn't had success. Are there other apps that could read the value from a gravitmon device?
 
I would like to make use of the Bluetooth feature using an ESP32s3 mini. I'm wondering how to use it beside building a gravitymon-gateway. I saw that the firmware supports the TILT format, so I tried the TILT app on Android but didn't had success. Are there other apps that could read the value from a gravitmon device?
I have tested with the tilt app on ios which works fine with tilt format. I dont have android so i cant test that

I have some python scripts that can handle all the ble formats if you want to run it on a computer.
 
Indeed it worked for me on an ios device, but still no success on Android.

Can you provide the python scripts?
 
Indeed it worked for me on an ios device, but still no success on Android.

Can you provide the python scripts?
Sure, they are in my github repos. I have 2 variants of the script one here in gravitymon repo https://github.com/mp-se/gravitymon/blob/master/test/scripts/ble_scan.py but I think this is the latest version i was working on, https://github.com/mp-se/brewlogger/tree/dev/service-ble (scan.py), they should work on most OS. Let me know if you have any issues.
 
I am a hobbyist from China. I have created GravityMon, but I don't know how to fill in the key and address for Brewspy, so I am still unable to test it. I hope you can help me answer this question
 
Under Push Target -> Settings -> Token 1: Enter your brewspy token here.

Under Push Target - HTTP POST (1 or 2) select the brewspy url in the drop down list and also select the standard iSpindle format template under data format drop down.

Press test to try it out. That should be the steps.
 
Hi Mper
I have constructed the gateway unit in the hope it will show me what the gravitymon C3 super mini devices are send out as i am having difficulty with the push targets. does this devices screen echo the data received over WiFi direct before pushing the data on? so far all i can see on the screen is the device title and WiFi address. also is it able to read multiple gravitymon devices?
 
Hi Mper
I have constructed the gateway unit in the hope it will show me what the gravitymon C3 super mini devices are send out as i am having difficulty with the push targets. does this devices screen echo the data received over WiFi direct before pushing the data on? so far all i can see on the screen is the device title and WiFi address. also is it able to read multiple gravitymon devices?
It will show the data on the screen when its pushed, deviceid + some of the data. When you start it might not show anything until the push timeout has passed (default 15 min). You can change that to 30 seconds if you want quicker response. The data that is included in the package will be forwarded to all defined endpoints.
 
It will show the data on the screen when its pushed, deviceid + some of the data. When you start it might not show anything until the push timeout has passed (default 15 min). You can change that to 30 seconds if you want quicker response. The data that is included in the package will be forwarded to all defined endpoints.
if there are no endpoints defined will anything be shown?
 
v2.2 beta 2 of Gravitymon is now released which support new gyro with much better accuracy than the older MPU6050 used in the ispindel hardware. Big thanks to Levi--G for the implementation of that gyro. Currently I'm running my first brew using this new gyro (and of course a older ispindle for comparison). This is how the data looks so far; The red one is the new modern gyro which is much more stable. The gravity readings dont really match but I just did a quick 2 point calibration for the new gyro....

1746210269599.png
 
Last edited:
Back
Top