TV-B-Gone bike light mod

TV-B-gone bike light mod in casing TV-B-Gone is a TV remote with only one button. When you press it, TV-B-Gone will cycle through 100 infrared off codes for most common TVs. Within at most a minute, most TVs you point it at should turn off (or on, as some off codes double as on codes).

TV-B-Gone was invented by Mitch Altman at Cornfield Electronics. It was released into open source, and later developed into a DIY kit with Limor Fried at Adafruit Industries. She also published a wealth of information on the TV-B-Gone kit : beautifully illustrated assembly instructions, explanations on the hardware, the software, and the rather involved process of collecting new TV codes. Nearly all of it applies to this mod. <--read it!

The mod

The "Smart E-Line" brand of battery-powered bicycle tail lights (RL403R) make a good casing for the TV-B-Gone kit. They are inexpensive and come complete with batteries, a button, and a bike mount. All that had to be done was to reduce the size of the circuit board to about a third to fit the light and its connectors.

The new board is single-sided and, like the original, fitted with through-hole parts, which are easier to solder than SMD parts. IMHO the board is well suited for first attempts in etching your own circuits.

To save space, some elements were left out from the original kit. No new parts were added. Omitted were TV-B-gone bike light mod, completed board back side


TV-B-gone bike light mod board diagram


  1. Download and make the circuit board. I won't go into details on PCB making here, there is better advice around.
  2. Chambers 1908 Countersink. Licensed under Public domain via Wikimedia Commons Drill the holes. Most are 0.8 mm, the resonator has 1.0 mm holes. Pre-drill the two mounting holes with 1 mm, then widen to 2.0 mm. These two also need to be countersunk: from the blank side of the board, use a 3.0 or 3.5 mm drill.
  3. In the casing, clip the little pin between the battery contacts
  4. Try to fit the board in the casing. Carefully file it down if it does not fit right away. Clean it before soldering.
  5. Cover the battery pads liberally in solder to make a better connection with the casing. This may get a little hot. If you are doing the always-on mod (see below) solder the battery wire first.
  6. put in the mounting screw under the IC socket
  7. Solder IC1, 8-pin IC socket, attention to the orientation of the notch
  8. solder XTL, ceramic oscillator
  9. solder C1, ceramic capacitor
  10. put in the second screw
  11. Solder C2, electrolytic capacitor. Its negative pole, marked with a white band, points towards the LEDs. leave about 3mm of clearance to the board, so you can reach the screw better
  12. Solder resistor R1, 1 kOhm, crossing the negative rail (the upper trace that connects to the outer pins of T1-T3).
  13. If you are in Europe, solder resistor R3, 10 kOhm. It serves as a selector for EU transmission codes over US/Asia codes.
  14. Solder the single PNP transistor Q1. Its flat edge points to the outer side of the board.
  15. Solder the NPN transistors P1-P3. Their flat sides points towards battery contacts.
  16. Solder the infrared LEDs. Their flat edges and short wires point to the inside of the board. Hint: The transparent red cover has three simple lenses. It may be worth a try to leave the LEDs standing off about 10mm off the board, and carefully bend them to be placed under the lenses. This is not strictly necessary but fiddling with it might increase the range.
  17. cut all the leads really short so that they don't interfere with the case. Retouch those that look bad after cutting with the soldering iron.
  18. check with a multimeter at least that there is no short circuit between the + and - rails.
  19. insert the batteries and the push button, screw the board into the case
  20. Put in the programmed ATtiny. The #1 pin, marked with a notch or groove, goes down towards the end of the socket which also has a notch.
  21. On pushing the button, the microcontroller should cycle through its codes now, which takes about a minute.
  22. Have fun.
TV-B-gone bike light mod, completed board

Always-on variant

The standard kit with the standard firmware will run all codes once on pressing the button, than go into a low power mode. You may want a kit that is always on, running through the codes until the battery runs out or you switch it off. For that, you need a slightly modified firmware and hardware:
    TV-B-gone bike light mod, sketch on the always-on-variant
  1. Cut the negative rail at the connector pad. You can drill a hole there, or file the copper away
  2. Cut the button contact part off. Cut close to the resonator contacts
  3. Solder an 8 cm wire to the negative connector
  4. Solder a 4 cm wire to the negative rail were the button contact was
  5. Screw in the board as usual
  6. Fit a single pole switch large enough to stick out, but small enough to fit besides the board. (MIYAMA MS-611 A with a 6x9 mm base fits)
  7. solder one of the wires to the middle switch pin, the other wire to an outer pin. The on position is diagonally adjacent to the outer pin.
  8. Glue the switch into place. There is only a small surface for glue, so high strength, two-component epoxy glue might be needed. Avoid quick dry glues like cyanoacrylates, they are too fluid, will get into the switch, and ruin it.
  9. Mark the on position on the case.

Programming the microcontroller

The software for the ATtiny is available at To get it on the chip, you need a programming device, like e.g. the AVR ISP mkII. This is most easily done before putting the MC in the TV-B-Gone, and as a matter of fact the only way for the bike light mod, as it has no ISP (in-system-programming) connector. You can use the adaptor described here

Under Linux, running 'make' will build the software, 'make full' will flash it using avrdude. For the AVR ISP mkII you simply set:
If errors occur during flashing, try to add "-b 1200" to AVRDUDE_FLAGS.

Layers in EAGLE

To print the board for etching, disable all layers but 16-18 (Bottom, Pads, Vias). Relevant for editing are also 19 (Unrouted), 20 (Dimension), 21 (tPlace), 23 (tOrigins), 25 (tNames) and 45 (Holes). For a commercial board maker, you also need 29 (tStop) not to put solder mask on the battery and button contacts.


TV-B-Gone and its modifications are distributed under Creative Commons Attribution, Share-Alike (CC BY/SA). This means that you are free to use this information for any purpose, including commercial ones, under two requirements:


Neither did I write the software for this thing, nor invent the circuits; all I did was a new layout for the board, and that's about all I can potentially help you out with. So if you have any other questions, they are probably already answered at adafruit's great TV-B-Gone pages or their quite active forums.

Will there be kits for this mod? Probably not. Feel free to enquire at se (at this domain), but I don't expect a number of requests that would make this feasible for me., July 29, 2014