CMOS 4017 Decade counter, can I sync and source the same output?

Discussion in 'The Projects Forum' started by Dead Crow, Mar 9, 2010.

  1. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    Hi I have only recently read about sync and sourcing. I have made a simple circuit which uses a NE555 timer and a 4017 Decade counter to simply, as each output comes on it turns on a LED then as it goes off the next starts etc. I was just wondering if i can use the outputs when they are low to switch on other LEDs by supplying VS to the LED (obviously in the opposite direction as the LED which comes on when the output is high):D AM I BEING DUMB?
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, it's "sinking" current and "sourcing" current.

    Yes, you could do that. Keep in mind that you'll get the 4017 mighty toasty if you're sinking current from a bunch of LEDs. It's best if you keep the current per output under 4mA.
     
    Dead Crow likes this.
  3. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    Actually I've used it with 10ma for literally decades on the same part, but it is outside the specs. There has been some debate as to the actual spec, but as I interpret the data sheet it is 6.8ma. I wouldn't push this part too hard though, else Wookie's interpretation becomes prophecy.

    A general rule of thumb within electronics is to keep it 50% of rated capacity, but if the circuit is not too important (just playing around) you can step out of bounds a little, as long as you're not going to freak if/when it blows.

    Have you read this?

    LEDs, 555s, Flashers, and Light Chasers
     
    Dead Crow likes this.
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It's commonplace for hobbyists fiddling around with things like solar robotics and other 'bots to abuse IC's far beyond their specified design limits.

    One big objection is that if you load 4000 series CMOS logic IC's too heavily, you are in the "forbidden zone" - neither a logic 1 nor zero. This fact has wreaked havoc on many "n00b" projects. A n00b might assume that you can both operate an LED and output a logic level from a 4000 series CMOS, and then become disillusioned when it fails to work.

    While one might get away with doing such things with some manufacturer's IC's, it is not a very good idea to do such things continually, and expect to always get away with it. Frequently, you will find yourself letting the magic smoke out of parts, even if you think are operating them within their specifications - at room temperature.

    The trouble is, parts don't stay at room temperature. When parts heat up, their limitations change. If you're operating well out of specifications at higher temperature, things "go south" in a hurry.

    My point is that this forum is primarily oriented towards the budding electronics hobbyist, who has an interest in electronics, but has limited knowledge of it. It's important that their projects be successful, as that brings a feeling of accomplishment, and that satisfaction will lead to future projects.

    Encouraging enthusiasts to stay well within all specifications of components, will help a great deal to ensure that their future projects will have a high probability of success.

    After all, if builders built buildings the same way that programmers wrote programs, the first woodpecker that came along would destroy civilization. :eek:

    In a small, one-off single IC circuit, it really does not matter that much if it breaks - unless it's your first circuit. The idea is to teach people how to make reliable "building blocks" - so that they can assemble them into larger systems that will function reliably.

    Remember the Eniac? The first general purpose computer? It broke several times a day in the first few years.
    http://en.wikipedia.org/wiki/ENIAC
    Of course, that's more dealing with the level of complexity coupled with the MTBF's of the day (Mean Time Between Failures), but such lessons learned should not be forgotten.
     
    Last edited: Mar 9, 2010
    Dead Crow likes this.
  5. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    thanks for that , sinking and sourcing, haha. I was wondering as i typed it. I will use transistors to power the leds, I need to get the right transistors the last i tried burnt out. I have some info of how to properly select them and will try expand my knowledge. The sinking and sourcing capability has really excited me to the artistic doors opened in making a really nice display eg. A bunch of bi-colour LEDs which are red when sinking and turn green when sourcing creating a green LED running through a red carpet sort of look. .. Thanks again, and its true what you say about sticking to the specifications I lost interest in electronics for a while because I tried to do things differently and it didnt work. cheers
     
  6. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    You miss a key point though, the circuit I've built has lasted 30 years, more than long enough to prove the basic concept. I always add the proviso about design, but it is possible to go to the other extreme and overcomplicate something.

    If it works, use it.

    To the OP, show us what you did (schematic). Odds are it is a simple fix. Wookie and I may disagree about minor issues, but overall we both get along pretty well, and both of us are very active here.
     
    Dead Crow likes this.
  7. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    hey thanks , i will upload the circuit soon
     
  8. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    Hi , I used a 2n3904 transistor to bring on multiple LEDs on the 4017 output with a 10K resistor in series to limit the base current. Unfortunately I didnt work out which to use ,I just copied someone elses circuit (It may have been Bills) . Looking at a datasheet I have discovered the PNP equivalent is a 2N3906 so Im going to try that out to sink bi-coloured LEDs red and source the same LEDs green when the output switches on. I surf and I cant wait to get a good wave effect going. Sorry I have not yet uploaded the circuit I will soon as possible, the problem is that the program I use is autocad and not everyone would be able to see it, but i may print and scan it at work as obviously the idea is, to share circuits.My girlfriend will never understand my obsession with LEDs:D
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Try bringing your AutoCad schematic up on the screen, size it to fill the screen, and then press Ctrl+PrintScreen or Alt+PrintScreen to capture the image of your screen in a buffer.

    Then start MS Paint, and select Edit->Paste (or press Ctrl+V) to put the image into Paint.

    Save it in .png format, as that format works great for line-drawing type images, is very compact, and it is not "lossy" like .jpg format is.

    Then attach it using the "Go Advanced", "Manage Attachments" feature.
     
    Dead Crow likes this.
  10. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    Hi its in Jpeg format, only saw Sergeant's advice now, I will try that with autocad in future. Pls excuse the rest of the circuit missing and the untidy work I was in a rush to just upload something! Ok Im not sure if I need a 10kohm resistor for the PNP transistor but I will try it out. I couldnt design a way to sink and source the same output for a Bi-colour LED without using two transistors because the cathode of the LED is common to both colours. Im sure theres a way to do it with gates... but I have never used one sooo...transistors cost about 80 south african cents .... Please advise me, I have never used a PNP transistor... Im just using the same principles as I use with the NPN type. Cheers! hope the jpeg is readable
     
  11. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    I will post a full circuit diagram soon
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Ahh, wait a minute.

    You are showing a bi-color LED using discrete LEDs which is OK, but you are showing them as having a common cathode. That won't work.

    If they are two-lead bi-color LEDs that are red when current is passed through one way, and green the other way, then you might be able to do something with them.

    If they have a single common cathode and two anodes, or a single common anode and two cathodes, your strategy will have to change.
     
  13. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    Hey sergeant, that circuit of mine works!, maybe i didnt describe the components properly. The one transistor is a pnp the other is a npn. The bi-colour LEDs I used have 3 leads in total one is a green anode the other a red anode and the other the common cathode. Thanks for your help, about 2 weeks ago I didnt even know what sinking an I.C was.I will post a full circuit diagram soon( I may have said that before...but its true)
     
  14. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your transistors are shown connected upside-down and wrong.
    1) The NPN must have its emitter at ground or have its collector at the positive supply.
    2) The PNP must have its emitter at the positive supply or have its collector at ground.
     
    Dead Crow likes this.
  15. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Do it like this:
     
    Last edited: Mar 26, 2010
    Dead Crow likes this.
  16. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    Hey thanks alot for that. I didnt think it mattered which way i connected the voltage (emitter or collector) . I obviously got lucky when I tested it because I just put the transistors on the breadboard and didnt check the emitter/ collector orientation. I see now that I must always use conventional electron flow with transistors as opposed to electron flow(using the arrows). I thought it was strange that wookie would say it wouldn't work when it did, since I have seen some of his circuits and theyre on a whole other level to this stuff.
     
  17. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    AG, you have the NPN base connected to the wrong end of the resistor.
     
    Last edited: Mar 26, 2010
  18. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Yes, I was thinking that if the output current from the CD4017 is low then the red LED will never turn off.
    The base if the NPN transistor can be driven directly from the output of the CD4017.
     
    Last edited: Mar 26, 2010
  19. Dead Crow

    Thread Starter Active Member

    Mar 6, 2010
    34
    1
    hi AG
    Should the NPN transistor not have a base current limiting resistor? I saw this on a circuit of Bill Marsdens.
     
  20. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    It is an emitter-follower so its base current is never high unless the output is shorted to ground.
     
Loading...