Allow me to apologize in advance. I am a programmer who is VERY new to the microcontroller world. I am starting out with the FEZ Spider Starter Kit (with a few additional modules) and will soon be working my way through basic electronics theory. However, as is typical for me, I am jumping the gun and working on a personal project for my stepson.
I am building a rocket launcher with all the appropriate safeguards. One of these safeguards is a physical switch that provides a 12V 500mA (Typical) 16V 2A (Maximum for 200mS) power source (separate from the microcontroller) to the relays (SRLAY-GM-327) that in turn launch the rocket.
*** Get ready to tell me just how WRONG I am ***
I want to be able to detect that the key has been inserted and turned on such that the launcher is now ARMED. My assumption (yes, I know what happens) is that the detection method should be physically isolated from microcontroller. It seems that something like the NTE Electronics NTE3090 (Optoisolator w/ Schmitt Trigger) would be a reasonable solution. It is physically isolated, could convert 12v to the 3.3 – 5v that the microcontroller needs and the Schmitt Trigger holds the state of the output voltage (Vo) either on or off for a GPIO pin based on the presence of voltage on the Anode and Cathode (pins 1 & 2).
I think that I just need to hookup the Anode and Cathode of the 12v power supply to pins 1, 2 on the NTE3090 and the 3.3V positive and ground from an Extender Module (XTNDR-GM-273) to pins 6, 5.
If I am correct, then when 12V is applied to pins 1, 2 then pins 4, 5 should be near 0V (backwards from what I would expect). When pins 1, 2 are near 0V, then pins 4,5 should be ~3.3V (near Vcc).
Am I on the right track? Am I connecting the NTE3090 correctly? Is there a better (i.e. easier) way to do this?
FYI… If easier is a little more expensive, thats okay
Thanks to everyone in advance for your help!