NAND only freq. counter - Page 1
Forum section: electronics / projects

author: GK
author_rank: Super Contributor
timestamp: April 04, 2015, 02:55:42 am
content: I'm vegetating a bit here at my electronics bench ATM as I wait for parts on back-order and project funds are on hold for home maint. stuff. This is what I knocked up yesterday afternoon as a diversion from my major projects.I'm going to need a frequency counter to monitor the synth for my 630m TX in my exciter rack. I have a bunch of these old ZM1050 neon display/indicator tubes, which I figured would make for a nice visual readout. These rare indicator tubes were originally designed as a nixie substitute as when nixie tubes first appeared there was a dearth of economical H.V. switching transistors available to drive them. The ZM1050 has a trigger electrode for each neon light and can be driven from logic-level signals as low as 5V - no expensive HV transistors required. Unfortunately for Phillips/Mullard, shortly after they put the ZM1050 to market affordable H.V. transistors arrived and their unique little neon indicator device went instantly obsolete.So I wired up a B.C.D. counter and a decimal decoder to test the tubes out, but with a twist. A uC would be the most practical way to implement a freq. counter, but that is pretty BORING. So I did it entirely in NAND gates - 74HC00 to be precise. It's pretty basic. There are just four pure-edge-triggered slave/master DFF's configured as a ripple counter, that resets to 0 on count 10(bin). The B.C.D. to decimal decoder is of the weighted "pyramid" configuration, which is the most economical on NAND gates that I am aware of.Note that a counter and display decoder for a freq. counter would require a latch between the B.C.D. counter and the decoder. I didn't prototype the latches as that would have required an additional four 74HC00's and I only had one.Unfortunately most of my ZM1050 are stuffed. They were originally salvaged from a seismic chronograph and ran for years 24/7. Most of them no longer trigger properly. So to implement my freq. counter I have decided to use jumbo 7-segment LED displays instead, which means that now I am going to have to embark on the comatose task of wiring a B.C.D. to 7-segment decoder, which unfortunately will take a fair few additional NAND gates.I intend to build the counter 100% entirely with NAND gates. Even the high-gain signal input amplifier and be implemented with NAND gates forced to operate in analogue mode. This will be a 6-digit counter with a fixed gate period of 1s (the 630m band is 500 kHz). After this is spun off I'll do an other counter for my H.F. band(s) exciter entirely in NOR gates.

author: GK
author_rank: Super Contributor
timestamp: April 04, 2015, 06:19:59 am
content: QuoteDone. Now I just need to implement leading digit supression I/O. LED-segment drive capacity will be implemented by putting gates in parallel if necessary.

author: GK
author_rank: Super Contributor
timestamp: April 04, 2015, 09:49:54 am
content: OK, I've completed the logic design for a complete single digit counter card and have it 95% drafted. These cards are just cascaded for how many number of digits the counter needs to have. There will be a second circuit board for the counters clock/timebase, signal amplifier input and control.I managed to fit it into 33 74HC00 packages. Two gates are unused for 130 NAND gates in total. The 7-segement outputs are active low, for common anode displays. This is just a rough view of the complete circuit logic diagram, I still have to finish drafting it and then thoroughly check it over before starting the PCB layout.EDIT: there is a wiring error in the diagram above for the display decoding of the "e" segment.

author: Thor-Arne
author_rank: Unknown
timestamp: April 04, 2015, 01:08:42 pm
content: NiceHope you post a image the pcb

author: Vgkid
author_rank: Super Contributor
timestamp: April 04, 2015, 04:59:11 pm
content: That will be impressive when finished.

author: GK
author_rank: Super Contributor
timestamp: April 06, 2015, 05:04:56 am
content: Quote from: Thor-Arne on April 04, 2015, 01:08:42 pmI stuffed it onto a super home-brew friendly single-sided layout with a 100 thou grid and 50 thou tracks. The etch tank is heating up. It's a pretty big board though. This counter is going to require a 4U rack case.

author: Thor-Arne
author_rank: Unknown
timestamp: April 06, 2015, 07:05:34 am
content: Impressive that you got to fit all that onto a single sided board.

author: GK
author_rank: Super Contributor
timestamp: April 06, 2015, 09:03:02 am
content: There may be a wire link or two

author: rob77
author_rank: Super Contributor
timestamp: April 06, 2015, 09:09:29 am
content: Quote from: GK on April 06, 2015, 09:03:02 am1 or 2 means 12 or 21 ?btw... really nice project

author: Thor-Arne
author_rank: Unknown
timestamp: April 06, 2015, 11:11:59 am
content: I expected some links, still impressive.Sometimes I struggle to get counter circuits to fit on a two layer board, even with wire links.

author: ConKbot
author_rank: Super Contributor
timestamp: April 06, 2015, 12:11:51 pm
content: Nice work, lots of Karnaugh maps and boolean math? Jeeze its been a while since I could say Ive done any work like that.

author: GK
author_rank: Super Contributor
timestamp: April 06, 2015, 01:26:32 pm
content: Quote from: ConKbot on April 06, 2015, 12:11:51 pmJust a little of the latter.

author: GK
author_rank: Super Contributor
timestamp: April 06, 2015, 01:28:31 pm
content: This evening I got the 14 IC's of the B.C.D. counter loaded. The scope shot shows the counter B.C.D. outputs cycling 0 through 9.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: April 06, 2015, 05:21:27 pm
content: Nice scopes. What's with that gap in the 545's side panel?

author: GK
author_rank: Super Contributor
timestamp: April 08, 2015, 02:14:00 pm
content: Quote from: Alex Eisenhut on April 06, 2015, 05:21:27 pmThe side panel is just be***snip***...follows:EDIT:Oops, just killed this post and erased almost all of the content. Wanted to quote a section of it but clicked "modify" instead.

author: phenol
author_rank: Regular Contributor
timestamp: April 08, 2015, 05:52:13 pm
content: How about using linearized 74HCU04 in the frontend?a year ago i too made an all discrete CMOS logic freq 8-digit counter, but it wasn't just NANDs that I used. the frontend consists of a broadband discrete transistors amp feeding a 74AC132 gate. it's all ac coupled and the lower freq limit is in the low 100s of kHz...but it's sensitivity is <8mV up to 210MHz. This is the point where the 74AHC74 divider after the '132 squarer craps out.

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: April 08, 2015, 07:13:36 pm
content: Quote from: GK on April 08, 2015, 02:14:00 pmI was hoping you'd know what this is for. I don't see it in any pictures of other scopes, and it's not on the mechanical diagram.It looks like something hooks in there.

author: GK
author_rank: Super Contributor
timestamp: April 09, 2015, 12:09:33 pm
content: Quote from: phenol on April 08, 2015, 05:52:13 pmWell, I just have this weird desire to do it all in NAND gates.

author: GK
author_rank: Super Contributor
timestamp: April 09, 2015, 12:10:41 pm
content: Quote from: Alex Eisenhut on April 08, 2015, 07:13:36 pmDunno. My 545 panel doesn't have any holes in it where the bend is and none of my other 5XX series scopes have one of those.

author: GK
author_rank: Super Contributor
timestamp: April 09, 2015, 12:15:14 pm
content: I love it when I solder all of the bits to the board, wire it up and it just works

author: zapta
author_rank: Super Contributor
timestamp: April 09, 2015, 01:46:00 pm
content: Quote from: GK on April 09, 2015, 12:09:33 pmReal men do it with AND gates.BTW, I like your PCB design, it has an artistic beauty.

author: harrimansat
author_rank: Regular Contributor
timestamp: April 09, 2015, 05:49:35 pm
content: You can use pnp germanium transistors...

author: GK
author_rank: Super Contributor
timestamp: April 10, 2015, 02:47:11 pm
content: Quote from: zapta on April 09, 2015, 01:46:00 pmThat would prove challenging.QuoteThanks. In the rush to get the layout to PCB I missed putting a radius on a number of the 90 degree bends. That's since been fixed.

author: GK
author_rank: Super Contributor
timestamp: April 10, 2015, 02:47:51 pm
content: Quote from: harrimansat on April 09, 2015, 05:49:35 pmNice old design!

author: GK
author_rank: Super Contributor
timestamp: April 10, 2015, 02:49:16 pm
content: Here is the completed schematic for the counter board., now that it has been built and tested. I am currently laying out the PCB for the timebase.

author: dom0
author_rank: Super Contributor
timestamp: April 10, 2015, 06:02:06 pm
content: Quote from: GK on April 09, 2015, 12:10:41 pmProbably to hold one of the small current probe amplifiers./e: Yes, look at this pic of a Type 134:

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: April 10, 2015, 06:38:00 pm
content: Quote from: dom0 on April 10, 2015, 06:02:06 pmThanks. I don't know why it suddenly became important to find out, it's been there for decades.

author: Sbampato12
author_rank: Regular Contributor
timestamp: April 10, 2015, 08:22:11 pm
content: Nice work.Last week I was looking for some only logic chips circuits, but I didn't though abou only NAND.....

author: zapta
author_rank: Super Contributor
timestamp: April 10, 2015, 08:31:46 pm
content: Quote from: Sbampato12 on April 10, 2015, 08:22:11 pmYou can have a complementary design works NOR only and then compare the two designs.In first digital design class at high school the teacher introduced the NAND gate and said that any logic can be implemented with it. I was impressed how such a simple circuit can be that versatile. His design looked like DTL if I remember correctly.Another detail that impressed me at the time was that a 741 has a gain of 10000 (that was another teacher told us)

author: GK
author_rank: Super Contributor
timestamp: April 29, 2015, 01:07:31 pm
content: Quote from: GK on April 08, 2015, 02:14:00 pmThere are a few omissions and mistakes in that diagram. The most significant is that the 20 stage ripple counter immediately following the crystal oscillator should in fact be a 19 stage ripple counter and the frequency output should be 8 Hz rather than the written 4 Hz.I almost have this part of the design built and tested. I ended up having to split it onto two separate PCB's. One PCB contains the crystal oscillator and the 19 stage ripple counter and the other PCB contains the rest of the circuitry. The latter PCB (the top board in the photo below) is complete and tested, the other board will have to wait for another evening. The boards have the same size/footprint and will be stacked, separated with spacers. I've decided to mount the 6 counter boards the same way, and this will permit me to house the whole thing in a 3U case. Now I just have to find a supplier of M3 threaded rod.Anyway, the design is now finalized and the total IC (quad 2-input NAND gate) complement is:247 x 74HC001 x 74HC1321 x 4011BThe 5V PSU regulator will be a chassis mounted LM317K (TO-3).

author: GK
author_rank: Super Contributor
timestamp: June 28, 2015, 09:10:44 am
content: This project is almost complete now. So far I have the timebase and signal amplifier boards installed and operational inside the completed chassis. These are the two stacked boards on the left. I also have two of the six digit-counter boards installed, wired and operational. The counter boards are stacked in the middle. I have the remaining four counter boards fully loaded with the exception of the wire links required by the single-sided layout. It takes bloody ages to form, insert and solder all of these damn links in place - about 3 hours per counter board, so I still have a few more hours ahead of me before I can screw the lid down on this one.

author: GK
author_rank: Super Contributor
timestamp: September 27, 2015, 01:13:49 pm
content: Finally got this slightly nutty project knocked off this evening. Tomorrow evening I'll double check the timebase calibration and screw the lid down. Over the next few nights I'll additionally write up a webpage project description. Phew, that was a bloody lot of wire links to solder in place!Leading zero suppression:

author: Sbampato12
author_rank: Regular Contributor
timestamp: September 27, 2015, 02:47:02 pm
content: Well done. Looks very nice!

author: codeboy2k
author_rank: Super Contributor
timestamp: September 27, 2015, 03:44:07 pm
content: Cool job!Now, make a frequency source that counts down like a clock.Then you will have the worlds best nand-gate clock that is also a frequency counter

author: kwass
author_rank: Frequent Contributor
timestamp: September 27, 2015, 03:47:31 pm
content: Well done! Just curious, what part of this project took you the longest time? (My guess is drilling the holes in the PCBs.)

author: Len
author_rank: Frequent Contributor
timestamp: September 27, 2015, 04:54:18 pm
content: Neat project! I'm just a bit disappointed that the timebase isn't a NAND gate ring oscillator.

author: rob77
author_rank: Super Contributor
timestamp: September 29, 2015, 12:57:10 pm
content: Quote from: Len on September 27, 2015, 04:54:18 pmit's supposed to count frequency, not making a rough guess or generate random numbers@ GK : awesome project ! well done sir !

author: GK
author_rank: Super Contributor
timestamp: September 30, 2015, 08:38:14 am
content: Thanks for the comments.I didn't get a special deal on the NAND gate ICs, but they do come cheaper in multiples of 100I didn't time myself, but I doubt that any of the boards took much longer than 15 minutes to drill. The most time consuming task by far was soldering in all of the wire links.