0
\$\begingroup\$

wiring diagram

I'm working on a project for a small treasure chest that will open/close, light up, and play sound effects when you walk close to it.

I've prototyped a bit wiring up each of the components one at a time. This is definitely still a work in progress and I'm still a newbie when it comes to electrical engineering so I wouldn't be surprised if I'm doing some stuff wrong.

So one of the things I'm trying to figure out is how to get down to one power switch. At the moment I have one power switch right at the positive terminal out of each battery.

I thought I could add a NPN transistor to the 9v power line in place of the physical slide switch and then place a jumper on the 6v positive terminal right after it's slide switch. The idea being that when I turn on the 5v, the gate pin on the transistor would activate and allow the 9v power through.

I tried wiring this up and found that my voltage on the outer legs of the transistor dropped from ~9v to ~4v. I know there's typically a voltage drop as the higher voltage goes across the transistor, but from what I read that's typically a 0.7v drop, not half the voltage.

Is there something I'm missing or misunderstanding?

UPDATE

Before I hit each of the suggestion bullet points I wanted to post an updated version of the wiring diagram with the theoretic NPN transistor and resistor in it for reference of what I tried before.

v2 plan

Answers to Questions and response to suggestions

Thanks for all of the input so far. Here are responses to each of the suggestions or questions so far:

Why not just use a double pole switch

...you can also use a double pole single throw (DPST) switch...

I didn't actually know those those existed. After that helpful exploration into types of switches I am definitely considering adding one in, but I want to try to go without it for a specific reason that I realize I didn't post earlier. I'm planning on using (still trying to use) a potentiometer that doubles as an on off switch so I have power and volume controlled by one component. Specifically, I'd like to use this:

enter image description here

If the transistor power switch or some other alternative that allows me to use this component doesn't work I'll definitely fall back on a single throw double pole switch. Thanks for that suggestion!

use a DC-DC converter to boost the 6V up to 9V then you only need to switch the 6V.

If you want you can just use one battery and something like this to efficiently provide the other voltage...

I was avoiding using a boost converter because I've read that I should separate power for microcontrollers from motors like servos to avoid the current draw that happens when the motor first kicks on. Is that a concern for servos?

In addition to that, I'm hoping to use this same approach for a slightly larger treasure chest, swapping out the servo for a stepper motor. I know there's going to be more complexity in that circuit (adding in a motor driver at the very least) so I'm starting with this step as a functional prototype.

Hopefully that adds some context on why I wanted to go the transistor route. Does this change any of your answers or suggestions?

\$\endgroup\$
  • 2
    \$\begingroup\$ Why not just use a double pole switch? \$\endgroup\$ – Jack Creasey Jul 29 '18 at 19:25
  • \$\begingroup\$ use a DC-DC converter to boost the 6V up to 9V then you only need to switch the 6V \$\endgroup\$ – Jasen Jul 30 '18 at 8:45
1
\$\begingroup\$

You haven't mentioned using a resistor to jumper to the gate of your transistor. As transistors are current controlled, you need a resistor to limit gate current. There's a good chance that you're causing the volt drop by pulling too much current. It would help if you added the theoretical transistor to the diagram to show us where you wired it and how. Transistors and mosfets have to be connected correctly within the circuit, and it matters whether they are switching between the load and the positive rail or between the load and the ground rail.

One thing to consider is that you don't necessarily need to use two separate power sources. If you want you can just use one battery and something like this to efficiently provide the other voltage.

If you're set on 2 power sources, if you want, you can also use a double pole single throw (DPST) switch, which switches two separate lines on a single switch.

\$\endgroup\$
  • \$\begingroup\$ Ah, a double pole single through would totally make this work and is kind of tempting. The reason I didn't go with that is part because I didn't realize they existed but also because I'm using a combo potentiometer/onoff switch (adafruit.com/product/3481). If the circuit gets too complex (for me) I may pivot to use a dpst on/off switch separate from the volume control. I'd like to shoot for single on/off/volume component so I'll add that detail to my post along with an updated diagram w/ the theoretic resistor. \$\endgroup\$ – Chris Schmitz Jul 30 '18 at 13:49
  • 1
    \$\begingroup\$ I'll check back on this later. Have to run out now, but you can definitely do it any of these ways without much trouble, including using a single battery bank/voltage source if you prefer or having one battery bank/voltage source switch the other with a solid state switch. If motor or solenoid currents are too high you may need to provide some degree of isolation. \$\endgroup\$ – K H Jul 30 '18 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.