I'm trying to build a smart DC switch that measures the input voltage (3V to 40V)1 and determines to which output pin to send it, similar to this threshold switch idea or a SIP3242 for Vin, not load current.2 It should be based on the below logic:
If (Vin > 35V OR Vin < 3v) Then send to GND (via a crowbar circuit?; too high or low)
Else If Vin > 9V Then send to buck circuit
Else If Vin >= 7V Then send to Vout
Else send to boost circuit
I'm not sure what components I need and how to arrange them (schematic), if I can't buy such a device in IC form. (What would such a thing be named?) I am thinking of using a level-shifter to supply shifted Vin
to a micro-controller (such as an ATTiny) as analog input, calculate the value of initial Vin
and activate an appropriate relay. Is this a reasonable starting point or is there a better/simpler approach using transistors, op-amps or other devices?
I already have the buck and boost circuits designed (using MC3X063As from TI).3 The initial design uses a manual SPDT to send Vin
to the buck or boost branch of the circuit. I'd like to replace that with something that doesn't rely on a human to decide what path must be taken (id est, what I'm trying to design/build).
simulate this circuit – Schematic created using CircuitLab
SW2 is what I currently have. SW1 is what I'm trying to build/buy.
- 3V to 40V is the range a MC33063A can cope with (according to the data sheet), although I'd like to limit it to 35V to be safe. (That's the rating of my caps, although some are rated for 50V.)
- I'm not trying to immediately pull the voltage down to 7V (as would be done as per this answer, which I think would waste a lot of energy as heat), although that is the ultimate goal, but determine to which switching regulator branch to send it.
- From what I understand, a MC3X063A can be wired to either buck or boost (but not switch between them of its own volition).