Shop OBEX P1 Docs P2 Docs Learn Events
What to use for power on/off — Parallax Forums

What to use for power on/off

russ christensenruss christensen Posts: 84
edited 2009-04-25 12:36 in Propeller 1
Hi, basically i want to control the power to a set of 12 volt led strips.· i know that the prop can't power them themselves, so what i'm wondering is what you recommend.· basically, when a distance triggers from an infrared sensor, i want the lights to be able to blink on and off at a specified pattern.· If you have a recommendation, if you can include part numbers so that i can look up the pieces.· Thanks!

Russ

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-24 20:02
    How about a Zetex ZVN4424A N-channel MOSFET transistor? This can switch voltages way more than your 12V, can handle currents up to 1/4A, and can be switched by the Propeller. They're available from both Mouser and DigiKey.
  • russ christensenruss christensen Posts: 84
    edited 2009-04-24 20:09
    Thanks for the reply, i'll totally look into that.

    Edit:· After looking at that, honestly i've never used a transister, can i get a link to a tutorial on them, or a quick tutorial?· I'm guessing out of the 3 pins, one is a trigger pin, and the other two just pass the current?· so if i have one pin hooked to a pin of the propeller, and i send a high to it, then the voltage coming in one pin will go through the other pin.· how much current can i pass through?· lets say the led strip uses 1 amp of current, is that going to be ok?· I've seen some talk before about transistors being dangerous for the prop?· how might that be?· sorry for my complete lack of knowledge on the subject.· Thanks in advance!

    Post Edited (russ christensen) : 4/24/2009 8:16:25 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-24 20:31
    Download Nuts and Volts Column #6. Go to the main Parallax webpage, click on the Resources tab, then Nuts and Volts Columns.

    Read the Wikipedia article on relays (do a websearch on "wiki relay").

    You would use a transistor as described in the Nuts and Volts article to control a relay designed for the voltage and current you need.
    This one from RadioShack would be powered by your Stamp's power supply (5V) and can switch up to 1A: www.radioshack.com/product/index.jsp?productId=2062480. RadioShack has some other relays that would be powered by your 12V supply and could switch as much as 10A. You'd still use the transistor to control the relay as described in the Nuts and Volts article.
  • localrogerlocalroger Posts: 3,452
    edited 2009-04-24 21:36
    @russ -- if price is no object and you just want something simple to use, look for a "solid state relay." These are typically optically isolated, come in high current DC and AC versions, and the Prop can energize them directly with no further supporting components either in sink or source mode (that is, SSR between prop and GND or between prop and +3.3V.) You can find SSR's capable of switching 10 amps at 24+ VDC or 110 VAC for around USD$10.
  • whickerwhicker Posts: 749
    edited 2009-04-24 23:08
    high side switch. BTS611L1
  • russ christensenruss christensen Posts: 84
    edited 2009-04-24 23:18
    From radio shack i picked up part number 276-2072. It is an irf510 Power mosfet transistor, n-channel 60 volt. on the back it says v(dss) = 100v, v(gs) = +-20volts, dm = 16A, i(gm) = 1.5a, and p(d) = 20w. it also says v(gs)(th) = 2.0-4.0v, which leads me to believe that it can be triggered with the ~3v from the prop. if i'm reading this correctly, i put 12 volts to source, put the positive of the device i want to power to drain, and hook up the gate pin to the prop. then if i put a high to the prop pin, the current will pass from source to drain, before i hook it up, is that what i need to do? also is there anything that could complicate this? or cause damage to my equipment? I'm going to work on wiring it up but not going to apply power to anything until i get a confirmation of this. Thanks for the help!

    Russ
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-04-24 23:57
    Russ - on your LED strip you will want to note if the LEDs are common anode or common cathode. The way you wire your circuit will depend on the way your LED strip is. My preference for working with items like these is to have a common anode (common positive). That means you feed the LED Strip the rated voltage (12V DC) and then you put the control electronics on the negative of the each LED. In the case of the RGB LED Ribbon I use (see Brilldea.com), the 12V DC goes to the strip and negative of the series of red LEDs is controlled as well as the negative (cathode) of the blue and the green.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • russ christensenruss christensen Posts: 84
    edited 2009-04-25 00:01
    Another question about this particular transister, i'm reading that the t(d) on = 20ns, and t(d) off = 25ns, does that mean i have to send it a 20 nanosecond pulse to turn on, and a 25 nanosecond pulse to turn it off? if this is the case, how would i do a waitcnt to do 20 and 25 nanoseconds? i'm not sure how to do the math. sorry i'm such a noo when it comes to this stuff. never messed with transistors before. I tried just doing high and low on the transistor, but nothing is happening, so i'm pretty sure i'm doing something wrong. thanks for the advice.
  • rjo_rjo_ Posts: 1,825
    edited 2009-04-25 04:39
    Russ...

    I'm not an expert... and if I say anything wrong I hope someone jumps on it.

    Like you, I thought that a transistor was a transistor and the only difference was in the sizing and cost... not at all.

    In my case I just wanted to use my Prop to switch 5V... to replace a reed relay. All of the guys told me not to use reed relays and I didn't listen... and I was perfectly happy until I got to a point where I wanted to pass an amp and switch very quickly and the thing tended to stick open. I tried using a switching transistor from RadioShack... expecting that if my source was 5V... I'd get 5V at the drain... not true... I got my gate voltage at the drain (and they call these things amplifiers?[noparse]:)[/noparse]

    However... if you spend just a little more money, you can get what you want and expect[noparse]:)[/noparse] An FET... or more specifically MPF102... cat #276-2062 from Radioshack actually works the way I thought they all worked[noparse]:)[/noparse] And the packaging is (quite exceptionally) very clear on the connections. With a mosfet design, the signal going to the base does not mix with the current being switched... which seems like the way it should be and the way I thought they all are[noparse]:)[/noparse].

    You are looking for an 1A... The package says that the MPF102 "dissipates 310mW"... usually a package will tell you how much current you can pass along. So, I'm not exactly sure what this means... it could mean that the moment before you blow it up, it will be moderately warm[noparse]:)[/noparse] If that is the case you can feel free to blow it up without starting a fire.

    I'd buy 4 of these... if the first one blows up, hook up the other 3 in parallel[noparse]:)[/noparse] ... the package says that the gate current is 10mA... so you should be able to drive 3 from a single Prop pin.

    Rich
  • Brian FairchildBrian Fairchild Posts: 549
    edited 2009-04-25 09:44
    russ christensen said...

    ... says v(gs)(th) = 2.0-4.0v, which leads me to believe that it can be triggered with the ~3v from the prop...
    Not quite.

    A MOSFET, like the IRF510, can be thought of as a variable resistor; the resistance from the Source to the Drain is controlled by the Gate voltage, or more accurately by the Gate voltage with respect to the source voltage. However, it's not a perfect device; a graph of resistance S-D vs Gate voltage is not a straight line.

    Vgs(th) is the gate voltage at which the device first starts to pass current. If we look at the graph below we see that little current flows until Vgs is about 4 volts; with a maximum of 3v3 from the Prop you may find the device does not conduct enough for your needs. In contrast, there are devices like the IRL510 which have a much lower Vgs(th) which are designed to work from low voltage logic levels. This can be seen in the second graph where we can see that 3v3 will cause a current of about 2A to flow.

    Your questions regarding t(d)on and t(d)off - these figures give the speed at which the device will turn on and off and are not related to the width of your driving signal. If you could feed the device with a pulse which instantly went from low to high then the FET would respond by dropping its resistance over a period of 20ns.
    473 x 496 - 127K
    485 x 543 - 118K
  • russ christensenruss christensen Posts: 84
    edited 2009-04-25 12:36
    thank you everybody. @brian: yeah i figured the t(d) out last night after talking with somebody. I still haven't quite figured out the transistor that i have, but i think i'm going to try to find one of those solid state ones. they look like they would fit the bill perfectly. thanks a lot for the help!
Sign In or Register to comment.