This is only a preview of the January 2026 issue of Practical Electronics. You can view 0 of the 80 pages in the full issue. Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Items relevant to "Variable Speed Drive Mk2 For Induction Motors, Part 2":
|
Constructional Project
~ Tim Blythman’s NFC Programmable ~
IR Remote Control Keyfob
Sometimes you need a small infrared (IR) remote control for just a handful of functions.
This remote is about the smallest we’ve seen, it can hang on your keychain and you
can make it yourself. It has three buttons that can trigger separate functions that are
programmable wirelessly via NFC.
W
e’ve used universal infrared remote
controls in several projects over
the last few years, most recently in the
Eight Channel Learning IR Remote
Receiver from the August 2025 issue.
Another project that used a similar
remote control is the Multi-Channel
Volume Control from the November
and December 2024 issues.
The problem with these is that the
remotes tend to be rather large, as
they are intended to control devices
like TVs and Blu-ray players that have
many functions. For these projects, we
need just a few functions like volume
up, volume down or on/off.
We found a smaller remote from a
local retailer that seemed rather useful,
but it was discontinued not long after
we found it. So we thought it’d be a
good idea to design a small IR remote
control with just a few buttons for those
situations where that’s all you need.
Rather than having buttons that send
fixed IR codes, and rely on the receiver
to be able to adapt to that, we felt we
could improve it. It would be handy
for such a device to be programmable.
The difficulty lies in adding a way
to allow codes to be added or changed
easily. We don’t want to massively complicate the device with a screen, more
buttons etc! Nor would it be ideal to
build external hardware to plug into
a socket on the keyfob. Luckily, there
is a neat solution.
You might recall our Dynamic NFC/
RFID Tag from July 2024. It combined
a small chip with a PCB trace antenna
to create a programmable NFC/RFID tag
that can be used to hold and transfer
small amounts of information.
NFC (near-field communications) is
a protocol based on RFID (radio frequency identification) technology. It
34
allows communication with devices
over short distances, typically up to
5cm. It’s the technology that’s used
in things like contactless credit cards
and transit passes.
Here, we have used NFC to add a programming interface to the IR Remote
Control. An external device such as a
mobile phone becomes the programmer,
and the setting can be transferred wirelessly to the Remote Control, without
needing a socket or opening the case!
The Remote Control is simply
placed against the NFC reader on a
device (eg, on the back of a mobile
phone) and an app is used to control
the transfer of data. The NFC chip we
are using doesn’t even need external power, so the data can be transferred without a battery fitted to the
Remote Control.
Other features
Since we are using the same chip
as the earlier Dynamic NFC/RFID Tag,
you can use this device similarly if
you wish. The ST25DV04 has 512
bytes of EEPROM that can be used
to store all manner of information,
as well as the configuration for the
Remote Control. Compatible chips
with more storage are also available
(up to at least 8kiB).
The NFC protocol allows up to four
different NDEF (NFC Data Exchange
Format) records to be stored. Programming the Remote Control only requires
a single text format NDEF record to hold
the programming data; the remaining
space can be used to store any other
information you want.
For example, an NDEF record can
contain a URI to link to a webpage, or
a WiFi record that contains the information needed to connect to a WiFi
network. It could even contain a virtual
business card, embedding data relating
to contact details and phone numbers.
The MIME record type could contain a complete file, such as an image,
although its utility is somewhat limited by the small amount of memory
on the chip.
So you could also use the RFID Programmable IR Fob Remote as a portable NFC tag which can be used to pass
around information such as webpage
links or virtual business cards. The
data is transferred by simply tapping
the fob against an NFC reader.
Circuit details
Fig.1 is the complete circuit diagram. Power comes from coin cell
BAT1 in a holder, which has a 22μF
capacitor across it. This relatively
large capacitance helps to even out
the demands on the coin cell. Its
lifes pan can be adversely affected
by high loads.
A further 100nF capacitor provides
local bypassing for IC2, a PIC16F15224
microcontroller. This is a fairly basic
8-bit 14-pin part, but it has PWM and
timer features to allow the modulation and timing needed to implement
an IR transmitter.
This chip also has a very low-power
sleep mode, which is handy for a device
powered by a small cell. IC2 connects
to the CON1 header for in-circuit serial
programming (ICSP) at its pins 1, 4,
12, 13 and 14. A 10kW pullup on pin
4 sets the microcontroller to run normally unless a programmer overrides
this signal.
IC1 is the ST25DV04 dynamic NFC
tag chip. Pins 2 and 3 connect to a
PCB trace inductor which has a nominal inductance around 4.7μH. When
Practical Electronics | January | 2026
IR Remote Control NFC Keyfob
● Compact keyfob case: 61 × 36.5 × 15.8mm
● Can attach to a keyring
● Three buttons to trigger the IR emitter
● Power supply: CR2032 lithium coin cell
● Standby current: <1μA
● Active current: 3mA
● Status indicator: red/green LED
● IR protocols supported: NEC, Sony SIRC and Philips
RC5 & RC6
● Low battery indicator
● Integrated NFC tag
● Programmable with ST25 NFC Tap mobile app
● Can work with our Multi-channel Volume Control, Eight
Channel Learning IR Remote Receiver and other projects
combined with the chip’s internal
28.5pF capacitance, it is resonant at
NFC’s 13.56MHz frequency. The trace
inductor consists of eight loops on the
back of the PCB.
IC1’s pin 4 is ground, while power
on pin 8 is supplied by IC2’s pin 8,
along with a 100nF bypass capacitor.
This means that IC2 can completely
power off IC1 by setting that pin low
(although IC1 can still get power from
its antenna in that case). Pins 6 and 7
of IC2 connect to pins 5 and 6 of IC1
for the I2C interface; each also has the
requisite 4.7kW pullup to the switched
power line.
Tactile pushbuttons S1, S2 and S3
connect to pins 5, 3 and 2 of IC2 respectively, with the other sides connected to ground. The microcontroller
applies an internal pullup to those pins
so that the switch state can be detected; these pins are in a high state until
the button is pressed, then it goes low.
The remaining circuitry drives the
infrared (IR) transmitter LED2, and a
bicolour indicator LED1. LED1’s red and
green junctions are in inverse parallel
with other, with both in series with a
2.2kW resistor connected between pins
9 and 10 of IC2. By driving one pin
high and the other low, either the red
or green LED can be lit.
The section around IR LED LED2 has
been designed to provide high bursts of
current to drive the transmitter, while
at the same time enforcing a low average current draw on the coin cell. The
470W resistor and 22μF capacitor provide a local buffer, while the 100W resistor limits the peak current.
With the values used, the average
current draw of LED2 during transmission is 2mA, while the IR LED sees
peaks of 15mA, which gives a good
Practical Electronics | January | 2026
compromise between transmission
power and the draw on the coin cell.
LED1 and IC2 will also draw current
while the transmitter is active, adding
to the load on the cell.
This simple circuitry only switches
the IR LED to be on when IC2’s pin 11
takes Mosfet Q1’s gate high, and off
when pin 11 is low. The microcontroller must modulate the signal to
suit the receiver detection frequency
and the expected protocol.
Firmware
The microcontroller runs with a
2MHz instruction clock, much lower
than its 8MHz maximum. That reduces its current draw when it is active
by about 2mA. If the clock was much
slower, the micro would struggle to
generate the necessary waveforms for
IR transmission.
The micro is normally in sleep mode
and it draws less than 1μA. Our Coin
Cell Emulator from November 2024
gives a reading of 0.0μA in this state!
Thus, the cell life will be dominated
by how much the Remote Control is
used and the cell’s shelf life.
When a button is pressed, the micro
‘wakes up’ from sleep mode and acts
upon the button presses. When the buttons are released and transmission has
ceased, the micro checks the supply
voltage. If it is 2.6V or higher, the green
LED in LED1 is flashed briefly; otherwise, it flashes red. This is a simple
but effective battery status indicator.
Fig.1: the Remote Control circuit is straightforward. IC1 is powered from one
of IC2’s I/O pins, allowing it to be fully powered off to minimise battery drain.
The circuit around Q1 and LED2 allows LED2 to be driven at 15mA peak while
limiting the draw on the coin cell to only 3mA.
35
Constructional Project
NFC programming
That IC1 can be programmed via its
RF interface is completely transparent
to the rest of the circuit. Its electrical
interface is much the same as many
I2C EEPROM devices, although its contents also include a header identifying
the size and nature of the data, which
needs to be read and validated before
the data is processed.
In the event that all three buttons
are pressed at the same time, the micro
quickly alternates the green and red
LEDs to alert the user. When the buttons are released, it powers on IC1 and
attempts to read an NDEF text record
from its internal memory, then powers
down IC1 immediately.
If the read is successful and correctly
formatted data is found, the codes are
loaded into memory and are available
for use the next time any of the buttons
are pressed. During this sequence, LED1
blinks in various patterns to report on
the status of the programming.
We’ll discuss the text format, programming and LED colour codes in
more detail later, as well as the use of
the ST25 NFC Tap mobile app.
Construction
The PP43 fob enclosure that we are
using for this project comes equipped
with buttons (to actuate the switches)
and a 3mm hole that suits LED1. However, since these cases are designed to
house RF transmitters, they lack a hole
for the IR LED.
We recommend adding this hole as
the first step, since it will be easier
and neater to tweak the location of the
IR LED than to modify the hole in the
case. You can use the PCB to mark it
out, or use the measurements in the
Fig.2 drilling diagram.
Firmly tape the two case
halves together. The hole
2.2kW LED1
K
Figs.3 & 4: most of the components on
the front of the PCB are M3216/1206
passives or SOIC chips, so they should
be easy enough to solder, even for
those inexperienced with surfacemount work. Don’t forget to fit the
two components on the back of the
PCB. The 22μF capacitor helps protect
the coin cell from brief high-current
demands that could shorten its life.
This diagram is shown at 175% scale.
36
22m F
S1
IC1
K
100W
S2
100nF
PCB assembly
The remaining parts can now be fitted
to the PCB. They are mostly SOIC or
M3216/1206-sized SMD devices, along
with some through-hole parts. So it is
easy enough to construct even if you
have had minimal experience working
with SMD parts.
At a minimum, you will need a
syringe of flux paste and tweezers if
you are accustomed to working with
through-hole parts. Your flux will likely
recommend a cleaning solvent; if not,
isopropyl alcohol works well for most
fluxes (you can use methylated spirits
in a pinch).
We also recommend you keep on
hand some solder-wicking braid, a
magnifier and a fume extraction fan. If
you don’t have such a fan, work near
an open window or outdoors. Working on a uniform light-coloured background will help you find any parts
S3
100nF
Q1
4.7kW
BAT1
4.7kW 10kW
IC2
CR–2032
CON1
10kW
22m F
+
Fig.2: you can use the dimensions
here to locate the hole for the 5mm IR
LED, or simply slot the PCB into place
and use it to place marks on the case.
There is a locating pin on the case to
ensure that the PCB is aligned.
470W
is centred on the division between the
two halves. We found it worked well
enough to drill both halves at the same
time as long as they were securely held
together. Check our photos to confirm the
placement of the hole and start with a
smaller pilot hole to locate it accurately.
You can see that the hole sits underneath the black button. It is a 5mm
diameter hole and, of course, it goes
in the opposite end of the case from
where a keyring would attach. The
metal battery tabs included with the
case are not needed since we are using
a cell holder fitted to the PCB.
LED2
The IR transmitter combines a timer
and PWM peripheral to generate the IR
modulation, which can vary between
36kHz and 40kHz, depending on the
protocol. The processor encodes the
IR signal as a series of active and inactive phases at the carrier frequency.
The Remote Control supports the
NEC, Sony (SIRC) and Philips (RC5
and RC6) protocols. John Clarke explained all of these in detail in the article on the Eight Channel Learning IR
Remote Receiver.
An interrupt is triggered on each
PWM cycle, providing the timing to
step through the active and inactive
phases of the encoded signal. LED1 is
driven in time with the active phases
of the IR signal, to give confirmation
that transmission is occurring. The
colour reflects the battery state; it flashes green if the battery is fine or red if
its voltage is low.
When the transmission cycle ends,
the buttons are checked and the IR
transmission continues if the button
is held down. For most protocols, that
means simply repeating the previously
sent sequence, but the NEC protocol
uses a special repeat packet instead.
Practical Electronics | January | 2026
IR Remote Control NFC Keyfob
that you drop, and a magnifying lamp
can also be helpful.
Proceed to fit the parts in the locations shown in the Fig.3 and Fig.4
overlay diagrams. Start with Q1, the
only SOT-23 device. Smear a tiny bit of
flux paste on its pads (that will make
soldering much easier) and rest it in
place according to the silkscreen marking, with its leads flat against the PCB.
Tack one lead, then check the positioning of the remaining pins over
their pads and adjust as needed by
remelting the solder. With it correctly located, solder the remaining leads
and refresh the first lead by adding a
tiny amount of extra flux paste before
touching the iron to it.
The same process can be used to
solder IC1 & IC2. Before soldering
any pins, it’s most important that you
identify pin 1 on the IC, which is usually indicated by a dot or divot in one
corner. Failing that, look for a chamfered edge along one side. With that
side on the left and the writing facing
you, pin 1 will be at upper left. Match
each chip’s pin 1 with the markings on
the PCB and Figs.3 & 4.
Solder these parts in place, just like
Q1. If you get a solder bridge between
two pins, leave it in until all the leads
are soldered. To remove a bridge, add
more flux, then gently push the braid
against the solder with the iron. When
it draws in the excess solder, gently
slide both away from the part.
Now you can fit the four capacitors using the same technique. There
are two 100nF parts, one adjacent to
each IC. These will be thinner than
the 22μF parts. One 22μF part is near
the top of the PCB, while the other is
on the back.
The resistors will be marked with
value codes (see the parts list). Make
sure that the values match the silkscreen and overlay in Fig.3. There are
seven resistors to be fitted.
Next, solder the cell holder in place.
Align it with the markings on the PCB,
being sure that the cell entry faces
the corner of the PCB near the BAT1
marker on the silkscreen. You can also
compare its orientation to the photos.
Take care to line it up correctly, since
it may prevent the screw being fitted if
it is too close to the edge of the board.
Apply a little solder to one pad, then
check its position. If you’re happy
with that, apply a generous amount of
solder to both pads to give mechanical strength.
Practical Electronics | January | 2026
Parts List – IR Remote Control Keyfob
1 double-sided PCB coded 15109231, 30.5 × 52mm
1 Supertronic PP43 keyfob enclosure
1 2032-size SMD coin cell holder (BAT1) [eg, Linx BAT-HLD-001]
1 CR2032 or CR2025 3V lithium coin cell (BAT1) ♦
1 5-way pin header, 2.54mm pitch (CON1; optional, for ICSP) ♦
3 4.3mm-high 6×6mm through-hole tactile switches (S1-S3)
1 M2×6mm Nylon machine screw and hex nut
1 lid label sticker
Semiconductors
1 ST25DV04K-IER6S3 (or equivalent) dynamic RFID tag chip, SOIC-8 (IC1)
1 PIC16F15224-I/SL 8-bit microcontroller programmed with 1510923A.HEX,
SOIC-14 (IC2)
1 3mm bicolour (red/green) LED (LED1)
1 5mm IR emitter LED (LED2) [TSAL6200 recommended]
1 2N7002 N-channel Mosfet, SOT-23 (Q1)
Capacitors (all SMD M3216/1206, X7R ceramic)
2 22μF 10V
2 100nF 50V
Resistors (all SMD M3216/1206, 1%, ⅛W)
2 10kW (code 1002 or 103)
2 4.7kW (code 4701 or 472)
1 2.2kW (code 2201 or 222)
1 470W (code 470R or 471)
1 100W (code 100R or 101)
This Remote Control will easily fit in your pocket and can trigger up to three
different functions. It makes the perfect compact companion for devices like
the Eight Channel Learning IR Remote Receiver. The PCB slots into the case and
aligns with a pin moulded into its base. The ICSP (in-circuit serial programming)
header can be left in place. Note the screw to prevent the coin cell being
removed by children. Both images are shown enlarged for clarity.
SC7421 Kit (~£15 + P&P): includes all parts listed except the two marked
with ♦. The microcontroller is pre-programmed, but the NFC chip will be blank.
37
Constructional Project
That completes the surface-mounting
parts, so clean off any excess flux using
your solvent and allow the board to dry
thoroughly. Take the time to inspect it
under magnification for bridges or bad
solder joints, since they will be easier
to correct now than later.
Through-hole parts
Bend IR LED2’s leads at right angles
directly behind the body. Make sure
they are bent in the right direction,
such that the shorter cathode lead
will go into the hole marked K on the
PCB. Push it into the holes and solder
one of the leads so that the lens points
out parallel to the PCB, then trim both
leads (leave the unsoldered one long
enough to solder later).
You can now place the PCB in the
bottom of the case and confirm that
LED2 lines up with the hole. Having
only one lead soldered will make it
easier to adjust the position. Once it
is aligned with the hole, solder the
other lead.
Next, fit the three tactile switches.
These must be no more than 4.3mm
high; any taller and they would be permanently depressed by the case buttons. They must also be mounted flat
against the PCB for the same reason.
You can now use the PCB along with
the top half of the case to check the position of the bicolour LED, LED1. Its
top lip should sit no more than 7mm
above the PCB. The K cathode marking
on the PCB corresponds to the cathode
of the red LED in the package.
Test this with a multimeter set to
diode mode. When the LED lights up
red, the pin connected to the multimeter’s black lead is the one that should
be placed in the hole marked K.
If you have a pre-programmed chip
for IC2, you can fit a coin cell and test
the LED’s operation. Pressing and holding one of the buttons should cause
the LED to flicker and flash green,
assuming a fresh cell has been fitted.
If it’s red instead, you should swap
its leads.
Programming IC2
The hole shown in Fig.2 allows the IR
emitter LED to poke out through the
end of the case, as seen here. Note the
location relative to the
buttons.
38
The ICSP header is only needed if
you have to program a blank chip for
IC2. A standard height (11mm total)
header strip will not foul the case
when fitted, so we recommend that
you solder this in place and leave it;
it will not affect the operation at all.
The software we use for programming PICs is Microchip’s IPE (integrated
programming interface), which can be
downloaded as part of the MPLAB X
IDE from www.microchip.com/en-us/
tools-resources/develop/mplab-x-ide
A Snap, PICkit 4 or PICkit 5 programmer can be used for programming. A
coin cell should be fitted to provide
power if needed; for example, the
Snap cannot provide power. Connect
the programmer to the CON1 header,
aligning the pin 1 arrows on the programmer and PCB.
Choose the PIC16F15224 as the part,
click connect and confirm that communication is established. If powering
IC2 from the programmer (PICkit), you
will need to enable that before clicking
the connect button. Load the HEX file,
program it into the chip and check that
it verifies correctly. The LED should
briefly flash green as programming
finishes or when you disconnect the
programmer.
Final assembly
Fit the cell (+ side up) and secure
it with the machine screw and nut
through the adjacent hole, feeding the
screw from the bottom of the PCB. The
case should neatly snap together around
the PCB. Check that the buttons actuate correctly and the LED lights up as
described earlier.
If the LED lights when no button is
pressed, one of the switches may be
stuck. Check the solder joints on the
back of the PCB and trim down any
that are too tall. The PCB should slot
neatly into the case and sit flat.
The default programming is to suit
the Multi-channel Volume Control,
with the red and blue buttons increasing and decreasing the volume, respectively (think hotter and colder!). The
black button controls the mute function. The default codes are for an NEC
device at address 0, with command
codes 21 (red), 7 (blue) and 67 (black).
You might see these values reported
differently on some systems. An example is the Micromite or PicoMite
IR decoder, which will report codes
168, 224 and 194 respectively because
it uses a reversed bit order. The device
code is still reported as 0 as the bits
are the same when reversed.
Simple hardware, such as the IR Keyboard we created in August 2019 (“Control your PC with an infrared remote”)
can also be used to interact with this
and other IR transmitters. The excellent irremote Arduino library makes it
easy to receive all sorts of IR signals.
Programming the NFC chip
To use the Remote Control with other
hardware, you will need to program it
to use new codes. First, you need to
determine the protocols and codes to
use. If you do not have a manual or
other reference for these, hardware
similar to the IR Keyboard can be used
to read codes from an existing remote.
The Arduino irremote library comes
with a sample sketch called “ReceiveDump”, which reports the protocol and
details of received IR signals. We used
this extensively during our testing of
the Remote Control to check that it was
delivering the correct codes.
Practical Electronics | January | 2026
IR Remote Control NFC Keyfob
The NDEF text record required to
program the Remote is much the same
as a CSV (comma separated variable)
file. The first field in each row is a
code that identifies the protocol; the
codes and protocols are listed in Table
1. The next field is the address code in
decimal, followed by the command or
data field, also in decimal.
You will need the ST25 NFC Tap
mobile app and a device that has NFC
capabilities. We used an Android phone
and downloaded the app from the Play
Store (https://pemag.au/link/ac38). We
haven’t tested it, but the app also appears on the Apple App Store (https://
pemag.au/link/ac39).
There may be other apps that will
work; we previously tried the NXP
TagInfo and TagWriter apps. Any app
that can read and write NFC NDEF records should work.
Screen 1 shows the welcome screen
Table 1 – protocol codes for RFID
Programmable IR Fob Remote
for the ST25 NFC Tap. Hold the back
of the Remote Control against the back
of the phone (or other device). Screen
2 shows what you will see when the
NFC tag in the Remote Control is read.
Tap the NDEF tab to see Screen 3,
then the blue button at bottom right
and select the option to add a plain
NDEF text record to the tag. Screen 4
shows the text field; you simply enter
the codes and values as shown, pressing the Enter key between each line.
The red button is on the first line,
blue on the second and black on the
third. When you have finished making
changes, save the new text to the tag
using the save button at top tight. The
ST25 app uses a line feed (LF, ASCII
0xA) as the line separator, so if you
use a different app, make sure that
this is the same.
The values shown in Screen 4 are
equivalent to the default settings provided by the Remote Control. You can
also add an extra column with notes
or comments about each line. Just be
sure to separate it from the other values
with a comma and be aware of the limited memory available.
There are many other things that
you can do with the app. For example, Screen 3 has a copy button at top
right that can be used to clone tags.
Screen 1: the ST25 NFC Tap comes
from STMicroelectronics, who
produce the ST25 range of chips. It’s
a good idea to open the app before
scanning a tag. Otherwise, your
device might open a different app
when the tag is brought near.
Screen 2: when a tag is first scanned,
some basic information is provided,
including the serial number. The tabs
along the top provide more options.
Screen 3: a blank tag will have no
NDEF records yet. The blue button at
the bottom right of this page allows
records to be added.
Practical Electronics | January | 2026
Addr.
bits
Cmnd.
bits
NEC N
8
8
Philips RC5 5
5
6
Philips RC6 6
8
8
Sony 12-bit S
5
7
Sony 15-bit T
8
7
Sony 20-bit U
13
7
Protocol Code
39
Constructional Project
The Memory tab can be used to read,
write or erase the tag’s EEPROM. If a
tag is not working correctly, you can
try erasing the EEPROM and rewriting the settings.
The Memory tab also allows the
tag contents to be read from or written to a file. The DEFAULT.BIN file
in the downloads for this project can
be written to the tag to similarly reset
it to containing the default IR codes.
You can add other NDEF records to
the tag. In our experience, a device will
typically act on the first valid record
that it recognises. So if you wish to
add an alternative record for people to
scan (such as a WiFi handover record
or URI record), we suggest adding it
before the text record for the Remote
Control. Non-text records are simply
ignored by the microcontroller.
Remote Control use
While the above process writes a
set of codes to IC1, these are not au-
tomatically loaded. Instead, the buttons are used to do this under user
control. Pressing all three buttons at
the same time will trigger the read sequence. While the buttons are held
down, the LED will alternate red
and green.
Releasing the buttons starts the reading process. Firstly, IC2 checks if IC1 is
present and if it is not, the LED flashes red once for about a second. If IC1
is present but no NDEF text record is
found, then nothing is shown on the
LED. This can be expected with a blank
NFC chip, such as if construction has
just been completed.
If a valid NDEF text record is found,
the LED will flash once for each of the
three button codes, in order from left
to right, green if it is valid or red if it
is not. If it is valid, the code will be
updated; otherwise, the current code
is kept. After this, normal operation resumes and you should see a brief flash
indicating the battery status.
In general, the code requires a valid
protocol code as per Table 1. The address and command values provided
must fit within the number of bits prescribed. For example, a value of 256
for either the address or command of
an NEC code would be invalid, since
these are eight-bit values and 256 requires nine bits to encode.
After programming, the Remote Control operates with the new codes. Simply
push each button and the corresponding IR code will be sent for as long as
the button is held down. If a second
button is pressed, while the first is
still down, the first code will continue
until the first button is released, then
the second code will start.
If you start to see the LED flashing
red instead of green during operation, then the battery is getting low;
down around 2.6V. The circuit itself
will function down to near 2.0V, but
IR range will suffer due to the lower
PE
current provided to LED2.
Completion
We’ve created a label for the keyfob
shown below. There’s space for
functions to be added in permanent
marker below each button on the
sticker. The kit for this project will
include a sticker with this artwork
– attach it to the front of the fob
case.
As we noted, the files in
downloads include a DEFAULT.
BIN file (containing the values
seen in Screen 4) that can be
written directly to the EEPROM,
if you wish to experiment with it.
The downloads also include the
HEX file for programming the
microcontroller and the MPLAB X
project files.
Screen 4: the text shown here matches
the default settings of the remote
control. The text can be stored to the
tag with the SAVE button (floppy disk
icon) at upper right.
40
Screen 5: the Memory tab provides
access to low-level read and write
functions. You can also store the tag
contents to a file.
There are spaces on this label to add
a legend for each button so you know
what it does. This will be provided
as a sticker in kits purchased from
the Silicon Chip Shop, and will also be
available to download.
Practical Electronics | January | 2026
|