0
\$\begingroup\$

I am testing some logic gate ICs to include in future projects. However, even when both of my switches are off, my logic IC is still sending a logical HIGH to my LED.

I think my problem is the same as this question. I would like to follow the second answer and put the right pull-up resistor in place.

Using the single gate pull-up resistor value calculation on this website, I got the resistor value to be 5MΩ. However, I don't have a 5MΩ resister (Arduino comes with 1MΩ max, but that is too small I think), and I don't want to waste my money if my problem is something different.

Other than the IC, I have tested all of my other parts, and I know that they work.

My circuit is below. Unfortunately my camera is not very good. Let me know if you want anything else from me :)

Circuit

Circuit

\$\endgroup\$
9
  • 2
    \$\begingroup\$ 5M ohm sounds so random. \$\endgroup\$
    – jay
    Commented Nov 24, 2021 at 5:23
  • 1
    \$\begingroup\$ please add a schematic diagram \$\endgroup\$
    – jsotola
    Commented Nov 24, 2021 at 5:24
  • 2
    \$\begingroup\$ Where do you get 5 MΩ from? Pullup resistors don't need much thought unless you're concerned about power consumption; just stick a hundred k and it'll probably work. \$\endgroup\$
    – Hearth
    Commented Nov 24, 2021 at 5:30
  • 1
    \$\begingroup\$ it appears that you have the switches and resistors wired incorrectly. The switches should be between the input pin and Ground/negative, while the pull-up resistors go between the input pin and Vcc/positive. It appears that you have teh switches in series between the input pin and the resistors, wit the resistors going to Vcc. 10K or so is a common value for pull-up resistors. \$\endgroup\$ Commented Nov 24, 2021 at 5:36
  • 1
    \$\begingroup\$ @JD9999 But that's the problem, you don't use those values, at least not like that, to come up with a value for a pull-up resistor. \$\endgroup\$
    – Justme
    Commented Nov 24, 2021 at 8:52

3 Answers 3

2
\$\begingroup\$

Those resistors are just in series with the switches, either the switch connects IC pins via resistors or completely disconnects IC pin. So they are not pull resistors.

Also the 1Mohm or larger resistance value seems far too high to be of practical use, but you did not mention why you think it is the right value.

Just use 4k7 pull-up which connects to IC pins, and have the switches pull the IC pins directly to ground.

\$\endgroup\$
1
\$\begingroup\$

Your switches are in series with resistors so they don't acts as pull-up.

For learning purpose I recommend use schematic below where resistor are connected as pull-down. During switch off the inputs are grounded (Low) and after switching on you connect input to 5V.

It's more clear for beginners when activation of switch sets input high rather than low. Using pull-up makes this reversed.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Just a note that it might work in this case where there is a CMOS chip used. But it will not work in a case if there is a TTL chip. So it will just be a simpler and more general solution to have resistor pull-ups to supply and buttons to ground. \$\endgroup\$
    – Justme
    Commented Nov 24, 2021 at 10:43
0
\$\begingroup\$

Thanks everyone for your help!

I found a solution by watching this video. I didn't realise what you meant by connecting the switch to the ground, but now I do. I apologise for any confusion.

In the end, my 180Ω resistors were enough (much less than 5M!)

Here is a picture of my two extra resistors in my circuit: GoodCircuit

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.