14 Replies Latest reply on Nov 22, 2020 3:27 AM by andrewj

    Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)

    opalko

      So I have built the "combination lock" from Charles Platt's Make: Electronics experiment 21 a couple of times now without getting it working correctly.  The schematic for the lock is below. The experiment is supposed to take a combination (pressing buttons E, F, G, H in order) to unlock the lock and provide power at the leads marked "to computer".  The buttons E, F, G, H are tied to a 74HC08 Quad AND chip with each button tied to an AND gate.  Each gate is unlocked in series by providing logical high as input from the previous button.  That is how it is supposed to work, but mine does not!  Using a logic probe, mine always has logic high on both inputs of button E so it seems to have no effect.  Pressing buttons F and G then unlock the circuit (sending high to H) which does not appear to need be pressed at all. One other weird thing is that I can occasionally start with a logical low at AND gate E if I disconnect and reconnect the green jumper tied to pin 2 on the 74HC08 from the 10K resistor to the same AND gate input, but not always.

       

      I have taken the 74HC08 out and tried each AND gate separately and they all appear to work correctly independent of experiment 21.  But put it back into my circuit and logic high is always present on both inputs of the gate button E is attached to before I ever get started.  Do I just need another chip to try this with (I don't have one)?  Any help on how to troubleshoot further is appreciated!!  Note: I have removed switch A in mine as it was too much trouble to keep it pressed while troubleshooting and just substituted a jumper.

       

      Regards,
      Robert Opalko

      Schematic

      Circuit as built

      Platt's image of how to build circuit

        • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
          jw0752

          Hi Robert,

           

          Check the voltage to ground on both sides of the 10K resistor that ties pin one to ground. This resistor should pull pin one low unless the E button is pushed. If it doesn't you probably have a bad connection on the bread board.

           

          John

          2 of 2 people found this helpful
            • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
              opalko

              John, thank you for this.  I checked the voltage to ground on both sides of the 10K resistor that ties pin one to ground and it read 5V on both ends!  I rebuilt this circuit a third time on a new & different mfr breadboard and still get the same result!  If that is not confusing enough,  if I remove the 1N4148 diode that ties pin 3 to pin 1 the +5V on pin one disappears and goes to 0!   What is going on?  I swapped out this diode with 3 others and still get +5V at pin 1.  This does not occur with the 1N4148 diode between pins 4 and 6.  I am soooo confused now!

               

              Boolean algebra is no sweat to me so I could move on to the next experiment but I really want to know why the diode is causing the +5V/logic high on pin 1!

              Thank you for any enlightenment!
              Robert Opalko

                • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
                  jw0752

                  Hi Robert,

                   

                  Your experiment where you measured the voltage on both sides of the resistor that runs between Pin one and Pin seven shows that there is something wrong with your connection. The Blue wire in your picture that ties pin seven to the ground rail should also tie the 10 K resistor to ground. This would mean that this side of the resistor should read 0 volts with respect to ground. When key E is not pressed this path to ground should also pull Pin one low even if there is a small leakage through the diode. The diode looks to me like it is there to latch the gate that is tied to pins 1-2-3. Your problem from what we have discussed is that the side of the 10 K resistor that should be grounded just as pin 7 of the 74HC08 should be grounded is not or you would not have been able to read +5V on it.

                   

                  Take a deep breath and check everything again paying close attention to everything that is attached to the pin seven of the IC. These things that don't work are a much better learning experience than the situations where everything works. These are the challenges that actually teach electronics and not just how to plug things into a breadboard following a map. I like to buy cheap electronic kits from China and when they don't work which happens once in a while I have a lot more fun because then I get to troubleshoot and occasionally redesign a circuit.

                   

                  Keep trying and let me know what you find.

                   

                  John

                  2 of 2 people found this helpful
              • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
                DAB

                The HC logic is very sensitive to levels so make sure each input has a pull up resistor so that they have a well defined state transition.

                 

                It looked to me like there were some inputs directly attached to outputs, which is fine for TTL circuits, but dangerous for HC logic.

                 

                DAB

                2 of 2 people found this helpful
                • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
                  dougw

                  Logic gates can be unpredictable or undefined as power is applied to the circuit. If the gate output is even momentarily high during power up, it will latch up the gate in the high state. Pushing switch B, C, or D should unlatch it. Placing a small capacitor across these switches may keep the gate input low long enough to ensure uneven thresholds don't define the initial state during power up.

                  1 of 1 people found this helpful
                    • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
                      opalko

                      Thank you for this!  Pressing one of the buttons B, C, or D did indeed reset gate 1 to a logic low enough that gate 1 worked correctly!

                       

                      However, I still have a problem in that the relay is triggered by only pressing buttons E, F, and G.  G should really trigger what I will call gate H (pins 8, 9, 10) which then triggers the relay; but in mine the relay is triggered after E, F, G.  Gate 4 output maintains a logic low even when the relay is activated.  I should also note that when I have a logic probe attached to pin 10 to watch the state of gate 4 where the 10K resistor is attached, the sequence works correctly! E, F, G, H -> unlock   ....  Still lost!  Cheers

                        • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
                          dougw

                          That behavior would be explained if the 10K resistor was not making good contact with the input to gate 3.

                          The extra load or capacitance of the probe prevents the (floating) input from going high.

                          Without the logic probe, the input is floating and a little capacitive coupling to the other input can cause it to go high when gate 4 goes high.

                          Try to ensure that resistor is making good contact to the input pin.

                          2 of 2 people found this helpful
                            • Re: Is my 74HC08 bad?  (Weird results in Make: Electronics experiment 21)
                              opalko

                              So I checked all the resistors and made sure they were making good contact - they were and I didn't see any difference in the behavior of the circuit, so I rebuilt it from scratch one more time!  This time I cut new jumpers for a few of the connections (not all), but used the same resistors and diodes.

                               

                              The very first time I tried the circuit it did the same thing: E, F, G -> relay activated & LED lit.  The second time I tried it, I made it through the combination E, F, G, H -> relay & LED activated.  Tried a third and fourth time with all 4 buttons and it unlocked. After all that time I had to make video proof (google photos link)!  Success? Well, I don't know.  I then tried different button combinations and got weird results.  A few times starting with pressing button G (gate 3) then H (gate 4) I could get the relay & LED to activate. Other times that didn't work and would only take the combination  E,F,G,H..

                               

                              I've built all the other circuits in the book without this kind weirdness but then again this is the first logic chip used so far.


                              Cheers

                              2 of 2 people found this helpful