Thanks to all for the answers. Today I tried it with just the diode and the resistor and seems to be working although I have not been able to test it extensively. I'm going to give it a couple of days to see if it really works. I'll take note of all your solutions in case I have to modify it.
A)
B)
Thanks!
Sorry for newbie question but the capacitor should be a polarized capacitor before the diode like in A) or a non polarized after (B)?Consider that both sides of the capacitor will be connected to voltage sources that are not open circuits, it seems that the capacitor charge developed while the button is pressed will be removed fairly soon after the button is released. But a one megohm resistor across the capacitor will not do any damage to the performance.
A)
B)
Thanks a lot! I've looked at the 2N3904 datasheet and says that "Emitter −Base Breakdown Voltage: 6v" is that ok or should I go for a logic N channel mosfet?I tried using a 474nf cap and 470K resistor as described but the results were intermittent with my setup, the TS may have better results with his.
This simple 2 transistor inverter worked reliably.
View attachment 285176
Thanks!