-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 upgrade? #2
Comments
Nice build. I've used some similar PCB for my builds, once I'm happy with the hardware design I will create a pcb. I have also created a 3d printable case for my board. It looks like the same size board that I used (but I bought mine from electrokit) I've experience that I get more variation when the scale is in the keezer and the temperature varies. Have you noticed anything around that part ? I know the Web UI is a little sluggish but I dont think a esp32s2 board would help. The main issue is that reading the scales takes approx 400 ms each so that loop is the problem since that would not be faster on an esp32. So every read cycle (2 seconds) the CPU is blocked for 800 ms reading the scales. I have been considering an esp32 but in that case it would be better with one that has more than one core like the older ESP32 D1 mini (that have 2 cores) or one of the development boards but then I loose the nice form factor. S2 and C3 only have one core each. But it's not that hard to port this to a esp32 for testing at least. Will do that once I'm happy with the stability. Another option is to move to a AsyncWebServer which would be much faster and I'm probably going that route once the functionallity is more stable. That option can cause real crashed and reboots if there are issues with the code (can be unstable) and is not that easy to develop and test. Let me know if you are missing any features. |
That's a really god case for the scales. I will have a look at those and see if I can modify my 3d model so they are not exposed as of today. I will test out both options (async) and (esp32s2) to see what improvements can be made. I getting to a state where I think the basic function are in place so its the next natural step to look at performance improvements. |
There is another option I will try as well, and that is a replacement for the HX711 board (sparkfun board) that uses i2c instead that should be much faster to get data from. |
Another theory around scale varations: |
Yes, im using unshielded cat6 (flat) and i dont have interference outside the keezer. So my therory is that tempersture and compressor is causing the drift/interference. Its not a big deal so it might not be worth to fix…. But it could be worth to test just to know for sure |
I've added a firmware_async.bin that you can try out (dev stream). This moves to an async webserver with better response. Let me know what you think. |
Tried installing beta9 and beta10 (the async one) via web interface . After 15-20 seconds they both loop back to web portal mode. I also noticed none of them detected the temp sensor during boot. Uptime was long enough for me to reinstall the working beta7, which correctly detects both scales and tempsensor after a cold start. I managed to catch a raw transcript via USB/minicom when running beta10 if that is of any help: |
Looks like it crashes when trying to return data to the ui for the index page. The stack trace should help to narrow it down to the exact point |
Found the issue, I need to refactor some code so I don't call hardware/IO from the webserver, this is causing the device to crash. I just did a couple of quick tests without any scale so I didnt see the problem. |
I had to refactor quite some code in order to make this work without issues. I have released a v0.5 now that I have tested the basic functions and calibration flow. That seams to work fine with the async option. I will upgrade my own keezer to this version and start to see if I can find any more issues. Thanks for the input. I will use this to improve the documentation when I have some time. |
Installed 0.5.0 async now. |
Yes, the pins for scale 1 sometimes needs a hard reset to work. I have the same problems with the iSpindle and a soft reset and connection issues with the gyro. Have not found a solution around that other than doing a hard reset. Yes, its much more responsive. The async webserver hooks into the internal delay/yield interrupts so it can serve data at any point without waiting for the loop. I'm moving that code to gravitymon as well to speed that up. |
@darkside90a I've done most of the coding for an esp32s2 chip with sync/async support. Still need to do some more testing. Let me know if you want to test that version. |
Sure, I can do some testing. |
It will be pin compatible, i will let you know when i have tested it |
You can try the 0.6 beta 1 version for the esp32s2. |
Great work! I have only found one issue(?) so far: For those not very familiar with esptool.py, I found this approach of first-time flashing to work too:
Initially I tried to upgrade the ESP8266 D1 Mini from 0.5.0 to 0.6.0b1 when it was still in place. Because then I could do a backup, copy data over to the ESP32-s2 backup, and restore. No new calibration needed. |
Thanks. I will try the NAU7802 chips as well, I have 2 of them. The problem with the history graph is probably related to that you dont have any data logged if you switched the board. But I will check to confirm that. I can confirm that uploading from the 0.5 version didnt work but I found one issue when testing the esp32 async that I fixed, could be that problem that causes it to fail (I guess you used the async 0.5). I will add the firmware to brewflasher once I have tested it a little more and fixed the main issues. |
Found the issue with the update. The main problem is that the device does not reboot when firmware has been uploaded. I flashed and then did a manual reset and when it reboots it will switch to the new version. Applies to the 0.5 async version. Will check if I managed to fix this in the 0.6 version. Really nice statistics. Seams really stable. |
Closing this for now, reopen if needed. |
Hi Darkside, your covers for the load cells and wiring look slick. Do you mind sharing the stl's for them? |
Hi, |
Nice work, I will add a link to your repo in the documentation so its easy to find. |
Great, thanks! |
I've successfully built one from this project with a different solution of scale bases. Incredible stable, even with v0.5.0b7 installed. Deviations are just 0.06 and 0.04%.
ESP8266 web interface is a bit slow though. I'd love to see an ESP32 variant, for instance based on ESP32-S2.
As I built the case unit as plug-in modules on a 60x80 experiment PCB (#90664) from Kjell&Co, it's really easy to replace the ESP8266. The whole unit fits snugly into a 120x70x35 case (#89026) from Kjell&Co.
The text was updated successfully, but these errors were encountered: