Author Topic: Large Binary Counter Project  (Read 4930 times)

0 Members and 1 Guest are viewing this topic.

Offline Devin BlackTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Large Binary Counter Project
« on: April 27, 2017, 07:39:01 am »
For this project, I want to try and make a large binary count of around 50 LED's.  So, in short I want to try and connect multiple cd4060 binary counters togther in order to make an extremely long chain of LED's flashing in a binary format.  What is the best way to link them together.  Can I link the IC's in series?  Thanks.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Large Binary Counter Project
« Reply #1 on: April 27, 2017, 07:54:07 am »
You can link them in series, you would connect Q14 (/16384) output to the next chips clock input,

So for 50 LED's you would have 5 chips, just know that its not a true binary clock as this chip doesnt make available /2, /4 or /8 meaning the previos stage would need to cycle 16 times to update the second stage,

You would likely be better off with a 74HCT4040, which is just a bunch of flip flops in series, 12 per chip, so lets say 4 chips for 49-50 leds' s
with this chip it would involve linking Q11 of the previous chip to CP of the next to series them,

Just be aware, unless your input frequency is very high, you will never see the last LED toggle, for 50 stages, it would take 3.6 years with a 10MHz input.
and you will likely want some local holdover power source because you cannot set it back as it was when a blackout occurs.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1352
  • Country: si
  • I like to measure things.
Re: Large Binary Counter Project
« Reply #2 on: April 27, 2017, 07:54:13 am »
Can I link the IC's in series?
Yes.

But why would you want a 50-bit counter? It means that you would be counting up to 1125899906842624 (not a typo). Even with the highest counting frequency (12 MHz), it would still take this thing 3 years to count through the whole range of values. What is the point? :-//
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: Large Binary Counter Project
« Reply #3 on: April 27, 2017, 08:02:11 am »
The 4060 is not a good choice for this. It's a 14 bit binary counter but only 10 of the counter outputs are connected to a pin.  The 1,2,3 and 11 outputs are missing so the LEDs will not be blinking in a pure binary pattern.
 

Offline Devin BlackTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Large Binary Counter Project
« Reply #4 on: April 27, 2017, 08:08:33 am »
What would be the best ic to make a large binary counter like this?
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: sk
    • My site
Re: Large Binary Counter Project
« Reply #5 on: April 27, 2017, 08:37:24 am »
Quote
What would be the best ic to make a large binary counter like this?
An FPGA/CPLD would to it in one IC :)

That said the 4040 ( http://assets.nexperia.com/documents/data-sheet/74HC_HCT4040.pdf ) IC would do what you want and you can link them together easily.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline Paul Moir

  • Frequent Contributor
  • **
  • Posts: 926
  • Country: ca
Re: Large Binary Counter Project
« Reply #6 on: April 27, 2017, 09:06:22 am »
You know if you clock that thing at around it's maximum 20MHz frequency, it'll be a couple of years before the 50th LED winks on right?
 
The following users thanked this post: alexanderbrevig

Offline Devin BlackTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Large Binary Counter Project
« Reply #7 on: April 27, 2017, 04:41:29 pm »
What would be the benefit of using the 4040 over the 4060?
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: sk
    • My site
Re: Large Binary Counter Project
« Reply #8 on: April 27, 2017, 06:12:55 pm »
The 4040 is a binary counter that has effectively a Divde by 2, 4, 8 output. The 4060 starts at Divide by 16.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline Devin BlackTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Large Binary Counter Project
« Reply #9 on: April 27, 2017, 06:44:32 pm »
Why would it make it better for this case, is it more efficient, fast, looks nicer...?
 

Offline ynfo

  • Contributor
  • Posts: 20
  • Country: gb
Re: Large Binary Counter Project
« Reply #10 on: April 27, 2017, 07:08:23 pm »
Here is an analog equivalent I spotted at the the MIT museum.

Twelve gears in series each with a 50:1 reduction. The input shaft turns at 200 rpm and the output shaft turns so infinitesimally slowly it can be fixed in concrete!
 

Offline theatrus

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Re: Large Binary Counter Project
« Reply #11 on: April 27, 2017, 10:10:13 pm »
Clocks are fun gadget projects. I second the suggestion of not just using direct counters since setting the clock will be a lot harder.

Electro-mechanical clocks using non-standard mechanisms are also fun - how about using peristaltic pumps for a water/oil clock?
Software by day, hardware by night; blueAcro.com
 

Offline GeorgeOfTheJungle

  • Super Contributor
  • ***
  • !
  • Posts: 2699
  • Country: tr
Re: Large Binary Counter Project
« Reply #12 on: April 27, 2017, 10:16:53 pm »
Clocks are fun gadget projects. I second the suggestion of not just using direct counters since setting the clock will be a lot harder.

74LS193/74HC193 + a switch per bit รก la Altair ?

« Last Edit: April 27, 2017, 10:40:54 pm by GeorgeOfTheJungle »
The further a society drifts from truth, the more it will hate those who speak it.
 

Offline DaJMasta

  • Super Contributor
  • ***
  • Posts: 2303
  • Country: us
    • medpants.com
Re: Large Binary Counter Project
« Reply #13 on: April 27, 2017, 10:58:58 pm »
I just did a project chaining 74HCT4040s and it's worked great, as mentioned you just use the output of the highest bit on the first counter into the clock on the next.  If you are concerned with current draw, you can buffer the bits before driving your LEDs, but the outputs are plenty for low-brightness LEDs.  Also the 74 series chips are usually rated for faster clocks, if that counts for anything in your design.  I ran my 74HCT4040s at 32MHz, though there was a different manufacturer that only rated them to 32MHz at 6V.  That said, there was a more expensive variant that could go up to 70 or 80MHz.



The one thing to be careful is to be wary of 14 bit counters.  Basically, they work fine, but they are put into packages that are too small to break all the outputs out, so generally bits 2 and 3 are missing and are only internal.  If you're just concerned with the top end of the count, then it's fine, but if you want the detail in the lower end, there is no way to get that data without another chip or something.  No idea why they fit them into the same package as the 12 bit counters, but they did, so if you want every bit exposed, you need to go with a 4040 instead of a 4060.
 

Offline Devin BlackTopic starter

  • Contributor
  • Posts: 10
  • Country: us
Re: Large Binary Counter Project
« Reply #14 on: April 28, 2017, 03:20:03 am »
awesome, thank you guys so much, I will try and use all this information to make the counter.  I think I am going to go with the 4040's.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Large Binary Counter Project
« Reply #15 on: April 28, 2017, 12:15:21 pm »
The 4040 does not have a spec on total allowed Vdd current. It does show
drive levels of a couple of mA, which may not be enough depending on your
LED requirements. So you would need buffers between LED and 4040. Lots
of chips.

PSOC would be a one chip 50 bit counter solution, but you may still need
buffers as its limited to total Idd current and pin current. But would save
a lot of chips. See attached pic.

You re limited to 100 mA per port, so that might work since 8 pins / port,
so you could drive ~ 12.5 mA per pin. Then no other buffers, just a 1
part solution.


Regards, Dana.
« Last Edit: April 28, 2017, 12:57:42 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Large Binary Counter Project
« Reply #16 on: April 28, 2017, 12:33:55 pm »
Here is an analog equivalent I spotted at the the MIT museum.

Twelve gears in series each with a 50:1 reduction. The input shaft turns at 200 rpm and the output shaft turns so infinitesimally slowly it can be fixed in concrete!

I suspect inspired by Arthur Gansen's work, very cool stuff!

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 7794
  • Country: ca
Re: Large Binary Counter Project
« Reply #17 on: April 28, 2017, 12:36:06 pm »
Even running multiple 74HC4040s at 32Mhz, the 50'th bit will still take over half a year before it turns on, more than a year before it goes off...  :scared:
Since you need 5 of them anyways to pass 50 bits, why not extend your LEDs to the total 60 bits available anyways & wait out the thousand years to see that last bit go!
« Last Edit: April 28, 2017, 12:38:46 pm by BrianHG »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12879
Re: Large Binary Counter Project
« Reply #18 on: April 28, 2017, 01:37:41 pm »
Assuming a well maintained server grade fully redundant DC PSU fed by independent UPSes, a well maintained triply redundant clock source, and secure bench space for the lifetime of the circuit, how many stages do you have to have before the probability of the last stage toggling once within the expected lifetime of the circuit drops below 50%?
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Large Binary Counter Project
« Reply #19 on: April 28, 2017, 02:36:19 pm »
Cleaned up schematic on PSOC design.

Note resources not used after instantiating solution, lots of other stuff you can do
with PSOC part.

Code: [Select]
Resource Type                 : Used : Free :  Max :  % Used
============================================================
Digital Clocks                :    2 :    6 :    8 : 25.00 %
Analog Clocks                 :    0 :    4 :    4 :  0.00 %
CapSense Buffers              :    0 :    2 :    2 :  0.00 %
Digital Filter Block          :    0 :    1 :    1 :  0.00 %
Interrupts                    :    0 :   32 :   32 :  0.00 %
IO                            :   53 :   19 :   72 : 73.61 %
Segment LCD                   :    0 :    1 :    1 :  0.00 %
CAN 2.0b                      :    0 :    1 :    1 :  0.00 %
I2C                           :    0 :    1 :    1 :  0.00 %
USB                           :    0 :    1 :    1 :  0.00 %
DMA Channels                  :    0 :   24 :   24 :  0.00 %
Timer                         :    0 :    4 :    4 :  0.00 %
UDB                           :      :      :      :       
  Macrocells                  :   55 :  137 :  192 : 28.65 %
  Unique P-terms              :   53 :  331 :  384 : 13.80 %
  Total P-terms               :   53 :      :      :       
  Datapath Cells              :    0 :   24 :   24 :  0.00 %
  Status Cells                :    0 :   24 :   24 :  0.00 %
  Control Cells               :    0 :   24 :   24 :  0.00 %
Opamp                         :    0 :    4 :    4 :  0.00 %
Comparator                    :    0 :    4 :    4 :  0.00 %
Delta-Sigma ADC               :    0 :    1 :    1 :  0.00 %
LPF                           :    0 :    2 :    2 :  0.00 %
SAR ADC                       :    0 :    2 :    2 :  0.00 %
Analog (SC/CT) Blocks         :    0 :    4 :    4 :  0.00 %
DAC                           :      :      :      :       
  VIDAC                       :    0 :    4 :    4 :  0.00 %


So in short I think you can do this with one part.


Regards, Dana.
« Last Edit: April 28, 2017, 02:40:02 pm by danadak »
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf