0
\$\begingroup\$

So I have this... device... that draws about 0.1~0.2 A and requires 3.6 V. In the below schematic it's represented as a speaker. I want to be able to toggle the power to this device with a Wemos D1 mini (sadly, represented below as an Arduino since I can't find a Wemos in circuit-diagram.org). All is powered by an 18650 shield that outputs both 5 V and 3.3 V. Since a Wemos D1 pin can only handle about ~12 mA I need to use a transistor to switch the required 0.1~0.2 A.

Here's what I've come up with:

My plan

My 'reasoning' is:

  • I need a 4k7 resistor to limit the current from the datapin (D4). I see 4k7 everywhere so... I guess that'll do?
  • I was planning on using a 2N2222 (but I have others) as my 'switch'. This should drop around 0.6 V, leaving 5 V - 0.6 V = 4.4 V? This is a bit on the high side I'm afraid.
  • Using the 3.3 V is going to leave 2.7 V for the switched load, which is too low.

My main question is: What can I do to get close(r) to the desired 3.6 V without using a ton of components? Add a dropper diode or two? Second: will this work at all? Does my reasoning make any sense at all?

(The device/load is a gag-birthday card which plays music at a rather annoying volume; it comes with 3 LR1130 batteries, 3 x 1.2 V = 3.6 V and using my bench supply I measured it using about 100 ~ 200 mA - I just want to control when it plays. It still plays when I lower the voltage, all the way down to 1.8 V but then it's barely audible - below 3 V is not gonna cut it, I'm afraid).

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Your battery symbols are upside down and so is your speaker and npn for normal usage. \$\endgroup\$
    – Passerby
    Commented Dec 4, 2021 at 3:46
  • \$\begingroup\$ @Passerby I'm a total n00b with circuit-diagram.org and couldn't find a way to rotate; it turns out that drawing up->down or down->up matters. But do we really need to be so pedantic for what is, in essence, just a way for me to convey my general idea? I'm not designing a mass-produced product here, I'm tinkering with electronics. As a software-engineer I know every little detail matters - professionally. For beginners? As long as I can understand the general gist of it I'm ok with whatever they come up with. I also don't see what is 'upside down' about the speaker or NPN? \$\endgroup\$
    – RobIII
    Commented Dec 4, 2021 at 3:55
  • \$\begingroup\$ @Passerby All/most NPN's I google look like this? Anyway, I was just trying to make a better diagram than I can make using paint/photoshop. \$\endgroup\$
    – RobIII
    Commented Dec 4, 2021 at 3:57
  • \$\begingroup\$ it's not that it's symbol is upside-down but it's placement, in the usage you want. See GT's answer for the proper usage. \$\endgroup\$
    – Passerby
    Commented Dec 4, 2021 at 4:02
  • \$\begingroup\$ and yes sometimes we do need to be pedantic. Upside down symbols are confusing and can be an error in the schematic or that you intend to connect it that way. Of you can't take constructive criticism then this is the wrong place to ask. \$\endgroup\$
    – Passerby
    Commented Dec 4, 2021 at 4:03

2 Answers 2

3
\$\begingroup\$

You can on have your load on the emitter side when your base voltage is a max 3.3v from the wells.

Try this...

enter image description here

\$\endgroup\$
8
  • \$\begingroup\$ And those are two dropper diodes? Any specific kind? Thanks for taking time to answer this n00bs questions! \$\endgroup\$
    – RobIII
    Commented Dec 4, 2021 at 3:38
  • 1
    \$\begingroup\$ Any 1n400x diode would be fine here. 0.6 to 0.7V drop each. And yes where the load is matters. So npn on low side and speaker on high side. \$\endgroup\$
    – Passerby
    Commented Dec 4, 2021 at 3:48
  • 1
    \$\begingroup\$ Yes, use any general purpose diode that can handle the load of your noise-make \$\endgroup\$ Commented Dec 4, 2021 at 3:54
  • 1
    \$\begingroup\$ Yes, use any general purpose diode that can handle the load of your noise-maker. Also, a PNP transistor confuses the issue a bit and won't be as simple as this circuit. The problem with a PNP on the 5v side means it will always be on - because the base voltage will be (5- 3.3v) of the wemos and current will flow and the PNP would be on. And the wemos cannot handle 5v in (I don't think - but if it can, then you'd need to set to "input" to turn off current flow and "output" to turn on current flow.). Low side switching with an NPN is by far the most common way to do what you want. \$\endgroup\$ Commented Dec 4, 2021 at 4:00
  • 1
    \$\begingroup\$ Nice catch - The schematic is copied from the OP, it was his (minor) mistake. I am certain he will not physically connect the batteries backwards. If he plans to physically connect batteries backwards, they need more help than I can offer here. \$\endgroup\$ Commented Dec 4, 2021 at 4:26
3
\$\begingroup\$

Here is an easy way, since the MCU has 3.3V outputs:

schematic

simulate this circuit – Schematic created using CircuitLab

R1 is your load

R2 is chosen so base current is Ic(max)/20 (forced \$\beta\$ of 20), and current < 12mA.

Q1 is a relatively beefy PNP transistor

Note that LOW = ON and HIGH = OFF.

\$\endgroup\$
9
  • \$\begingroup\$ Won't the voltage for R1 be too low? I thought the transistor would drop some, so R1 wouldn't get more than... 3V or so tops? Thanks for taking time to answer this n00bs questions! \$\endgroup\$
    – RobIII
    Commented Dec 4, 2021 at 3:43
  • 1
    \$\begingroup\$ The PNP is connected as a saturating switch not an emitter follower so it will get close to 3.3V. \$\endgroup\$ Commented Dec 4, 2021 at 3:44
  • \$\begingroup\$ I have no idea what you just said, but I'll look it up and read up on the subject(s). Thanks! \$\endgroup\$
    – RobIII
    Commented Dec 4, 2021 at 3:45
  • 1
    \$\begingroup\$ Refer to the saturation voltage curve on this 8550 datasheet. At 150mA it's something like 60mV with Ic/Ib = 10. \$\endgroup\$ Commented Dec 4, 2021 at 3:47
  • \$\begingroup\$ The noisemaker needs 3.6v so the 3.3v of @SpehroPefhany schematic will not supply enough voltage when switched with the PNP using 3.3v as shown in the schematic. If you try with a 3.6v power supply and use the PNP, the PNP will not be off completely when the base is connected to 3.3v of the Arduino (unless you set the pin to "input" state. \$\endgroup\$ Commented Dec 5, 2021 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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