Pages: [1] 2 3   Go Down
Author Topic: seven segment display help  (Read 2205 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* test pcb.jpg (23.26 KB, 439x585 - viewed 29 times.)
« Last Edit: July 27, 2014, 12:43:35 am by santino » Logged

West Yorkshire, UK
Offline Offline
Edison Member
*
Karma: 50
Posts: 1480
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 152
Posts: 5757
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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"
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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".
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i have bc337 NPN transistors does that work?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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..
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27425
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

They will if your code is multiplexing properly.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

West Yorkshire, UK
Offline Offline
Edison Member
*
Karma: 50
Posts: 1480
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 28, 2014, 01:46:11 am by PaulRB » Logged

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 95
Posts: 4094
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* mpx.png (43.66 KB, 1869x680 - viewed 28 times.)
« Last Edit: July 28, 2014, 09:50:46 pm by Jack Christensen » Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Newbie
*
Karma: 0
Posts: 43
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Grand Blanc, MI, USA
Online Online
Faraday Member
**
Karma: 95
Posts: 4094
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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...
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1] 2 3   Go Up
Jump to: