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.

Not able to drive led using uln2803 on tiva c connected launchpad

Other Parts Discussed in Thread: CC3200

Hi,

I am trying to use the gpio pin to drive led using the uln2803.I have set the gpio drive strength to 12 ma.Even after using 2 pins to drive led I am not able to drive the led using tiva c connected Launchpad gpio.where as I am able to drive the led from external powersource set at 10 ma current output.Is there a problem in the way I am interfacing uln2803 can help me with this.

 

Regards

 

Manoj

  • Manoj R94504 said:
    trying to use the gpio pin to drive led using the uln2803

    My small tech group has been in this biz for some time - past used high volume of the, "grandfather to your device - ULN200x series."

    Now that ULN family is a 7/8 channel, high current (500mA), darlington transistor array.   Thus if driving a single, normal Led - its use is really, "overkill."

    [edit 08:47 CST]  Dawns that - because ULN is a Darlington - it will not, "pull down all the way" to ground.   Thus if you've connected your Led anode to 3V3 - have a reasonably sized/connected limit R - and connected the cathode to the ULN - it may be very dim.   Answer (in this case) is to connect the anode to a higher voltage - such that the ULN's ground return (now) enables adequate Led current flow.

    Your MCU is quite capable of directly driving most any "normal" Led to great brightness.   You do not describe your Led - thus we're left to "guess."

    I'm concerned by your mention of, "using 2 pins to drive (the) led."   We assume these are 2 GPIO properly configured as outputs - and wired in parallel.   Usually - but not always - connecting 2 outputs is unwise.  (i.e. what occurs when one output is high - the other low?)   Can that be good?

    A "normal" Led - properly sized current limit resistor - and connection to (even) a relatively low voltage source should enable your MCU GPIO to fully illuminate any "normal" Led.   You must observe the Led's anode/cathode - you may illuminate by connecting the anode to + voltage, the cathode to resistor, and the other end of the resistor to your GPIO.   In that case - outputting a "low" will light the Led.   You may reverse that setup - tieing Led's cathode to ground - and then outputting a "high" will illuminate.

    As always - frustration/emotion (lack of forum guidelines) causes the absence of needed facts - complicating remote diagnosis...   (this is not your fault - and has been "Duly Noted" - yet continues and continues and continues....)   And its that unwise, "continuation" which has been especially NOTED!

  • Hello Manoj

    I concur with cb1. However w/o the circuit diagram we cannot say for sure what is happening to not cause the LED to light up

    Regards
    Amit
  • And without (some) Forum Poster Guidelines - posts like this arrive endlessly...
  • I got it working.i had not connected the ground from mcu.

    Sent from Nine

  • Your use of ULN device still concerns (and is still undescribed) - should not be required unless yours is a very special Led.
  • Led was just for testing. I actually need to drive a solenoid.

    Sent from Nine

  • Manoj R94504 said:
    actually need to drive a solenoid.

    We'd never have guessed that - nor that the MCU was ungrounded.

    Indeed most solenoid coils are beyond the voltage & current capability of any MCU's GPIO - thus the ULN device (provided you needed all those channels) makes sense.   (single FET could handle single solenoid - should cost/size/implementation matter...)

  • Yes the solenoid which I am using is of 12v and it is consuming around 200 ma current.The solenoid which I am testing I am able to drive it by a single GPIO pin(usin the ULN2803 IC).As you said  using a single fed should reduce the cost as described in the below post

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/188299#pi316701=2 

  • Whatever I had typed below the link has not appered here so I am reposting those lines again

    I had the uln device readily available with me so I used it.Do you suggest me to use the design as described in the above e2e post link.
    I am using the ethernet interface to communicate to my tiva c.I wanted to move my use case and make it wifi based so are there any examples available.I was thinking if moving my use case cc3200 makes sense as it has built in wifi.
  • Glad you succeeded. I'd choose a FET with a current rating 4x (minimum) that of your solenoid due to "surge on turn on." Also - use of an "anti-kickback" diode is normal/customary. (even though the ULN usually incorporates such - when you "move" to FET - such protection moves, too!

    As for moving post - I'm outsider - not qualified for such guidance.    (and its beyond my pay grade)