Learn Counter ICs Using an Arduino

 by laserjocky
Featured
SDC10007.JPG
Have you ever needed to count something? Sure, we all need to count change, count blessings, and occasionally count cards, but that's not really the kind of counting I'm talking about. In this Instructable, I will elucidate how Counting ICs operate, and show how to connect one to a microcontroller so you can see exactly how it works in a controlled way.
 
Remove these adsRemove these ads by Signing Up

Step 1: Why Use Counting ICs?

Yes, yes, why not just use the microcontroller? Arduinos are pretty good at counting things. But what if you want a cheap hardware solution that operates with events as fast as 30MHz? That's what counting chips are for.

My work in the atom optics lab at my university has taken me through some real twists and turns. I've learned more in my two years as an intern there than I have in most of college, and it's way more rewarding than turning in homework. If you ever have the chance to work in a university laboratory, take it, no matter what. You'll never regret it. One of the things I've had to learn pretty thoroughly is electronics, since one of my duties is troubleshooting electronics and occasionally building additions and hacks to them. My most recent project brought me face to face with digital counting ICs.

The project involved using a Michelson Interferometer to compare the relative wavelengths of two lasers by counting the number of fringes of each beam when a retro-reflector cart was translated across the beam paths, thus changing the path lengths of both beams by identical amounts. Light has such a short wavelength that moving the cart even as slowly as a few centimeters per second produces fringe patterns at around 150kHz. The interferometer operation simplifies down to the relation:

λ21(N2/N1)

where λ is the wavelength of a laser, and N is the number of fringes produced by translating the cart a certain distance. So if we know one laser pretty well, we can find the wavelength of the second laser by counting their fringes. For light being measured by translating the cart over 1 meter, N is going to be around 40 million. Try counting that by hand. No, we need high speed event counting methods.

Another use would be in something like a Geiger counter. If you need to know how much radiation you've been exposed to, you can hook up a traditional Geiger counter to a counter IC and count the number of radiation events, then use the appropriate math to convert the radiation count to rads.
TedRobotBuilder says: Nov 23, 2012. 2:42 PM
Nice! Do you know of a counter IC that can count up and down out to a Long, has serial out and is fairly easy to use with an Arduino? I am looking for something to count the output of a LS7183 CMOS. Thanks!
laserjocky (author) in reply to TedRobotBuilderNov 23, 2012. 7:17 PM
My experience with serial output is nonexistent, unfortunately. If you're having trouble finding a counter with built in serial output, you could use a Shift Register to convert parallel counter output to a serial signal, but it might take some doing.

According to the LS7183 datasheet, the 40193 counter can be used as an up/down counter, but it's 4-bit parallel.
TedRobotBuilder in reply to laserjockyNov 23, 2012. 8:51 PM
Thanks for the reply! :D
crackHacker says: Mar 19, 2012. 8:41 AM
to be honest i came into this one thinking i would be able to count the number of ICs attached to the circuit.

love counters though great how to on them!
laserjocky (author) in reply to crackHackerMar 19, 2012. 5:47 PM
To be completely honest I wasn't expecting this to be on the homepage.
laserjocky (author) in reply to crackHackerMar 19, 2012. 5:46 PM
Ah yeah, I was being a little funny on the title, but maybe that wasn't such a good idea.
omnibot in reply to laserjockyMar 20, 2012. 1:33 AM
Oh no, I thought the same but after reading this I'll know what to expect next time.
laserjocky (author) in reply to omnibotMar 20, 2012. 1:49 AM
Haha, ok I've modified the title. From now on I'm going to save the bad humor for the actual instructions ;)
crackHacker in reply to laserjockyMar 20, 2012. 3:46 PM
title is better! maybe you could do one on flip flops leading into this?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!