tjko/fanpico

More temperature inputs

Opened this issue · 6 comments

Thank you

First of all, this project is an amazing gem, pretty much exactly what I was thinking about designing and building! Thank you for that. I poked around the code and I see it's very high quality and with a great level of flexibility built-in. This is what prompted this issue.

Scope

How feasible/desire would be to expand the temperature sensing capabilities of fanpico? I have precisely two things in mind:

  1. More temperature sensors via ADC, potentially external one via I2C/SPI to limit hardware changes and prevent scope creep
  2. External temperature sensors with value published from an outside source (MQTT/HTTP/UART/whatever)

Dynamically-created sensors are imo out of scope and non-goal. Looking at the code making SENSOR_COUNT dynamic would be a nightmare.

Usecase

The usecase for such a change is to have a complete control over the system that contains multiple heat-generating components. For example if we take even a small NAS as an example, we have:

  • multiple disks, where usage pattern can create big temperature gradient warranting fan ramping up even if CPU temperature is low
  • network cards/DPUs, with 10/25/40Gb ones creating quite a bit of heat
  • SAS controllers, that during e.g. RAID rebuild can produce substantial amount of heat
  • GPU-only activity like transcoding or AI training, requiring overall increased airflow

My original idea steems from HDDs itself: high-capacity 7.2k RPM enterprise units can very quickly heat up under load. As they're split into multiple pools I would realistically need one sensor per disk.

Future possibilities

With more sensors implementing something similar to HP 3D Sea would be feasible. As I have some experience with lightweight web interfaces I could help with that.

image

Interface like that greatly improves "glanceability" of system state, as list of raw temperature and fan speed values requires more effort to interpret at a glance.

WDYT?

tjko commented

Adding support for additional temperature sensors is something that has come up. One way to easily support 8 (or 16) would be to add one (or two) analog multiplexers that are driven by same signals as the existing analog multiplexer (74HC4051) for tachometer input.

As you suggested another way could be some analog switch (multiplexer) that can be controlled over I2C to "multiplex" temperature inputs.

For external temperature inputs current firmware has initial support for virtual sensors (VSENSORS), that were meant to allow using things like HDD or CPU temperature as input (and to be displayed on OLED or LCD panel).
(https://github.com/tjko/fanpico/blob/main/commands.md#configurevsensorxname)

Idea for "VSENSORS" was that there would be some software/script that would issue SCPI commands to update their values over the Console/UART connection. MQTT can be used currently as well (there is simple control to only allow "WRITE" commands if want to block other SCPI commands over MQTT).

I'd gladly accept contributions to improve the current web interface as its very primitive at the moment...

tjko commented

@kiler129, current batch of 0804D boards is starting to run low. I was thinking of minor revision by adding "QWIIC" (or "STEMMA QT") connector to make it easier to add/daisy-chain external sensors. Any preference on the connector type?

Adding more inputs (connectors) for thermistors read by ADC, might be something for a new board model. Since seems like not many users actually use all "MBFAN" inputs from motherboard/fancontroller, so reducing inputs would allow adding other features as well (or increase FAN outputs).

@tjko We have ben purchasing several boards 30+ We currently mount a daughter board above the temperature inputs and have written code to read the ds18b20 serial one-wire sensor. These are addressable and have a higher accuracy. were using screw down TE Connectivity AMP Connectors. May be we could collaborate. The one-wire sensor allow multiple sensors to be added on the same buss. We also utilize a 12v barrel connector instead of the 4 pin aux on a daughter board.

tjko commented

@jamesRericha, those DS18B20 sensors look really nice. Have you been using them in the "external supply" mode (when only 1 pin seems to be needed) or in "parasite-powered" mode (when it seems like 2 pins are needed)?

Should be able to squeeze support for these on current PCB design without too much trouble. And this shouldn't really need more than a pull-up resistor and perhaps protection (TVS) diode(s) ? (I was just thinking, that a long string of sensors connected, probably raise risk of ESD damage to the micro noticeably...)

If you don't mind sharing how you've been doing things, that would help.

Oh, and a 12V DC jack sounds like good idea. I'll see if can add footprint for one as alternate to the current "floppy" power connector.

@tjko Please forgive me I am very new to Kicad and github. I am sure there is a better way for me to share these and I will have to figure out how.

We use a 2" wave share screen with a 10 pos ribbon cable over about 5 feet distance. 3d printed housing and a face plate sticker.
ISO Screen mod 050724
waveshare2displayadapter

This is the adaptor board.
image
We had a few issues with noise on the spi for the screen and the sensor. We now don't pass the 5v pin from the main board to the daughter board, we don't pass the power select jumpers up but instead solder a jumper to the main board selecting the aux power. We use the 12v barrel connector.

Then over at the temperature sensors we pass both of the current jst pins to the daughter board and the slightly too large pull up resistor 10k is bonded to the existing voltage reference source. Creating a signal wire with a pull up resistor about 2x the size recommended size. We have a ground, signal, and power. One wire setup is cool for some situations but more code implementation and slower read times.

We measure temperatures and needed the greater accuracy offered by the ds18b20, we then display the temperatures and run fans on a curve. No computers involved so we never use the MB Fans or MB power. Currently we use 4 fans but may expand. We want to port from micropython to C++ to increase display options and add the Bluetooth and wifi settings page.

IMG_8909 (1)

tjko commented

@jamesRericha, thanks for the details. I'll see if I can incorporate these features on the next PCB revision.