Monday, February 10, 2014

testing out a CD4017B (decade counter) chip

I watched Collin's Lab: Circuit skills - LED matrices and got inspired to make up this diagram:

You can choose a column (or even a pattern of columns) with the first three switches and then enable it on a given row with the second three.

I have a 'decade counter' chip called the CD4017B and basically it counts up to 10, so I thought I could use it to drive the LED matrix - but I wanted to build a simple test circuit with it first so I made up the following schematic and built it:

There is a button which is pulled-up again, the idea is that you press it and the counter steps one place - so every 10 presses the LED should go on.

I had come across this example circuit:

technologystudent.com/elec1/count1
which helped me design mine. I was worried about short-circuits in connecting the 9V battery directly to the VDD (VCC) and VSS (GND) pins but there is a good reason for this:

A resistor will confuse the microchip and things will be unpredictable. The current would change depending on what it's doing which will change the voltage through the resistor and it might randomly go lower or higher than the chip expects.

so once I felt brave enough to connect it up, I tried it out and... nothing happened.

I looked around a little bit and found this:
allaboutcircuits
which shows that the clock enabled and Rst pins are connected to ground. So I've added that to my schematic, and the breadboard and it worked perfectly!

next I can build the LED matrix and have a go with that, but I don't think I can fit it on the breadboard so I'm not sure how to deal with that..



I built the LED matrix circuit on the breadboard:


and it worked fine! as long as you have the 10k resistor to activate the transistors it does let you select an LED by row/column.

Then I tried making the decade counter enable the lines in order but there just wasn't enough space on the breadboard to pull off this:

 So I just set it up to select 3 different LEDs in sequence:

Next I want to try connecting teensy to it in some way, but I'm not sure how yet.

No comments:

Post a Comment