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 with 4015 Shift Register

Status
Not open for further replies.

katq22

New Member
Hi all, I am designing a Ball Scoreboard (You can view my progress in this thread here... ) and I am trying to work out the Outs counter. What I would like it to do is have the LED "TOP" lit up until the output Q0 on U2B in my diagram below has become active or High. (forgive me if I use the wrong terminology I have only been at this stuff for 2 weeks now. Google and forums like this are great for learning quickly)

I think a PNP transistor will do what I want but I am not sure how to use it.

I believe the rest of it is correct (except the resistors on the LEDs) and functions the way I would like.

If this is wrong or could be done better another way please feel free to correct me or point me in the right direction.

Thanks
Ben
 

Attachments

  • Ball and Strike Counter INCPLT.JPG
    Ball and Strike Counter INCPLT.JPG
    40.1 KB · Views: 2,042
Hi all, I am designing a Ball Scoreboard (You can view my progress in this thread here... ) and I am trying to work out the Outs counter. What I would like it to do is have the LED "TOP" lit up until the output Q0 on U2B in my diagram below has become active or High. (forgive me if I use the wrong terminology I have only been at this stuff for 2 weeks now. Google and forums like this are great for learning quickly)

I think a PNP transistor will do what I want but I am not sure how to use it.

I believe the rest of it is correct (except the resistors on the LEDs) and functions the way I would like.

If this is wrong or could be done better another way please feel free to correct me or point me in the right direction.

Thanks
Ben

hi,
Have you considered this,
Connect a 180R resistor to +5V and the other end to the anode of the LED and the cathode of the LED to Q0.

While Q0 is low the LED is ON, when Q0 is high the LED is OFF...:)

Have I understood your question correctly.?

EDIT: there is no limiting resistor in the top LED D6, it will blow if you power up.!
 
Last edited:
Look at this change.
 

Attachments

  • esp02 Aug. 21.gif
    esp02 Aug. 21.gif
    70.5 KB · Views: 465
No I had not but it seems to work correctly in CircuitMaker. I will go this way its nice and simple. (wont hurt the LED will it?) I gather you assumed it was a Red LED needing 1.7V, All I need to change is the 180R to a 150R for 2.1V for a Yellow LED, Is this correct?

Also would this work on a larger scale? cause I will also be using the output to drive a transistor to power a cluster of 5-7 LEDs. I realize that a 4017 is designed to activate each output after the other but i am trying to avoid adding another IC plus this half of the 4015 is not being used.

Thankyou very much for helping me out here.

Are there any other changes you think I should make? I think it all looks pretty good now.

Ben
 

Attachments

  • Ball and Strike Counter INCPLT2.JPG
    Ball and Strike Counter INCPLT2.JPG
    40.6 KB · Views: 439
No I had not but it seems to work correctly in CircuitMaker. I will go this way its nice and simple. (wont hurt the LED will it?) I gather you assumed it was a Red LED needing 1.7V, All I need to change is the 180R to a 150R for 2.1V for a Yellow LED, Is this correct?

Also would this work on a larger scale? cause I will also be using the output to drive a transistor to power a cluster of 5-7 LEDs. I realize that a 4017 is designed to activate each output after the other but i am trying to avoid adding another IC plus this half of the 4015 is not being used.

Thankyou very much for helping me out here.

Are there any other changes you think I should make? I think it all looks pretty good now.

Ben

hi Ben,
IMO its a good idea to fit a low value resistor in series with a LED when its connected to a IC pin.

Post an updated dwg showing the LED cluster.

Ref the resistor value, it [Vsupply - Vled]/0.020 [thats for 20mA]
 
Last edited:
I am trying to do something similar and I decided to go with a pnp driver for the led's on the output of the IC pins. I don't think the 4015 can sink too much current so it's probably not a good idea to connect the LED directly, as someone pointed out. That's why I'm using a pnp configured to saturate when turned on so it acts like a +5v switch. I can sink plenty of current (enough to blast an LED in fact if not connected with a series resistor) with the transistor without worrying about the IC.

Also, I had MAJOR problems with switch debounce - granted I was using a very noisy switch but even a clean switch will bounce which will affect your final count. I noticed it after hitting my counter switch about 5 times, all my output LED's were lit up (I have my counter configured as an 4 bit counter). So 5 counts ended up as 15 (maybe more, since it's only 4 bit it stopped at 15). Just an FYI - you can easily debounce using a cap and a filter configured as a low pass and adding a Shmitt trigger on the output (to eliminate oscillations)
 
With a 5V supply a CD4015 can drive an LED with only 2.2mA typically or a minimum of 1.3mA which is very dim. So current-limiting resistors will not make any difference and are not needed.

If you want the LEDs to be brighter then use a 74HC4015 that needs a current-limiting resistor for each LED. Its max allowed output current from one output is 25mA. Its max allowed total output current is 50mA.
 
With a 5V supply a CD4015 can drive an LED with only 2.2mA typically or a minimum of 1.3mA which is very dim. So current-limiting resistors will not make any difference and are not needed.

If you want the LEDs to be brighter then use a 74HC4015 that needs a current-limiting resistor for each LED. Its max allowed output current from one output is 25mA. Its max allowed total output current is 50mA.

So, there you go - a prime reason for a transistor switch on the output. The switch will act like a current amplifier so a small amount of current on the base will result in a large amount of current on the collector. I have mine biased for 50ma output current with a current limiting resistor in series with my LED - which IS needed for a transistor driver stage since that transistor can sink a lot more current than the '4015.
 
My Ultrabright Chaser project uses a 74HC4017 driving LEDs though a single current-limiting resistor. No transistors. The battery is four AA cells (6V when new). It is very bright. It pulses the LEDs for a very short duration so its battery lasts for months.
 
Well, the problem I have is I need to have multiple LED's on at once, if it's an 8bit counter I would need it to source enough current to drive 8 LED's (when the counter is full). You said previously that you can only source a total of 50ma with that chip, so that means I would still have dim LED's. My particular application is not battery based (or will be powered by Li-poly or Li-Ion) so I'm not concerned about power consumption - more so longevity of the components.

I'll take a look at that chip though, all the ones I have in my parts bin are the low power versions - and those have been there since the dawn of time.
 
For the last 40 years ordinary Cmos chips are the B version. Before about 40 years ago they had the A version that had much less output current.

Why limit the supply to only 5V? Cmos works much better at 10V and 15V. Then the output current is typically 14mA and 27mA. But at 27mA the output transistor will fry without a current-limiting resistor.
 
Not sure what the remark regarding 40 years was, but my point was those are what I have in my bin. The reason I limit to 5V is because it's a microprocessor application and I don't want to have to deal with different voltage levels. I'm talking about a specific application, not in general and I am by no means trying to say you don't know what you are talking about so if I offended you I am sorry. I am speaking from my experience, I have the low power versions in my bin - that's it - how they got there I don't know. I'm a digital guy, not an analog/audio guy so I don't know about all that complicated mumbo jumbo. For me it's 5V (or 3.3V) or 0V - everything else in between is for those DSP guys. :p
 
More than 40 years ago they made the CD4015A. It was very low current. It was not marked "A". Then about 40 years ago they improved the CD4xxx series and from then on they made the CD4015B. All of the improved ones are marked with the "B".

The 74HC4015 and other HC ones are different and are much faster with much more output current. They are "high speed" Cmos.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top