Shop OBEX P1 Docs P2 Docs Learn Events
HB-25 Motor Controller and Fan Control — Parallax Forums

HB-25 Motor Controller and Fan Control

Ryan83Ryan83 Posts: 3
edited 2014-04-17 00:02 in BASIC Stamp
Hey all,

Let me start by introducing myself as this is my first post here. I have a background in Mechanical Engineering and took an interest in electronics while I was college. I have no training in electronics other than the Stamps in Class series which I have done most of and the allaboutcircuits.com site. The programming I find to be relatively easy but the circuit/electronics design can give me trouble at times. I have been using the Basic Stamp (BS2) for well over 5 years. I have never had to ask a question on here before as I have always been able to find an answer in these forums or in other documentation provided by Parallax. I would like to extend a very appreciative thanks to the knowledgable folks who contribute to these forums and to Parallax for the awesome documentation.

Having said that, I will give you some background on my project the details of which are somewhat sensitive. I am involved in a project that is essentially a heat transfer problem and my part is to design experiments to determine the effectiveness of the system and optimize it for use in an end product. To do this, I am using the BS2 on a BOE controlling a fan (datasheet attached), measuring temperatures at various locations, measuring power usage and collecting that data for output to excel. I would say that this is by far the most involved project I have done with the BS2 as I have taken a number of shortcuts to reduce output pins and programming space required. If the initial trials prove that the concept can work, I will likely be purchasing the Professional development board and the BS2p40 to enhance the capabilities.

Now on to the problem. The fan(s) I am attempting to use are 92mm DC brushless fans. My original attempt was to use the HB-25 on the positive and negative leads of the fan to control speed. I learned the hard way that the HB-25 motor controller is not intended to control a brushless motor, however, the fans that I have also have a PWM input available for control (originally left open which results in the fan running at max speed for the specified voltage). Although not ideal due to the amount of other actions the Stamp must perform, I thought maybe I would use the PWM command to control the fan speed. I discovered from reading the documentation for the PWM command in the Basic Stamp help that it is not true PWM and it does not appear to be compatible with the fan PWM input.

Can I use the PWM output from the HB-25 as the fan PWM input? This would be a gross underutilization of the HB-25 but I have it now with no other use for it. Is there a better way to control the speed of a DC brushless fan from the BS2? Are there brushed fans of similar output available that could be directly controlled by the HB-25?

I don't believe this is a programming issue so I have not posted it here but I may due so in the future as it is pretty extensive (for me), well docummented and makes use of a lot of features of the BS2.

Any and all help would be greatly appreciated.


Delta Fan FFC0912DE-TP04.pdfDelta Fan PFR0912XHE-SP00-REF..pdf

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2013-03-18 11:33
    The HB-25 "Mode 1" frequency is around 9 kHz.
    It is fixed-frequency PWM.
    The best solution would be a motor controller designed for brushless motors (there are many.)
  • Ryan83Ryan83 Posts: 3
    edited 2013-03-19 06:20
    PJ,

    Thank-you for the quick reply.

    If the output of HB-25 is fixed frequency, can I just tie M1 to the fan PWM input and expect it to work to control the fan speed? Should M2 be left floating or does it need to be tied to ground?

    Can you point me in the direction of choosing a brushless motor controller? I see lots of them but it isn't obvious to me which one might be suitable for the application. I prefer one that can be controlled with the BS2 and can be wired up on a breadboard or with terminal block connections.

    Thanks again for the help.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2013-03-19 11:52
    OK, by "brushless" I assumed the 3-phase sort. Not so, in your case. (Hey, I looked at the PDFs.)

    The HB-25 is an H-Bridge, its output is reversible, so neither terminal should be "tied to Ground" or +V.
    The HB's output, PWM output and polarity, will vary in relation to the pulse width of the signal in:
    Between 1.5 and 2.0 msec its polarity will be in one direction and between 1.5 and 1.0 msec it will be the other (i.e. reversed.)
    Where it changes over is somewhere either side of 1.5 msec.
    [Refer to manual and aspects of Mode 1 operation.]

    I think you can run your fan with its +V and Ground connected to M1/M2 if you place a diode in series with your fan, then reverse polarity will not be as issue.
    Leave the fan's yellow lead disconnected.
    To be certain which polarity results with the pulse widths you choose (M1 positive with respect to M2 vs. M2 positive with respect to M1), substitute a large value resistor for the fan and get out the voltmeter and observe.

    If you wanted to use the HB's output as PWM input (yellow lead) for your fan then I'd run that through an opto.

    None of this takes advantage of the fan's freq ("foo") output.

    P.E.
    The fan PDF notes "polarity protection" as part of the device design, so, depending on how that is effected, it may be that the diode I mentioned is not needed.
  • Ryan83Ryan83 Posts: 3
    edited 2013-03-20 05:29
    I think I understand the HB-25 operation as I have read the data sheet a number of times. My thought in using it as PWM control was that I would only be driving the fan in one direction (forward) so I could use just one output of the HB25 to send the PWM signal to the fan. I will give the HB-25 another shot once I get a working power supply back. I also had previously observed the polarity of the outputs on the HB-25 with a DMM and was the reason that I was going to use M1 as the PWM output for forward direction.

    Part of the normal operation of the fan will include counting pulses on the fans frequency output. I have that signal going through a zener diode to "clip" the signal near 5V and through a resistor to limit current to the fan datasheet specifications (which also meets the BS2 specifications) before going to an I/O pin on the BS2. I have not had a chance to test that yet but will do so once I receive the working power supply.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2013-03-20 05:56
    Hooking the fan up between M1 and Ground... it's an atypical use of the HB, so I never thought of it that way, but it seems sound.
    The Frequency Generator Signal output is "open collector" (pg. 7 of PDF, "Frequency Generator (FG) Signal"), so all that's required is a pull-up to Stamp +5V.
  • srbergersrberger Posts: 1
    edited 2014-04-17 00:02
    I know this thread is a year old, but I'm currently working on replacing a "brushless fan controller" that I fried. The reason I put that in quotes is because you don't need a motor controller whatsoever, as it's built into the fan. What you (and I need) is only a fan controller. In your case it's a 2 wire control, one PWM going from the bs2 to the fan to control speed, and one input capture/counter from the fan to the bs2 to read the speed of the fan.

    One thing I wanted to ask is, is this a work project? If so I wouldn't even use a stamp, as this is in the development stage. You would be much better served by using lab view and a I/o card. Very easy to set up experiments in lab view and run them, as you get your feedback in a usable form much more a quickly, as well as use the feedback to create a virtual closed loop control as things progress. If it is decided that an mcu will be used in the final application you can use what you learned in LabView to spec a STAMP or other mcu that gives you only what you need.


    In this application starting with a dev STAMP isn't that big of a deal as it is so simple. But on the other hand your project isn't to develop and implement an embedded system, you're just evaluating the performance of a thermal system, and LabView is the perfect system for this. (And much much more) So if this is in a professional setting, get your boss to set you up with LabView, if there isn't already a setup in the building. You would be hard pressed to find a company that doesR&D and doesn't have some form of LabView around.
Sign In or Register to comment.