Shop OBEX P1 Docs P2 Docs Learn Events
Fan Control Suggestions — Parallax Forums

Fan Control Suggestions

joeldjoeld Posts: 49
edited 2008-03-05 02:06 in Propeller 1
I'm trying to implement the most efficient/reliable method for controlling the speed of a small 100ma 12v dc fan. I've been looking at the Maxim 6615 or 6616 I2C fan controller chip. I'm not controlling the speed based of temprature but it looks as if I could just write a desired speed to a register in Manual mode.

I'm sure the function of this chip could easily be implemented with a couple proppeller pins and run in a cog. But I look at all the functions this chip performs such as providing a spin up cycle if the fan is stopped and checking for a locked rotor and wonder if it's a better choice to just use the $8.00 chip.

Anyone have suggestions or have implemented a good fan control with the propeller? I don't see anything quite like it in the object exchange.

Comments

  • parts-man73parts-man73 Posts: 830
    edited 2008-03-02 21:21
    I just got done with a similar project. Except that the motor I was controlling consumed more than an amp while running and quite a bit more upon start up.

    I suggest a simple NPN transistor and use PWM on a single pin of the Propeller to the base of the transistor. By changing the duty of the PWM, you will change the speed of the fan.

    I used the simple PWM object from the object exchange here
    > obex.parallax.com/objects/216/

    ( I used a MOSFET instead of a transistor in my project due to the higher amperage involved, but the same concepts apply)

    If you want a schematic or code example, let me know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio - the modular Development system for the Propeller

    PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!

    SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-03-02 22:58
    I agree with parts-man73. Save the cost of the expensive chip and just use a pin and PWM a transistor or MOSFET. You can write your own routine for it to spin up or spin down. Does the fan have an integrated tachometer? If so, then I would use another pin (or two) to connect the tach to the inputs. One cog is more than enough to control the outputs and watch the inputs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter

    www.brilldea.com·- check out the uOLED-IOC, an I/O expansion for the uOLED-96-PROP
    www.tdswieter.com
    One little spark of imagination is all it takes for an idea to explode
  • joeldjoeld Posts: 49
    edited 2008-03-02 23:40
    I think I take this advice and try the direct route. I ran down to radio shack and picked up a MOSFET transistor. The fan I have does have the tachometer output so I should be able to easily implement methods to check speed and for problems such as a locked or failed motor.

    I was thinking about what might be handy functions to include in a Fan Control Object.

    Things that came to mind were methods to: Set a speed and return a result (maybe a tach reading or just true or false), Read the Tachometer, Log operation time, Stop the fan.

    Can you think of any other functions that would be usefull to write into a control object?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-03 01:40
    An Nch mosfet and pwm is certainly the way to go. Having tacho feedback is a bonus too. It might not be required for a fan but current sense is always a good idea when dealing with motors. If you include a current sense resistor in the drain/emitter to ground you can measure the motor current as voltage. It is even possible to detect stalling and commutator spikes when you do not have tacho feedback. Of course none of this really matters with a little 12VDC/100ma motor anyway, but then again if you couldn't be bothered you would have bought a unit off-the-shelf.

    Motor speed doesn't always equate to air flow though and the motor response isn't linear linear either. I'm saying this because I am not quite sure what your application, it might be to cool a 10x10 array of propeller chips!, in which case temperature feedback is more important then as is the fitting of the motor to a PROPer beanie cap.

    *Peter*
  • Paul RowntreePaul Rowntree Posts: 49
    edited 2008-03-03 05:13
    Can anyone give me an idea of how stable these fans could be (in frequency) when locked-up with an I2C controller or a prop via PWM? I need an optical chopper and the commercial units are way too expensive (often >$1000), and this could be a very easy work-about. A chopper needs to be stable to ~0.1 Hz for best effect ..

    Cheers!
  • joeldjoeld Posts: 49
    edited 2008-03-05 02:06
    I have the fan up and running. It's driven through a power transistor directly off a propeller pin. I used the PWM object off the object exchange. The PWM object was very simple, clean and works great.

    My question now is the best way to implement the remainder of the project. ·The overall goal is a humidity controller for a cabinet cigar humidor. The fan will be driven in a PID loop to pull air across a humidifying block to control the humidity in the case.

    My thought is a main object that drives a LCD screen, reads the sensirion sensor and does misc other functions, set time, door alarm, turn on and off light, etc. Then have a second object that is a PID object that gets passed the desired set point from the main object and calls the PWM object that will run in it's own cog. All said with the support objects that about eat up available cogs. I need to study a bit to figure out how to read the same var's or memory locations in different cogs. I haven't attempted that yet.

    Cog 0 Main
    Cog 1 Sensirion
    Cog 2 LCD
    Cog 3 Float32
    Cog 4 FloatString
    Cog 5 PWM
    Cog 6 PID

    Anyone see any flaws in my thinking or more efficient ways to implement?
Sign In or Register to comment.