Shop OBEX P1 Docs P2 Docs Learn Events
Solid State Relays- Are direct connection to a BasicStamp okay? — Parallax Forums

Solid State Relays- Are direct connection to a BasicStamp okay?

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2004-09-23 17:10 in General Discussion
I purchased a Chomalock SSR (SolidState Relay)
I am stuck with only the label specifications which are:

·· Load 24-380VAC/25A· ---· Input 3-32VDC

Input voltage seems possible, but since the BasicStamp is limited to about 20ma I fear that I might burn up my processor if I try to use more than two.·

Additionally, the threshold of 3VDC seems a bit higher than the Stamps (I believe it is 1.4V for a positive signal)

And, finally -- if this uses 8ma·[noparse][[/noparse]which is what I suspect from look on the Internet at similar units], is it better to buffer the output to a latch so that the BasicStamp is not using a large portion of its output current budget on holding one pin's output?

Or can I just put in a NPN transistor that draws less current (say 1ma) and outputs more?· This seems to me to be doable without another supply voltage (using only the +5) because I only need 3volts and the voltage drop from the transistor would be less that 1 volt.· But, I am not very go with transistor design.

A Darlington transistor seems to be a bit of overkill (Hfe = 1000s) when I really need a jump from 1ma to 10ma.
·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan

Post Edited (Herzog) : 8/30/2004 4:44:36 PM GMT

Comments

  • KenMKenM Posts: 657
    edited 2004-08-29 14:59
    My suggestion is to use an emitter follower configuration to drive your SSRs.

    Get a standard 2n3904 or 2n2222,



    base to stamp

    collector to +5v

    emitter to input of the ssr

    when the stamp pin is high, the emitter will be 0.7 volts less than the stamp high output
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-29 15:19
    Thanks,
    I have both here - The 2n3904 is a 'general purpose' transistor whilts the 2n2222 is a 'high current' transistor (maybe it works, but a bit of overkill)

    It seems to me that the 2n3904 is all I need

    - But do I have to limit the current drain from the BasicStamp with a resistor between the base and BasicStamp pin?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-29 15:28
    In all the SSRs I've used, they're basically running an LED, like in a Opto-Coupler, so there is no need to buffer the output of the BS2.· However, if you're worried about overall current and want to use a Transistor, I would use a 2N2222 or 2N3904 NPN.· Tie the SSR +IN line to Vdd (5V), the SSR -IN line to the collector of the Transistor, and Emitter to Ground, and the Base to the BS2 output through a 1K Resistor.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • KenMKenM Posts: 657
    edited 2004-08-29 16:07
    For the emitter follwer suggestion, no, you do not need to limit the current output of the stamp with a resistor between the stamp pin direct connection to the base.

    That is a good question though as this configuration is not intuitive.

    For example, I looked up a test I did using this configuration using a 2n3904.

    The collector was connected to 5.11 volts, the base connect to 5 volts, the emitter connected to the anode of an LED, cathode of led to 100 ohms and the other end of the resistor to ground.

    Results:

    Base current measured with an amp meter was 100 microamps

    Emitter current (meter in series between LED & resistor) measured 22.7 mA.

    emitter voltage measured 4.4 volts.

    This calculates a transistor hfe of 227, which is about right (22.7 mA / 100 uA)


    Herzog said...
    Thanks,
    I have both here - The 2n3904 is a 'general purpose' transistor whilts the 2n2222 is a 'high current' transistor (maybe it works, but a bit of overkill)

    It seems to me that the 2n3904 is all I need

    - But do I have to limit the current drain from the BasicStamp with a resistor between the base and BasicStamp pin?

    Post Edited (KenM) : 8/29/2004 4:12:52 PM GMT
  • KenMKenM Posts: 657
    edited 2004-08-29 16:09
    Chirs's suggestion will also work perfectly well with a higher part count......if you consider one resistor to be "higher part count"

    Ken
    Chris Savage said...

    In all the SSRs I've used, they're basically running an LED, like in a Opto-Coupler, so there is no need to buffer the output of the BS2.· However, if you're worried about overall current and want to use a Transistor, I would use a 2N2222 or 2N3904 NPN.· Tie the SSR +IN line to Vdd (5V), the SSR -IN line to the collector of the Transistor, and Emitter to Ground, and the Base to the BS2 output through a 1K Resistor.



  • KenMKenM Posts: 657
    edited 2004-08-29 16:12
    Herzog said...



    Additionally, the threshold of 3VDC seems a bit higher than the Stamps (I believe it is 1.4V for a positive signal)



    Regarding the 1.4 volts for a positive signal. I believe that is the threshold for a the stamp input for logic 1. I may be wrong.

    Any stamp I have ever used, the output was a minimum of 4.95 volts as long as the current being supplied was within the limits specified (about 20 mA)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-08-30 17:10
    I see...
    The nearly +5V (you say a minimum 4.95V) is the output in the HIGH state, and there is a 0V output in the LOW state.
    The +1.4V is the transition from logical 0 to logical 1 in the input mode.

    The 'Art of Electronics' mentions that the Emitter Follower is the ideal current amplifier configurations. But, this is really what I need to protect the BasicStamp (one transistor current amplifiers) from being hooked up to too many things at the same time.
    I know I can use the UNL3803A for stepper motors or mechanical relays. And that their are other devices for H-bridges. But, this really jumps into every day housewiring.

    If each device is using only 100microamps, I could have all the pins go HIGH and stay HIGH without burning up the microprocessor. (20ma/.1ma = 200 pins) Great!

    Eventually, I may change the transistors collector voltage to +9V as I would like to use long wires to connect to SSRs at some distance (say 50feet) and I fear the the 4.7V would drop down to below the the SSRs threshold of 3Volts (some SSRs say 4Volts).

    Regard, Chris Savage's comment that it is just an LED that is being driven, I have to wonder how the input range goes from 3VDC to 34VDC for 'just an LED'. It has to be a little more complicated to get a range like that -- and there is an indicator LED that is being also driven from somewhere. If all that is driven on the INPUT side, you test run with a simple LED is misleading.

    But, I can try the same thing with the real SSR and my 5V bench supply, and the transistor to see what the ampmeter comes up with.

    By the way. This forum is a success! The really did not like Yahoo's insertion of advertising every third or fourth inquiry and I am not sure I could follow this thread so easily with their bifuracated (sp?) threading.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-30 18:02
    Herzog said...(trimmed)
    Regard, Chris Savage's comment that it is just an LED that is being driven, I have to wonder how the input range goes from 3VDC to 34VDC for 'just an LED'. It has to be a little more complicated to get a range like that -- and there is an indicator LED that is being also driven from somewhere. If all that is driven on the INPUT side, you test run with a simple LED is misleading.

    The range of input voltage of my SSR's has been 3-30VDC.· Again, according to the datasheet, it's merely an LED to the driving circuit.· I could be wrong, but my guess is it has some internal circuitry (based on the block diagram) that limits the voltage and current going to the internal LED.· I have driven them straight from TTL Logic, and knowing me, the first time I did this, I too connected my DMM to see what current draw there was.

    Do you have the Datasheet for the part you are using?· That may have the answers...



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-09-01 16:53
    Chris, NO DATASHEET available.
    When I look at similar units, I get 8 to 12 milliamps at 3-34 volts.

    But, when I power up the SSR with +5, my Digital Multimeter reading is 1 nanoampere! without adding a transistor.

    If I add the 2N2222 in an Emitter Follower circuit with 1 megaohm parallex the load, the base to +5 reads 1 nanoampere and it works (turns on and off my desk lamp or radio).

    What is going on? Have I made a mistake? It is very hard to believe that small a current would drive the LED and control 340VAC at 25amps. Or course the 8 to 12 milliamps may be required when it is thermally hot (conducting 25amps).

    This the lowest current reading on my meter without figuring out some kind of shunt (00.1 on the 200 microamp scale).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-01 21:49
    Dunno, I guess ya gotta go with what works sometimes!· tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • KenMKenM Posts: 657
    edited 2004-09-02 02:39
    My guess is that your amp meter may not be working properly, or the hookup is not what you think it is.

    If I had a reading such as yours that is, "wow! hard to believe" I would install a 1 ohm resistor in series with the circuit, then measure the voltage across the resistor.

    Also, you will need to carefully read the resistance of the meter leads (put leads together, reads 0.1?) then measure the resistor, subtract the leads resistance from the measured resistor value.

    Then lastly, of course use ohms law (V/R) to see what current the device is using....

    This is quick and dirty.....but it might give different results (possible more believable results) than the straight amp meter method.

    Ken
    Herzog said...
    Chris, NO DATASHEET available.
    When I look at similar units, I get 8 to 12 milliamps at 3-34 volts.

    But, when I power up the SSR with +5, my Digital Multimeter reading is 1 nanoampere! without adding a transistor.

    If I add the 2N2222 in an Emitter Follower circuit with 1 megaohm parallex the load, the base to +5 reads 1 nanoampere and it works (turns on and off my desk lamp or radio).

    What is going on? Have I made a mistake? It is very hard to believe that small a current would drive the LED and control 340VAC at 25amps. Or course the 8 to 12 milliamps may be required when it is thermally hot (conducting 25amps).

    This the lowest current reading on my meter without figuring out some kind of shunt (00.1 on the 200 microamp scale).

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-09-02 09:28
    Thanks, I will try that 1 ohm series resistor.

    It is not so much that I have to drive this particular SSR.

    The question applys to all those 10ma loads that you need to get down to 1 or 2 ma so that you can use all the pins on the BasicStamp safely.

    First, you need to clearly identify them.
    Second, you need to have a comfortable solution when you only need a gain of Hfe=10, not the usual Hfe=200 or more.

    I still have trouble feeling comfortable with using transistors when the base input is under 10 microamps (the chart curves usually do not go that low). Is there a lower limit to what a microprocessor will output or is this just a nearly perfect set up?

    Am I working about nothing? Can I just assume that the gain is a bit less? Or, do I have to stay within the specs?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-09-02 10:30
    THE SOLID STATE RELAY DRAWS 5.63milliamps.

    A·1-ohm resistor at 5 volts equals 5amps.
    Using a 1/4 watt resistor gets mighty hot (but it does put the meter on the un-fused amp meter)

    Anyway, I just decided to read what the battery puts out and it seems that I have a broken meter!

    I just bought the meter and it seems to have come with a blown fuse. . . . . .

    Since only the low range amp meter is fused, I thought the meter was OKay.
    I guess that 1 nanoampere is just enough to cross the gap in the fuse.

    Regarding the use of a transistor to move the current down to below 1 ma.·

    This will have to wait.
    I am going to Phuket (Thailand) for about 7 days and I am not taking my BasicStamp with me.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Herzog) : 9/2/2004 2:02:58 PM GMT
  • KenMKenM Posts: 657
    edited 2004-09-02 14:14
    In another post related to using a resistor to measure current, you mentioned 5 volts. 1 ohm and 5 watts, and really hot.....This method is meant for just a quick test, leave the circuit on just long enough to get a reading, then disconnect.

    A typical 1/4 watt 1 ohm resistor will not last long at all if connected directly to 5 volts.

    My intention was to have you measure the current used on the control side of the SSR by measureing the voltage drop across a known resistance. The resistor would go in series with the current path of the control side of the SSR.

    The value of the resistor is purposely very small so it has minimal impact (uses up less voltage) on the circuit. They make resistors specifically for that purpose.....precision·values at 0.01 ohms. The 1 ohm idea was just a quick·of my suspicion of an amp meter not working.

    On to the transistor to control the SSR. You are correct in wanting to lessen the current drawn from the stamp. Several 10mA loads all at once will exceed the current output limits of the stamp.

    The stamp will provide (try to) what ever current is requested from the external circuit. So using the emitter follower circuit simply reduces the load on the stamp, which is a good thing.

    About the transistor chart curve not going "that low" there is no concern there. And yes, you are worrying about nothing. The emitter follower configuration is a very practicle method to amplify current.

    Remember less current from the stamp is a good thing.
    Herzog said...
    Thanks, I will try that 1 ohm series resistor.

    It is not so much that I have to drive this particular SSR.

    The question applys to all those 10ma loads that you need to get down to 1 or 2 ma so that you can use all the pins on the BasicStamp safely.

    First, you need to clearly identify them.
    Second, you need to have a comfortable solution when you only need a gain of Hfe=10, not the usual Hfe=200 or more.

    I still have trouble feeling comfortable with using transistors when the base input is under 10 microamps (the chart curves usually do not go that low). Is there a lower limit to what a microprocessor will output or is this just a nearly perfect set up?

    Am I working about nothing? Can I just assume that the gain is a bit less? Or, do I have to stay within the specs?

    Post Edited (KenM) : 9/2/2004 2:17:28 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-02 15:38
    A blown fuse...Well, that explains why my ideas weren't adding up for you.· tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2004-09-12 14:41
    By the way, I just did some more reading on SOLID STATE RELAYS and find that one serious drawback is that their usual failure more is to short circuit.

    This means that they should always be fused to avoid making a nice little bonfire. If that does not appeal to you, the good old fashion relays offer the safer failure mode - Off.

    They also have trouble with interfacing with transformer and sometimes they fail to pulsating DC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan
  • dbpagedbpage Posts: 217
    edited 2004-09-13 21:19
    One of the benefits of an SSR is high isolation, usually 1000 volts or higher. Inside SSRs are opto-couplers: a light source (usually an LED) switches a photo detector which switches a triac. When the LED turns on, the triac switches on. One of the failure modes for the SSR is a short, as Kramer points out. SSRs can drive the same loads as triacs: they like AC loads, they don't like high surge currents, and flourscent ballasts drive them nuts!
  • dbpagedbpage Posts: 217
    edited 2004-09-15 17:12
    Clarification:
    I was so focused on optical isolation that I may have missed an important point. The output of an SSR is NOT necessarily triac, it may be a triac, SCR or transistor. The output may be suitable for resistive, inductive, capacitive, AC or DC loads, depending on the SSR specs. Ya gotta know the specs!
  • Jim ForkinJim Forkin Posts: 5
    edited 2004-09-23 17:10
    For interfacing ideas, check out my web site at http://www.geocities.com/jimforkin2003 and follow the links.

    Jim
Sign In or Register to comment.