element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
The Learning Circuit
  • Challenges & Projects
  • element14 presents
  • The Learning Circuit
  • More
  • Cancel
The Learning Circuit
Documents The Learning Circuit 74: How to Make Chase Lights with a Decade Counter
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
The Learning Circuit requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Engagement
Author: tariq.ahmad
Date Created: 23 Jun 2020 5:30 PM
Last Updated: 26 Aug 2020 3:24 PM
Views: 1067
Likes: 4
Comments: 10
Related
Recommended

The Learning Circuit 74: How to Make Chase Lights with a Decade Counter

How to Make Chase Lights with a Decade Counter

The Learning Circuit | element14 presents |  Project Videos

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

 

Karen is making a robot with lots of flashing lights. But the Arduino she’s using to control the circuit has limited I/O. After learning about 555 timers and decade counters, Karen discovered that she can combine them to animate the lights in her robot reducing the outputs needed on the Arduino from ten, down to one. Decade Counters use a clock signal to cascade a high output signal across 10 outputs. Karen shows how to make an astable oscillator circuit with a 555 timer to create the clock signal needed for the decade counter. Then shows how to set up a circuit with 10 LEDs, one for each output. She also shows how to use transistors and relays for applications that require a higher current draw.

 

 

Bill of Material:

 

 

Product NameManufacturerQuantityBuy KitBuy Kit
74HC4017E -Decade Counter / Divider, 2 V to 6 V, DIP-16TEXAS INSTRUMENTS1Buy NowBuy Now
CD4026BE -Decade Counter / Divider, 16 MHz, 3 V to 18 V, DIP-16TEXAS INSTRUMENTS1Buy NowBuy Now
CD74HC4017E -Decade Counter / Divider, HC Family, 60 MHz, 2 V to 6 V, DIP-16TEXAS INSTRUMENTS1Buy NowBuy Now
CD4022BE -Decade Counter / Divider, 11 MHz, 3 V to 18 V, DIP-16TEXAS INSTRUMENTS1Buy NowBuy Now
CD74HCT390ECD74HCT390E - Decade Ripple Counter, HCT Family, 27 MHz, 4 Circuits, 4.5 V to 5.5 V, DIP-16TEXAS INSTRUMENTS1Buy NowBuy Now

  • clock signal
  • e14presents_makerkaren
  • clock pulse
  • oscillator
  • the learning circuit
  • 555 timer
  • astable
  • decade counter
  • timer circuit
  • Share
  • History
  • More
  • Cancel
Anonymous

Top Comments

  • duckiethedragon
    duckiethedragon over 1 year ago +1

    Hi! Could  you instead connect the LED anodes to the output pins of the 4017 and connect all the cathodes to ground through a single resistor? It seems to have the same effect  and takes up less space, but…

  • makerkaren
    makerkaren over 1 year ago +1

    Here's the breadboard layout with 10 LEDs for anyone that would like it. (The resistor values may not be accurate.)

  • makerkaren
    makerkaren over 1 year ago in reply to periodic +1

    That's awesome! Thanks for taking the time to figure that out and for sharing it.

  • goldee
    goldee over 1 year ago in reply to makerkaren

    I got it work with 9 in series, I think my issue comes in when I add my second CD4017 to use in a matrix configuration. "R1 , R4 , R5 , and R6 are usedfor current limiting; R7 , D4 , D5 , and D6 form an OR gate" the article says to form an OR gate but now that i think of it wouldn't it need the AND state of the button press?  I had a circuit kinda working in the bread board, but each key would repeat it's column so "1, 4, 7" "2,5,8" and "3,6,9" would repeat if I pressed just 1 of 3.    I'm going to get more familiar with diode logic and try a matrix again.

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 1 year ago in reply to DAB

    If it makes you feel even better, I recorded this before I read those other comments about using a conductive pointer.

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • DAB
    DAB over 1 year ago

    Another good project.

     

    Also, thank you for using a non-conductive pointer when tracing out your circuit on the breadboard.

     

    DAB

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 1 year ago in reply to goldee

    Ok, so it looks like this circuit requires 3 pins on the MCU for the 4017 and potentially just one more per additional 4017. I'm going to walk through how this works to make sure I understand and so we're on the same page. I'm also including the schematic for reference.

    So the MCU can reset the 4017(Pin 2->15). It can control the clock, so it should know which output of the 4017 is high at any time (Pin 3->14). Each output passes a high signal and each passes through a button. If the button is not pressed, the MCU will detect a low signal at that time. If the button IS pressed, the MCU can detect the high signal at that time. Since the MCU knows the timing and can determine which 4017 output should be high at any time, it can use that information to determine which output is sending a high signal through whichever button at any given time, so all buttons can be connected to one input on the MCU and you get a matrix of 9 buttons that can be detected by a single MCU pin.

    Does this all sound correct?

    To add a second 4017, in theory, you would only need one additional MCU I/O pin to detect the 9 additional buttons, because you could tie the clock pins and the reset pins of each chip together, requiring no additional MCU pins. However, there may be voltage or current limitations that could mean you actually need 3 MCU pins per 4017. But you'd need to check data sheets of the 4017 and your MCU for that. If that's the case. You may be able to use transistors to power the clock and reset pins for the 4017s, which would only require two total MCU pins. However, that could potentially cause delays in the clock signal maybe? Again, you'd need to check the data sheet of the transistor to see if there is a ns delay or anything.

    Other than that, it seems it would come down to code.

    Does that all make sense and seem to be in line with what you're doing? If that doesn't help you figure out your problem, can you provide more information about where you are having problems?

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 1 year ago in reply to duckiethedragon

    Since, in theory, only one output pin would send a high voltage at any time, I believe you could use only one resistor.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 1 year ago in reply to periodic

    That's awesome! Thanks for taking the time to figure that out and for sharing it.

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • makerkaren
    makerkaren over 1 year ago

    Here's the breadboard layout with 10 LEDs for anyone that would like it. (The resistor values may not be accurate.)

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • goldee
    goldee over 1 year ago

    I've been trying to use 2 4017 to make a scanning matrix for a keypad matrix using 3 pins on an MCU.    I found this git by majicdesigns which refers to this article. In theory I should be able to control 100 keys, but currently I'm having issues with 12.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • duckiethedragon
    duckiethedragon over 1 year ago

    Hi! Could  you instead connect the LED anodes to the output pins of the 4017 and connect all the cathodes to ground through a single resistor? It seems to have the same effect  and takes up less space, but are there drawbacks to doing it this way? This is for the single LED per pin.

    • Cancel
    • Up +1 Down
    • Reply
    • More
    • Cancel
  • periodic
    periodic over 1 year ago

    Hi, in last video was mentioned KITT effect, with this counter 4017 it could be done like this (right part of scheme):

    You don't have permission to edit metadata of this video.
    Edit media
    x
    Upload Preview

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube