2

EDIT: Rewrite, this is why you don't write questions after not sleeping for two days (wait what day is it?)

I have a whole bunch of 12V 4 pin (pwr, grnd, tach, pwm) fans I'd like to manually control, a server rack (don't worry this isn't any kind of production system...) from which I'd like to read temperatures using DS18B20 1-wire sensors, and a raspberry pi. Buuuut I'm not really sure about my best options for how to do this.

PWM

I understand I can use Software PWM to use GPIO pins for PWM output but constantly this seems relatively computer-power hungry and attempting to write different PWM outputs to lets say 8 different fans on 8 different GPIO pins seems like it would pretty much tie up the rpi from doing anything else. Also as far as I can tell from my research 12V fans use a 5V TACH output and 5V PWM control which isn't rpi safe so I'd have to step down the TACH input and step up the PWM output (Is this right?). I could use a Adafruit 16-Channel PWM I2C interface since it can deal out 6V PWM but two problems arise, the board is designed for servos so lacks a TACH input, meaning I'd have to rewire my fans to switch the TACH and PWM pins (removing plug and play ability for switching fans out), and the power delivery to the PWM devices is limited to 6V meaning I'd again have to use a separate circuit for 12V power for the fans.

It seems my best option is using I2C fan controller since they are designed for this in the first place (why redesign the wheel) and the price-per-chip for simple versions is relatively low (although from my research I've come across a number of very cool 'intelligent' i2c fan controllers that can handle a bazillion fans and numerous ways of controlling them though I'm not willing to pay $1,600 per chip). It seems like something like the EMC2301 would be my best option, it allows control of a single 4-pin fan with all the features I want and assumes powering of the fan device will take place somewhere else (woo sperate 12V power supply).

1-wire

For 1-wire sensor collecting I understand I can run a number of them in parallel and I love the OWFS stuff for reading from the sensors, the limiting factor seems to be the avg. and overall lengths of the wires each sensor is connected to, since each of my wires will be quite short (less than 1m) I could probably get away with all 20 on one GPIO pin by changing the config that limits you to 10 on your 1-wire bus. But I've also heard stories of people running up to 17 sensors using a I2C bus so I'm wondering if this is my best bet with LOTS of sensors, something like a DS2482S-100, it still only has one bus (although they do make an 8 bus chip) but people seem to say they can support up to a 100m network, although I cannot find anything in the datasheet about what this really means for numbers of sensors.

So two questions really, would a chip like the EMC2301 (datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/2301.pdf) be my best bet for 4-pin fan control without having to completely reinvent the TACH/FAN PWM control wheels, and would a chip like the DS2482S-100 be my best bet for a stable 1-wire bus for A LOT of sensors that exist in a relatively small network (distance wise)?

  • Welcome to Raspberry Pi Stack Exchange! While we want to help you, and this is exactly one of the things the Pi was created for, your question is a bit long-winded and hard to follow, as well as the actual question being a bit hard to find. If you could shorten up the question, including just the essential information(what you've tried/researched and any issues you've run into) and making the question clearer while cutting out the chattiness, that would make this question a lot better! – RPiAwesomeness Jul 6 '14 at 18:55
  • hopefully this is a bit better... – rolands Jul 7 '14 at 12:26
  • Much better! :) Hope you can get an answer! I haven't had any real experience with i2c and the like, just basic GPIO, so I'm really unable to help. – RPiAwesomeness Jul 7 '14 at 13:38
1

you are right, that the one-wire temp-sensor Dallas DS18B20, is the least painful way to measure the temperature. I used 3 on a wire, and it was all fine.

For the PWM-Output: why not keep it simple, and just control all the fans together? I would use a Transistor to do that, it's quite a simple setup but it works well for my LED'S :-) It's of course possible to have more PWM-Ports using I2C and other IC's but that would make the project more complicated, so i'd start that way!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.