Shop OBEX P1 Docs P2 Docs Learn Events
Mosfet selection - Please help — Parallax Forums

Mosfet selection - Please help

computer guycomputer guy Posts: 1,113
edited 2008-01-28 13:39 in Propeller 1
Hi there

A project I am working on involves switching a 24v AC source I have come to the conclusion that a mosfet would probably be the best way to switch a relay on and off to control the 24v.

However I am new to using mosfets and have no idea how to select the appropriate type.

One other thing how can I power the propeller from that same 24v AC source, Obviously a Bridge Rectifier will be needed to convert the source to DC but what about the voltage drop from 24V to 3.3v?

Thank you smile.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Check out my robot using the propeller RECONAUTOR

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-01-08 00:38
    Because of the large voltage drop, I would use a switching pre-regulator (see www.cd4power.com) to get down to 5V or so, followed by a linear 3.3V post-regulator. Using a bridge rectifier with a filter capacitor on your 24VAC, you will want a switching regulator that can handle a 24-34V input range.

    -Phil
  • BTXBTX Posts: 674
    edited 2008-01-08 00:50
    Computer guy.
    Why not an optocoupler with a diac integrate into, like the MOC3041/42/43 plus a triac to avoid using the mosfet-relay ?
    Also a simple BC548 (not mosfet) or a BS170, could drive the relay too (you don't specify the current contacts of the relay, neither the coil characteristics).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-01-08 01:40
    While designing this contraption of yours it's good practice to choose components rated for twice the wattage, (voltage and or current) that will pass through them, that way you won't endanger your project or maybe even yourself.

    www.discovercircuits.com has a large selection of power supplies, would give some good ideas on going about what it is your trying to do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.

    Post Edited (RinksCustoms) : 1/29/2008 4:13:21 AM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-08 02:17
    The project is an irrigation controller that will switch on and off 24v AC valves.

    BTX,
    If you can suggest the appropriate optocoupler and triac to use, than that sounds like a good idea.

    RinksCustoms,
    Thank you will remember that one.

    Phil Pilgrim,
    Could you please be more specific, that website contains a lot of products none of witch match what you have described. The DC/DC converter on that site is $108 USD.

    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
  • BTXBTX Posts: 674
    edited 2008-01-08 02:59
    Computer guy

    Please download the dadasheet of the MOC3041, there you'll find the correct example of what I'm talking about.....then a triac like the BT136 in enough for your application.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-01-08 03:15
    Computer Guy,

    You're right. I made the recommendation for CD Technologies before I realized that your DC input voltage could exceed 30V. Given that, a better option would be the TI PT5101A, whose input voltage can range up to 38V and which is available for US$11.96 in one-piece quantities.

    -Phil
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-08 03:27
    Phil,
    Sounds like a great product. Will have to get one/some.

    BTX,
    Is this what you mean, or am I way off the mark?
    attachment.php?attachmentid=51319

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR

    Post Edited (computer guy) : 1/8/2008 3:32:07 AM GMT
    553 x 230 - 12K
  • BTXBTX Posts: 674
    edited 2008-01-08 12:25
    Correct !!! Tha's is what I suggest to you.

    But look at the 10 KOhm resistor, it is incorrect connected, instead use a 100 Ohm resistor with the propeller I/O in "serial" with it.

    The MOC input is a "led" you must drive it with about 15-20 mA for the MOC3041...
    If your I/O pin gives a 3.3Volt output, this, minus the VLED, who is about 1.2V-1.34V give us about 2V...so divide that by 100 Ohms, and you'll have the 20mA needed.. (Ohm law).

    So, take out the 10K resistor and replace it for 100 Ohm in serial with the I/O pin. The propeller can drive it well.

    Or.

    Replace the 10 KOhm resistor by a 100 Ohm, and use the I/O pin in the "GND" instead.... you'll source the 20mA too.

    For the 0.01 uF capacitor, use a polyester by 100V minimun. The resistor of 39 Ohm must be at least 1 Watt.

    This circuit works great...I use it almost everyday.... also the MOC have a zero cross detector inside... optoisolate the output...and avoid very well noises.

    Good luck !!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-08 12:31
    Thanks BTX, looks like I am off to a good start. smile.gif
    Now I just have to work out how to schedule the prop to do things at certain times using a "real time clock ic". smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-10 22:14
    What do you mean by optoisolate the output...and avoid very well noises.
    You have me worried now.The Hot wire going to pin 6 via the 360ohm resistor is that ok. would the 360ohm and 330ohm resistor need to be 1Watt and the capacitor rated for AC?

    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR

    Post Edited (computer guy) : 1/11/2008 5:25:12 AM GMT
  • BTXBTX Posts: 674
    edited 2008-01-18 12:51
    Hi...sorry for the delay...I´m in vacations now....although each time I can, I connect with my notebook to see messages.
    It is a good idea to avoid gnd loops, optoisolating inputs and outs of the boards...... sometimes you can use relays for outs..(if it is possible)...but in this case could be better, to use the MOC3041 to drive the triac, and you´ll be optoisolating the output too.

    I mean..the 360 Ohm resistor could be of 330 Ohm ...1/2 watt (both 330 Ohm 1/2 watt)...Then the 39 Ohm resistor must be better 1 watt.
    The capacitor could be polyester like 0.01 uF x 100 Volt.

    Sorry for the quick answer....I´m stand in the street, while answering to you [noparse]:)[/noparse]. & my wife can´t believe this I´m doing in vacations...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-18 23:13
    Thank you for taking the time on your vacation to answer. Say sorry to your wife for me.

    Can't wait to see the propeller switch on and off 24v solenoids.
    This should be fun.

    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Sticker
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-19 11:04
    I just came around these:
    document.sharpsma.com/files/s102s02_e.pdf
    But no personal experience...
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-20 07:29
    @wastehl:
    Relays usually take more current than the propeller can give so a transistor would no doubt be needed.

    @deSilvia:
    By looking at the datasheet, it looks like an opto isolator with built in triac. Nice, however probably a bit to fancy for my project.

    Thank you both anyway. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Sticker
  • Sleazy - GSleazy - G Posts: 79
    edited 2008-01-20 11:07
    I advise against relaying your power in AC stages, but if you must, a transmission gate with CMOS setup will work

    remember you cant use an individual FET with AC because only one FET would cause the impedance·of the gate to differ in both directions.·

    If You dont need to·terminate·power from any supply transformer·until after rectification, I advise keeping the output stage floating and ready to·be switched after rectification using darlington transistor arrays.· They will do over 24V and you can put the propeller's I/0 pins directly to its base junctions.· Theyre alot smaller and cheaper than conventional relays.

    One "NUTS AND VOLTS" column reccomends darlington transistor·arrays to switch your DC loads to ground.
    "Silicon steroids for the stamp" I think its called.·
    http://parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv6.pdf

    Notice·darlingtons are BIPOLAR JUNCTION TRANSISTORS NOT FIELD EFFFECT TRANSISTORS (FET)·and work on·N-P junctions as opposed to the FET's working on·solely·N channel or· P channel "field".· You wont be able to use the darlingtons to provide bipolar current.

    AND.. to power from the same source, just use a multiple tapped transformer.· Since youre allready using AC, just get a transformer with dual secondary windings of different sizes to get multiple voltage rails.·

    180px-CMOS_transmission_gate.PNG··· cmos transmission gate with one pFET and one nFET
    ·
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-20 11:09
    @Sleazy - G

    BTX has provided a schematic to interface AC with a diac / triac combination.

    Thank you anyway smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Sticker
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-20 12:15
    Would the MOC3021 work, or do I need to source a MOC3041 from somewhere?

    Thank you smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Sticker
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2008-01-21 16:45
    Sleazy - G,

    If you’re building a transmission gate with discrete components, you should use 4-terminal CMOS transistors (Source, Drain, Gate, Bulk) to avoid P-N junction diode effects.
    Otherwise keep your signals below +/-400mV.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • computer guycomputer guy Posts: 1,113
    edited 2008-01-22 09:48
    Thanks BTX, that circuit worked great. I ended up using a MOC3021 for testing purposes, however I will try to source a MOC3041 from the US for the final project. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller RECONAUTOR
    If you like my avatar then check this out Propeller Domed Sticker
  • BTXBTX Posts: 674
    edited 2008-01-22 21:29
    You´re wellcome Computer Guy..
    The only one big difference between the MOC3021 and the MOC3041..."I think" could be the zero cross detector....but it must work fine anyway.
    Use MOC3042 or MOC3043 instead...they are similar MOC3041...but with different IF suggested for the LED.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • Sleazy - GSleazy - G Posts: 79
    edited 2008-01-23 00:34
    Beau, i thought all FET's were 4 terminal except Jfets. No?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-23 00:57
    The FET itself is 3 terminal. The "bulk" terminal is an artifact of the how the FET is constructed on the substrate and usually it's connected internally to the source. If you build your FET on an insulating substrate (like sapphire), then you have only 3 terminals, source, drain, and gate.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2008-01-23 05:07
    Sleazy - G and Mike,

    Sleazy - G said...
    Beau, i thought all FET's were 4 terminal except Jfets. No?
    Mike said...
    The FET itself is 3 terminal. The "bulk" terminal is an artifact of the how the FET is constructed on the substrate and usually it's connected internally to the source.

    You’re both right...



    The FET is actually a 4 terminal device, and is made into a 3 terminal device by connecting the Source terminal to the Bulk terminal.· The reason that the Bulk MUST be connected is to prevent latch-up.· The simplest example of latch-up is a CMOS inverter. (INVERTER.JPG)· This arrangement creates a parasitic NPN and PNP transistor (NPN_PNP.JPG) that happen to be arranged in an SCR (Silicon Controlled Rectifier) configuration. (SCR.JPG)



    By connecting the Bulk, or Well taps (NTAP for PMOS, and PTAP for NMOS) to the FET Source terminal, the parasitic SCR can be "snubbed" or persuaded to remain "OFF" by applying the

    Well tap resistance across the B-E transistor junction.



    Without the Bulk-Source connection, the use of FETs would not be possible.



    In layout (NMOS.JPG), the S and D can be interchanged, and in fact the S/D isn't really defined UNTIL you connect it to a NTAP or PTAP.



    Note: An NTAP or PTAP "ring" is the best form of latch-up prevention because it has several contacts resulting in a LOWer Well resistance across the parasitic B-E junction, but it doesn't necessarily need to be a ring.· A strip or even a single contact will work, but a ring is the preferred method.· Alternating NTAP PTAP rings can also be effective for sensitive circuit elements.



    A typical CMOS inverter (CMOS_INV.JPG) uses an NTAP or PTAP strip under the power and ground rails to make the Bulk connection.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 1/23/2008 6:13:25 AM GMT
    499 x 591 - 74K
    963 x 505 - 98K
    335 x 701 - 66K
    575 x 724 - 345K
    518 x 724 - 235K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-01-23 05:30
    I was trying to simplify the description, but, as happens, a lot of important details got left out. It's still true that, if you build the FETs on an insulating substrate like sapphire, you don't need the bulk or well connection and the FETs are really 3 terminal whether P type or N type. Silicon on sapphire is an expensive way to make ICs though, so the higher speed and efficiency comes at a price.
  • James LongJames Long Posts: 1,181
    edited 2008-01-23 08:36
    computer guy said...
    Thanks BTX, that circuit worked great. I ended up using a MOC3021 for testing purposes, however I will try to source a MOC3041 from the US for the final project. smile.gif

    Just for info....the 3041 has a zero cross circuit built in.....the 3021 does not. What this circuit does is terminate the connection when the AC voltage is at the threshold of positive and negative ( 0v).

    This is important if you are trying to prevent noise on the AC line. With the 3021 it will switch on or off no matter where the phase of the AC is, which causes spikes (or droops)·on the input line....which results in noise.

    I have a board with MOC3041s on it to switch lights for Karaoke and rock bands (will actually run NZ and Euro lights at 250v)......it runs from a computer...(parallel port....up to 32 outputs....it has other components on it to do this)....and it runs on 5 volts.

    The MOC3041's are really more expensive.....but if you are switching a lot (fast)....it probably would be a good idea to have them.....if you are just turning on........holding for a while (few minutes, hours,...etc) then the 3021's will be fine.

    Just shedding some light on the differences,

    James L

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James L

    Partner/Designer
    Lil Brother LLC (SMT Assembly Services)
  • Sleazy - GSleazy - G Posts: 79
    edited 2008-01-28 11:51
    Mike Green said...
    I was trying to simplify the description, but, as happens, a lot of important details got left out. It's still true that, if you build the FETs on an insulating substrate like sapphire, you don't need the bulk or well connection and the FETs are really 3 terminal whether P type or N type. Silicon on sapphire is an expensive way to make ICs though, so the higher speed and efficiency comes at a price.
    ·· Like I said, all FETs are 4 channel except JFETs

    · JFETs have·an insulated body·terminal, , youre describing a JFET.
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-28 13:39
    Sleazy - G said...
    ... Like I said...
    Don't take it personal... There are hundreds of threads I could close that way smile.gif
    But we need talking basics here now and then (Ohm's law etc...), and some deep misunderstandings in between

    @Beau: Thank you for your contribution; I know well how long it takes to prepare such postings....
Sign In or Register to comment.