Experimenter Board Help

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
mikerd
Posts: 7
Joined: Fri Feb 08, 2008 7:36 pm
Contact:

Experimenter Board Help

Post by mikerd » Fri Feb 08, 2008 8:41 pm

Hello everyone,

I am a teacher who has to teach some Digital Electronics to students not knowing much myself. I've admired many of the Digital Logic Trainers I've seen (power connector, input leds, output leds, breadboard, etc) that I've seen, but we can't afford these things which are $60-200. So I decided to copycat and improvise a little. I built a prototype which seemed to work, so I built 10 more. Clearly my testing of the prototype was too simple because once my students tried using it for anything complex (like a full-adder) it was erratic. Multimeter measuring shows the voltages aren't what they should be...

I suspect in my ignorance I've messed up resistor values or some such thing. Which probably means a lot of desoldering and resoldering. At any rate, I was hoping someone might be so kind as to look at a simplified schematic of the design and let me know where I went wrong.

Input LED's are red, Output Green, resistors 1/4 watt. It really is a simple project, or so I thought.

I'd really appreciate any help you can provide.

Mike.


Image

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Re: Experimenter Board Help

Post by Bigglez » Fri Feb 08, 2008 9:17 pm

Greetings Mike,
mikerd wrote: I suspect in my ignorance I've messed up resistor values or some such thing. Which probably means a lot of desoldering and resoldering. At any rate, I was hoping someone might be so kind as to look at a simplified schematic of the design and let me know where I went wrong.
As I read your post my first though was that you are
trying to use high speed logic with slow speed stimulus
and monitoring, and your circuit is either oscillating or
reacting to glitches that are too fast to see on your tools.

Digital inputs need to be de-glitched, ordinary switches
or wire to wire attachments create unpredicatable and
undefined states.

Next, some of your LEDs have resistors, some don't. LEDs
require current limiting to work, and for most practical
circuits 5 to 10mA current will be bright in a classroom setting.
For 5mA and 5V supply the resistor drops about 3V, so
a 600 ohms resistor is required. For 10mA a lower resistor,
around 300 ohms will suffice.

Unused inputs must be tied off, you can't leave them
floating as the ambient noise will trigger the inputs.

A "trainer" teaching tool typically has buffers for the
monitor LEDs (to protect the LEDs from careless students)
and to prevent the LEDs from loading the actual circuit.

The stimulus inputs, which is often switches or push
buttons, require de-bouncing to make a clean single
transistion on command (and not rattle with extra or
spurious pulses). A R_S latch per switch or button is
usually employed.

These are all easy fixes to your current design. If my
hints are not crystal clear let me know and I'll provide
a full schematic.

Comments Welcome!

Bigglez
Posts: 1282
Joined: Mon Oct 15, 2007 7:39 pm
Contact:

Re: Experimenter Board Help

Post by Bigglez » Fri Feb 08, 2008 9:18 pm

Greetings Mike,
mikerd wrote: I suspect in my ignorance I've messed up resistor values or some such thing. Which probably means a lot of desoldering and resoldering. At any rate, I was hoping someone might be so kind as to look at a simplified schematic of the design and let me know where I went wrong.
As I read your post my first though was that you are
trying to use high speed logic with slow speed stimulus
and monitoring, and your circuit is either oscillating or
reacting to glitches that are too fast to see on your tools.

Digital inputs need to be de-glitched, ordinary switches
or wire to wire attachments create unpredicatable and
undefined states.

Next, some of your LEDs have resistors, some don't. LEDs
require current limiting to work, and for most practical
circuits 5 to 10mA current will be bright in a classroom setting.
For 5mA and 5V supply the resistor drops about 3V, so
a 600 ohms resistor is required. For 10mA a lower resistor,
around 300 ohms will suffice.

Unused inputs must be tied off, you can't leave them
floating as the ambient noise will trigger the inputs.

A "trainer" teaching tool typically has buffers for the
monitor LEDs (to protect the LEDs from careless students)
and to prevent the LEDs from loading the actual circuit.

The stimulus inputs, which is often switches or push
buttons, require de-bouncing to make a clean single
transistion on command (and not rattle with extra or
spurious pulses). A R_S latch per switch or button is
usually employed.

These are all easy fixes to your current design. If my
hints are not crystal clear let me know and I'll provide
a full schematic.

Comments Welcome!

dyarker
Posts: 1711
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker » Fri Feb 08, 2008 10:01 pm

For TTL inputs not connected to a TTL output use a pullup resistor to +5V supply.

For example the A1 input in your schematic, you've got resistor to common and switch to V1. That should be reversed.

The LED resistors seem high to me. At 4.7K LED current is less than 1mA. Do they light up at all?

No resistors for output LEDs????????

"... for anything complex (like a full-adder) it was erratic." Sounds like power supply loading or filtering problem (power supply not shown). But input resistors to ground and pullup switches the TTL is almost in linear mode and noise picked up on interconnecting wires causes crazy things to happen.

Do you have a full schematic of the trainer you can post?

(after thought - TTL outputs can drive LEDs, but also using the same to feed TTL inputs can be "flaky" because the load of the LED cause output voltage to be too low for the following TTL to see a valid logic '1'.)

(after-after - unused TLL inputs should be pulled-up or grounded, not open. If it doesn't matter, then pullup is better because it uses less current.)

C U L -
Dale Y

dyarker
Posts: 1711
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker » Sat Feb 09, 2008 2:29 am

Here is a circuit for de-bounceing switches you can use in your trainer:
Image
Switch bounce can cause a lot problems in digital logic. Especially when trying to single step a counter with a push button.

There are many ways to debounce a switch input, RC filters and schmitt triggers, monostable rechecking, multiple scans, etc., etc.

The method shown requires double throw switches (N.O. and N.C. vs. single throw N.O. only), but is rock solid.

It also demonstrates what I was saying about right way to use pullup resistors and grounds on inputs to TTL. 4.7K is a good value for pullup for 74xx, 74Sxx, 74LSxx ICs. For CMOS use 47K. (CMOS can be pulled up, or down; but is not as forgiving of mistreatment by beginners.)

With a 74LS00, two switches can be debounced. A 74LS279 can debounce four switches.

---------------
Would you like a better LED buffer?

C U L -
Dale Y

mikerd
Posts: 7
Joined: Fri Feb 08, 2008 7:36 pm
Contact:

Post by mikerd » Sat Feb 09, 2008 6:54 am

The lack of resistors was my mistake. There are 1Kohm resistors for all output LED's. Originally I planned to use the same 4.7Kohm as the input but I guess green LED's drop less voltage as they were very dim.

mikerd
Posts: 7
Joined: Fri Feb 08, 2008 7:36 pm
Contact:

Post by mikerd » Sat Feb 09, 2008 7:11 am

Thanks for the comments everyone!

I understand the idea of debouncing, and I appreciate it's a much better way, but it's not entirely practical for what I'm doing and some manufactured trainer boards seem to get by without it.

As for using a pull-up. I guess I'm a little unclear. I tied the switches to ground because my understanding is that when the switch is open you want the output to be '0' no floating, and when it's closed you want the output to be '1'. I think passing it through the buffer chip should preserve this. Isn't this just tomatoe tomahto? Won't pull-up or push-down work equally?

As far as what I mean by 'flaky'. The voltage regulator delivers a steady 5V. But when I measure voltage at the input terminals of the breadboard, it is less than 5V (when on) and more than 0V (when off). Which means that even with the switch off, the Voltage is sometimes high enough to partially trigger the logic chip, I'll get a dim output light for example. Something in my amateurish circuit must be affecting it. I'm still not quite sure what...

Dean Huster
Posts: 1263
Joined: Wed Dec 05, 2001 1:01 am
Location: Harviell, MO (Poplar Bluff area)
Contact:

Post by Dean Huster » Sat Feb 09, 2008 8:03 am

Mike, contact me via regular e-mail (dhuster little-at-symbol windstream dot net, or see my profile or send a sekrit personal message. I've been teaching digital at the votech level for upwards of 15-20 years. Anyway, I have bunches of schematics for "trainer" circuits: clocks, LED indicators, "pulsers", "DIP switches", 7-segment readouts, etc. These are on little modules (each is a "piece" of a big digital trainer) meant to plug into a regular solderless breadboard where you need them, rather than having to run eight 12-inche wires all over the place. They can be build as-is or the circuits can be laid out onto a bigger board and used as a regular "trainer". I also have my own version of the E&L "Pencilbox" that may be of interest.

Dean
Dean Huster, Electronics Curmudgeon
Contributing Editor emeritus, "Q & A", of the former "Poptronics" magazine (formerly "Popular Electronics" and "Electronics Now" magazines).

R.I.P.

dyarker
Posts: 1711
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker » Sat Feb 09, 2008 9:50 am

"Won't pull-up or push-down work equally?"

For CMOS yes, for TTL no.

The TI spec sheet for 7400, 74LS00 and 74S00 here:
http://focus.ti.com/lit/ds/symlink/sn74ls00.pdf

Look at values VIL, IIH and IIL. With a pull down resistor, the current from the input pin would cause a voltage drop across the resistor that prevents the voltage on the input from going to 0.8V or lower as specified. (maybe the low input isn't read correctly.) The reason can be seen more clearly in the schematic for 7400 than for 74LS00. For a '0' in requires current flow; a '1' virtually none.
Dale Y

User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba » Sat Feb 09, 2008 3:03 pm

Debouncing is mandatory for digital circuits - check this out http://www.ganssle.com/debouncing.pdf

skip to page 11 to see a very simple debouncer. It may well work fine for your application.

dyarker
Posts: 1711
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Post by dyarker » Sat Feb 09, 2008 7:33 pm

Excellent link Philba. Not only debounce, it also touches on the 0.8V to 2V zone that I have been (poorly) trying to explain to mikerd.

mikerd,

If you still need curriculum material, the link could be used as text for one or two lessons experimenting with input to TTL and why counters don't count right.

Cheers,
Dale Y

wd5gnr
Posts: 104
Joined: Wed Dec 19, 2001 1:01 am
Contact:

Post by wd5gnr » Sun Feb 10, 2008 5:23 pm

I don't disagree with anything said. However, consider this. If you have the capability to work with microcontrollers, why not use a cheap micro (like an AVR or a PIC) to do your debouncing and logic probing. You could add things to it like simple logic analysis, frequency counter, signal generation, pulse stretching on the LEDs (glitch detections) etc. etc.

In fact, it would be a good project for advanced students to work on and then their improvements filter down to the next semester's beginners.

Just a thought. These chips are in the few buck range now and the tools are at least potentially cheap. And you could gradually build to a level of sophistication unheard of in the commercial products.

Al W.
Robot Videos: http://www.youtube.com/awcelectronics

mikerd
Posts: 7
Joined: Fri Feb 08, 2008 7:36 pm
Contact:

Post by mikerd » Mon Feb 11, 2008 7:31 pm

Thanks for all the help, I really appreciate it.

Sounds like the first (and easiest) thing to try would be to switch to a pull-up resistor. It's a 2-wire change. That in itself may fix my problems. I have a mixture of TTL and CMOS chips, so this might also explain why my testing didn't always produce consistent results. I'll also have to make sure I understand the behavious of TTL.

If that works, I'll have to look a bit more closely at debouncing solutions. As I mentioned early it's not an immediate concern because I don't believe it has serious consequences for the applications I want to start with. But as I move the trainer to more complicated teaching (clock circuits, flip-flops) I'll definitely have to add it.

I'll let you know how things go.

Sincerely,

Mike.

mikerd
Posts: 7
Joined: Fri Feb 08, 2008 7:36 pm
Contact:

Post by mikerd » Sun Feb 17, 2008 7:42 pm

Just a quick update...

A 2-wire switch (connecting common side of switch to ground and parallely resistor to +5 to make it a pullup) seems to have really helped. I still occassionally get a phantom dim output light. But it is sufficiently different from an 'on' that I can explain it to my students. Perhaps the fact that I'm using two different LED's for input and output (red/green) yet the same series resistor value could be a contributing factor.

Oh well, 12 more of these boxes to do the switcheroo.

Thanks all.

sparkle
Posts: 17
Joined: Thu Sep 20, 2007 7:43 pm
Contact:

Post by sparkle » Wed Feb 20, 2008 2:44 pm

mikerd wrote:...I still occassionally get a phantom dim output light. But it is sufficiently different from an 'on' that I can explain it to my students...
One more consideration is the quality of the switch contacts themselves, a separate issue from bounce. Depending on the construction, environmental contaminants, humidity, and previous use if any of the switch contacts, even the precious metal plated contacts that are necessary for reliability in this kind of application can form a poorly conducting surface film that will not self-clean when subjected to the modest 5V, almost no current application you have. This is especially true if you have gone to a single pole double throw configuration.

Yet, the same contacts may clean up, and work well for a while thereafter, if subjected to a low voltage load of tens to hundreds of milliamps, the so-called wetting current (or sealing current) you can look up in Wikipedia and elsewhere. You can also research the so-called wet and dry contact application considerations for switch and relay contacts for extra credit. Clean hermetic sealed gold contacts should not need any wetting current but no common mechanical switches are even close to hermetic except for the glass sealed magnetic reed ones (hint: these are very good!) in some of the larger old keyboards.

If a gold plated switch was previously used with a still higher current surge application like a motor load even once, the thin gold film can burn off and it becomes essentially a non-gold contact switch! And if ordinary non-gold contacts are used, including household light switches, they may work fine for a hundred or more applied AC volts and yet not at all in response to an ohmmeter or to 5V applied-they can look like an insulator, not a switch. You might think that just flipping the switch should clean it, but not necessarily so!

The next time you run into a flaky voltage level coming out of a grounded switch, you can try manually cleaning it by arranging for it to have to sink say 20 to 40 mA thru itself to ground for a dozen operations. Hitting whatever contaminants there might be with the continuous controlled current of a smaller pullup resistor like 150 ohms (not 10K ohms), just might clean up things a bit. Driving a single logic gate input is insufficient current to clean contact surface film.

Debouncing may hide this problem for level assertion inputs but it will still be there: if the switches get dirty enough, your students will sometimes be hitting the stimulus switch multiple times to get a single clock out of it.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests