I could really use some help getting oriented on a project that is intended to be used as part of a Christmas / White Elephant gift tomorrow.
The idea behind my project is essentially that when a wire is cut, music plays from one of these “singing card” programmable speaker module. The one I have uses a 4V lithium battery cell.
I already have the programmable speaker module configured to immediately play music as soon as its power switch is moved to the “on” position.
In exploring possible ways to go about this, I realized that what I am effectively doing is building a tripwire circuit.
The examples I found were very simple, involving an NPN transistor (2n2222), 10KΩ resistor, battery, and DC Piezo speaker.
In my case, there’s no piezo - I’m trying to handle the entire load that would otherwise be running through the on/off switch.
With my initial attempt, I wired +4V from the switch to the transistor’s collector and then separated the collector from the base with a resistor. I connected the emitter to the pin that, when the switch is engaged, would send 4V through and power the module.
Initially, all I got with the “Tripwire” disconnected was rapid clicking from the module’s speaker as it cycled on and off. I reduced the resistor to 1KΩ and then 510Ω to get longer runtime, but it was still restarting. I jumped down to 22Ω and that stopped the restarting while introducing a new concern: that resistor quickly climbed up past 100C while the “tripwire” was connected. Without the tripwire, the I don’t want to start a fire, nor do I want the battery to die while this all sits in a box.
Someone suggested that what I actually needed was a MOSFET, so I ordered a hobby kit with various FETs that would get here in time and am now running into a new issue - I can’t get the MOSFETs I have to turn fully on and let current through.
I have the resistor connected between Gate and Drain, +4V going to drain, and the load from the module on Source.
With an RFP30N06LE, I get about 2V output to Source. With an IRF840N, I’m only getting 0.9V.
In my photos, the orange wire is +4V, brown connectors the the circuit that ultimately powers the module, and blue is the “tripwire” that pulls down to GND.
I’ve attached a couple of the diagrams I have been referencing, as well as one I quickly drew outlining my particular application.
I’m starting to feel like this circuit design isn’t actually applicable in this context and that what I am going to end up needing is something far more complex that involves parts I don’t have on hand. At the same time, I’m worried that I’m about to give up when I’m only a small adjustment away from success.
raspberriesareyummy@lemmy.world 8 hours ago
I was never excellent at analogue electronics but your very first diagram looks perfectly fine, with the tripwire connecting the transistor base to ground. Preferably with a large resistor to avoid draining the battery quickly. A grounded base should effectively close the collector-emitter path.
Romkslrqusz@lemmy.zip 8 hours ago
That’s where I think I’m having the biggest issue. I’ve been experimenting with different resistors, 20Ω is the only value so far that doesn’t result in the module power cycling the resistor starts to cook, I think it is rated for 1/8W and I could go with a higher wattage rating but I don’t want to drain the 300mAh battery too fast