Help: SSR or Transistor (Which Specific too)

Hi all,

I’ll do my best to explain the situation. I’m trying to control a LED using an Arduino Uno rev3. I will be connecting the output of the Arduino to a transistor gate or SSR. Then, I’ll have an external power supply giving the necessary power to the LED. The digital outputs on the Arduino output 5 VDC. In this case, the LEDs will only come on when the Arduino outputs a 5v signal to the SSR or transistor. For my purposes, I need all this to be smaller, so I’d need something like an IC or small like a transistor.

With this in mind, my question is: Should I use an SSR or a transistor?

When I was searching for an SSR, i couldn’t find any IC size ones for my necessary “Voltage - In”. Would I just simply use a resistor before it to drop the voltage?

1 Like

Hello tonywilson824 - Welcome to the TechForum!

I take what you’re looking to do is use the Transistor or SSR as a switch that turns the LEDs on or off without directly supplying them with the power, correct? If so, before I recommend anything, I’d like to ask what you are building the circuit on. Is this something you have a specific board for, and if so, does the component need to be through-hole or surface mount?

In regard to the voltage on the output of the Arduino, the 5v when using a transistor is not really much of an issue, as the base of the transistor should open up at around 0.7v; it’s the current that you’ll want to keep an eye on. This means you’re going to want to choose the correct resistor to be in series with the base of the transistor coming off of the Uno’s digital output. To calculate this, we will need to know how to put the transistor into beta mode, which means we will also need to know how much current the LEDs are expected to draw (as if it pulls to much current, it will put the transistor into saturation). Additionally, you don’t want to exceed the maximum current draw on any particular pin of the Uno.

Using an SSR you may be able to circumvent the saturation issue, however many times you’re also working with built in resistances. If it’s only a few LEDs that you’re trying to power, then I would personally suggest using a transistor; if you’re trying to power hundreds of LEDs, you may be better off with the SSR.

If you can provide the current draw requirements of your LEDs, and the space constraints you’re working with (including packaging types), we’ll definitely take a look and try provide some options.

Regards,
Klint

I’m building a custom project, right now it will just be breadboard and soldering. The leds are ones I grabbed off amazon, they are 3W and use up to 0.250 A. While they call for 12 V, I was going to use 9V as it gave a just as bright light. I will be putting 2 in series. The transistor will be acting as a switch.

  • eventually I’d like to design a more compact version using a website to create my own chip or something and have it more professional.

Hi tonywilson824,

Your task can be accomplished with a BJT transistor, a MOSFET transistor, or an SSR. Any one of them can be reasonably compact. You haven’t clearly defined what your idea of “compact” is, so that makes things a little fuzzy. Are you intending to use a surface mount part or a through-hole part?

In any case, look for parts that can handle a minimum of twice your max LED current, for a reasonable margin of safety. Also, is it your intention to switch this on and off rapidly (as in several kHz range - also referred to as Pulse Width Modulation (PWM)) for dimming purposes, or just to turn it on and off like a light switch? If the former, then SSR’s are not a great option, as they typically take milliseconds to switch.

If you use a BJT, you definitely want to put it fully into saturation mode, which minimizes the Vce voltage (typically to around 0.25V), as this is where it will dissipate the least power, which creates the least heat. If you use a MOSFET, select one with a low gate threshold voltage, as you want it to be fully enhanced with your 5V signal. Additionally, finding a MOSFET with a very low Rds-on spec will dissipate the least power.

Here are a few examples of each type to consider:

BJT - note you’ll need to put a resistor in series with the base to limit base current to 10mA or less

MOSFET - note you’ll want to place a 4.7k or greater value resistor between gate and ground to fully turn off the gate when your input is low

SSR - note you’ll need a current limiting resistor on the input:

1 Like

Basically, I will be putting these two LEDs in series across the Collector and Emitter side if it was a transistor because the Arduino is controlling the gate signal. There is an external power supply. With this in mind, I repeat this a total of 6 times, because I’m making a miniature stop light. That being said, it doesn’t need a high frequency. So in total I’ll need 6 transistors or whatever I use. I’d like them to be small as in small like the ones you provided above. It doesn’t matter what kind of mount, I don’t know the difference but in my head I imagined one with similar mounting as either the ZTX853 or ZXTN25060BFHTA that you sent. Something with leads that I push into a breadboard and / or solder.

When I was lookinf yesterday, without completely understanding how to find the one I need, I believe I found two but they are either obsolete or sold in bulk (which is not ideal as I only need a maximum of 20 for right now).

Part # BDP948E6433HTMA1
or
Part # BDP954H6327XTSA1

I believe I needed one of these because I think I calculated these parameters:

  • Current - Collector (Ic) (Max) at least 300 mA
    (300 mA because my current though CE is 250 mA so I gave some wiggle room)

  • Voltage - Collector Emitter Breakdown (Max) at least 20 V
    (20 V because I’ll be needing an 18V power supply to power the 2 9V LEDs in series so I gave wiggle room here too)

And Finally, I was confused on this value because none of the others multiplied to be correct on the parts

  • Power - Max at least 5W
    (5W because I assumed you take the 250mA x 18V through CE)

I’m confused by power because for example, for the ZTX853 you provided the parameters say 4 A and the Voltage is 100 V; well 4 x 100 = 400W not the 1.2W that it says.

  • Is there a way I can call someone and communicate this? I tried the chat and they said I had to use this forum.

Hello Tony,

A few comments:

  1. If this is among your first projects, use a transistor. As a rule, they are less fussy. It’s been my experience that transistors offer a shorter path to success.

  2. Protect your Arduino. The Arduino has a maximum current per single I/O pin. It also has a maximum current for a group of pins. Since you have 6 drivers, you run the risk of damaging the common I/O such as the internal bond wire for the ground pin.

  3. Putting ideas 1 and 2 together, a Darlington pair may be appropriate. As a starting point, consider the MPSA29. You correctly mentioned “wiggle room.” I agree, but like to have a bit more headroom especially for parts that may be reused in other projects. With that said, also consider the BD679AS and the TIP122G. You could also use surface mount devices such as the MJD122. After you have the prototype working, you can select a low-cost components optimized to the task at hand.

  4. My understanding of your circuit is presented below. Please let me know if this is correct.

  5. Your comment about power is a classic mistake. But it’s a good mistake — a rite of passage — because it shows that you are thinking about the topic. This is a thing to celebrate! Know that the power is given up to the LEDs, not the transistor. In this example, the transistor power is very low. It is calculated as P = IE where I is approximately 0.25 A and E is in the 0.2 range for a transistor in forced beta. At full power the LEDs consume 6 W while the transistor is at 50 mW. Here “full power” assumes a 24 VDC source and the absence of R2.

  6. Know that I’m making some assumptions that may be incorrect with regards to R2. I don’t know if your LEDs have and an integral current limiting resistor. As presented, R2 is the high-power device and should have a rating of at least 1/2 W.

Let me know if this is helpful or if you have any additional questions.

Best Wishes.

APDahlen

P.S. Be sure to take a look at this article regarding forced Beta:

2 Likes

Hi tonywilson824,

APDahlen is right on.

Just to clarify a few points further, I’ll point out the following:

  1. The two transistors you mentioned were both PNP transistors. To function properly, they must be connected above your LED load, between your power supply and the LEDs. However, the logic-level signal from your Arduino cannot turn them on directly on the high side, so one would have to use an additional NPN transistor connected between your I/O pin and the PNP transistor. You don’t need this complication. The parts that @APDahlen and I specified are either NPN or N-channel transistors, which are to be connected between your LEDs and ground.

  2. The difference between through-hole and surface-mount parts is in how they are soldered to a board. A “through-hole” part has leads that pass through holes in a circuit board and are soldered on the opposite side. Surface-mount parts have leads that flair out to the side or underneath the part and are soldered to pads on the same side of the board as the part itself.

  3. Regarding datasheet specifications such as voltage ratings and current ratings for transistors, these are absolute maximum numbers, and one can always use lower voltages and currents with these parts. Those numbers merely specify the values you must never exceed.

  4. Regarding power dissipated within the transistor itself, @APDahlen covers that pretty well. It is simply the voltage dropped across the transistor multiplied by the current passing through it when the transistor is turned on. So, in your case, if you have 250mA (0.250A) passing through it and 0.2V dropping across it (look for the Vce saturation voltage in the datasheet for the specific values), you can calculate the power that the transistor itself will have to dissipate. Assuming Vce-sat is 0.2V, then the power across the transistor is only 50mW (0.2V x 0.25A = 0.05W).

  5. The power value, such as the 1.2W you mention, as specified in the datasheet is the maximum power the device can handle without letting out the magic smoke under a specific set of circumstances. Generally, you want to make sure that the power the part actually dissipates in your specific circuit never comes anywhere close to that value.

2 Likes

Thank you for the clarification.

The schematic looks similar, but the transistor schematic you included looks different than usual, I’m assuming it’s because of what you called a “Darlington Pair”.

I should mention, the LED has an internal resistor I believe. It’s a SIMBA Lighting MR11 ECO LED and looks like a halogen with only two prongs coming out of it to plug into something. I’ve thought about switching to Flashlight LED’s as they usually operate on lower voltage and current but are really bright.

This is my first project involving chips etc. I should note that while I am repeating this 6 times, because its a stop light, the Arduino will only ever be sending out 2 signals at a time (when North-South, that is 2 leds, is green, East-West will be red).

See I assumed it was something more along those lines for the Power rating. I don’t know much about forced beta, we may have touched on it once in class, I’ll have to look into it more.

Also, for most (all) of these will i probably need a resistor on the gate?

Hi tonywilson824,

You are correct about the transistor image. Darlington transistors are a pair of BJTs connected together internally to increase the current gain, at the expense of higher voltage drop across the Vce junction.

Regarding your resistor question, only MOSFETs have gates, and for them, a resistor between the gate and ground is good practice but not always necessary. If you were referring to the base lead of a BJT (which is somewhat analogous to the gate of a MOSFET), then a resistor between your I/O pin and the base pin IS mandatory.

Regarding current from an I/O pin of the Arduino, it is recommended to source or sink no more than 40mA on any pin (preferably less than half that), and no more than 100mA on any port (all pins within a group labeled as “PBx”, “PCx”, or “PDx”, which are Ports B, C, and D, respectively).

Regarding your specific LED, based on the disassembled image I found when searching it online, it appears to have a complete driver circuit inside, so it should be current limited internally and therefore shouldn’t need a series resistor for current limiting.

Image found in this Amazon review:
image

However, there may be an issue in putting two of these in series. Since they are not just LEDs, but rather, complete circuits, there may be some weird effects if placed in series. I’m actually quite curious as to what that would look like. Maybe they would work fine that way, but I would not be surprised if either one or both didn’t light up, or that they did some sort of oscillation or something.

Could be an interesting experiment. If you haven’t already done so, I would try connecting two in series independent of the Arduino circuit just to verify that it will light up as intended.

1 Like

Yes, that is exactly what it looks like on the inside. I’ve already wired them in series and they behaved normal I think, I’m not entirely sure because I’m still a novice finishing school.

As for the gate, yes I did mean the base.

And for the arduino, yes I’d only be taking max 20mA from each DO but no more than 2 DO will be on at one time most likely.

So going forward, it seems a Darlington Transistor is the easiest option and a must? I’m hoping to fit everything inside a miniature StopLight that will be about 150 x 150 mm MAX or ideally 100 x 100 mm.

  • This does not include the arduino, Imagine a stop light that is 100 x 100 mm base and about 300 mm tall.

  • Therefore, I’ll need 6 transistors.

1 Like

Thank you for the update, Tony.

@David_1528 has a good point about connecting the two devices in series. They may not play nice together in the long run leading to an unreliable circuit.

Please let us know if can assist in the future.

Also, kindly post pictures of your finished project. Better yet, write and the post an article describing your experience.

Sincerely,

Aaron

@APDahlen , @David_1528 Will do, this is solely to make a prototype, but you may be right; only time will tell.

I still may need help with a direct answer though if possible, were we saying for sure a NPN Darlington Pair Transistor? I think they said try the MPSA29, BD679AS, TIP122G, or the surface mount MJD122. Are these all going to work for the values I mentioned?

Yes, there are many different transistor types that would work in this circuit (schematic above).

There is something to be said for making the first circuit large and simple. As you learn you can transition to the small and complex. A transistor such as the TIP122 is very large relative to your needs. However, it’s a good general-purpose device that may be used in many future projects. The same can be said of its small MPSA29 cousin or the hundreds of available surface mount devices.

r/

APD

2 Likes

@APDahlen @David_1528 I’m using the MPSA29 as a test right now. When I plug the base directly into the arduino it stays on, I do not have a resistor in it. When it is not attached to the Arduino, and I plug a simple wire into the base, and put my finger on that wire it turns on. When I let go it turns off. My assumption is the resistor I had put in there before trying my finger was too low and I need a bigger resistor.

How do I calculate the resistor I need?

I know the formula but I don’t know which values I need to look at specifically, I know you take (5V - 0.7 V - 0.7V) / Current but which current ? - Is it the current the arduino outputs or it would make sense if it was the current the base needs in order to activate correctly, but idk what that is called to find it in the manual.

Hi tonywilson824,

You’ll want to set the base current high enough to bring the transistor into the saturation region, where the Vce voltage is brought down to a minimum value (for the least internal power dissipation and heat generation) and where the maximum collector current is above what your circuit will actually draw (I believe you stated above that it would be about 250mA). You can set the base current using a series resistor to any value less than what the Arduino can source, which is about 20mA, but you won’t need nearly this much, as seen below.

To do this you can look at Figure 4 on page 4 of the MPSA29 datasheet.

Figure 4. CollectorSaturationRegion
image

Figure 4 shows a few things of note. First, it shows that for any collector current, there is a minimum base current required to get to that collector current. For instance, to reach 250mA of collector current, you will need a minimum of close to 20uA of base current. But at 20uA base current, the voltage drop across Vce will be about 2V. This means that less voltage is available to drop across your LEDs and it will dissipate quite a bit of power. Since 250mA will be passing through the transistor and the voltage drop will be 2V, the transistor will have to dissipate 500mW (2V x 0.25A = 0.500W) of power as heat.

If you increase the base current to, say, about 800uA, the Vce voltage drop reduces to about 0.9V for a 250mA collector current. In addition to leaving more of the voltage to drop across your LEDs, this reduces the transistor power dissipation to only about 225mW.

The area on the curves where the line for a given collector current transitions from a more vertical slope to a more horizontal slope is where the transistor starts to become “saturated”. This is the region you want to be in when turning on and off a load because it minimizes lost power in the transistor and minimizes the voltage dropped across the collector-emitter region.

So, it looks like setting the base current to at least 500nA should do the job, and there is no harm in doubling that to 1mA to get really good saturation. The Arduino can easily handle supplying this current. Your formula was right, since there are two diode drops in a Darlington transistor. Looking at Figure 2, it shows that the actual Vbe will be roughly between 1.5V and 1.6V.

Figure 2.“ON” Voltages
image

To be sure you have enough base current, one should choose the higher Vbe voltage, which means a lower base resistor value to allow enough current.

So, to get about 1mA of base current, choose a base resistor by subtracting the voltage drop across the Vbe pins (about 1.6V) from your Arduino I/O pin voltage of about 5V and dividing that by 1mA.

Rbase = (Vi/o - Vbe) / I base = (5V - 1.6V) / 0.001A = 3400Ω

This does not need to be very precise, so a 5% resistor should be fine. The nearest common 5% value to 3400Ω (or 3.4kΩ) is 3.3kΩ, so that’s a good value to try.

3 Likes