Maker Pro
Maker Pro

Basic Toggle Switch Circuit

zsteve

Aug 20, 2015
5
Joined
Aug 20, 2015
Messages
5
My computer speakers have a a separate momentary non latching on/off power switch that I have to manually turn on and off every time I use the PC.There is also an indicator LED next to the switch.

Can anyone help me with a simple circuit I can build using the 5V signal from the USB port to toggle the switch?

PC on 5v from USB port -> toggle a momentary set of contacts
PC off 0v from USB port -> toggle momentary contacts again

I presume the logic state of the switch could get reversed on random occasion, but then I could just tap the normal power switch and be okay again.

Found this on eBay, but not sure if its what I would need.
http://www.ebay.com/itm/5V-12V-Butt...W-Brand-New-/221855722885?hash=item33a7a1ad85

Thanks for any help.
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
To confirm... non latching button?

in that case there's a flipflop used to switch on the speakers, open it look at the non latching button, you'll be able to switch it on by simply shorting the button...

the same can be done with a generic transistor
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Not all latching pushbutton switches remain indented in one state and extended in the other. How sure are you that the switch is not latching?

ak
 

zsteve

Aug 20, 2015
5
Joined
Aug 20, 2015
Messages
5
20150824_200105.jpg
20150824_200007.jpg


I understand the concept of shorting the switch as a toggle. I just don't know which relay/transistor/circuit to use to get the 5V from my USB port as the computer turns on and off as the toggle to short the switch on and off.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Found this on eBay, but not sure if its what I would need.
http://www.ebay.com/itm/5V-12V-Butt...W-Brand-New-/221855722885?hash=item33a7a1ad85

Thanks for any help.

This is the "Technical???" specs on that board: :rolleyes:

"Parameters:
Size: 8.1CM * 3.2CM
Supply voltage: 5V or 7-12V(When using a 5V power supply, short circuit to short-circuit the cap chease; When using the 7-12V power supply, short circuit to remove the cap chease)
Control: Low pulse action, a low level over the relay on the job, and then a low level over the relay resets, and so on. Low level can be used to generate keys can also be used to produce single-chip to control. The following describes in detail the use of the method. Greater than or equal to 0.1 seconds low effective"


Reading Chinese product descriptions and spec data is always great fun. They should all be prefaced with... "If you really want to get confused please read our product description". :confused:o_O

Regardless of that I don't believe that board will do what you want.

Chris
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
Well, any generic transistor... as i said

tie gnd usb to gnd of the speaker, use a multimeter to find which side of the button is 5v and which is ground...

but it requires a pulse, or it will switch on and off, a 555 sounds like a candidate
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
The power switch S3 is a SPST momentary TACT switch, so there is a toggle flipflop circuit somewhere. The latch could be built into the audio amp IC, but probably not. Can you read any lettering on U3?

Also, the switch circuit might not be toggling power; it might be toggling an On/Standby or Enable/Disable input to the audio amp.

ak
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
There may be options other than toggling that switch. Do you have a DMM?

Chris
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Just remembered another option common in Asian designs but less so in the US, a single chip on/standby controller. Switch interface and debounce, flipflop, and a small power MOSFET all in one package. That might be U3.

If you can work through the PCB traces and determine that one end of the switch goes to GND, that makes things much easier. In that case you probably can drive the other switch contact with an open collector NPN.

If the speakers are powered separately from the computer, why not just leave them on when the computer is off?

ak
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Much has been said here regarding a simple BJT switch paralleling the push button but he's going to need a bit more than that if shunting the switch is the rout he takes. As I see it zsteve needs the following logic..

(1) PC turns ON: 5V USB power is used to fwd bias the BJT ON 'momentarily'.
(2) PC turns OFF: The 5V USB power drops to 0V. This event must again fwd bias the BJT ON 'momentarily'.

In short a single NPN and base resistor will not do if zsteve is shunting that switch.

Chris
 

zsteve

Aug 20, 2015
5
Joined
Aug 20, 2015
Messages
5
20150825_151916.jpg


20150825_152212.jpg


I've done some basic 12v auto wiring with car alarms and relays, also home 120vac wiring, but not much in the way of circuit design and have yet to wire a transistor or IC to anything which is why I'm here asking.

I do have a nice digital multimeter. Appreciate the help and advice so far. Let me know if there's anything else you suggest I check on the board.

The reason I don't leave the speakers on all the time is that there's a distinct amplifier hiss that I can hear from the speakers when they're on all the time.
 
Last edited:

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
In short a single NPN and base resistor will not do if zsteve is shunting that switch.

True, but 100 uF to 470 uF at 10 V should be enough holdup to power a pulse before the cap runs dry.

ak
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
True, but 100 uF to 470 uF at 10 V should be enough holdup to power a pulse before the cap runs dry.

ak

I'm not sure what you're saying. ZSteve needs 5V pulse On & 5V pulse Off. I'm just saying it isn't going to happen with a single transistor and associated R & C. Perhaps you can draw it?

Chris
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Misunderstood your comment. Given that there is a pulse circuit driving the switching transistor, having it make a pulse on power up is easy. However, there is a logic problem if the pulser has to be triggered by removing its own power. Hence, a small energy store to complete the pulse triggered by USB power going away.

This can be done with one 74HC14, or one CD4093, or one ULN2003. I'll see if I can sketch up something tomorrow.

ak
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Yes AK, that was my point. ;) Judging by your description here you perhaps saw a schematic of the chip (U3?) in question?
Just remembered another option common in Asian designs but less so in the US, a single chip on/standby controller. Switch interface and debounce, flipflop, and a small power MOSFET all in one package. That might be U3.

<snip>
ak

If we can determine a single (control) node (anywhere on that board) that is held low when the amp is on and held high when the amp is off we may be able to facilitate a single NPN + one fwd bias resistor solution.

Chris
 
Last edited:

zsteve

Aug 20, 2015
5
Joined
Aug 20, 2015
Messages
5
I had thought of using the presence of 5v through the USB port as the toggle, but I suppose it would be just as easy to use 12v since the power connector for the hard drives supplies that when the computer is on. Thank you for the insight so far.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
Here is a first pass at using USB for both power and signalling. If Ground isolation is needed, Q1 can be replaced with an optocoupler.

ak
SpeakerToggle-1-ch.gif
 

Attachments

  • SpeakerToggle-1-c.pdf
    11.3 KB · Views: 76

zsteve

Aug 20, 2015
5
Joined
Aug 20, 2015
Messages
5
4093.png


Thanks for the help AnalogKid, I have a breadboard that came along with an Arduino kit I've been meaning to learn how to use that should suit the task.

A few questions:
1) Am I correct in assuming that U1A, U1B, U1C and U1D are all in the same single 4093 IC chip with pin references as shown in the IC picture above?

2) The pin numbering for 1/2/3 and 11/12/13 seem to correlate with your schematic, but 4/5/6 and 8/9/10, the do not. Are the numbers just mislabeled on your schematic for those pins?

3) Does the 5v coming into C1 and C2 need to be constant power supply from somewhere else?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
4093.png


Thanks for the help AnalogKid, I have a breadboard that came along with an Arduino kit I've been meaning to learn how to use that should suit the task.

A few questions:
1) Am I correct in assuming that U1A, U1B, U1C and U1D are all in the same single 4093 IC chip with pin references as shown in the IC picture above?

2) The pin numbering for 1/2/3 and 11/12/13 seem to correlate with your schematic, but 4/5/6 and 8/9/10, the do not. Are the numbers just mislabeled on your schematic for those pins?

3) Does the 5v coming into C1 and C2 need to be constant power supply from somewhere else?
(1) Yes, they're all the same quad NAND Gate package.
(2) Yes, they're mislabeled. Follow the attachment you posted.
(3) No, the node marked +5V is an Output not an Input. Vdd (Pin14) of the 4093 gets tied there too. When your PC turns On the USB power pin (~5.5V) charges C1 through D1 and provides ~4.8V at the bus marked +5V. When the PC turns off C1 stays charged to provide power to the Vdd and logic pins. D1 prevents C1 from discharging back into the USB port when the PC turns off.

I have no idea how the issue in (2) happened. AK is probably using a commercial schematic editor or spice simulator program. If so the error is not his.

AK... Nice! :cool:

Chris
 
Last edited:
Top