seven segment display help

so i am working on a project that has 4 seven segment displays.. they are common anode.

So i have them all wired together for multi plexing.. i have them wired a-a-a-a , b-b-b-b, ect.. and the two common anode pins together on each segment display. and those are wired to my arduino as segment 1,2 ,3 ,4 .. when i have it run through numbers on display it lights up correctly only sometimes.. meaning it will show the full number randomly.. most of the time one segment of the number will be out.. can someone help me with this?

the display in my pic should show 0600 and in my pic it does not.. what am i doing wrong.. as a fyi i dont have any resistors on it as i dont know where and what kind i should be applying.. but as of now they are wired directly to the arduino uno.

Hi,

No, we cant help at all. You have not posted a schematic or your sketch. Without those we would just be wasting our time guessing. The schematic can be hand-drawn on paper and scanned on your printer or phone camera. When you post the sketch, use code tags. That's the # button on the reply screen.

I should warn you now that not having used series resistors may explain what you are seeing. The segments not lighting up may be permanently damaged.

Paul

i can upload a schematic but i didnt think i needed cause i stated all pins go directly into the arduino .. i will draw one up.. as for you saying they are damaged.. they arrent as during certain times the segments will light up correctly.. they dont normally when all the same numbers appears.. what kind of resistors would i use on a 3.3v running arduino? i know i dont put resistors on the common anodes just the segment pins correct?

santino:
i can upload a schematic but i didnt think i needed cause i stated all pins go directly into the arduino ..

"schematic ... or your sketch"

You need 220 ohm resistor between Arduino pins and the segments, and PNP transistors between each device's common anode and +5. The Arduino will drive each PNP one at a time so that only one digit lights up at a time, for 2mS or so, the eye will see them all being on together thru "persistence of vision".

i have bc337 NPN transistors does that work?

No, with common anode, you need PNP to switch 5V on & off.

any specific PNP? i can go to radioshack and buy a 4 off the shelf or do i need one they dont carry? how does it wire up? base collector emitter? what pins..

Like so. Arduino drives PNP base low to turn it, and segment cathode low to turn the segment on.
PNP used is not particularly sensitive. Must be able to supply 160mA Id, so a >=200mA continuous on part will do.

so add a 1k resistor also? and 220ohm resistors on the segments and my display should light up nice and properly

They will if your code is multiplexing properly.

Hi again,

You can use your bc337 as I have done in this circuit:

http://forum.arduino.cc/index.php?topic=188135.msg1392352#msg1392352

I have used charlieplexing, which makes the wiring a little more complicated, but the way the transistors are used would be the same for regular multiplexing.

Now, where is your sketch?

Paul

Put your code in code tags. Read this.

Here is a circuit of mine driving a 4-digit 7-segment common anode display. It's a single unit display, all the segments are connected together internally. It's also a 3V circuit, so the 100? segment resistors may be too small for your project. 220? should be a safe value to start out with.

PS: We'll probably want to see all the code, not just some of it.

ok thanks.. sorry bout that.. i am going to be using 3v in the end.. so should i change my 220 to 100? and should i change my pnp to a 4403 pnp?

santino:
ok thanks.. sorry bout that.. i am going to be using 3v in the end.. so should i change my 220 to 100?

Resistor selection may require some experimentation with your particular display.

and should i change my pnp to a 4403 pnp?

Most any general-purpose small-signal PNP type should work. I might have actually built the thing with 2N3906s, I forget...

well then i dont get it?? my display still wont work right.. ugh.. is my code right?

santino:
well then i dont get it?? my display still wont work right.. ugh.. is my code right?

Can't see near enough of it to tell. Post it all, please.

Oh, if you're using PNP high-side drivers, the code needs to keep all the bases pulled HIGH except for the one digit being displayed, pull that one LOW. Looks to be backwards in the code above.

santino:
ok so i ran this code on my break out using this
now i have NO resistors and NO transistors

Bad idea. Even if Sparkfun does it, it's still a bad idea.

.. i was just doing this just to see what it displays quickly and it shows the code no issue? ..
so i move back to my MAN71A seven segment displays and i dont get the same feedback? i am using 220ohm res and pnp transistors? whats the big difference in these displays?

It's not the displays, its the transistors. They invert the logic for the digit drivers. Have you changed your code as described in Reply #21?

With the transistors (and resistors) in the circuit, the Sparkfun code should work if

#define DIGIT_ON  HIGH
#define DIGIT_OFF  LOW

is changed to

#define DIGIT_ON  LOW
#define DIGIT_OFF  HIGH

i dont see that part in my code? can you tell me what section i am suppose to modify.. this code was written for me.. so i dont understand this very much. what am i suppose to change in my code?