114-115 - DIY - Nov-15 - Automatic USB Controlled Power Switch

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

do-it-yourself

Automatic USB-Controlled Power Switch


Ajith Kumar control devices powered by mains.
Here we present a circuit that can

A
lmost all electronic gadgets control mains power of an LED TV edi
S.C. Dwiv
now come with one or more and a DTH set-top box (STB).
USB ports. You can use the Generally, mains power for TV
USB port as an automatic switch to and STB are derived from a common

ZD2 R4 R5
12V 10E CON1
D3 D4 1M
R1 S1 1W 230V AC
1W 1N4007 1N4007
1K START 50Hz
N/O
L
R2
1 IC1 4 D2 N
56E C2 C3
+ 1N4007
PC817 N/C R7 1000u 470u C4
D− 2 3
1u,400V
D+ RL1 2.2K 25V 25V L
GND ZD1 1C/O RELAY N
D1 4.7V R3 R6 CON2
1N4007 10K LED1 POWER
CON4 10E
T1 D6 D5 SOCKET
FOR USB−A 1W
BC547 1N4007 1N4007
OUTPUT C1 L
1000u N
25V CON3
POWER
GND SOCKET

Fig. 1: Circuit diagram of the automatic USB-controlled power switch

switchboard. When you switch off


the power of the TV using a remote
control or sleep timer in the TV, the
switched-mode power supply (SMPS)
of the TV continues to draw a small
amount of power from mains and the
STB does not get switched off. This
drawback can be overcome using
this circuit. Besides, it protects the
devices from harmful initial surges
when power comes back after a
power failure.

Fig. 2: Actual-size PCB of the automatic USB-controlled power switch


Circuit and working
Circuit diagram of the automatic
USB-controlled power switch is
shown in Fig. 1. It is built around
optocoupler PC817 (IC1), transistor
BC547 (T1), 12V 1C/O relay (RL1),
six rectifier diodes 1N4007 (D1
through D6) and a few other com-
ponents. USB-A extender cables are
used to connect the USB ports of the
TV and of the STB to the circuit.
230V AC mains power supply
connector CON1 is connected be-
tween n/o contacts of relay RL1 and
neutral line N. When switch S1 is
Fig. 3: Component layout of the PCB pressed, it allows positive voltage to

114 November 2015 | Electronics For You www.efymag.com


do-it-yourself

Parts List timing capacitor


Semiconductors: C1 and the power
IC1 - PC817 optocoupler
T1 - BC547 non transistor
to go through the
D1-D6 connected zener
- 1N4007 rectifier diode
LED1 - 5mm LED diode ZD1 and re-
ZD1 - 4.7V zener diode
ZD2 - 12V, 1W zener diode sistor R3 to the
base of transistor
Resistors (all 1/4-watt, ±5% carbon, unless stated
otherwise):
T1. When transis-
R1 - 1-kilo-ohm
R2 - 56-ohm tor T1 gets base-
R3 - 10-kilo-ohm bias voltage, it
R4, R6 - 10-ohm, 1W
R5 - 1-mega-ohm conducts and relay
R7 - 2.2-kilo-ohm RL1 energises to
Capacitors: provide 230V AC
C1, C2 - 1000µF, 25V electrolytic
C3 mains to power
- 470µF, 25V electrolytic
C4 - 1µF, 400V polyester sockets CON2 and
Miscellaneous:
CON1-CON3 - 2-pin connector terminal
CON3, which are
CON4 - USB-A type used to connect an
RL1 - 12V, 1C/O relay LED TV and STB,
S1 - Tactile switch
respectively.
- USB-A extender cable (2)
When the LED
TV (connected across CON2) and the STB (connected
across CON3) get 230V AC mains power, USB port of the TV
(connected across CON4) gets power to enable IC1. Timing
capacitor C1 gets positive supply voltage through diode D1
and it remains charged until mains power of the LED TV is
disconnected.
When you switch off the TV using its remote control,
power that was available at its USB port connected across
CON4 also stops. So 5V voltage available to the optocou-
pler stops. T1 stays on for a predetermined time (about
100 seconds) only due to the charged timing capacitor
C1. If you wish to keep it on for longer, use higher-value
capacitor C1. After the capacitor has discharged, the com-
plete system gets switched off.
There are two benefits of using the timing capacitor.
The first is to protect the gadgets from harmful power
surges that may occur while switching on using switch S1.
The second is, when you use sleep timer mode of the TV,
you can switch on the LED TV without pressing switch S1
again, if the time lapses before you sleep.
Finally, working of the circuit is simple. Press switch
S1 momentarily to activate the TV LED and STB. When
you switch off the TV using the remote control, both the
TV and STB will get switched off.

Construction and testing


An actual-size, single-side PCB for the automatic USB-con-
trolled power switch is shown in Fig. 2 and its component
layout in Fig. 3. Enclose the PCB in a small box in such
a way that you can connect it to TV’s and
STB’s USB ports. Also provide connectors
for CON1 through CON3. 

Ajith Kumar is an electronics hobbyist

www.efymag.com Electronics For You | November 2015 115

You might also like