I am trying to control a boost converter - I want it on when headphone jack inserted and off otherwise. It is on when it's EN pin is >1V and off when EN pin<0.2V.
I would also like to be able to override the jack and turn the boost converter off when 5V is applied elsewhere in circuit.
I've been running into some issues with the understanding of this and would appreciate some thoughts/if there is a massively more elegant/better version of what I've thought up, or if it has a flaw.
I've attached a schematic of my circuit below. The 1.2V source is constant. The headphone jack I've represented with a switch. The switch is NC and unfortunately for me is connected between pins 5 and 6. If it was NC but connected to ground pin this would be a lot easier, however it's not. What I have done is connected a 1Mohm pullup to pin 6 and on pin5 attached a 10k pulldown resistor. My thinking with the 10k pulldown is that without it, when there is no headphone inserted, the EN pin would be pulled up so I'm using it as a much stronger pulldown. When there is headphones inserted it will be cut off from the EN pin by the open switch, and will be in parallel with the headphone speakers, however, I don't anticipate this will cause any audio issues.
I need to be able to disable the boost converter if 5V applied on the circuit - however, this is not constantly on. Even if the headphone jack is inserted it needs to turn off if 5V applied. So have put a N channel enhancement MOSFET there to allow this. Have used a 1k resistor on mosfet gate to prevent it from floating.
Thanks for your help/thoughts.