Shop OBEX P1 Docs P2 Docs Learn Events
Driving higher current with multiple pins — Parallax Forums

Driving higher current with multiple pins

hinvhinv Posts: 1,255
edited 2010-11-05 08:00 in Propeller 1
For a project I am working on, I wanted to experiment with using multiple pins tied together and used as outputs. I understand that I could cause problems if I didn't drive them in the same way basicly crowbarring the power supply, but if I was careful not to do that, could I use this method to drive more current for a small motor maybe? Is there any other gochas?
I have 3 reasons to want do this:
1. I have several spare pins available in this project.
2. I want to keep the part count down.
3. I am not good at FETs and driving transistors from a propeller.

Thanks,
Doug

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2010-08-30 21:17
    Generally this practice is frowned upon. Even though you take precautions from a software perspective to drive all of the pins at once, there still could be small amounts of propagation delays within the IC itself that will cause the drive transistors on the I/O's to operate (briefly) in their linear mode. It's much better and accepted to select an appropriate external drive transistor for the job. There are also back EMF considerations when driving an inductive load such as a motor that would kill the I/O pins in a short time.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-08-30 21:30
    Doug,

    I'm afraid that none of your reasons provide an adequate rationale to do what you contemplate -- particularly the third one. Sorry, man, but FETs aren't magic, and they aren't out to get you. :) Here's a simple circuit to get you started:

    attachment.php?attachmentid=72889&stc=1&d=1283229745

    -Phil
    453 x 260 - 2K
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-08-31 00:35
    Don't do that!

    Use a cheap transistor and control it
    as a switch using one pin. A pn4401
    or pn2222 can handle a few hundred ma
    and cost just a few pennies.

    If you want to control a lot of current
    and protect your Prop from any chance
    of spike damage just use a cheap optocoupler.
    I like to use darlington optocouplers. You can
    switch a large power transistor with the
    coupler.
  • hinvhinv Posts: 1,255
    edited 2010-08-31 20:34
    Hey thanks for the information. I might have to order some of those FET's and play around with them.

    For getting started, I have bunches 3904 and 3906 transistors. Where do I get started in designing a circuit for output from a propeller? Can I use the 3904 and 3906 in pairs like darlingtons?

    Thanks for all your help,

    Doug
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-08-31 20:59
    hinv: IIRC 3904 & 3906 are general purpose transistors just like the 2N2222. NPNs are easier to drive than PNP. Take a look at the RS232 driver circuits using transistors for the propplug equivalent. This should be where the schematics for other prop circuits are (see the home page for a link).

    Fets are quite easy to drive, although often to turn them on fully you need voltages above 3V3. I recommend you try Phils circuit.
  • Clock LoopClock Loop Posts: 2,069
    edited 2010-09-01 04:48
    hinv wrote: »
    For a project I am working on, I wanted to experiment with using multiple pins tied together and used as outputs. I understand that I could cause problems if I didn't drive them in the same way basicly crowbarring the power supply
    Doug

    Why not just use resistors on each leg to limit the amount of current allowed out each pin? Then your only worries are inductive destruction. The way igbt's take care of that back emf is with protection diodes.


    There is one reason to use the prop to drive loads like this, and that is the frequencies that are possible in such a configuration.
  • KaosKiddKaosKidd Posts: 296
    edited 2010-09-01 05:53
    Doug,

    I'm afraid that none of your reasons provide an adequate rationale to do what you contemplate -- particularly the third one. Sorry, man, but FETs aren't magic, and they aren't out to get you. :) Here's a simple circuit to get you started:

    attachment.php?attachmentid=72889&stc=1&d=1283229745

    -Phil

    Ok, I'm dense...
    Maybe someone can start up a basic conversation about which to use when. I know I would get a lot of info out of it.

    KK
  • RinksCustomsRinksCustoms Posts: 531
    edited 2010-09-01 05:57
    Clock Loop wrote: »
    Why not just use resistors on each leg to limit the amount of current allowed out each pin? Then your only worries are inductive destruction. The way igbt's take care of that back emf is with protection diodes.


    There is one reason to use the prop to drive loads like this, and that is the frequencies that are possible in such a configuration.
    Like Beau said, even using current limiting resistors, there are still likely small delays within the prop that would cause one I/O to turn on before all the others and basically short it to the power supply or gnd thus killing the output CMOS transistor, which CMOS logic -unless using one of the IC buffers designed for higher current output (which can drive multiple TTL level gates)- cant source/sink much current. In fact, you usually pushing your luck with driving single LED's directly from the I/O pins.
    As far as the second concern you have, with regards to frequency, a 2n2222a like the one linked at the bottom of this post, can switch @ 300MHz @ 20V Vcc, more than double the speed the prop can PLL output (128MHz). RF transisitors switch into the GHz/THz range.

    @ hinv -learning how transistors work will give you a powerful understanding of this suvject and make you quite versitile in this field once you gain the knowledge on the opperation and different configurations transistors can be used in. If nothing more, i highly recomend learning all you can about the use of transistors. Its a very pwerful tool in your mental toolbox for any project you get involved in with the prop.

    Happy programming :D
    Mike

    http://www.datasheetcatalog.org/datasheet/stmicroelectronics/9288.pdf
  • hinvhinv Posts: 1,255
    edited 2010-11-05 08:00
    Thanks for all of your help. First I did a H-Bridge from some transistors here:
    http://www.beam-online.com/Robots/Tutorials/Freeform/H-bridge/hbridge.html

    But, after ordering and playing with the L293, it is so much simpler.
    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/L293/List/0/SortField/4/ProductID/608/Default.aspx

    I ordered some IRF3708 MOSFETs so I will be playing with them after I get my zapper project done.

    Thanks for encouraging me to go outside my "comfort zone"

    Doug
Sign In or Register to comment.