Shop OBEX P1 Docs P2 Docs Learn Events
Need help Spec'n a MOSFET, need help with darlington — Parallax Forums

Need help Spec'n a MOSFET, need help with darlington

???O? ???????O? ???? Posts: 18
edited 2009-06-11 05:52 in Accessories
Hello,

In my never ending quest to complete my project, i have hit a couple of stumbling blocks.

First. Need help spec'n out a MOSFET that will allow me to PWM from stamp to a 12v, 9amp (max) inductive·load . (Assuming this is the best unit for the job.)

Second, I have attached a picture regarding the darlington array. I cant seem to figure out what goes where. I have put the· pin 4 stamp·to pin 1a darlington.· relay will be powered from 12v battery, current sink to pin 2a darlington. COM to ground. I dont know what to hook up to E. Also, can i use the internal diodes for suppresion, or must i hook up an external diode accross the coil of the relay?


Thank you,

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DP
(ΜΟΛΩΝ ΛΑΒ&#917[noparse];)[/noparse]

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2009-06-09 18:04
    ΜΟΛΩΝ ΛΑΒΕ,

    The common of the ULN2003A should go to your supply voltage and not Vss
    Pin 8 is the Enable, and should be tied to ground or a logic "0" to enable the Chip.

    As for your MOSFET, there are several Logic Level automotive mosfets that I would consider (<- read rugged design). You didn't specify if you needed a n-mos or p-mos mosfet.

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

    IC Layout Engineer
    Parallax, Inc.
  • ???O? ???????O? ???? Posts: 18
    edited 2009-06-09 19:10
    So to make sure I understand this completly.
    Com should go to 12 v?
    E (pin 8) goes to ground.
    stamp pin goes as shown.

    what sinks the current from the relay as the relay is supplied with 12v already. Somehow my relay must go ground, it doesnt go through the chip enable does it? also, to drive the chip do I put the pin on the stamp high or low. I am assuming high to saturate?

    As for the MOSFET. With a low level of understanding, I am not sure which I need. To be honest, I didnt know there was two types. Here is my application. I will be driving an DC motor, that will draw 9 amps at full pressure(load). In order to reduce pressure, I would like to use PWM. I will try to find the article you are refering to. I found the nuts and volts article but as i have two voltage sources, 5v and 12v i want to make sure i dont fry my new stamp.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DP
    (ΜΟΛΩΝ ΛΑΒ&#917[noparse];)[/noparse]
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2009-06-09 23:04
    ΜΟΛΩΝ ΛΑΒΕ,

    Pin 8 is the Ground ... not the Enable (my mistake)



    "to drive the chip do I put the pin on the stamp high or low." - the output is open collector so , it will only be pulled LOW, but with relation to the Input, the output is inverted. Which means that making the stamp pin HIGH will cause the corresponding output on the ULN2003A to go LOW. A LOW on the stamp pin will cause the corresponding output on the ULN2003A to go into a High-Z or Open-Collector mode.


    Doe your motor require a terminal to go to the +Supply, Ground, or does it matter? If it doesn't matter or if one terminal must go to the +Supply, I would suggest a logic level N-MOS transistor to do the job.

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

    IC Layout Engineer
    Parallax, Inc.
  • ???O? ???????O? ???? Posts: 18
    edited 2009-06-10 04:32
    Beau Schwabe
    Thank you for your assistance....however

    I think i am more confused than when i started. My understanding of a darlingtion device such as the one i have listed....i am able to drive 7 relays from 7 stamp pins. What you are telling me is that i must have seperate chips to do each relay.

    My goal is to run 3 relays from 3 stamp pins. But it sounds like i need more than one chip.
    __________________________________________________________________________________

    Going back over the chip. I am VERY green with electronics. Thus, why I opened this thread.

    NOW. the ULN2003A is an 18 pin device. pin 9 is labeled E, pin 10 is labeled com.

    I want to drive my relay as shown in the picture. please tell me where to hook up ground, stamp pin, 12volt, 5 volt (if needed).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DP
    (ΜΟΛΩΝ ΛΑΒ&#917[noparse];)[/noparse]
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2009-06-10 06:11
    ΜΟΛΩΝ ΛΑΒΕ,

    My understanding of a Darlington device such as the one i have listed....i am able to drive 7 relays from 7 stamp pins. - Yes, that's correct.

    What you are telling me is that i must have separate chips to do each relay. - No, I'm not sure where you got that, the ULN2003A is capable of driving up to 7 outputs with 7 corresponding inputs. All of the Darlington transistors share the same Vss or "E" connection, so that's where the Darlington transistor is able to sink current.

    Referring to this document...
    www.parallax.com/Portals/0/Downloads/docs/prod/sic/Web-PC-v1.0.pdf

    ... on page 171 Figure 5-24 ... shows the equivalent circuit of one of the Darlington transistors. Notice how "E" is attached to the second stage NPN transistors Emitter which is also the Vss connection. The Diodes that are built in between Vss and the Input, and Vss and the output help to protect the transistor from any back EMF caused by inductive loads. Additional EMF protection can be gained by connecting the COM to the positive supply. (Note: it can be left unconnected in 'some' circumstances where back EMF is not a problem.) In cases where you want any "free-wheeling" you might want to leave the COM unconnected. Free-wheeling could apply to a motor where after you turn the Darlington transistor OFF you would want the motor to coast to a stop. With the COM connected to the Vsupply, any power generated from a motor (a motor is basically a DC generator) would be directed back into the power supply via the diodes. This would cause the motor to slow down much more quickly.



    ULN2003A Reference:
    www.datasheetcatalog.org/datasheet/stmicroelectronics/5279.pdf

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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 6/10/2009 3:11:39 PM GMT
  • ???O? ???????O? ???? Posts: 18
    edited 2009-06-10 15:36
    OK, this is getting clear as mud.

    Pin 8 "E" goes to ground.
    com goes to the common "12 volt"
    the stamp pin goes to the 1a with an output of 1b pins 1 and 18 respectivly. this output, 1b or pin 18, would go to the ground side of the coil, in a current sink situation. relay two would then go to 2b (pin 17) with the controlling stamp pin at 2a (pin 2).....so on.

    I am NOT driving a motor with the darlington, i am driving a relay.


    I WILL be driving a motor with the mosfet, n-mos, as soon as i get the information regarding one that will withstand pwm @ 9 amps. I just dont know how to correctly spec one. That is the part i need help with.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DP
    (ΜΟΛΩΝ ΛΑΒ&#917[noparse];)[/noparse]
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2009-06-10 17:33

    Pin 8 "E" goes to ground.
    com goes to the common "12 volt"
    the stamp pin goes to the 1a with an output of 1b pins 1 and 18 respectivly. this output, 1b or pin 18, would go to the ground side of the coil, in a current sink situation. relay two would then go to 2b (pin 17) with the controlling stamp pin at 2a (pin 2).....so on.

    Yes, that's correct, with the exception that the ULN2003A is a 16-pin chip. So, 1->16 , 2->15, 3->14 and so on.


    I am NOT driving a motor with the darlington, i am driving a relay.

    Yes, I understand that you are not driving a motor with the Darlington, but I was trying to explain the reference in the datasheet of the common free wheeling diodes and how they could be used.



    I was holding off on answering anything regarding the mosfet, because I didn't want to confuse the question you had regarding the ULN2003A.

    There are a couple of things we need to know about the motor.

    Is 9 Amps the Stall current? ...meaning is that how much the motor demands when the shaft is prevented from turning?

    Can you measure the terminal resistance on this motor and report back a value to us?

    What is the Base Period or Frequency of your PWM signal driving the motor?


    Typically, as a safe rule of thumb, you want to select a MOSFET capable of delivering at least twice your rated current, so your looking for something that can handle at least 20A. Second, the Rds"on" value on the data sheet is very important if you want your MOSFET to run cool. The lower the Rds"on" the better. The next thing to look out for is the input gate capacitance. This value will ultimately determine how fast your PWM signal can be at least to the MOSFET (<- The motor will have it's own limitations here). The data sheet should also give a rise time and a fall time which is also related to the input capacitance as well as the output capacitance. You want to make sure that these values are within the rise and fall times of your PWM signal.

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

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 6/10/2009 5:38:15 PM GMT
  • ???O? ???????O? ???? Posts: 18
    edited 2009-06-10 22:49
    Great! I see your reference to the diodes and how they pertain, thank you for that information. It through me off for a moment, and I thought we had crossed lines. Regardless, I believe I now understand the darlington. Copy on the 16 pin device, will adjust accordingly.

    Moving on to the MOSFET. One down one to go. smile.gif

    I will be driving a diapram pump with the MOSFET. This pump has an internal bypass so the motor will never stall. The 9 amp current is at max pressure/ flow rate. The purpose of this MOSFET is to slow the pump and reduce pressure/flow.

    Now, as I was reading your refered information "PC controls", I came accross the PWM information. I may be confused on this issue as well. The PWM on the stamp, only excutes the code, when the prgram moves on, it is no longer providing a pulse to the MOSFET.

    This will not work for my application, as driving the motor is only one of the many tasks of this controller. I have however come accross the sample circuit that shows a capacitor that charges to the "average voltage" of the pwm, that will maintain while my program is being executed elsewhere. Here is my question, how or will the MOSFET maintain the slower motor state? I thought the MOSFET was either an on or off deal, and was basically following the stamp in terms of frequency.

    Example - 50% duty, on-off equal time. the MOSFET will see the on off, and open or close the gate, making the average voltage at the motor. basically the motor will see 6 volt (on a 12 volt system).

    If the capacitor is in the system, (assuming the duration of the PWM was long enough to charge), and the stamp moves to the next line of code, the MOSFET no longer sees the on off but an average voltage 2.5v from the cap. Is this 2.5 volts allowing only 6 volts through the MOSFET to the motor?

    I understand that half the voltage to the MOSFET does not equal half of the voltage to the motor, i was attempting to make the problem clear.


    Am I remotely close to understanding this device? If not, how can i run this motor at a lower speed for a given time from my stamp, while executing other code?

    I will try to get the resistance across the motor when i get home tonight. I have no actual data as far a PWM frequency or duration. I have not been able to test in this applicaiton, due to not having a device that will handle the current.

    I really appreciate you taking the time to walk me through this. Electronics, Stamps, Code, are all new to me.

    Regards,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DP
    (ΜΟΛΩΝ ΛΑΒ&#917[noparse];)[/noparse]
  • Beau SchwabeBeau Schwabe Posts: 6,547
    edited 2009-06-11 05:52
    ΜΟΛΩΝ ΛΑΒΕ,

    From the Basic Stamp Editor...

    [code]

    The term "PWM" applies only loosely to the action of the BASIC Stamp's PWM command. Most systems that output
    PWM do so by splitting a fixed period of time into an on time (1) and an off time (0). Suppose the interval
    is 1 ms and the duty cycle is 100
Sign In or Register to comment.