Shown below is my circuit for a mailbox notifier. The circuit is powered down when idle, and both sides of C2 are at V+, which is 5VDC or less. Then when the door is opened, the switch closes, and the left side is grounded, which also lowers the right side to ground, turning on the mosfet. The right side then starts to charge up, but is brought back down then the NPN turns on.
If the door is closed and the switch opens before the D1 Mini has finished transmitting, then the left side will start to charge through R3. However, if the door is left open, or not properly closed, or the magnet is knocked off the door (all of which have happened), then the Mini will turn off the NPN while the door switch to ground remains closed, and then the right side of C2 will charge up to 5V.
I want to use reasonably available (through-hole) parts for this, which would not include a non-polarized electrolytic capacitor, so I'm wondering if I can get away with violating the polarity of even a tantalum capacitor at this voltage and with current limited by the 1Meg resistor. I would put the positive side on the right since that would be correct polarity when the door is left open for an extended period.
Also, does the voltage rating of the capacitor affect the answer?
As a hobbyist, I just haven't dealt with this situation before. So I would appreciate any guidance on this issue.