Appreciate your response / effort! The first diagram that comes up in my post is one I drew of what I’ve been implementing, you can sub the NPN Transistor for a MOSFET to cover attempts with that component type. Base to Gate, Drain to Collector, Source to emitter.
For all three of your diagrams, SW2 exists on the module PCB but it is being bypassed by my circuit. I have the resistor / drain / collector wired to “1” on SW2, “2” is the load of the rest of the Module (in my diagram, “2W Speaker and some ICs”)
The blue wire is my “Tripwire” / pulldown to GND. In the last picture, I haven’t even bothered attaching it to pull down the signal from Gate because I had been experimenting with different MOSFETs and finding they weren’t turning on all the way / letting any more than 2V through, which is not enough to power the speaker module.
litchralee@sh.itjust.works 13 hours ago
In any case, pending your reply, I would suggest the following circuit for reliable operation. This will require a P-channel MOSFET, which is different from the two MOSFETs you tried earlier, which are all N-channel. This will also use two resistors. I am making an assumption that your speaker module simply requires two wires at feed it 4 volts, and does not care whether we add a switching circuit to either wire, the positive or negative wire.
suggested circuit 1
This type of circuit would be described as an inverting, low-side MOSFET switching circuit. The inverting part means that when the MOSFET is fed a lower voltage, that causes the transistor to become active, whereas a non-inverting circuit would require feeding the MOSFET with a higher voltage to make the transistor become active.
Low-side switching refers to the fact that the load (ie the speaker module) is permanently attached to the higher voltage (the high-side) and we are manipulating the low-side. Not all electronic loads can be used with low-side switching, but this is the easiest mode to implement using a single MOSFET transistor. As a general rule, to do low-side switching always requires a P-channel MOSFET.
As for why we cannot do high-side switching (which would use an N-channel MOSFET), it is because a typical N-channel MOSFET requires that the gate be a few volts higher than the source. But consider that when the transistor turns on, the drain and source become almost-similar voltages. So if the drain is attached to 4 volts, and as the transistor becomes active, the source rises to something like 3.95 volts, then what gate do we use to keep the transistor active? If we give 4v to the train, then the gate-to-source voltage is only 0.05 volts, which is insufficient to keep the transistor on. We would need an external source to provide more gate voltage, relative to the source pin. If we tried such a high-side switching circuit anyway, it would quickly oscillate: the transistor tries to turn on, then turns itself off, then back on, and so forth.
The way that my suggested circuit works is as follows: when the tripwire (marked as SW3) is in place, then R4 and R2 will form a voltage divider. Given that the battery supplies 4v, we can show that the voltage at the MOSFET’s gate will be 91% of 4v, or 3.64 volts. This should be just enough to prevent the P-channel MOSFET from becoming active. Note: a P-channel MOSFET becomes active when there is a low gate-to-drain voltage, with 0v causing the transistor to become active. In this way, with the trip-wire, the transistor will not allow current to pass through the speaker.
When the tripwire is pulled out, this breaks the connection to R4. That leaves the gate connected to only R2, which is connected to the negative side of the battery. Thus, any charge in the gate will seep away through R2, meaning that the voltage across R2 will equalize at 0v. This means the gate-to-drain voltage will be 0v, which means the MOSFET will activate. And that allows current to power the speaker module.
Note: one end of the tripwire (labeled #1 in the diagram) will still have 4v on it. If the tripwire is cleanly detached from the whole circuit, using your loop-of-wire and nails idea, then there is no problem. But if the tripwire is still hanging onto the 4v side of the circuit, then be careful that the tripwire doesn’t make contact with another part of this circuit. The R4 resistor will still be there, so there won’t be a short circuit or anything bad like that. But if that tripwire reconnects to the gate, then the transistor will deactivate again, stopping the music.
I wish you good luck in this endeavor!
jeinzi@discuss.tchncs.de 13 hours ago
Props for the detailled answer, but this all sounds completely backwards.
Low-side switching should in general use an N-Channel FET. And with your voltage divider, the gate will be at 6% auf the supply voltage, not 94%, which means the FET will always be conducting. It will also never fully turn on, because that would mean the Gate-Source voltage would drop to near 0, which would turn it off again.
My counter proposal:
Image
Romkslrqusz@lemmy.zip 11 hours ago
I don’t think it’s possible place the full module between 4V and Drain (or collector for NPN), so I shifted my focus to just the speaker without all the ICs.
The good news is that it works with both an NPN or a MOSFET - the bad news is that it totally degrades the quality of the audio to a point where the thing I am trying to play is unintelligible.
Romkslrqusz@lemmy.zip 13 hours ago
With how I’ve been going about this, technically, the load of U2 / Speaker Module would be on the Drain side of Q3 PMOS rather than the source side - and that’s the key difference between what I’m doing and the Piezo speaker tripwire circuits.
Could this be the reason I’m not seeing success?
jeinzi@discuss.tchncs.de 13 hours ago
With a PMOS device used for simple on/off switching, placing the load between drain and ground would be correct. With an NMOS FET, the load should be between drain and VCC.
In general: NMOS source to GND, PMOS source to VCC.