C-B-G: New Simplified Redesign
A couple years ago, Tommy wrote an article for Circuit Cellar about his device designed to mute TV commercial audio. In this article, he shares his revamped design that is much simpler in construction while adding more features. Controlled by an Arduino Nano MCU, the electronics are so simple that the device doesn’t even need a PCB or a power supply.
Commercial-B-Gone (C-B-G) is a device that will give you quiet relief from annoying and repetitious TV commercials you’ve grown to hate because you’ve heard them at least 50 times. It uses a control unit about the size of a pack of cigarettes that can be hung on a wall, placed on a shelf or hidden out of sight behind your TV. There are no modifications to the TV, nor any direct connections between it and the control unit. The only thing you carry around with you is a tiny push button radio transmitter not much bigger than your thumb. When you see or hear the start of one of those obnoxious commercials or solicitations, just press the button.
Even if the push button is in your pocket or you’re in another room out of sight of the TV, C-B-G Immediately silences the TV audio. I have mine set for a 3½ minute commercial break. At the end of that time audio is automatically restored, or you can restore it sooner by pressing the button again. The duration of the automatic mute time is easily changed to whatever works best for you. This is a low budget, easy-to-build project that you will really enjoy using and to which you will quickly become addicted. The design is a major improvement over one that I published a few years ago in my article ” Device Avoids TV Commercials” (Circuit Cellar 334, May 2018). It’s much simpler in construction but has more features. Plan to spend about $35 for the materials you need, and build it in just a few hours.
The C-B-G design is simplified by using three modular sub-assemblies (Figure 1). One Module is an Arduino Nano microcontroller (MCU) that coordinates everything and provides all timing functions. Another module is a UHF remote control receiver that picks up the signal from a personal push button. The third module is a device that learns, saves and reproduces the TV’s infrared (IR) remote control MUTE signal. Its IR LED serves double duty as an optical sensor when learning the mute signal and as an IR emitter when reproducing that signal. We add another LED to indicate when the automatic break timer is running, so you always know why the TV is silent. The main board that everything mounts on is so simple that a PCB is unnecessary. Everything can be enclosed in a 4-1/2″ × 2-1/2″ × 1″ plastic box or you can just use a bare board construction.
The circuit for C-B-G (Figure 2) looks more like a wiring diagram than a schematic because of the modular construction. Operation couldn’t be simpler. When the UHF module receives a radio signal its output (VT) signals the MCU board (input A3) to turn on the mute indicator (output A5), trigger the IR module (output A1), and start the mute timer. U3 is a solid-state switch that momentarily closes the circuit between U1-8 and U1-9 of the IR module. That’s equivalent to pressing the ▼ button, which transmits a mute signal to the TV. When the mute timer expires, or if another UHF transmission is received before that, the mute indicator is turned off and the IR module is triggered again to un-mute the TV. Power for the control is obtained from any available unused USB port or from a 5VDC charger.
PARTS NEEDED FOR CONSTRUCTION
The four most critical components of this project are all made in China and generally not stocked by US electronics distributors (Figure 3). The best sources I can recommend for these are Banggood.com or eBay.com. I have always found Banggood to have good prices and reasonably fast shipping. Use its site to familiarize yourself with the following components.
On the banggood.com site:
search for “959231” and select “ATmega328P Nano V3 Module Improve…”
search for “1618440” and select “KTNNKG 433MHz RF Remote Control…”
search for “1407281” and select “Geekcreit RX480E-4 433MHz Wireless…”
search for “1149663” and select “CHUNGHOP L181 Mini Universal…”
The Microchip (formerly Atmel) ATmega328P MCU-based board is equivalent to an Arduino Nano and uses the same MCU, but is available at a fraction of the cost. There are dozens of manufacturers of these Nano equivalent boards, and they all look almost exactly like the one shown. Some are sold with headers installed, and others supply loose headers in a bag. We can use either one, the cheaper the better.
The push button RF transmitter is a good choice for a personal transmitter unit. It’s a small, thin, key fob unit with only one large push button and no external antenna—perfect for something you can easily pin to your clothing or tuck away in a pocket and operate just by feel. It’s a 433MHz transmitter with quartz crystal frequency stabilization and 1527 encoding. It’s powered by a pair of CR2016 Lithium coin cell batteries, and is even waterproof. Its companion is a Geekcreit Model RX480E UHF receiver, a smart “learning” 433MHz superhet receiver with crystal stabilized carrier frequency and 1527 decoding. There are also numerous manufacturers of this item.
The Chunghop learning remote control handles the most important function of this project: learning and reproducing the IR signal that mutes the TV. We remove the tiny 1.1” × 2.2” circuit board inside the remote and use it for the IR module. It is this device that allows you to configure C-B-G for use with almost any TV of your choosing.
Other than two small resistors and some wire, the only other items you need are available from many US sources, such as the following Digi-Key parts:
P/N HM2027-ND, Hammond 1591XXBSBK Black Box
P/N 255-1430-5-ND, Panasonic AQY210EH Solid-State Relay
P/N 1516-1365-ND, Brightek QBL81B60D Blue Diffused LED
P/N V1042-ND, Vector 64P44WE Punchboard
The Punchboard is for making the main board, and you’ll need a piece that’s at least 2″ × 3.8″. The material can be FR2 (phenolic) or FR4 (glass epoxy), either unclad or with solder pads on one side and NPT (non-plated thru) holes. You can also find this occasionally at Banggood by searching “929161” and selecting “12cm × 18cm PCB Prototyping Printed.”
PREPARE THE UHF MODULE
When you have both the UHF transmitter and receiver units, you should test them to make sure they are paired and working properly. Connect two or three 1.5V batteries to the V+ and GND terminals of the receiver for power. First, clear the receiver of any previously learned configuration by pressing its little LEARN push button eight times. The red LED will blink with each press to help you keep count. Immediately after the eighth press, the LED will blink seven more times on its own to indicate the receiver has been cleared. This is not something you’ll probably ever have to repeat. We’re doing it to make sure the receiver is not configured for latching operation or something else we don’t want.
Next, pair the receiver and transmitter. Press the receiver LEARN button momentarily. The LED will come on steady, indicating the receiver is in pairing mode waiting to receive a transmission from a unit to pair with. Now press and hold the transmitter button until the receiver LED blinks three times to indicate it has paired with that transmitter and saved its ID. Test it by pressing the transmitter button again to make sure the receiver LED lights as long as the button is pressed, but goes out when it’s released.
When the unit is receiving a signal on channel “n” from a transmitter it’s been paired with, the Dn output pin goes high and the LED lights. The VT output pin is an “OR” output that also goes high when any output (D0 – D3) does. We use the VT output instead of a specific channel output so that you can add a second transmitter for another family member, or replace a lost or broken one, without having to worry about buying a transmitter built for a certain channel.
If your receiver has no antenna (most are sold that way), connect a 7-1/2″ piece of very small gauge insulated wire—solid or stranded—to the “ANT” pad at the corner of the receiver board. At final assembly, the antenna can lie at random inside the control box, or you can drill a small hole and let it hang outside.
PREPARE THE IR MODULE
When you receive the Chunghop L181 remote control, teaching it to mute your TV is the first step to preparing it for C-B-G. Any button except the “S” button can learn any IR signal. For C-B-G we use the ▼ button rather than the center button marked with a MUTE symbol because the switch contacts of the ▼ button are more accessible for wiring connections. Put two AAA batteries in the Chunghop remote and place it about an inch in front of your regular TV remote control, pointing directly at it. Make sure there are no bright lights or strong daylight shining directly into the LED at the front of Chunghop remote (hereafter referred to just as Chunghop).
1. Hold the Chunghop S button down until the little red LED stays on steady.
2. Press the MUTE button of the regular TV remote until the LED begins flashing.
3. Press the Chunghop ▼ button until the LED flickers, then comes on steady again.
4. Press the S button again. The LED will turn off, indicating the signal has been saved.
Now you should be able to mute your TV with the ▼ button. If you have problems, try repeating the learning procedure. There’s no way to erase a button, but you can over-write it with a new signal as often as needed. Chunghop can learn and reproduce any command of practically any brand and model TV that uses an IR remote control. It also has its own non-volatile memory to store any signal it learns, so when you remove the board from Chunghop to place it in C-G-B, it will not forget how to transmit the ▼ signal. This also means you can power C-B-G from an unused USB socket in the TV without concern for power being switched on and off.
Before dismantling Chunghop, you might use it to plan a suitable location for the C-B-G control. Operate Chunghop as if it were the control box. Mute and un-mute the TV while moving Chunghop around to various places in front of, behind, above and below the TV—aimed in various directions. You may be surprised how easy it will be to locate the control unit where it is invisible or unobtrusive, yet effective. The IR signal is strong and bounces off most surfaces.
Remove the Chunghop door and batteries, insert a flat blade screwdriver into the slot at either side of the battery compartment and twist. The rear end will snap open far enough for you to pry the case apart and remove the circuit board. Don’t worry about damaging the case. The only parts we want are the board assembly and the yellow keypad. When working on the circuit board, wrap it with a strip of paper or aluminum foil to protect the interleaved black fingers on the top surface from dirt, soldering flux, oily finger prints or other contamination. These are the switch contacts. Clean them with alcohol if necessary. Heat the solder joints of both battery contact springs and drop them out of the board.
You can leave the IR LED where it is for now until you see later if you get good results aiming it out of the front end of the control box. Or you can go ahead and place it on a short cable. I suggest a cable about 12″ long. Be sure to observe the correct LED polarity silk-screened on the board. To avoid disturbing the tiny surface mount resistor (R1) that’s very close to the solder pads of the IR LED, cut the LED leads beneath the board at their midpoint and attach your wires to the cut leads.
PREPARE THE NANO BOARD
The only preparation the Nano board needs is to load the C-B-G sketch (program) into the chip. If you are hesitant because you lack experience with Arduino, try taking it one step at a time. Purchase just the Nano board and a micro USB cable to go with it. Then build a simple circuit (Figure 4) to load and test the program before proceeding with the project. The Nano board will be easier to plug and unplug if you cut off the 24 unused pins. Don’t cut the 3V3 pin. It’s not used for testing, but is needed for C-B-G.
The tester switch simulates an incoming signal from the personal push button. The red LED blinks to simulate sending a MUTE command to the TV, and the blue LED is the MUTE indicator. It is lit to show the C-B-G timer is running, or blinking when you are re-calibrating mute time.
Once you have downloaded and installed the Arduino IDE it will open to the editor page where you can put the the sketch code for downloading into the chip. The sketch is 66 lines of code (Listing 1). You can just type those lines onto the editor page if you want to, but there’s an easier way. Go to the Circuit Cellar website and select Magazine > Article Code & Files. Double-click on the button for year 2020, then the button for issue 361, then the folder for author 361 Tyler. You’ll see two files, an .ino file and a text file. Double-click on the .ino file, then click on the blue Download button.
When download is complete the filename will appear at lower left corner of the screen. Click on the filename. The Arduino logo screen will pop up while Arduino tries to load the sketch. After a few seconds you’ll see a message box informing you the sketch file can’t be loaded because it’s not in a folder. It asks if you want Arduino to take care of all that. Click on OK and wait for the editor to open with the sketch displayed. Connect the USB cable and make the following selections in the IDE Tools drop-down menu:
Board: “Arduino Nano”
Port: “COMn“ (Make sure “n“ is available)
Programmer: “ArduinoISP” or “ArduinoISP (Old Bootloader)“
Upload the sketch by pressing the reset switch on the Nano board and then clicking on the Upload button ( ) at top of the IDE display. IDE tells you when it is compiling and when it is uploading. For this short program it takes less than a minute. If you have made a typographical error IDE halts compiling the program, highlights the faulty line of code, and prompts you with a message containing a clue (often cryptic) to the error. After correcting the listing try uploading again. Keep trying until you see a Done uploading message, which means the program is installed and ready to roll. If IDE compiles without error but can’t complete the upload, try the alternate programmer “ArduinoISP (Old Bootloader).“
Close the test switch. The red LED should blink and the blue LED should turn on. Fifteen seconds later the red LED should blink again and the blue LED should turn off. The default setting of automatic mute time when you first load the program is fifteen seconds. Read the section on Using and Calibrating C-B-G to see how you can change the mute time setting using only the switch.
MAIN BOARD CONSTRUCTION
The main board (Figure 5) is made from 1/16″ perforated prototype board. The four mounting holes must be enlarged or filed obround toward the corners of the board because the mounting bosses in the plastic box are not on 0.1″ grid centers like the perf holes. You will need four #4 × 1/4″ sheet metal screws here.
The only parts required to assemble the main board—other than the three modules—are U3, R1, R2 and the LED you plan to use for your mute indicator. Start by cementing the IR module to the main board, centered between mounting holes (Figure 6). All the wiring connections can be made with solid, tinned, 24 AWG hook-up wire. Bare wires are OK since none of them crosses another. That saves a lot of time not having to strip wires, but be careful if your perf board has solder pads on the bottom. Of course, the LED cable wires (red) must be insulated.
The drawing insert (circle) in Figure 6 shows the only difficult step of the entire project—attaching leads to pins 8 and 9 of the main IC on the IR module. Those IC pins are tiny and close together and the PCB traces are thin and vulnerable. You will need magnified vision, a soldering iron with a very small tip and steady hands to avoid bridging solder between pins. Insert a wire through the main board and solder it to pin 9, fold it over to temporarily hold it in place. Do the same with another wire to pin 8. If you make a mess, don’t panic. Use de-soldering wick to suck it all up and start over. Don’t rely on the tiny solder joints alone to keep these two wires connected.
After testing with your ohmmeter to make sure each wire makes contact with its assigned pin and nothing else, anchor them both down with epoxy. Then you can safely cut them to length on the bottom side of the board and connect their other ends to the pins of U3 without disturbing the fragile solder joints. The rest of the wiring is pretty straight forward, since there are only about eight jumpers (Figure 7). In the illustrations, wires are shown as black where connected to a pad or pin on the top (component) side of the board, and change color to blue as they pass through a perf hole for connection to a terminal or component lead on the bottom (wiring) side.
Temporarily place the main board assembly in the enclosure and carefully mark where you will add 1/4″ holes for the two LEDs and a rectangular opening for the USB cable. Drill a 1/8″ diameter hole in the side of the box approximately lined up with the ANT terminal at the corner of the UHF module, in case you want to extend the receiver antenna to improve reception. Drill another hole about an inch farther forward, approximately lined up with the receiver LEARN switch. If you ever have to pair the UHF receiver with a new transmitter, this hole can save you from having to remove the top of the box. You can just stick something through the hole to actuate the switch and place it in pairing mode.
An additional hole in the box top so you can see the receiver LED helps. The yellow key pad can be stored on the IR module in its normal location, possibly held in place by a bit of tape or cement. If you ever need to change the mute command, you’ll have to remove the box lid anyway. And the conductive rubber pads on the S and ▼ buttons of the keypad are much easier to use than trying to bridge switch contacts on the surface of the module with a metallic object.
USING AND CALIBRATING C-B-G
Use short (less than 3 second) presses of the transmitter switch to start or stop a commercial break. Releasing the switch after pressing it longer than 3 seconds starts the calibration routine instead of a break. The mute LED begins flashing about once per second, with each flash counting as 15 seconds of mute time. It continues flashing until you press the button again during the Nth flash, where N is the commercial break time you want in units of 15 seconds.
For example, suppose you want your commercial breaks to be 3½ minutes long. After giving the button a long press, you would count flashes and press the button again as soon as you see the start of the 14th flash. When you set a new mute time, C-B-G flashes the mute LED four times rapidly as an indication that the calibration was successful, then saves it in non-volatile memory and starts using it immediately. Play around with this to see how it works. Set the break time to two flashes and see that the mute LED stays on for 30 seconds. Then try a long one, say 24 flashes, and see that it stays on for six minutes. Timing accuracy is typically within a second.
On the www.banggood.com site:
search for “959231” and select “ATmega328P
Nano V3 Module Improve…”
search for “1618440” and select “KTNNKG
433MHz RF Remote Control…”
search for “1407281” and select “Geekcreit
RX480E-4 433MHz Wireless…”
search for “1149663” and select “CHUNGHOP
L181 Mini Universal…”
Digi-Key ( www.digikey.com )parts:
P/N HM2027-ND, Hammond 1591XXBSBK
P/N 255-1430-5-ND, Panasonic AQY210EH
P/N 1516-1365-ND, Brightek QBL81B60D Blue
P/N V1042-ND, Vector 64P44WE Punchboard
PUBLISHED IN CIRCUIT CELLAR MAGAZINE • AUGUST 2020 #361 – Get a PDF of the issueSponsor this Article
Tommy Tyler is a design engineer with more than 40 years of experience in industrial instrumentation, medical electronics, consumer electronics, and robotics products, earning 17 patents in these fields. In retirement he still pursues his hobby of technical writing, for which he does all his own illustrations. Tommy's address is email@example.com (Include "C-B-G" in email subject).