Safe way to have voltage selector 120v AC or 12v DC....

Hi All,

Planning a project to fit in a small enclosure and I would like to be able to either plug it into the house mains (120v) with an internal transformer to bring the power down to 12 v. and convert to DC.

I would like the option to power the project from a car battery so 12v DC.

I am not sure how to go about this safely. Not sure if there is a panel mount connector that can "open" the 120v line if the 12v connector is being used. I am thinking something along the lines of when you plug a headphone jack the system speakers are disconnected so sound is only in the headphones.

So same idea but when the 12 volts is what is connected to power the project, the AC line is disconnected.

Thanks for your thoughts, ideas, circuits, components :) Anything to point me in the right direction.

Dan

Design it to run from 12VDC, and use a seperate 120VAC to 12VDC adapter. You can see some quite small units here

https://www.mpja.com/DC-Plug-In-Power-Supplies/products/366/