Shop OBEX P1 Docs P2 Docs Learn Events
Problems with CMOS and TTL LED flasher circuits from Forrest M. Mims III — Parallax Forums

Problems with CMOS and TTL LED flasher circuits from Forrest M. Mims III

bryan mcdonaldbryan mcdonald Posts: 27
edited 2008-05-28 13:45 in General Discussion
I was teaching my 10 year old some basics of CMOS and TTL circuitry by building up some fun circuits from Forrest M. Mims III delightful book called 'Getting Started In Electronics' (which I think is a terrific book and recommend it highly to anyone getting started in electronics since Forrest's love of electronics, positive energy and brilliance shines through). The reason I was building these low level digital logic circuits was that I wanted to contrast to my son the benefits of using a basic stamp (since one can do so incredibly powerful things with a few lines of code as opposed to having to build a few breadboards full of TTL chips).

I'm using my old TTL and CMOS chips that are well over 20 years old, am having some problems (most likely my fault) and was hopeful some of the talented people on this forum might be able to assist me. (I checked to see if Forrest had any forums but could not find any).

Please check out:
http://homepage.mac.com/sailing/7400flasher.jpg
For this circuit the 47uF caps are supposed to generate a LED flashing frequency of about 2Hz. When I wire it up (and I've wired it up at least 10 different times, starting from scratch and using many different caps and 7400 chips), the LEDs flash at the 2Hz frequency initially but then quickly get into a race condition, flash faster and faster and then stay on at virtually 100% duty cycle. I bought brand new 47uF caps just to be sure my old caps were not bad (and my capacitance meter said my old caps were ok) but still no luck. Anyone have any tips on how to avoid the race condition (i.e. just to have the LEDs flash at 2Hz or so)?

Please check out:
http://homepage.mac.com/sailing/4011flasher.jpg
This is almost the same circuit as the above but it uses one more stage of logic to drive the LEDs. When I use 47uF caps (and change to the 1K ohm pull up resistor (as contrasted with the 470 ohm resistor in the 7400 circuit), I would expect virtually the same response as the above 7400 based circuit. When I power it up (and, yes, I've built this circuit from scratch a few times to make sure my wiring is ok), I get the the LEDs to flash alternatively but over a few seconds (maybe 30), one of the LEDs gradually dims to almost not being visible (as if the gate driving it is no longer able to sink enough current). The logic is still working (i.e. no race condition as with the 7400 circuit) as the LED that is still bright is flashing at the same frequency.

Thus I get a race condition with one circuit and a dim LED with the other circuit. I think I'm doing something wrong and would appreciate some feedback or tips as to what to try next.

Yes, I am applying enough power (that seems to be a common debug tip offered by many on this board). I'm using 4 AA's that my multimeter is telling me is producing over 6v when the circuit is running.

Pictures of my set up are here:
http://homepage.mac.com/sailing/setup1.jpg
http://homepage.mac.com/sailing/setup2.jpg

I'm thoroughly vexed as to why these circuits are not working (these low level circuits should last for years of smooth operation). Forrest says he's built all the circuits in the book (I remember building a lot of them many years ago and them working fine). I'm wondering if my chips have hit the bucket and over time degraded (akin to a CD disk losing it's contents over time).

I know debugging TTL and CMOS circuits is a bit off topic so I appreciate your time in checking out this post. If others are able to build the circuits and get them to work, I'd love to learn about that.

respectfully submitted, bry

p.s. ironically, even though I bought this book at radio shack (it's catalog number 276-5003), radio shack today has NO books at all (ah, the benefits of our MTV generation smile.gif. Nor do they have any 7400's or 4011's in stock. Thankfully they still stock resistors and caps. And, in my neighborhood, they stock many parallax kits (like the PING) which is probably cooler than stocking discrete TTL or CMOS chips.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-25 17:47
    The CD4011 is not capable of driving an LED at anywhere near the current you're requiring. With a 1K series resistor, you're talking about 10-12mA. The datasheet for the CD4011 shows that it can drive maybe as much as 4mA. The chip is probably heating up and the current output drops with increasing temperature.

    The 7400 should be able to handle the output current. Exactly what kind of 7400 are you using? Now there are so many logic families and you can get 7400 pinouts with bipolar, cmos, and all sorts of voltage, current, and speed capabilities.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-05-25 18:00
    This may be a total red herring, but during part of each cycle the caps will be charged in reverse to the polarity indicated in the schematic. You might try replacing each cap with two in series, negative-to-negarive. This will effectively create a non-polarized cap of half the capacitance, which will also cut the period in half. But try it and see if the LEDs continue to flash at a constant rate.

    -Phil
  • bryan mcdonaldbryan mcdonald Posts: 27
    edited 2008-05-25 18:28
    thanks guys for the instant response! this forum rocks!

    Mike, good point. Maybe I'm using an LED that is requiring too much current...should I go with a larger series resistor?

    I tried two different 7400's...a DM7400N and an F-7400PC...just found a 7400NA...which one sould I try to prevent the race? FYI...should have mentioned this earlier but I did tie the unused inputs of the 7400 high to prevent them from going crazy without any inputs....

    Phil, curiously I measured the caps in my cap meter both forward and reversed biased and they showed the same capacitance...thus not sure if polarity is the issue...interesting idea though...
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-25 19:24
    What's happening is not what's called a race condition which is a situation where the logic equations are undefined or inconsistent like tying the output of an inverter to the input.

    Here's a version of the CD4011 circuit that uses switching transistors to drive the LEDs: www.elecfree.com/electronic/4011-dual-led-flasher/

    With the 7400 circuit, I suspect that the load from the LEDs is causing problems, either with the output voltage of the gate or overheating the device. Try a larger (like 1K) LED series resistor. The gate itself can handle the load of a single LED. Try using the other two sections of the quad gate as a buffer for the LEDs like the CD4011 circuit.
  • bryan mcdonaldbryan mcdonald Posts: 27
    edited 2008-05-25 20:32
    Thanks Mike for your very helpful feedback. I'll try your tips!

    Already tried using the 1K and buffer for the LEDs with the 7400 based circuit and that did not solve things.

    The reason I call it a race is because that's what I think is actually happening. If you took out the RC component of the 47uF cap (where the R comes from the internal resistance in the 7400), it would definitely be a race, would it not? The behavior appears to be like a race too where the frequency starts slow then speeds up to virtually 100% duty cycle (visually that is, I'm guessing a scope would show the flip flops oscillating at the chip's rise time bandwidth). Anyway, I always thought that was a race condition...I could be wrong.

    thanks again for your help, bry
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-05-26 16:17
    This thread is being moved from the BASIC Stamp Forum to the Sandbox Forum as it is off topic in the original forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • jmalaysiajmalaysia Posts: 97
    edited 2008-05-26 19:18
    The 7400 might be behaving erratically because you are exceeding the maximum allowable supply voltage of 5.25vdc.· You might try a series resistor to drop the source voltage.
  • bryan mcdonaldbryan mcdonald Posts: 27
    edited 2008-05-28 13:45
    thanks for the tip jmalaysia...i'll try that too...thanks
Sign In or Register to comment.