Check out my first novel, midnight's simulacra!
InaMORAta: Difference between revisions
No edit summary |
No edit summary |
||
Line 23: | Line 23: | ||
===External (thermistor)=== | ===External (thermistor)=== | ||
===Microcontroller=== | ===Microcontroller=== | ||
==Wiring== | |||
* 5V pin goes to 10kΩ resistor, goes to signal | |||
* Take ground from power source | |||
* Digital input pin goes to 10kΩ resistor, goes to signal | |||
===Example breadboard=== | |||
* 1A: digital input pin | |||
* 1B: fan signal | |||
* 1C: 7C | |||
* 2D: Arduino GND | |||
* 2E: External ground | |||
* 7B: 10kΩ resistor | |||
* 7C: 1C | |||
* 16A: 5V | |||
* 16B: 10kΩ resistor | |||
==Protocol== | ==Protocol== |
Revision as of 03:44, 16 August 2022
Let's fuck hard with some fans using an Arduino or two (UNOs or Megas, not the 3.3V Due). This will be used for my MO-RA3 to collect realtime data (fan RPMs, temperatures, etc.) and provide realtime control (fan PWM, RGB signals).
Communication
We'll want to report RPMs to the controlling host, and probably take PWM and RGB orders from it. We might use e.g. LoRa for this later. For now, we'll use the serial channel over a USB connection.
Powering the micro
So long as we're using the USB connection, we can get power from it; later, if we cut the cord, we'll need to take power from the fans' power source. If we're using 12V fans, that's right at the top end of the supported voltages. 5V is not going to cut it as a Vin supply (it'll work over USB, though). Arduino claims to support 6–20V through Vin, and recommends 7–12V.
We will *not* be powering the fans or LEDs from the Arduino directly. They draw too many amps, and Arduinos can't provide 12V power directly anyway.
When Vin is driven with at least 7.5V, it will take over from any USB connection. This is probably desirable, so that we are on the same power source and ground as the DUTs (but maybe it doesn't matter?).
The USB power must not be used in conjunction with power supplied through the 5V header. If a 5V source is to be used, it is desirable to use it through the USB receptacle, which enjoys polarity protection (unlike the 5V pin).
Rotation count (RPMs)
Most case fans have a tachometer inside, using the third wire to send its signal. It will be strobed once for every two revolutions. If it is e.g. strobed 80 times within a second, then there were 160 revolutions in that second, and we can extrapolate to 9600RPM (truly an insane case fan; I know of no such monstrosities).
We will use one digital input pin per fan being monitored.
Control (PWM)
Temps
External (thermistor)
Microcontroller
Wiring
- 5V pin goes to 10kΩ resistor, goes to signal
- Take ground from power source
- Digital input pin goes to 10kΩ resistor, goes to signal
Example breadboard
- 1A: digital input pin
- 1B: fan signal
- 1C: 7C
- 2D: Arduino GND
- 2E: External ground
- 7B: 10kΩ resistor
- 7C: 1C
- 16A: 5V
- 16B: 10kΩ resistor