0% found this document useful (0 votes)
52 views7 pages

Build A Simple Remote Controlled On Off Switch

build-a-simple-remote-controlled-on-off-switch

Uploaded by

12aabbaa30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views7 pages

Build A Simple Remote Controlled On Off Switch

build-a-simple-remote-controlled-on-off-switch

Uploaded by

12aabbaa30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Build A Simple Remote-Controlled ON-OFF Switch

Learn how to build a remote-controlled ON-OFF switch that can be controlled from any
standard remote control. You can use this to control a lamp, triggering a Halloween project
unnoticed, or whatever else you can think of that could be useful to turn on and off remotely.

Overview of the project


In this project you’re going to use an IR receiver component to receive and demodulate an IR
signal from a standard remote control.

You’re not going to decode the signal to figure out what button was pressed, instead you’re just
going to detect if a button has been pressed. You’ll use this to toggle the state of a flip flop that
controls a relay where you’ll connect whatever you want to control.

Copyright © 2024 by Ohmify AS


How IR Remotes Work
Infrared (IR) remote controls send commands to devices like TVs and DVD players using infrared
light. This light is invisible to the human eye but can be detected by receivers on the target
devices.

An IR remote control consists of an IR LED (Light Emitting Diode) that emits infrared light. When
you press a button on the remote, it sends a specific pattern of light pulses that represent
different commands.

These light pulses are modulated, meaning they switch on and off at a high frequency, typically
around 38 kHz. This modulation helps the receiver distinguish the IR signal from ambient light.

The receiver on the device has an IR detector, which demodulates and converts the infrared
light signal back into electrical signals. This detector is designed to only respond to infrared light
modulated at specific frequencies, filtering out signals from natural light sources.

The receiver must then decode these signals to figure out what command was sent (such as
volume up, change channel, or power on/off) based on the pattern of the pulses.

Copyright © 2024 by Ohmify AS


The IR Receiver Component
The main component for this project is an IR receiver. It’s a component that detects IR signals in
the 38kHz range and demodulates them into the 1s and 0s sent by the remote control.

I used the TSOP1238, but there are plenty of other options that will work.

What makes this project possible with so few components is the fact that you’re not going to
figure out what command was sent from the remote control, you’re just going to detect that a
command has been sent – any command.

So instead of trying to decode the output from the IR receiver, you’re just going to detect that a
command starts, then filter out the data of the command to make sure we only trigger the flip
flop one time. You can filter out the data using a capacitor up to VCC.

Copyright © 2024 by Ohmify AS


The reason that we can just use a capacitor here is that the output of the IR Receiver has a pull-
up resistor inside. Here’s a diagram from its datasheet:

When the output from the demodulator goes high, the output transistor turns on and your
capacitor charges up fast since it does not have to go through any resistor (it’s connected
directly to ground through the output transistor).

But when the output from the demodulator goes low again, the output transistor turns off, and
your capacitor must discharge through the internal pullup resistor. This makes the discharge
phase much slower. So the voltage on the output pin will need some time before it becomes
high again.

A capacitor value of around 47 µF is high enough to make the output voltage stay low for the
whole duration of the received IR command.

Copyright © 2024 by Ohmify AS


The Flip Flop
To toggle your relay on and off, you need a flip flop that will change to the opposite state
whenever an input pulse is detected. I used JK flip-flop where both the J and K inputs are tied
high for this project, but it could also be a D flip flop where the D input is tied to the inverter Q
output.

The output from the IR Receiver is inverted. It means that the output is normally high, when
there is no IR signal detected. Then it goes low, every time a signal is detected. So you need a
flip flop that triggers on the negative edge of the signal (or add an inverter).

The 74HC73 is a negative edge-triggered JK flip flop - perfect for the job.

Now, you need to make the Q output from the flip flop control whatever it is that you want to turn
on and off.

The Relay
An easy way to control whatever you want is to use a relay.

To easily control the relay and save a few parts, I used a relay module. The module has pins for
controlling the relay on and off, and it has proper screw terminals for connecting whatever you
want to control.

Copyright © 2024 by Ohmify AS


The Complete Circuit
The complete circuit looks like this:

Parts list
• IR Receiver (TSOP1238)
• Capacitor (47 µF)
• JK Flip Flop (74HC73)
• Relay Module (Ex: Parallax Single Relay Board)

Build Instructions
I recommend you build this out on a breadboard to test it out first. Here’s a drawing of how you
can hook it up:

Copyright © 2024 by Ohmify AS


Once you’ve tested that everything works well, you can solder it onto a stripboard. Here’s a
suggested layout for you. Remember to cut the tracks under the 74HC73 IC so that the left-side
pins are not in contact with the right-side pins:

Want To Learn More?


If you're new to electronics - or trying to get back into it - here are two ways I can help you learn
electronics:

1. Getting Started With Electronics is a short and beginner-friendly eBook I wrote to help
people get started. It contains clear and simple instructions to get started building
electronics. Perfect for complete beginners.

2. Our online classes at Ohmify is for those who want to learn skills like soldering, circuit
design, Arduino, and PCB design and more in order to confidently create electronic
gadgets and tools – and who are prepared to take action to make it happen.

Keep On Soldering!
Oyvind @ build-electronic-circuits.com

Copyright © 2024 by Ohmify AS

You might also like