Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help understanding behavior of Seven-Segment LED circuit.

Status
Not open for further replies.

DaKandEKid

New Member
I'm made a simple circuit which i use to store the floor and section i parked my car in. It's a small circuit board which goes on my keychain that has two 7-segment LEDs, a pic uC and a 3V coin battery.

Since our Vdd is about 2.2V after the voltage drop from the SCR. The SCR is used to turn on the circuit after the power button has been pressed and stays on because the PIC draws enough current to stay above the SCR's holding current until we put the PIC to sleep. For more information on the SCR's purpose see the project website (see link below). We don't put any resistors to limit current to each of the display segments. This results in some characters which require less segments to illuminate to be brighter then characters which require more but this is okay by me.

The issue i'm having is all the seven segment displays we tried using were too dim until we tried Kingbright's APDC03-41CGKWA which has the following specs:

Chip Material: InGaAIP
Common: Cathode
Color: green (570nm)
Iv mcd: 4700 (min), 11000 (typical).
IV Characteristic: @2.1V If=20mA -> good luminous intensity :)

What i'm confused about is why do my other LED displays look so dim when the voltage being supplied to each matches the typical IV characteristic for the LED.


The PIC i'm using (16F628) can source and sink 200mA on portA and B.

Any thoughts?

For more information on the power circuit and other design decisions see my writeup of the project here:
**broken link removed**

Datasheet of known working display:
**broken link removed**

Schematic:
**broken link removed**
 
For a start I would suggest you add current limiting resistors for the LED's, you're seriously overloading your PIC without them - maximum current per pin is only 25mA, with no series resistors the current will be limited only by the internal resistance of the supply and whatever the PIC pin might restrict it to - but it's likely to be considerably higher than 25mA!.

Secondly, why the SCR? - it's just adding extra components, wasting voltage, and providing no benefits.

All you need to do is turn the display OFF and put the PIC to sleep, this will reduce current consumption to extremely low levels - and because you're not losing so much through the SCR the battery will last far longer.

I presume you're using the 16LF628?, rather than the 16F628 which isn't rated for low voltages.
 
If you have a voltage of 2.1V and the forward voltage drop across the LED is 2.1V. Then don't you not need a current limiting resistor? Since the voltage across the loop is already 0. The LEDs aren't very bright as is so there isn't that much current going through the LEDs. Is it possible overdriving a port would result in even less then the maximum current to pass through it? Cause if an LED isn't really bright w/o a current limiting resistor it's only gonna get dimmer with the current limiting resistor.?

The problem with putting the PIC to sleep is i'm using the internal osc. and i want to be able to wake the PIC up from sleep using a external button.

With the WDT enabled and using the internal clock the power consumption isn't negligible.

Is there a way to wake from sleep using an interrupt i didn't think there was?

I suppose i could use add a xtal for the same cost as an SCR but then there is the issue of having to poll a button when you wake up and i didn't want the PIC to potentially miss the "ON" button press.
 
DaKandEKid said:
If you have a voltage of 2.1V and the forward voltage drop across the LED is 2.1V. Then don't you not need a current limiting resistor?
Yes, you DO need a current limiting resistor... to limit the current, not the voltage.

DaKandEKid said:
The LEDs aren't very bright as is so there isn't that much current going through the LEDs.
did you test the LED's by connecting them straight to a power supply (with a resistor, of course...). They might just be that dim. Or already damaged.

DaKandEKid said:
The problem with putting the PIC to sleep is i'm using the internal osc. and i want to be able to wake the PIC up from sleep using a external button.
What's the problem about that? What oscillator you use hasn't got anything to do with the sleep function.

DaKandEKid said:
With the WDT enabled and using the internal clock the power consumption isn't negligible.
Reucing power to absolute minimum using sleep requires some things for you to do before going to sleep. First, All outputs of the pic should be placed i such a state that they don't drive anything. If something external draws current from the pic it will continue to do so, even in sleep, you must turn it off first.

Then, all input pins should be eighter pulled high, or low, or, if possible, be configured as output. there should be no floating inputs. Sleep current can ge beyond 5mA if there are floating inputs!

Also consider that the watchog and brownout circuitry use quite a lot of current (100µA). if you want to keep it down to the advertised 5µA then you must turn them both off.

DaKandEKid said:
Is there a way to wake from sleep using an interrupt i didn't think there was?
Yes there is. It can wake up on almost any interrupt source, the watchdog, or a manual reset.

DaKandEKid said:
I suppose i could use add a xtal for the same cost as an SCR but then there is the issue of having to poll a button when you wake up and i didn't want the PIC to potentially miss the "ON" button press.
Like i said before, it hasn't got antything to do with the oscillator.
 
I agree with everything Exo said!, try checking the datasheets available from MicroChip, they have ones specifically about waking up from sleep in response to a button press (even on a multiplexed keypad).
 
Thanks for your detailed response Exo. I've looked into your suggestions and i'm going to go with the PIC16LF628A. One thing that's really neat about the PIC Chips with nanoWatt technology is they have an option to specify an internal clock of either 4Mhz or 37Khz by setting a bit in the PCON register.

I'm going to disable the WDT and Brownout detect and have it wake on interrupt.


One thing i don't understand is:

If you have a voltage of 2.1V and the forward voltage drop across the LED is 2.1V. Then don't you not need a current limiting resistor?


Yes, you DO need a current limiting resistor... to limit the current, not the voltage.

Here is my logic. Tell me where i'm going wrong or if this is right.

Typically when we calculate what the required current limiting resistor is you take your supply voltage - Forward voltage of the led. So if we had a supply voltage of 3V and the forward voltage across the LED is 2.1V.

So we know that the resitor has to drop the voltage by 0.9V and we know from the spec sheet the LED should have a current of about 20mA. So we calculate the resistance required to be about 45 Ohms (0.9V/20mA).

In my actual circuit i have an effective supply voltage of 2.1V because of the voltage drop across the SCR. Therefore we want a voltage drop of 2.1V - 2.1V = 0V and a current of 20mA. That implies that the current limiting resistor should be R=V/I = 0/20mA = 0 Ohms.

I mean if we skip all the calculations and just think about it... If the LED isn't getting hot (implying it's dissipating current as heat)... Then, putting a resitor in series with the display isn't going to make it any brighter. Right?

Another quick question:
What does overloading the PIC pins do to the PIC? Anything or it just somehow limits the current.
 
DaKandEKid said:
Here is my logic. Tell me where i'm going wrong or if this is right.

Typically when we calculate what the required current limiting resistor is you take your supply voltage - Forward voltage of the led. So if we had a supply voltage of 3V and the forward voltage across the LED is 2.1V.

So we know that the resitor has to drop the voltage by 0.9V and we know from the spec sheet the LED should have a current of about 20mA. So we calculate the resistance required to be about 45 Ohms (0.9V/20mA).

In my actual circuit i have an effective supply voltage of 2.1V because of the voltage drop across the SCR. Therefore we want a voltage drop of 2.1V - 2.1V = 0V and a current of 20mA. That implies that the current limiting resistor should be R=V/I = 0/20mA = 0 Ohms.

Current flows from a higher potential to a lower one, so if your supply is 2.1V and the LED needs exactly 2.1V then no current will flow, there's no 'potential difference'. Although as the LED isn't a supply itself, this doesn't exactly apply, but the same principal does.

So for the LED to light up the supply must be slightly higher than the LED requires, or current can't flow - so assume the difference is only 0.01V - 0.01V divided by 0 ohms gives infinite current, which will be limited by the supply impedance.

I mean if we skip all the calculations and just think about it... If the LED isn't getting hot (implying it's dissipating current as heat)... Then, putting a resitor in series with the display isn't going to make it any brighter. Right?

Wrong! - it's extremely bad practice, particularly as the voltage drop across the LED will vary somewhat with temperature - and as my ohms law above shows, something has to limit the current, as the LED will draw current until it destroys itself.

I would suggest you design the circuit properly, there's a seriously good reason for the limiting resistors, and none at all for the pointless SCR.

Another quick question:
What does overloading the PIC pins do to the PIC? Anything or it just somehow limits the current.

As far as I know it's just going to damage the I/O pin.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top