2
\$\begingroup\$

Not long time ago, as i couldn't find a proper Mosfet to drive a high wattage led strip ( 5050,5630), i asked how to create a circuit that allows me to turn on properly the mosfets i already own. irf510,irf520 and the RFP70N06. Led Driver/Controller for 3.3v & 5v circuit i got it working an before i hooked it up to my microcontrollers i tested it with some 3v batteries(CR2032) leaving out the R1 resistor. it worked. then i put 3 1k resistors there. And used it with an arduino. And it worked. Not that i tested it much but everything was fine. Now i just finished to setup a new microcontroller, Raspberrry PI... so the difference is the 3.3v vs 5v of the arduino.

With the Raspberry Pi 3.3v i'm not able to turn on the green part of the led strip.

Now, the answer is prolly ... put a smaller resistor in R1.(wich one?)

But i want to understand.

  1. The leds, red needs less voltage(2.1), the green needs more(3.1). but isn't the blue the one that normally needs more voltage(3.2)? could this be a problem?

  2. As i'm just driving a transistor with a Raspberry pin the above has not much sense. if i'm able to turn on red and blue i should aslo be able to turn on green. where should i measure whats wrong?(i have a multimeter, no oscill..).

  3. Maybe the raspberry pi's pin's don't all output the same voltage. Would that be normal?

  4. if it's possible i want to be able to control this circuit with both logics 3.3v and 5v... so if i need 2 different R1's i could desolder the 1k ones and create a custom smaller connection circuit to use with each logic. in that case what resistors should i use? or even better how can i calculate myself what resistors i need to drive it properly looking at the datasheet? RFP70N06, 2N3904

schematic

simulate this circuit – Schematic created using CircuitLab

Note: The above schematics is for one channel there are 3 !!! red,green,blue.

\$\endgroup\$
26
  • \$\begingroup\$ Are you still using the 12V supply? LED data sheet? \$\endgroup\$
    – Andy aka
    Commented Jun 22, 2015 at 8:38
  • \$\begingroup\$ i'm using a "12v @ 6A Ac/Dc Adapter Led Driver" \$\endgroup\$
    – cocco
    Commented Jun 22, 2015 at 8:40
  • \$\begingroup\$ You shouldn't have to change R1 - are you sure green isn't broken? \$\endgroup\$
    – Andy aka
    Commented Jun 22, 2015 at 8:41
  • \$\begingroup\$ i measured it and it out puts exactly 12.06v \$\endgroup\$
    – cocco
    Commented Jun 22, 2015 at 8:41
  • \$\begingroup\$ with arduino it works \$\endgroup\$
    – cocco
    Commented Jun 22, 2015 at 8:41

1 Answer 1

2
\$\begingroup\$

There is a few possible scenarios. There are three parts here. The input (ie the arduino, rpi, or battery), the transistor circuit, and the output (the led channel). If you switch them around, you should be able to figure which one is the problem.

If Rpi + Green Transistor Circuit + Green led channel doesn't work, first try switching the led channel. Still don't work? Switch the transistor circuit for the blue one with the blue led channel (same rpi pin). If that works, put the blue transistor circuit with the green led channel.

If that doesn't work, then try a different RPI pin with the blue transistor circuit and the green leds.

That should eliminate any hardware issue. If it doesn't work, then it's likely software based. If the RPI pin isn't set to the right current level, or its the wrong pin, it won't work. Remember the rpi is limited to 16mA max, or less, based on setting. That said, 1k resistor means just 2.6mA at the base of the initial transistor.

\$\endgroup\$
13
  • \$\begingroup\$ with 5v everything works, the various 3.3v pins work on every channel appart from the green one. so the problem is 100% the first "green" transistor. how do you get 2.6mA? \$\endgroup\$
    – cocco
    Commented Jun 22, 2015 at 15:22
  • \$\begingroup\$ As the "green" transistor works with 5v & 1k resistor, i think it just needs some more juice from the rpi to work and that at this point the "green" 2n3904 has a problem. could it be that it is partially damadged and so needs more mA to switch? \$\endgroup\$
    – cocco
    Commented Jun 22, 2015 at 15:29
  • \$\begingroup\$ So if you put the blue led channel on the green circuit, it works? Have you checked for bad solder joints? The 2.6mA is (V - Vbe) / R. In this case, 3.3v - 0.7v (typical) / 1000 ohms. \$\endgroup\$
    – Passerby
    Commented Jun 22, 2015 at 15:33
  • \$\begingroup\$ so basically i don't even saturate properly the transistor with 1000k ohm?? No bad soldering(it works with arduino) if i put the green output pin from raspberry at the blue transistor i can control properly the blue leds with the green values.. the blue(rpi) pin is not able to turn on the green(transistor) leds. \$\endgroup\$
    – cocco
    Commented Jun 22, 2015 at 15:39
  • \$\begingroup\$ No, a 1 Mega ohm resistor won't saturate it. A 1k ohm with a Ice of 12mA would be fine, it's acting as a switch not a current amplifier. So if you can put the coin cell 3V battery at the green transistor base with a 700 or so resistor, does it turn on? If not, replace the circuit. All those parts are a dime or so. Are you sure you have a 2n3904 there? Cause I can tell you I've mixed transistors up before. \$\endgroup\$
    – Passerby
    Commented Jun 22, 2015 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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