Shop OBEX P1 Docs P2 Docs Learn Events
switching 120vac — Parallax Forums

switching 120vac

rrrr Posts: 63
edited 2005-11-23 13:07 in General Discussion
hey guys...

what is the best way to switch 120 volts ac with a basic stamp?
i am switching little neon transformers, they are less then a half amp each.

do i want to use a 2n2222 transistor with a mechanical relay or are ssr better???
i want the ac circuit to be able to be on for many hours.


***also off topic question... i notice that when i use transistors in my work they seem to slowly let more current through. i am guessing that this is caused by heat or something. does this occurence continue for ever, and is it something to worry about???

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-11-19 11:33
    WITH FUSES OR CIRCUIT BREAKERS INCLUDED on the 120AC. Never depend on the switching device to provide circuit safety against overload or short circuit. I don't think you can get a reasonably priced circuit breaker under 2-3 amps, so fuse the mains.

    You can either use mechanical relays or solid state relays. In the case of neon transformers, the mechanical relays would be a more conservative approach as all solid-state devices struggle with back EMF from transformers and ballast. It somewhat depends on how often you switch·[noparse][[/noparse]once a day or once a second] and additonal fixes.

    Currently, there are fixes for the SSRs that add protection. You can use a 0.1uF at 600VAC rating to stop some of the back EMF and you can add CORCOM line filters to eliminate outside transients. You begin to see that these things are not required with the mechanical relay's switching side. You also may 'derate' the SSRs by using a 5amp SSR for your less than 1 amp circuit.

    Mechanical relays need a fly back diode to protect the 2N2222. Also, there is an upper limit to how fast you can switch on and off. Heat may be taking its toll on the 2n2222 due to fast cycles or an incorrect amount of current on the input. Change the current limiting resistor to get full switching anuse 2n2222 produced in a metal can and add cooling fins. Again, derate the relays to add a lot of useful life to the contacts. 10amp relays are almost as cheap as 1 amp relays.

    Be careful to not put a design on a circuit board that cannot handle the actual current load.
    There are many 10amp or 5amp relays mounted on circuit boards that can only handle a fraction of the relays load. Ask about the board and the loading before you buy. The relay is being derated in this context - very normal but confuses beginners.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 11/19/2005 3:37:22 PM GMT
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2005-11-19 18:31
    Correct me if I'm utterly wrong here, anybody, but I think S-S-Rs require some minimum draw, don't they?·

    I'm not sure if an application with "little neon transformers" will be successful.·

    If it's low current, then why not use a MOC-30xx opto-triac IC?· You can for sure turn NE-2 neon bulbs on/off with these.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-11-19 23:46
    This might save you some trouble: http://www.parallax.com/detail.asp?product_id=31204

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2005-11-20 00:24
    Well, there you are.

    I looked at the page where the SSRs (D2W203F) mentioned are described: http://www.parallax.com/detail.asp?product_id=400-00010

    In the output specifications we read:
    • Voltage 24-280 V
    • Current 0.06-3.0 A·

    I don't know what the current demand of the poster's "little neon transformers" is.· I figure it's little (probably less than that 60ma min.), unless it's a "little neon transformer" for running neon tubes with.

    So, rr --·what's the story?
  • rrrr Posts: 63
    edited 2005-11-20 03:12
    the transformers am using are for lighting up a small amount of neon tube. they are rated at .25 amp (250ma).


    does this mean that the· SSRs (D2W203F) will work for my application???

    what about this:
    Kramer·said...
    solid-state devices struggle with back EMF from transformers
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-11-20 07:28
    It looks as if they [noparse][[/noparse]SSRs] will work with no problem.· It is a very nice board - quick and easy.
    At 280VAC and 3.0Amp maximum, they will be derated quite a bit - thus more durible.

    Heat is the enemy of all solid state electronics.
    I suspect that the original SSRs have been improved upon quite a bit reguarding failure as the market for relays is huge. [noparse][[/noparse]I have read a lot of wary reviews, but the material is old and many engineers feel they are excellent.]

    I alos read that generally SSRs·controlling 120VAC·cause about·1 watt of heat·to be·generated per 1 amp in use.
    Mechanical relays make noise.

    American 240VAC is a·balanced line setup and requires two SSRs to properly turn off the mains where as one 'double poled' relay may do the same. 120VAC you need to only turn off the 'Hot side' or usually Black wire which can be confirmed with a VOM to ground.

    I suppose the real trade off is if you can tolerate the heat or tolerate the mechanical noise.· Size may be an issue too.

    Mechanical relays come in small DPDT relays·which means complete shut off and redundant shut off in case of failure whereas, the SSRs usually fail as a short circuit of some sort [noparse][[/noparse]the fail in an on mode and really must have fuses].

    The short answer is YES, the long answer is YES, but fuse to be safe.· If you wanted to run a Neon billboard, you might need to add the CORCOMs and capacitors to gain longer life.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 11/20/2005 7:40:16 AM GMT
  • rrrr Posts: 63
    edited 2005-11-20 08:16
    thanks for the help...



    where do i want to put the fuse in the circuit???

    should the fuse be rated slightly higher than the current i am pushing.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-11-20 09:05
    The fuse should be on the HOT side of 120VAC and so should the relay's switch.

    The fuse size is primarily determined by use.· If you have a 0.5 amp application, so a 0.750amp fuse would provide a reasonable lower limit to shut down on mal-function.

    The secondary way to determine fuse by upper limit.· The size of all the components in the circuit would be listed.· Then, the lowest AMPere rated device would be considered your highest possible upper limit.· From there, you would de-rate according to protecting your USE.

    I really hope this is clear.· We have a lot of beginners and the idea that a battery and 120VAC can tolerate messy, sloppy design will get you· into trouble.

    For instance, I tend to 'hot swap' a lot of my BasicStamp circuitry.· Parallax will tell you to never do it as it can really damage your Stamp.· So far, I have no damage, but it really doesn't address the problem.

    I must learn not to hot swap.

    With 120VAC, such attitudes can be lethal and provide a good stiff jolt with a big flash even if they are not.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • rrrr Posts: 63
    edited 2005-11-20 21:25
    i am still a little unclear about some stuff...
    Kramer·said...
    (solid-state devices struggle with back EMF from transformers and ballast.)
    ····· then you said
    Kramer said...
    (If you wanted to run a Neon billboard, you might need to add the CORCOMs and capacitors to gain longer life.)
    will the solid state relays work for the neon transformers or is there to much interferance from the high voltage side???
    will the relays see a shorter life because of the neon transformer???
    how many switching cycles should i expect to see without the use of the extra components vs. just the relays???



    ·
  • Alan BradfordAlan Bradford Posts: 172
    edited 2005-11-21 15:52
    Hi,
    I use Grayhill SSR's all the tme to switch AC Relays, Power Contactors and solenoids.·I have about 100 controllers, wth this type of SSR,·runnng in industrial applications. I have not had an SSR failure, and have been using them for over 10 years.
    Last year I ran a test with a SSR and an AC Solenoid. The solenoid·required 1 AMP AC. I switched it on and off once a second and it ran for over·5 months and approximately·5 million·cycles. The solenoid faliled (It was used to begin with). I connected another and ran it 100,000 more cycles and then stopped the test.
    The SSR's I use have a built in snubber. I cant say they all do, but the Grayhill 70M-OAC5 does.
    Digikey part # GH7022-ND
    This is·a solder in part. I like to solder them in as it is a safer connection. My use is in Industrial Controllers.
    This part would directly run a 250 MA AC transformer with out any extra snubbers or filters.
    You can see pictures of boards with the SSR's on them on my website.

    Thank You,
    Alan Bradford
    Plasma Technologes
    www.plasmatechnologies.com
    ·
  • rrrr Posts: 63
    edited 2005-11-22 00:41
    ·thanks for the information...

    i am kind of new to this stuff and i want to put together a safe and reliable sytem.

    the Grayhill 70M-OAC5 seems like it will work perfect for this project.

    i checked out the data sheet for the Grayhill 70M-OAC5 and said:

    nominal logic voltage 5 volts

    max logic supply current 16ma

    does this mean that i can run this output module directly from a i/o pin on my oem Bs2???

    if not, how do i interface a device like this to my stamp???

    thanks for all the help !!!

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2005-11-22 01:19
    Here's how I do it.

    A picture is worth a thousand words, to wit -- the attached pic (SSR ckt.jpg)

    No current limiting resistor is required for the transistor, it's already in the SSR.
  • Alan BradfordAlan Bradford Posts: 172
    edited 2005-11-22 01:31
    Hi,
    I have attached a schematc of 16 SSR's (Inputs and outputs).
    I use a 470 ohm resistor and Led in series with the logic pin. The Stamp pulls the pin low and turns on the SSR and Indicator Led for the output modules. There is no pn 5 on the output modules.
    The input modules pull the line low for the Stamp Inputs.

    Make sure you fuse the AC feeding the circuit.

    Thank You,
    Alan Bradford
    Plasma Technologies
    www.plasmatechnologies.com
  • rrrr Posts: 63
    edited 2005-11-22 04:47
    i am unclear...

    it looks like one of the circuit designs uses a transistor to switch·the ssr...

    why is the transistor nessecary???

    voltage requirements for the Grayhill 70M-OAC5 seem to be within the stamps range...



    the other circuit design has the ssr connected directly to the stamp.

    which way is better and why...

    ***also, is it nessecary to use a fuse on the ac side even if the ssr has a fuse in it already.



    thanks for all the help and info.
  • rrrr Posts: 63
    edited 2005-11-22 07:09
    i guess i would need transistors because i need to run 10 i/o modules.· if they were all switched on that would be 160ma. this is too much current for the bs2 oem.
    ????????????
  • Alan BradfordAlan Bradford Posts: 172
    edited 2005-11-22 10:28
    Hi,
    The design I use only·requires about 3-4 MA per SSR. I can turn all 16 on without damaging the stamp. I have done this many times before. The SSR turns on at this current level. The 16 ma is the maxmum rating. The LED and resistor are in series with the SSR input and limit the current. I have turned on the· Grayhill SSR's with as low as·2 ma. The data sheets do not state what the minmum turn on current is.

    The SSR will draw a maximum of 16 ma with its internal current limiting.

    The tranasistor in the other drawing allows the stamp to drive the transistor with reduced current, and the transistor switches the SSR at 16 ma. More parts, same result. If you are only dong a one of a kind project then the extra wiring may not be a problem. In production building the·fewer parts the better.

    The G5 series of SSR's have fuses built in (70G Series). The 70M Series (mini) do not have fuses.
    I would·use one master fuse for the AC supply (Supplying the SSR's), and you can put one fuse on each transformer. Make sure your wirng is the proper size for the main ac load.

    Thanks,
    Alan Bradford
    Plasma Tecnologies
    www.plasmatechnologies.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-22 15:38
    Alan, you kind of touched on what I was going to add when I read PJ Allen's post.· You should always read the datasheet for each SSR, since some are as low as a few mA, making it possible to drive several directly from a BASIC Stamp.· Inside, many are the equivalent of an LED and resistor on the input side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2005-11-22 16:18
    With zeal, I advocate using a transistor to switch devices from any STAMP: I think that it's better that somebody should waste a 10cent transistor as·the result of a mistake, getting carried away, or getting careless, than to·exceed the limits of a STAMP output and waste the whole enchilada.

    I referenced the "high-side" of the SSR control input toVDD, but it should have been to VIN, to·obviate anyone's over-taxing the STAMP's on-board regulator.

    And everybody lived happily ever after.

    Post Edited (PJ Allen) : 11/22/2005 4:24:05 PM GMT
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-11-22 16:35
    PJ,
    You are absolutely right [noparse][[/noparse]for one line].

    The 2n2222 is the best one, though the 3904 is quite okay [noparse][[/noparse]not as much gain, why buy and stock both when the 2n2222 works in the same situations and is more versitile, less demanding of current.]

    But, it you have six lines to drive, the 74HC07 can offer quite nice protection. For SSRs, it would seem to make for building a neater, tighter circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • rrrr Posts: 63
    edited 2005-11-22 17:12
    ·you guys are great

    thanks for all the info.

    what is the best way to mount these i/o modules (Grayhill 70M-OAC5)???

    i am going to use ten in my design and i would like a clean way to do it.
    i know that putting them on regular circuit board may not be a good idea because of the 120 volts ac.

    i have seen i/o racks before but i could not seem to find one for ten i/o mods
    anyone want to help...

    thanks again...
  • rrrr Posts: 63
    edited 2005-11-22 19:57
    i made a mistake...

    i just checked the current that runs throught the neon transformer and it is much lower than what i was told.

    it is actually pulling .023 A which is just short of the required .03 A for the Grayhill 70M-OAC5.

    is it possible to run a dummy lamp or something in serries with the transformer to pull enough current to run the ssr???
    3510 x 2550 - 179K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-11-22 20:15
    PJ Allen said...(trimmed)
    With zeal, I advocate using a transistor to switch devices from any STAMP: I think that it's better that somebody should waste a 10cent transistor as·the result of a mistake, getting carried away, or getting careless, than to·exceed the limits of a STAMP output and waste the whole enchilada.
    I often agree with that concept to some degree.· We add 220 ohm resistors to the I/O on our Homework Boards for protection.· However, I have noted in the past that sometimes the additional complexity is not warranted in all situations, and will sometimes deter someone from building the circuit.

    http://www.parallax.com/detail.asp?product_id=31204

    Here is an example of what I refer to in my earlier post.· Our RC-4 board (Parallax EFX) doesn't have transistors driving the input of the Crydom SSR.· In fact, each I/O line also drives an LED, as well as the input.· But the current draw is so low that it doesn't matter.· You could run all 4 relays and have no issues with current.· So in this case there is no need to add 4 transistors and 4 resistors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Alan BradfordAlan Bradford Posts: 172
    edited 2005-11-23 04:13
    HI,
    The Grayhill 70M-OAC5 can drive up to 3 amps.· I use Express PCB and run .100 traces top and bottom of the board on the AC Side. This can handle 6 amps.·I solder the SSR's directly to the board.
    I am not sure if there is a minimum current. There is 1-2 ma leakage current that can cause problems with other solid state devices, but Im sure the transformers will have no problem with this.

    As far as using transistors or not. That is up to you. Like I said if you are makng a one of a kind project, then the extra soldering is not a problem. Use them. In a high volume PC board·I elected to eliminate the transistor. Your choice.
    There is no wrong answer. I use a ULN2003 when I need extra drive from a stamp. It is overkill, but still easier than inserting and·soldering transistors to the board.

    If you use the G5 series of SSR's you can get a ready made PC board to screw them into. It is easer for a one time project, but a few bucks more.

    Good Luck and be safe with the AC wirng.

    Alan Bradford
    Plasma Technologies
    www.plasmatechnologies.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2005-11-23 13:07
    I reckon the "dummy load" is OK, but wire it in parallel with your actual load (not in series, as you show it in your pic/dwg.)

    [noparse][[/noparse] Early on, I asked about the current when 'advocating' using a MOC-3xxx opto-triac, having taken into account the minimum load with SSRs. ]

    Post Edited (PJ Allen) : 11/23/2005 1:12:05 PM GMT
Sign In or Register to comment.