LED only turns off when both buttons pressed
I’m testing out the logic behind MOSFET BS170 gates on my arduino but I think I’m confused.. I’m trying to get the LED to turn off when both buttons are pressed not just one but so far I’ve only been able to get it to where pressing one of the two buttons turns off the LED. I tried making an NAND gate and a standard AND gate but it won’t work.. Looking for some tips/guidance on the topic. Below is my test circuits that didn’t work.



5 Replies
can you please share the circuit schematic
Well done! Its nice to see courage to study the basics and ask "why?"
Long story short is: on real world aplications you cant simply expect the parts to work exactly like on simulations.
I didnt see your schematics either but Im pretty sure you didn't take into account current paths.
You see, real MOSFETS need some current on its gate to charge its capacitor. And then you need to discharge it when you want to turn it off.
If the path has a high resistance value, it will take some time for it to charge.
Then if you just tie one gate to another gate, considering that high resistance path before them, one gate will be charging and discharging the other gate, thats ringing, causing unpredictable results.
Share your circuit for more help and don't give up!
Hi, thanks for your reply. I ended up fixing my circuit by including a pulldown on both of my MOSFETs, the issue was that it was floating which affected my end output. Thanks again for your reply!
Cool! Pull down / up are are the current paths I was talking about 🤫 they discharge / charge initially the gate. Knowing that, can you change your circuit into a latch (memory)? Nice job fixing it.
I could, but i was using mosfets for the task
And thank you!