I have constructed the following circuit on a breadboard and all functions as it should with no issues.

However, each time I solder this project onto a perf board, the same issue arises. The LED starts bright then goes dim upon powering up. Then I get no functionality. It is an cree 3 Watt LED that uses two buttons, a TIP31, a 5V supply and a digispark ATtiny85. The draw is 600 mA maximum as measured when connected to bread board.

easyEDA schematic

What I've done:

  • Measured 5V at input pins from buttons. Both check.
  • Reprogrammed the ATtiny after assembly.
  • Checked continuity on perf board to input output pins and power.
  • Power the LED directly, works fine.

Perhaps the digispark is that sensitive to solder heat? The transistor is a bad selection?

  • 3
    \$\begingroup\$ LED? What LED? I don't see any. \$\endgroup\$ – Eugene Sh. Nov 14 '16 at 17:44
  • 4
    \$\begingroup\$ Assuming the LED is on the "Load" pins, what resistor or current limit is in series with it? If the answer is "none", then your breadboard is making such crappy connections that it supplies enough resistance to protect the LED, while a decent soldered version destroys the LED as you would expect. If the aim is to use the PWM to limit the LED current, then you need to monitor the LED current somehow anh not turn the PWM up above the rated current. \$\endgroup\$ – Brian Drummond Nov 14 '16 at 17:48
  • 1
    \$\begingroup\$ anything get hot? PSU? LED, TIP31A? \$\endgroup\$ – Sunnyskyguy EE75 Nov 14 '16 at 18:08
  • 1
    \$\begingroup\$ What is the 5V supply, exactly? Can you monitor its voltage with an oscope in the first milliseconds of start up? What's the voltage at the base of Q1 look like (at useful moments to check it?) \$\endgroup\$ – jonk Nov 14 '16 at 18:11
  • 1
    \$\begingroup\$ @jaunty - I see that you have given some info (thanks for that), but there is still lots of missing info needed for efficient troubleshooting e.g. you have not answered the questions from Tony Stewart nor all the questions from jonk. I have some other areas where I could ask questions too. However, if you don't reply to questions, then some of us will not help you, because we would be wasting our time if you don't answer questions. In short: Either please answer all the questions which are asked to you, or clearly state that you will not answer questions. \$\endgroup\$ – SamGibson Nov 14 '16 at 18:23

Your problem is not understanding the transistor datasheet for hfe vs Ic/Ib when saturated and you are operating in the linear region resulting in poor switch control or current control.

If this is a LED with a heatsink rated for 600mA then it could be rated for 2-3W and will have a Vf ~3V depending on power rating and temperature.

The TIP31A is a power NPN with a strong attenuated hFE as Vce drops below 2V where hFe~100.

For effective control, you should saturate the NPN hard to <<1.2V (pref0.4V) and not rely on the Rb value and uncontrolled Vce vs hFE drop.

Thus for Ic=600mA , choose Ic/Ib=50 thus Ib=12mA then

- R3=(5-1.4)/12mA= 300 Ohms - next allow for a >= 0.8V drop (5-1.2-3.0) with a series R to LED or 1.25 Ohms rated >=1 Watt or use 8x 10 Ohm 1/4W R's in parallel.

If Vce <=0.6V then recalculate Rs and go from 1.25 towards 3 Ohms. Then test and measure LED temperature with finger. If it is too hot to touch, you need a better heatsink.

This is a case where Rb and Rc are critical choices for driving a 3V diode from a 5 V supply, and frankly a Mosfet is easier with an RdsOn <<0.1 Ohm @1A.

This device also has an equivalent Rce that varies with Ic when Vce is saturated. Vbe must also be saturated and for most devices this ranges around Ic/Ib =20 but yet most devices , unlike this one, are rated for Vce(sat) @ Ic/Ib=10 and more expensive devices up to 50.

enter image description here

Here from the table, I compute Rce as follows:

  • Vce(sat)=1.2V @ Ic=3A, Ib=375mA or Rce=1.2V/3A= 0.4 Ohms
    • this uses an Ic/Ib = 8 , lower than most.
    • if we design around a ratio of 20, Rce will rise as well as Vce
    • if we design around the hFE=100, then Vce is no longer saturated and Vce=2V at 1A (typical not worst case) here Rce = 2V/1A = 2 Ohms

      Thus we can conclude as a switch best case with higher drive current than you are using Rce starts around 2 Ohms and rises sharply by an order of magnitude with insufficient base current, making the LED dim as Vce rises. enter image description here

  • \$\begingroup\$ Thanks for detailed answer. I will modify the circuit and try this. Do you have any explanation as to why my circuit works fine on the breadboard? \$\endgroup\$ – jmaturner Nov 14 '16 at 20:09
  • \$\begingroup\$ If you measure Vce , and Vled on both this should explain it. \$\endgroup\$ – Sunnyskyguy EE75 Nov 14 '16 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.