Is there a good counter chip?

Ask and answer questions, share tips and resources for installing lighting and other electronics in your models.

Moderators: Sparky, Moderators

Post Reply
User avatar
MillenniumFalsehood
Posts: 16992
Joined: Tue Nov 16, 2004 5:23 pm
Location: Wichita, KS, USA
Contact:

Is there a good counter chip?

Post by MillenniumFalsehood »

In this video:

http://uk.youtube.com/watch?v=BLYiVdC7I ... re=related

the phaser has a button you press that lights up a series of LEDs in sequence, one right after the other, and I was wondering what chip it was that does this. I'm pretty sure I've seen one somewhere, I just can't remember what the number was. :-k
If a redhead works at a bakery, does that make him a gingerbread man?

Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
Sparky
Moderator
Posts: 2404
Joined: Thu Jun 05, 2003 8:28 am
Location: Are we there yet? (Chicago)
Contact:

Post by Sparky »

I'm certain they're using a micro controller (PIC or stamp, or TI's mp series).

This is because not only does the button increment the LED light bar, but it also mods the action of the LED phaser light emitter and at full power the LED light bars light LED position bounces back and forth.
<a href="http://www.kc6sye.com/2_wheresaneatpart.jpg" target="_Sparky">Is this plastic thingy on the counter a neat part?</a> <a href="http://www.kc6sye.com/1_casting_inprogress.jpg" target="_Sparky">Let's cast it.</a>
User avatar
MillenniumFalsehood
Posts: 16992
Joined: Tue Nov 16, 2004 5:23 pm
Location: Wichita, KS, USA
Contact:

Post by MillenniumFalsehood »

Yes, but all I need is a chip that does the counter thing, with the number of LEDs increasing every time the button is pressed. The video is just an example of what I mean.
If a redhead works at a bakery, does that make him a gingerbread man?

Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
shotgunlebowski
Posts: 584
Joined: Sat Sep 22, 2007 1:42 am

Post by shotgunlebowski »

He's right. That's definately done with a pic/micro controller. I dont think you need anything else other than the Pic
Sparky
Moderator
Posts: 2404
Joined: Thu Jun 05, 2003 8:28 am
Location: Are we there yet? (Chicago)
Contact:

Post by Sparky »

If you just want the LED bar to increment up then reset to 0 you can use the Johnson counter, and instead of a clock hook up your switch. the Outputs will count up to 10 I believe then reset to all off.

Best to add a switch de-bouncer in there so that the button push doesn't appear to be clocking the chip in jumps.

If you need more than 10 outputs, then you can add another Johnson counter in series. You may need an AND gate to do this, but you will probably have some leftover on the chip used to de-bounce (I believe you can use AND gates as a de-bouncer).

Zog or I can draw up a circuit and if need be test it on breadboard.
<a href="http://www.kc6sye.com/2_wheresaneatpart.jpg" target="_Sparky">Is this plastic thingy on the counter a neat part?</a> <a href="http://www.kc6sye.com/1_casting_inprogress.jpg" target="_Sparky">Let's cast it.</a>
User avatar
MillenniumFalsehood
Posts: 16992
Joined: Tue Nov 16, 2004 5:23 pm
Location: Wichita, KS, USA
Contact:

Post by MillenniumFalsehood »

If you would draw up the circuit, that would be great! I knew that I knew the name Johnson counter, but I just couldn't think of it. I kept thinking it was a 40-something-or-other chip. Thanks, Sparky! :8)
If a redhead works at a bakery, does that make him a gingerbread man?

Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
Sparky
Moderator
Posts: 2404
Joined: Thu Jun 05, 2003 8:28 am
Location: Are we there yet? (Chicago)
Contact:

Post by Sparky »

You had it right a 4017 is a cmos Johnson counter.
<a href="http://www.kc6sye.com/2_wheresaneatpart.jpg" target="_Sparky">Is this plastic thingy on the counter a neat part?</a> <a href="http://www.kc6sye.com/1_casting_inprogress.jpg" target="_Sparky">Let's cast it.</a>
Sparky
Moderator
Posts: 2404
Joined: Thu Jun 05, 2003 8:28 am
Location: Are we there yet? (Chicago)
Contact:

Post by Sparky »

Shucks that wont' do it, it can produce either a walking one state or walking off state. I think a seires of flip flops will be the only way to do it, and to get a high number it'll take several chips cascaded together.
<a href="http://www.kc6sye.com/2_wheresaneatpart.jpg" target="_Sparky">Is this plastic thingy on the counter a neat part?</a> <a href="http://www.kc6sye.com/1_casting_inprogress.jpg" target="_Sparky">Let's cast it.</a>
jwrjr

Post by jwrjr »

Depending on the number of leds you can do it with a shift register and one logic chip (probably a 74hc00). but it is easiest and cost-competitive (at least) to do it with a PIC or maybe an AVR.
Post Reply