Shop OBEX P1 Docs P2 Docs Learn Events
BS2 Control of 120 VAC fan — Parallax Forums

BS2 Control of 120 VAC fan

KatyBriKatyBri Posts: 171
edited 2006-10-16 03:38 in BASIC Stamp
I'm starting a new project where I want to control the speed of a typical 120VAC "computer style" fan using a BS2. The BS2 would change the speed of the fan, based upon temperature readings the BS2 received from a DS1620. This project is to ventilate an electronic component cabinet.

I would appreciate any ideas of how to simply and economically control the fan speed using the BS2.

Comments

  • CogburnCogburn Posts: 62
    edited 2006-10-15 12:32
    You will need a solid state relay to control the 110 volts.··I have written a program to control an incubator heater with 110 volts so it should be about the same as your application except I·have the unit turn on when it gets too cool and you would have your unit turn on when·it gets too warm.· I used a Dallas Semiconductor 1620 to measure the temp. and send a signal to the ssr to turn on the 110 volts.

    If you would like·to·view the code, I would be glad to send it to you - give me a little time to find it though.

    I believe that the small cooling fans in the back of computers run off of 3 to 12 volts DC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Showing up to school doesn't·mean you are a student any more than crawling up in an oven means that·you are a biscuit.

    Post Edited (Cogburn) : 10/15/2006 1:14:46 PM GMT
  • CogburnCogburn Posts: 62
    edited 2006-10-15 12:56
    I will try to attach the code and a circuit diagram to this message.· I could only find hard copies so I scanned them - you will have to type in the program yourself.· Notice on page three under the decision structure there is a number 3861.· That represents 38.61 degrees which is the desired temperature for the incubator.· Change this number to whatever you want to trigger the fan.· Of course change the less than sign to greater than so facilitate the cooling process.· Good luck and thanks to Tracy Allen for the code to facilitate better precision from the 1620 chip.· I forgot to mention that this program will graph the temperature data to an Excel spreadsheet through the StampDaq feature so I have remmed out the debug statements.· If you are not using StampDaq then rem the serout command at the bottom of page two of the code and then delete the apostrophes where I have used them.· This will make the temps and switch settings show up on the debug screen of your pc.··This program just switches the fan on and off.· Since you want to change the speed of the fan you will have to·develop that code and insert it into the program where the decision structure is.· I hope this helps a little.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Showing up to school doesn't·mean you are a student any more than crawling up in an oven means that·you are a biscuit.

    Post Edited (Cogburn) : 10/15/2006 1:10:22 PM GMT
    1696 x 2176 - 487K
    1376 x 2048 - 785K
    1632 x 2224 - 769K
    1632 x 2224 - 304K
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-10-15 15:57
    Folks -

    On many occasions when the question is asked about controlling a small current AC load, the suggestion is often made that a solid state relay is the way to go. I have no particular problem with that suggestion, except for the fact that in some applications it may be over-kill, and sometimes overly expensive.

    Here is an "AC Line Switch" (datasheet attached) which operates very much like a common transistor (it's a three legger), but it handles all of the appropriate AC concerns, and can be driven from logic levels! In addition, it's a good deal less expensive than a solid state relay in my experience.

    Just remember the maximum currents are limited for this and other similar devices in this series.

    Regards,

    Bruce Bates
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-10-15 16:10
    Very sweet device Bruce. Though it should be noted the maximum current is 0.8A for the TO-92 style, and that it doesn't provide electrical isolation as a typical SSR would. As always, when playing with damaging voltages, the user needs to be careful and read the data sheets carefully, and be VERY sure of thier wiring.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    Personal Links with plenty of BASIC Stamp info
    StampPlot - Graphical Data Acquisition and Control
    AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-10-15 17:43
    Martin -

    Not to be a PITA, here and below, BUT I BOLDED the caveat about the small current capabilities, so I'll leave that to the reader. I certainly don't mean to "pick on you" but this is now the second time the isolation characteristics of this device have been questioned. I backed away from the "inquisition" the first time, because I don't make a dime whether anyone buys this device or not, but I'm digging my heels in this time <ouch>, just by virture of the factory specifications, and my own personal experience with this "sweet" device. In over 8 years I've had ZERO failures, and I KNOW some of these switches have been "abused" by line transients, inadvertant overcurrent, and in one specific case, local high frequency "noise" from electronic welders.

    Please define what you mean by "electrical isolation" so we can both be on the same page,·and how you would choose to measure it? I can think of at least a half a dozen potential·meanings for terminology as general as that. Are we talking about - voltage withstand, high voltage break-over, noise immunity/isolation, line terminal break-over, body insulation characteristics, or what? Secondly, which listed SSR electrical characteristics do you·feel·are·important to you (or others) in this "electric isolation" respect?

    In general terms, if·one were to compare this ST Micro "AC Line Switch"·to an SSR of similar voltage and capacity (albiet of large size, due to the nature of SSR's) you will find that the electrical characterists are similar, if not the same. If you're playing the "over-kill game", I'm not interested, thank you very much, as that was the primary thrust of this posting. I have 100 amp AC contactors sitting on my shelf·that will knock the jock off of any such devices!

    Kindest regards,

    Bruce Bates
  • Robert KubichekRobert Kubichek Posts: 343
    edited 2006-10-15 18:05
    Bruce,

    Do they make a higher power version of the same device??? In a TO220, or TO3 case???
    I have a lot of SSR's, but this looks nice as regards to being a heatsinkable mount, and the
    ease of connection to mcpu...

    Bob scool.gif
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-10-15 18:18
    Bob -

    OH how I wish they did or would, as that would be Nirvana for about 40% of my own higher voltage applications. Unfortunately (to date) they don't. I DO check about every 6 months or so, to see if they've updated the line. I'll let you all know if they do.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Robert KubichekRobert Kubichek Posts: 343
    edited 2006-10-15 18:21
    KatyBri said...
    I'm starting a new project where I want to control the speed of a typical 120VAC "computer style" fan using a BS2. The BS2 would change the speed of the fan, based upon temperature readings the BS2 received from a DS1620. This project is to ventilate an electronic component cabinet.


    I would appreciate any ideas of how to simply and economically control the fan speed using the BS2.

    Actually, using 12v computer fans would be much easier and safer to use, and would use comparably the same power to ventilate the cabinet.

    There are Dc motor controllers and kits out there that are rs232 controlled, and are quite resonable in cost.

    Doesn't the DS1620 have user controllable outputs???
    All you would need to do is program it to turn on a fan that has its own temperature-stepping control already.
    The warmer the air flowing through the fan the faster it blows, as the cabinet gets cooler the fan slows in speed and idles until the DS1620 shuts it off.
    Depending on the amount of heat generated by components, you could have mutiple fans running this way, and the power requirements would be quite low..

    Bob scool.gif
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-10-15 21:01
    There is a selection guide on the ST AC switches towards the botom of this page:

    www.st.com/stonline/products/families/thyristors_acswitch/acswitches/acswitches.htm

    From the guide, they have AC switches that will handle up to 8A.
  • Mike GreenMike Green Posts: 23,101
    edited 2006-10-15 21:26
    It wouldn't be hard to use an opto-isolator to get a robust AC switch up to 2A (with some devices in this series) that could be controlled by a Stamp or Propeller.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-10-15 21:28
    Kevin -

    Thanks! I totally missed that reference.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2006-10-15 23:29
    Bruce,
    Didn't mean anything by my post but re-emphasizing a couple points. I and students have blown out a couple computers and controllers by not using optical isolation and having issues. Like I said, it's a really sharp device as long as precautions are used. Sorry again. I typically push SSR's, but you showed me something new, so cool and thanks.

    I for one don't remember seeing a post on this device before or questioning it, if I did, sorry, I may not have looked as closely as I did this time. I'll try to limit my posts to those of significance.

    -Martin
  • JW SmytheJW Smythe Posts: 12
    edited 2006-10-16 00:55
    ... about the price of SSR's.

    Check out eBay. [noparse]:)[/noparse] I just bought a lot of 4, Crydom D1D12's (100V 12A DC-DC SST's) for $50. There are an abundance of AC-AC and DC-AC (DC Control, AC load) Crydom SST's on there, and a few other brands. It was a pain in the butt for me, since I was looking for high voltage, high amp DC-DC, but you should be able to find something for cheap.

    Of course, all the standard rules of shopping on eBay apply. Make absolutely sure the product you're buying is what you wanted (Crydom has a product # lookup, which works well). Check the seller's feedbacks, and avoid anyone with negative or no feedbacks. Blah, blah, blah. [noparse]:)[/noparse]

    4 for $50 may seem high for something to toy with, but it's much better than the $40/ea that they sell new for.

    Bruce was probably right though (I'm far from an expert). There's always more than one way to do things. Ask any programmer. [noparse]:)[/noparse] In my case, I think the SSR was the better choice, but I'm playing in dangerous territory.

    I'm not sure if it's perfect for controlling speed of an AC fan though. (let my ignorance shine through)
  • Robert KubichekRobert Kubichek Posts: 343
    edited 2006-10-16 01:38
    As a further note, switching AC inside a cabinet produces lots of EMF/RFI that might cause problems with the equipment being cooled.
    You do not get as much noise when you switch low voltages like the fans used in computer cases..

    Bob scool.gif
  • KatyBriKatyBri Posts: 171
    edited 2006-10-16 02:00
    Thanks for all of the ideas, but I·want to change the speed of a cooling fan based upon the sensed temperature; not, simply turn it on-and-off if the temperature exceeds some preset value.

    Most cooling fans are too loud, and cycling the fan on-and-off would be a problem. Having the fan speed regulated as a function of the temperature (e.g. the fan turns on at slowest speed when temperature limit is exceeded and then increases speed to next higher setting, if the temperature is not reduced within a specified time interval) is what I would like to do. I am thinking of using a look-up table in BS2 to do this.

    But,·I've not used any·120VAC speed control products with the·BS2, and·am looking for·this type of·hardware. Does Parallax sell anything? Thanks
  • Robert KubichekRobert Kubichek Posts: 343
    edited 2006-10-16 02:53
    That is why I suggested temperature controlled dc fan.

    Here are some;

    www.antec.com/us/productDetails.php?ProdID=75012

    www.casecooler.com/therrpmconfa.html

    I would use them on the switched output of the DS1620 for simplicity, as they have temperature speed control
    internally, so the DS1620 would just turn them on when the cabinet gets too warm, and turn them off when
    it cools back down.

    Bob scool.gif
  • KatyBriKatyBri Posts: 171
    edited 2006-10-16 03:38
    Thanks, Robert.
Sign In or Register to comment.