I am currently working on an AND logic gate using 2 diodes.
- My first logic input is 3.3V/5mA from a Raspberry Pi Zero W GPIO pin.
- The second is 3.3V/500mA from a door access system. This input is originally 12V that I stepped down to 3.3V using this voltage regulator : https://my.cytron.io/p-voltage-regulator-plus-3.3v-1880?r=1
- The supply voltage of the AND gate is 3.3V/<50mA => This supply voltage is used to supply a relay (a Grove mosfet). Then, this relay activates (or not) an external power supply (12V) used by a magnetic latch. By doing so, I want that if my logic gate is receiving 2 HIGH inputs, then my magnetic latch would remain closed. On the contrary, I want that if my logic gate is receiving at least one LOW input, then my magnetic latch would open.
The problem is that this configuration is not working. The magnetic latch remain closed no matter what the inputs states are.
However, when I replace the second logic input by another 3.3V and 5mA (from another raspberry GPIO pin), it works.
I also tried with different diodes : 1N5400, 1N5819, 1N4004, 1N4007.
Do you know what could be the origin of this issue? Is it from the second logic input of 500mA?
I attached a simple diagram of the AND logic gate. In my case, the 2 logic inputs correspond to the one I described earlier. And the LED corresponds to the relay (Grove Mosfet) that is triggered or not depending if the output of the logic gate is HIGH or LOW.