Understanding basic circuits with diode

Hi! I'm quite new to electronics and I'm trying to learn about it without breaking my arduino...

One of the first challenges I set myself up to was creating an AND logic gate without transistors... I found that can be done using "diodes", which only allow the current to flow one way.

So far so good, I made the AND to light a led if two pints are "HIGH", but I'm concerned about whats going on when my AND gate is LOW. In that case, the current avoids the led and goes through the diode straight to ground. I understand that connecting power straight to ground can damage the arduino the same way that I've been told that you should never plug together the + and - of a battery.

I simplified my circuit to illustrate my question.

When the switch is ON the DIODE gets HIGH on both ends so current can't flow though it and goes by the led.
When the switch is OFF the DIODE works normally and since there is less resistance, the current avoids the led.

Now, if current goes through the led, then the batteries 3V goes down by the resistor and the red led. But when the current goes through the diode, there is no voltage drop and it seems like the + and - of the battery are connected together. Isn't that dangerous?

There is indeed, about 0.7 V. Which is still very bad for the battery.

Diode I-V curve

If you don't have a multimeter, this would be a good time to get one. They are extremely handy for understanding circuits, and fixing them when they don't work as expected.

Diode logic

Worth a look at logic maths ( De Morgan’s theorems etc ) if you really interested too . Allows you to do complex logic with only one sort of inverting gate and so on ( eg AND gate with NOR gates only )

Examples

Yes, it is.

Cure: connect the diode to the other side of the resistor.

An AND logic gate needs 2 diodes....

         5V
         |
        200ohm
         |
         |
1--|<|---
         |
2--|<|---
         |
         -
         V //
         -
         |
        GND

Hi,

Hi,
examples of various types of logic blocks with discrete components.

Sorry for those bad circuits with transistors. Except for the NAND gate all transistors are killed as soon as one input goes high :frowning:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.