This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using MSP430F6638 to Drive a 12V, 320mA micro-pump

Other Parts Discussed in Thread: ULN2003LV, MSP430F6638, L293, ULN2003V12, ULN2003A

Hi, i'm working on a small project to operate two separate micro-pumps ( these kind: https://www.biochemfluidics.com/cart/store/comersus_listItems.asp?idCategory=85&Cur=  )  via the MSP430F6338 using PWM.

The pumps are rated 12V, 0.32A (.i.e. 4W ). I intend on using two TIP120 darlington transistors each (with each's base connected to separate PWM pin's of the controller through two seperate resistors each, their are emitter's connected to the common ground to which both pump and controller grounds are connected to , and their collectors connected to the negative terminals of each pump).

The two micro-pumps are powered by a dual-output LDO regulator ( http://www.linear.com/product/LT3024 ) delivering 12Volts to each micro-pump. And there are two seperate diodes across each pump's-to-transistor terminal ( to handle the back emf effect of the solenoid motors).

I want to ask, is this above setup valid ?, and how does one determine the kind of resistor ( i know it's between 1 to 2kohms;but which exactly?) to place in series with the controller's pins.
Also, i want to place 2 separate optoisolators between the controller and the two TIP120's - i want to ask which optoisolator might be most feasible as well as how the connection between the controller,transistors and optoisolator should be ?

thanks for any replies in advance.

  • Some comments:

    1) I don't know if you really need optocouplers. Since you already have a driver transitor separating the PIC from the load, and the solenoid voltages are not that high anyway, I think that they are not necessary

    2) Regarding your power drive, please take into account that a Darlington pair has the advantadge of high current gain, but the disadvantadge that the output transistor cannot saturate. Is there any reason for using Darlingtons? Are you willing to consider other output drivers?

  • Could you suggest other possible drives ?

  • Also, Neglecting the optoisolator, what value of resistor in series with the MSP430 pin would you suggest using?

  • You can use a logic level N-channel Mosfet to drive the coil, including the protection diode in parallel to the coil as you already stated. A series 5 Ohm resistor from the ucontroller to the FET is recommended to limit gate current when turning on (and off). If you need a part number let me know. You can also combine a PNP connected to the micro and an NPN as the final stage, the advantadge of this latter configuration being that there are widely available bipolar parts to do the job.

    The series resistor when using bipolar transistors is calculated to limit the base current, but still have it big enough to saturate the transistors when turned on.

    Again, if you want schematics of any of the variants, let me know. 

  • Thanks alot for the reply. Schematics would be most appreciated as well; as well as link to component datasheets. What rating/specifications should the diode be ?

  • david,

    use IRLML6246 from digikey http://www.digikey.com/product-detail/en/IRLML6246TRPBF/IRLML6246TRPBFCT-ND/2393880

    VDS 20 V      RDS(on) max @VGS = 2.5V     66 mohms

    The transistor gate will need about 100k pulldown resistor to prevent floating gate in cpu reset state. (at powerup IO is set to input)

    Another possibility is to use TI ULN2003LV with paralleled outputs.

    For the protection diode use any 1 amp rated rectifier.

    Peter



  • What would the schematic be like using the n-channel power mosfet in conjunction with this pulldown resistor ? The 5ohms suggested, is that calculated or just assumed. if calculated, how ?

  • I'd be making use of the dual channel version of that mosfet to drive two micro-pumps.  The resistor in series with the MSP430 output pin as well as the gate-to-source resistance; how are they calculated  and what is the maximum output of the MSP430F6638 ??

  • @Peter, what about http://www.digikey.com/product-detail/en/FDMC6890NZ/FDMC6890NZTR-ND/1287248 ??

  • Pay attention that the dual channel FET is assymetric, one device has more on resistance that the other. You also asked how the value of the series resistance is calculated, you can see on the datasheet that the Rg = 6 Ohm. So the question would be what is the series resistance of your driver, if you know that it is big enough then there is no need for additional series resistance (However, I would put it anyway, if you have place and no need, you put 0 Ohm, but if you have no place in layout and you need it... you are obviously in trouble). 

    Other than that, the dual device you chose seems OK.

    BTW regarding the damping diode, it can be much smaller, even as small as 100mA continuous can be good (or less). Actually you have to check the datasheet and see if it has definition of peak current, since the 320mA will go through the diode for only a small time after the conmutation, so it is a peak current and not a continuous current.

    For example the BAT42XV2 Schottky rectifier has an average current of 200mA but a peak of 4A, so as you can see, the damping diode can be very small. 

  • You simplest and wisest solution would be to use the ULN2803.  There are no other components needed, no calculations, nothin'

    Just connect the port pin up to it and that is it!  I use it with 3.3v controllers and never had any problems powering LEDs, relays or solenoids.

    Your next best option is the L293 wiich can sink or source since it is a push pull.  Both of these will take care of any application you will encounter quickly and easily.

    As mentioned above, the ULN2003 is an option.  The ULN2803 doesn't require any diodes. Both can have their outputs paralled to provide more current. The only thing you may need are pull down resistors on the inputs. 10k or higher will do when you are doing very fast switching with PWM. 

  • @greenja,  I don't need more than two channels though.

  • This uses less board space than any other solution.  Tripple up and quadruple up the inputs and outputs if you feel guilty about having unused outputs.

    There is always room for another LED or buzzer in everyone's project.

  • Give that i only need two channels rather than 7. I would probably go with just two separate mosfets .i.e.  http://www.digikey.com/product-detail/en/IRF6201TRPBF/IRF6201TRPBFTR-ND/2354055

    On second thought, having gone through the datasheet of the ULN2003LV; i will go for that option; the ULN2003LV12.  Is there an application schematic somewhere highlighting it's configuration for a 12V inductive load ??  The application circuit i saw for the ULN2003LV was only for 1.8V relays, not to mention the inputs where differential (i.e. Two pins joint for one logic output from the MCU pin)

    Will i still need a 5ohm series resistor when connecting the ULN to the pump load ?

  • Also Unused pins of the ULN2003LV12 are they to be left floating or do they need a pull-down resistor ?

  • The micro-pumps work by PWM switching, so i 'will' be using that from the MSP430F6638....

  • Hello David,

    The two pins joined up are not differential inputs.  The single port pin output from the MCU is connected to two ULN inputs. This is how you parallel the outputs to get more driving current.  You should be able to simply replace the relay with your solenoid.  The VSUP provides the positive voltage to the solenoids and the COM of the ULN. 

    You had mentioned that there is an LDO that supplies both solenoids.  This is what you will connect to the VSUP as in the data sheet. 

    I don't know where you are getting the 5ohm resistor from.  Putting that in series would set the current to 2.4 Amps!  If anything, you will want to put a 36 ohm or higher resistor to set the maximum current to 325mA.

    Also, the ULN2003LV is NOT the device you will use, it is only rated for 8 volts.  You need the ULN2003V12.

  • TheULN2003LV12 output current of each pin is 100mA, given that the load needs 320mA, i'd need at least three pins in parallel (about 300mA). since i'm driving two loads i'm wondering if this output current of the driver would be enough..

  • You are right, it does say only 100mA per channel when using less than 5v input.  The 1000mA rating is very misleading.  

    You can always go with the ULN2803 as per my original suggestion or the ULN2003A.

  • The 5 Ohm resistor I mentioned in case you used a FET is in series with the gate of the FET, not with the load.

  • The MSP430f6638 is powered at 3.3v having a full port drive strength of about 15mA at each pin.

    could you explain how the series resistor is calculated to give that 325mA maximum current value ?

    Three of the output pins of the ULN2003LV12 are to be connected to each solenoid load, is this correct ? But this would only give a 300mA parallel current. How does this R > 36ohms, you mentioned, make it 325mA ??

  • I will go with the ULN2003A.  Given that the current at a single output is rated at 500mA ( indirectly meaning five unused pins since i would only need two), what value of series resistor at the input would be needed to limit the current to 320mA ??  And aside from the internal pull-up resistors; would i need any external ones for the unused pins, or will the internal ones by fine (i.e. leaving the unused pins just floating) ?

  • The calculation was for setting a current limit for the solenoid, not the MCU.  12V / 36 ohms = 325mA.  In the data sheet where you saw the example circuit, the resistors are there to limit the current.  The actual current will be less due to the resistance of the coil.  So, your maximum current can only be 325mA if the internal resistance of the coil was zero.

    You will have to check the specs on the solenoids to see if the 320mA is the holding current or the maximum current rating.  The specs should also give you a max and min current values.  As long as the 300mA is within this range, you should be safe, unless you are putting these in a hot environment.

    Go with the ULN2803A and all your problems are eliminated.  I believe I mentioned that in my original post...

    Check the spec sheet on the ULN2003A to see if the inputs already have pull down resistors like the ULN2003LV.  If they do, then you don't need any resistors on the inputs.

    Calculations for resistance and current are Ohms Law V = I x R.  So, R = V / I = 12 / 0.320 = ... I'll let you do the math!

    As far as unused pins go, add LEDs or a buzzer.  You have to have some indicator that the pump is running, not to mention some method of detecting over or under flow.  A buzzer could be used as the audible alarm.  Add them, it will make your project better.

  • Well, I think the ULN has its advantages, and the FET has others. The ULN is a Darlington output and as such, its Vce(sat) is quite high. For a collector current of 350mA, you are typically losing 1.3V on the output. So you would be wasting almost 1W on both outputs when the solenoids are ON. The FET is better in that respect, it wastes less power. The advantage of the ULN is simplicity with no need of additional diode. Regarding space on the board, I think that both solutions (FET or ULN) are quite similar.

    If you choose the ULN, connect the unused pins to GND.

  • The 120SP micro-pump (  https://www.biochemfluidics.com/pdf/micro-pump-brochure.pdf , page-6  ) specs doesn't state if the 0.32A current is maximum or the holding current. The ULN2803A has only a 2.7k base series resistor, no pull-down. So i believe an external series resistor at the MCU pin will be required ?  what value ??

  • You don't need a series resistance with the micro output to connect to the ULN. Only if you use a FET.

  • In terms of power-dissipation, which would be better : this ULN2803A or a discrete mosfet ?

    If a mosfet was to be used, say,  http://www.digikey.com/product-detail/en/IRF6201TRPBF/IRF6201TRPBFTR-ND/2354055  ; that would mean a 5ohms series resistor, a 100k gate-to-source, and the 1A protection diode. Right ?

    If the dual mosfets  http://www.digikey.com/product-detail/en/FDMC6890NZ/FDMC6890NZTR-ND/1287248    were used, what series resistance (and as well as R(gs) ) would be recommended ?

  • I'd be using this LDO to power the solenoid  http://www.linear.com/product/LT3024   is this okay ?  together with the current limiting resistor at the solenoid as 36ohms. I thought since the load had an adjustable output that it would be possible to adjust the output current to 325mA at 12V, is this valid ?

  • That is what you hire engineers for!  I surely hope you are not designing something that is going anywhere near a lab or medical facility.  You have been given more than enough information, twice, to complete this.  I strongly suggest you hire a consultant or brush up on your electronics.

    This forum is for assisting, not for designing a project for you.  That is how people get injured and buildings burn down!  Hire someone to do this project for you and take on less challenging projects.  There is an old saying, "if he knew the math, he wouldn't be asking those questions"

    I'm not trying to be mean.  We have all taken challenges we know we shouldn't have...and we've learned our lesson!  If this project isn't for anything other than watering your plants, then don't do it!

**Attention** This is a public forum