by bArray · 1y ago · 0 comments
[1] https://andrey.mikhalchuk.com/2011/06/20/reading-attiny85452...
USB Bootloader is interesting, but I already had a few ISP loaders. You can make an ISP loader with Arduino as well. [1]
[1] https://docs.arduino.cc/built-in-examples/arduino-isp/Arduin...
It's kind of better than ambient, it would reach the temperature of the GPU if thermally coupled. The sleep-mode thing would just be a case of lots of micro sleeps to discount the temperature of the chip, could have even under-clocked too.
> USB Bootloader is interesting, but I already had a few ISP loaders. You can make an ISP loader with Arduino as well.
The benefit of USB is being able to get debug data from the fan controller as it runs, and be able to re-flash it whilst in the PC by attached to an internal USB bus.
This way you could also log out what the GPU reports, vs what you measure, vs what the ATtiny85 measures.
The compensation might be needed, and the internal thermal sensor also needs tuning in any case if you read the specs, but it's close enough that you could use it out of the box and only be out by a few degrees. Chip temperature with regular sleeps isn't going to be a significant factor.
There is enough code space on the ATtiny85 that you could actually build a model that takes measured temperature T at time t (T_t), the goal temperature of G (G_t) and produce a predictive model for M(T_t, G_t) = T_{t+n}. You could then do something a little smarter than a PID controller that takes in some profile considerations, i.e. slow (low noise, low RPM, likely for normal usage), fast (high noise, high RPM in bursts, likely for gaming).