Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Either A or B, not on or off switch..?

Status
Not open for further replies.

Hippogriff

Member
I've only experimented with on / off type switches so far, like DIP switches and rocker switches. I was thinking about creating a circuit that could either be powered by DC or battery and the way I thought I'd go about it would be by having the two power sources going into some kind of switch, where I would choose to allow current to flow into the circuit from either battery or DC... kinda like railway points, but in reverse... I think.

What kind of switch do I need to purchase for that? I don't think it's a toggle switch, but I had originally inferred it might be, from the name.

I also thought about having a simple switch decision tree that was two deep, the first selecting where the power is coming from, and the second being whether the circuit was on or off at all - so current only flows if a) the mains or battery has power and b) if the circuit is on... is there a switch type that would allow me to do this in one device, like:

Switch position 1 = circuit off and no power from DC or battery.
Switch position 2 = circuit on and power from DC.
Switch position 3 = circuit on and power from battery.
 
Last edited:
Last edited:
A single-pole double-throw (SPDT) switch with a center-off (usually described as "on-off-on") would be perfect for your application.
 
Am I totally wrong, or can I do what I'm wanting with a three-legged DC power jack? I've read (Connectors and Cables) and also from user Blueteeth (on one of my posts here many moons ago) that if you actually use the three prongs on the DC socket (unlike me to date, as I have just been cutting off the 'unneeded' prong) then you can have a circuit that is either battery or DC powered, and the decision is actually made for you, by whether you have anything plugged in or not?

Is it that simple?
 
The only problem is that you do not have an off. If you unplug the DC, then the unit will run on battery power. Also, there may be a short period in which the circuit is not powered at all as you are removing the DC plug.
 
Yeah, I was planning on still having a simple switch between the DC jack output and the circuit... that will be fine I assume? I also wouldn't plan on changing over the source of power while the circuit is doing its thing... just before the initial start-up. I think it is now sounding like my solution.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top