Go Down

Topic: 74hC959, 12 segment LED, npn 2222 (Read 228 times) previous topic - next topic

scouser1023

Jan 19, 2021, 04:02 pm Last Edit: Jan 19, 2021, 04:04 pm by scouser1023
Hi Everyone,
I am getting some strange results from trying to run a 12 segment led bar (KWLR1230CDUGB) with a TX74HC595 and 3 NPN2222 on the common cathodes.

I have the 595 being controlled by an arduino mini and using a voltmeter I can see all the pins rising to 4.7v in series that matches my sketch.

If I connect either of the cathode pairs directly to ground everything works as expected. As I switch the ground to each cathode pair the led segment is divided into 3 segments of LEDs 4 in each. I can turn on the green, then the red, and then both to make yellow.

When I add in a npn 2222 for a low side switch I get sporadic behavior and it looks like in some cases the expected LEDs light and then the other 2 segments are very dull.  The 3 out pins on the arduino all turn on as expected when I set them to high and show 4.7v.

I made this on a bread board and it worked. Tore it down and soldered everything on a PCB and I am having major issues.

Can someone advise on test points to further dissect what is wrong?  And can someone confirm this is the correct way to do this?

Thank you!

scouser1023

#1
Jan 19, 2021, 04:09 pm Last Edit: Jan 19, 2021, 08:14 pm by scouser1023
Okay apparently I can not attach a picture.

I am combining pins 1,14 and 9,6 and 7,8 on the led bar. These are going to one of 3 collectors on the npn 2222.  The emitters are all connected to ground.
3 outputs from the arduino are connected to a 220kohm resister and then to the base on each transistor.
The 8 lines from the 74HC959 are connected to 8 120k resisters and to the LED Bar anode lines.

MarkT

#2
Jan 19, 2021, 04:15 pm Last Edit: Jan 19, 2021, 04:17 pm by MarkT
Forgot the decoupling capacitor for the '595?

Hang on, 120k base resistor ?????   Way way way way way too large.  Try 220 ohms.

The LED series resistors would normally be in the hundreds of ohms to 1k or so range.
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

scouser1023

#3
Jan 19, 2021, 04:19 pm Last Edit: Jan 19, 2021, 04:21 pm by scouser1023
Ummm no capacitors on anything.  Will take a look at that. I assume that goes between the power rail and the vcc on the 595?  And this did work on a bread board just must have messed something up when moving to a board.

aarg

#4
Jan 19, 2021, 04:27 pm Last Edit: Jan 19, 2021, 04:28 pm by aarg
Quote
Okay apparently I can not attach a picture.
Forum software has a "gotcha", it rejects images with certain meta-data embedded. Load the image file in a graphics program like "paint" and then export it from there, add it as an attachment to the post.

But what the heck is a NPN2222? Never seen that part before... :)
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

scouser1023

Lol easy now I am new to this!  That's my new design of transistor lol.

raschemmel

Anyone know why I can't find a datasheet for a 74HC959 ?

scouser1023

Just look up SN74HC595 and it will come right up.

scouser1023

Sorry changed the above. I am using 220ohm resisters on each led in the bar and on the 3 base connectors of the transistors.  Will add a cap to the 595. But this was working on a breadboard. I have moved it to a blank pcb and soldered everything up.
I have used a voltmeter and see what I would expect on the 595 and arduino outs.  If I skip the transistors and take the bar right to ground it works. So I have an issue with the transistors and don't know how to trouble shoot it. There are only 3 connections on each so it seems like it should be simple and work. Guess I need to go back to the breadboard. Or duplicate all 3 transistors on a breadboard and run jumpers from the PCB to test. Total pain now it's all soldered up.

aarg

#9
Jan 19, 2021, 11:25 pm Last Edit: Jan 19, 2021, 11:27 pm by aarg
Post a schematic. I told you how to fix the upload issue. Since you say it worked on breadboard and not on soldered proto board, please add close up images of the soldered board and everything around it.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

aarg

Lol easy now I am new to this!  That's my new design of transistor lol.
It's not about you. In engineering, one digit or one wire is all it takes to make the difference between a modern miracle and a useless pile of junk.
  ... with a transistor and a large sum of money to spend ...
Please don't PM me with technical questions. Post them in the forum.

raschemmel

Quote
Just look up SN74HC595 and it will come right up.
So what's the connection between the 74HC959 and the 74HC595 ?
The first one doesn't come up anywhere and the second one comes up everywhere.
Did you just type in the wrong number ? Where did you get the number 74HC959 ?

MarkT

You give people copy and paste and they still prefer to mistype part numbers - why why why?  :)
[ I DO NOT respond to personal messages, I WILL delete them unread, use the forum please ]

raschemmel

#13
Jan 20, 2021, 04:47 pm Last Edit: Jan 20, 2021, 04:48 pm by raschemmel
Quote
You give people copy and paste and they still prefer to mistype part numbers - why why why?
I guess that would explain it.
I suppose it would be futile to ask the OP to edit his OP and change the title to the correct number...

Paul__B


Go Up