Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 23rd March 2007, 11:47 AM   (permalink)
Default

Heres an example with a piezo siren, but its the same analogy for the segment displays



GND would be applied to Pin 8 on the ULN2003
bullet

Pin 9 on the ULN2003 is connected to the positive supply for inductive loads such as motors and relays
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 23rd March 2007, 06:03 PM   (permalink)
Default

The datasheet of ULN2003 shows that there is a 2.7 khm: resistor at the input. So I can use it without a resistor right? And the output logic of the patterns have to be inverted.
__________________
Superman returns..
bananasiong is offline  
Old 23rd March 2007, 10:34 PM   (permalink)
Default

Quote:
Originally Posted by bananasiong
The datasheet of ULN2003 shows that there is a 2.7 khm: resistor at the input. So I can use it without a resistor right? And the output logic of the patterns have to be inverted.
You still need segment current limiting resistors.

A '1' on an input turns on its corresponding output which sinks current to the LED segment turning it on.

Stick with common anode displays and use the ULN2003 or ULN2803 to drive the segments.


Last edited by Mike, K8LH; 24th March 2007 at 02:53 AM.
Mike, K8LH is offline  
Old 24th March 2007, 01:22 AM   (permalink)
Default

Quote:
Originally Posted by bananasiong
The datasheet of ULN2003 shows that there is a 2.7 khm: resistor at the input. So I can use it without a resistor right? And the output logic of the patterns have to be inverted.

That’s correct, a digital "High" (5V) at the input will supply an earth to the output (like a switch to earth), a logic low (0V) will turn off this earth ("open circuit") thus turning the segment/device off

Quote:
Originally Posted by Mike
You still need segment current limiting resistors.

A '1' on an input turns on its corresponding output which sinks current the LED segment turning it on.

Stick with common anode displays and use the ULN2003 or ULN2803 to drive the segments.
How can you use the ULN2003/ULN2803 for a common anode segment? They switch earths, not supply voltages - the common +ve supply pin is purely for inductive loads (notice every output has built in diodes to protect from back EMF)
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net

Last edited by gramo; 24th March 2007 at 01:35 AM.
gramo is offline  
Old 24th March 2007, 02:41 AM   (permalink)
Default

Quote:
How can you use the ULN2003/ULN2803 for a common anode segment? They switch earths, not supply voltages - the common +ve supply pin is purely for inductive loads (notice every output has built in diodes to protect from back EMF)
Not sure what you mean by a common anode segment but common anode displays have the anode of each segment tied together and supplied or switched at a positive voltage. The other end of each segment requires a sinking driver, like the '2003. A simple example is shown in the post just previous to your last post. You connect the ULN2003 diode connection to the same positive supply that you're using for the common anodes.

I assumed you were describing using a ULN2003 as a sinking driver for a multiplexed common cathode display, using it to replace the sinking NPN drivers in the "common cathode" drawing below. Yes, no?
Attached Images
File Type: png Mux CA & CC.PNG (43.6 KB, 6 views)

Last edited by Mike, K8LH; 24th March 2007 at 03:01 AM.
Mike, K8LH is offline  
Old 24th March 2007, 02:44 AM   (permalink)
Default

Quote:
Originally Posted by Mike, K8LH
You still need segment current limiting resistors.
Oh god, you're correct. I'm muddled, the resistors are needed, they are the load of the collector.

Quote:
Originally Posted by gramo
How can you use the ULN2003/ULN2803 for a common anode segment? They switch earths, not supply voltages - the common +ve supply pin is purely for inductive loads (notice every output has built in diodes to protect from back EMF)
He meant using both PNP and the ULN2003. PNP to supply the common anode while ULN2003 used for the patterns of the 7-segment display.
__________________
Superman returns..
bananasiong is offline  
Old 24th March 2007, 02:50 AM   (permalink)
Default

Quote:
Originally Posted by bananasiong
He meant using both PNP and the ULN2003. PNP to supply the common anode while ULN2003 used for the patterns of the 7-segment display.
That would be complete overkill wouldnt it? Just use the ULN2003 to switch the common cathode for each display - the pic can drive each segment easily, but a resistor for each would still be required to limit the current for each segment.


Quote:
Originally Posted by Mike
A "common anode segment"? What the heck are you talkin' about?
common anode segment display



Common Cathode

__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 24th March 2007, 02:52 AM   (permalink)
Default

But if you only have common anode displays, and the additional components already, then go with the transistor switching..
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 24th March 2007, 03:03 AM   (permalink)
Default

Because previously I complained that the 7-segment display is not bright enough. If I use common cathode, the current sourced by the PIC is enough?
__________________
Superman returns..
bananasiong is offline  
Old 24th March 2007, 03:08 AM   (permalink)
Default

Quote:
Originally Posted by gramo
That would be complete overkill wouldnt it? Just use the ULN2003 to switch the common cathode for each display - the pic can drive each segment easily, but a resistor for each would still be required to limit the current for each segment.
Yes, I agree, it is "overkill" but it provides you with a full brightness display. If it takes 10-ma per segment at 100% duty cycle for full brightness you're going to need 40-ma per segment pulses at 25% duty cycle for full brightness (and a source driver capable of 40-ma for 7 or 8 segments = 280..320-ma). Driving the segments directly from the PIC pins as you suggest just isn't going to cut it if you need full brightness. Sorry.

Last edited by Mike, K8LH; 24th March 2007 at 03:22 AM.
Mike, K8LH is offline  
Old 24th March 2007, 03:11 AM   (permalink)
Default

Quote:
Originally Posted by bananasiong
Because previously I complained that the 7-segment display is not bright enough. If I use common cathode, the current sourced by the PIC is enough?
No, you'll still have the same problem. In fact, in my experiments these last few years I've found that common anode displays are slightly brighter than common cathode displays when you're directly driving the segments from PIC pins. It seems the PIC pins can sink slightly more current than than they can source. Or, there's a slightly higher voltage drop when sourcing current, or somthing like that.
Mike, K8LH is offline  
Old 24th March 2007, 03:19 AM   (permalink)
Default

Ya, that's why I choose to have the PNP with common anode and the driver.
__________________
Superman returns..
bananasiong is offline  
Old 24th March 2007, 03:19 AM   (permalink)
Default

PIC's can throw out up to 25mA per output.

I try and aim for around 20mA, and it’s a clear display with that much current
__________________
Spency.

PIC Micro's - Your mind is the limit

PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net
gramo is offline  
Old 24th March 2007, 03:29 AM   (permalink)
Default

Quote:
Originally Posted by gramo
PIC's can throw out up to 25mA per output.

I try and aim for around 20mA, and it’s a clear display with that much current
Mine is also bright enough if I use only one 7-segment display. When the four 7-segment display being multiplexed, they becomes dimmer.

Any idea if I want to turn 4 LED's on at the same time with PIC with the brightest? But I'm not going to use any transistor or driver, just the LED's, resistors and the output port of the PIC.
I would sink the current from the PIC.
There are 3 extra pins not being used, I plan to use all of them for four LED's. But how should I connect them? Definitely not in series right? I will use parallel for all.
__________________
Superman returns..
bananasiong is offline  
Old 24th March 2007, 03:31 AM   (permalink)
Default

Quote:
Originally Posted by gramo
PIC's can throw out up to 25mA per output.

I try and aim for around 20mA, and it’s a clear display with that much current
Sure, you'll get full brightness at 100% duty cycle with 20-ma. Four displays at 25% duty cycle will see about 5-ma average current. That's quite a bit dimmer than full brightness but fortunately these LED segments throw off quite a bit of light at even a miniscule 2 or 3 milliamps average current.

If you a one to four digit display you're fine. If you've got more than four digits and you can get by with a lower brightness display then by all means, go for it...

Here's a very fuzzy picture of a 4-digit common cathode stick display. The common cathodes have transistor drivers and the segments (anodes) are directly driven. This board is actually using the Charlieplexing type of multiplexing where 8 pins are used to drive the columns (common cathode transistors) and the segments (anodes) instead of 12 pins. It's quite a bit dimmer than a full brightness display. It throws off plenty of light but you can't see it very well in a sunlit room and you can't see it at all when it's in direct sunlight.
Attached Images
File Type: jpg Stick Display.JPG (59.9 KB, 5 views)

Last edited by Mike, K8LH; 30th March 2007 at 07:31 PM.
Mike, K8LH is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
How we can do it in Assembly..Help Needed Ayne Micro Controllers 37 29th December 2006 06:49 PM
dual decade ripple counter baftab Datasheet/Parts Requests 1 30th September 2006 01:57 PM
Dual Beam People Counter Problem........ fingers Electronic Projects Design/Ideas/Reviews 7 21st September 2004 01:02 PM
Crude assembly counter Mark Lazarides Micro Controllers 5 28th February 2004 08:22 PM
Query about 4518 Dual 4 bit counter andipi General Electronics Chat 2 12th October 2003 11:04 PM



All times are GMT. The time now is 08:15 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker