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.
Edit : Here are the pictures of the circuit and the updated diagram : Assume that there is no LED. Instead, there is a wire that goes into the Grove Mosfet (the SIG pin).
The second is 3.3V/500mA from a door access system.
what's the output configuration? Open drain/collector (i.e. Hi-Z), pull-up (non-zero output impedance) or push-pull? \$\endgroup\$I just stepped down the 12V into 3.3V so that It could match the signal from the Raspberry Pi to go into the AND gate.
How did you step it down? With resistors or regulators or something else? Put this detail into your question. \$\endgroup\$