Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

problem with sourcing leds interfaced with pic

Status
Not open for further replies.

confusion

Junior Member level 3
Joined
Jan 6, 2012
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,516
1)i am using pic16f877a to interface interface 8 leds to it.. the pic16f87x datasheet says that its high sink/source current is 25ma. and i am using red leds which sinks in at the max 30ma current. as i am using 8 leds 30x8=240ma+25ma=265ma will be needed by the kit at the most..

2)this is how i calculated the current requirement for the source(i might be wrong ..so plz correct me).. so know i am using a 9v battery(6f22) which has typical current rating of 400ma. which satisfies my requirement.

3)then i connected a 7805 regulator(500ma typical current rating) to power the pic ckt . so when i give a 9v i/p to the regulator i get o/p somewhere equal to 4.95-5v . but when i give it to the pic ckt it shows me 0.82v accross the supply terminals and at the vss and vdd of the supply.
and battery gets discharged fast.. after that the battery showed only 5.54v accross it.
is the battery not sufficient to provide current to the 8 leds ? what might be the problem.
.plz reply as soon as possible
thanx in advance!!
 

Hi,

Yes, most standard leds have a current between 20 to 30ma but that is Maximum, they are normally connected to the pic via a series resistor, typically 330 ohm .

Although many pic16F pins can handle 25ma , again that is maximum and its never wise to run every thing full throttle.

You must also consider the maximum current the whole chip can handle, thats typically 250 to 300ma, details in the datasheet.

Assume you are just using 8 leds to see test data on the port - so just use 8 standard 3mm or 5mm leds each with its own series resistor, that will probably use well under 100ma at normal illumanation.


That battery will be little use on a 7805 with a pic chip with leds. - sound like you may have a short as well as current overload

Either use something much bigger like a lantern battery PP7 or PP9, but it would be a lot cheaper to buy a simple multivolt wall power pac.
 
There are some uncertainties in what you say.

An alkaline PP3 has around 500mAh capacity - by drawing 250-300mA from it you are really pushing it hard. Dry cell batteries drop their output voltage quite quickly, especially under high load where their internal resistance drops voltage.

Your 7805 regulator really needs at least 7.5-8V input to function. The PP3 will very quickly drop below that. PP3's are not good for more than tens of mA.

Anyway,

I'm not sure how you are calculating your current. The PIC's outputs can have a maximum of 25mA in or out, without suffering damage. Don't try to allow 30mA - run the LED's with a series resistor that limits to 25mA maximum. Then, with them all on, the current will be 8x25=200mA. Also, the PIC will draw some. I can't remember how much (the datasheet will say) but probably around 20-ish mA, so total from the supply is around 220mA.
 
Spookily similar to this I have just made,
**broken link removed**

, an LED PWM demoboard based on the 16F887, with a 16Mhz clock crystal (and 2 15pf caps), an ICSP connector, a few LED and Darlington-drivers. If you imagine the circuit basically follows the rows, there is a 220 ohm DIL resistor pack tied directly to the PIC's pins, they go through to the ULN2903's, which sink a bit more current, and then through another 220 resistor pack to +ve...

This is a test I did, of directly soldering LEDs to the legs of PIC12F675's, and leaving running for 36hrs (Nokia charger powered)... With no restistors or anything but power to the PIC I made a nice RGB-up-down-type thing which still works now and is the size of an 8pin PIC... I eventually have ended up with 3 parallel LEDs on 3 legs, RGB, and still works, even after being tested bouncing around a clear 2" tube over a speaker (to put the photo into context)... Pointed-LEDs in tubes create strange patterns when the light emitting from the tube is proejected on a surface, and the speaker made it move!!
**broken link removed**

**broken link removed**
Cool, hope everyone is ok in the world...
NEAL :-D
 
Last edited:

ok ..i did not connect series resistor .how can connecting series resistor help.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top