I formerly asked about a LED circuit a long time ago.
The circuit I want to make is 'reverse-voltage notifier'. If the input is reversed, then a LED(below, D2) will lit. Of course, if the input is forward voltage, then another LED(below, D1) will be bright.
Also, I want to use these LEDs only if it is at bright place. In other words, in some occasions, I want to turn off them.
Using a Logic MOSFET is very good choice in my thought. However there's a problem.
I thought this is right, however I don't want to make any smoke and I hadn't confirmed this. V1 could be +12V ~ -12V. Is it right? If it isn't, how could I work on this to work in any conditions(even if the V1 is reverse voltage)?
D1 is for forward-voltage, and D2 is for reverse-voltage. In reverse voltage MCU will not turn on, so I didn't used any MOSFET in D2 circuit. Of course, the reverse voltage will not excced above 12V. The maximum reverse voltage of the LEDs is 5V.
** Edit : The MCU is STM32F411RE which is I'm using. However I think this will not take an important part in. You could regard the MCU input as just the 0V / 5V logic source. **
You can see the BSS138 datasheet at here: https://www.onsemi.com/pub/Collateral/BSS138-D.PDF