A few years ago, a co-worker turned me on to this TV program called "The IT Crowd". The show revolves around a two-person IT team and their "Relationship Manager", Jen, who inadvertently landed the job by including some basic PC skills on her resume. Moss and Roy resent her for getting the position both wanted, and will occasionally try to help expose Jen as a hopeless non-technical leader that has no business leading IT - in fact, Jen doesn't even know what IT stands for!
In one episode, Jen wins employee of the year and must give a speech to the board of directors and company executives. Moss and Roy decide to "help" Jen by allowing her to use "The Internet" in her speech to impress the leaders. Watch the short clip below.
As you have seen from the video clip, the device is a simple black box with one red LED in the top center just flashing on and off. It was so simple and so elegant, I decided to reproduce the device and gave it as a gift to my co-worker. The device quickly became a huge hit.
The device is completely useless, but I guarantee that if you haven't seen the show, binge watch it and you will want to build one right away. It makes a great gift, even to the person who has never seen the show. Simply give them the box and point them to the clips. If you have not seen the show, it is available on Netflix and Amazon.
In this project, I'll share here how I built the box. I originally built it using a 9-volt battery, but later decided to make it rechargeable.
Building the DeviceAlthough at first glance it may not seem like it, the device is fairly simple to build. It is comprised of several circuits combined. The first is the battery and charging circuit. The second is the step-up power booster. The third is the power regulator circuit and the final module is the LED flasher circuit.
Battery and Charging Module
If you purchase the battery charging breakout and the battery from Adafruit it includes the necessary JST cable to connect to the power booster module. The Common Cathode RGB LED is used to show the charging status outside of the box. I mounted the LED using a plastic beveled LED holder. Drill a hole in the side of the box to match the holder and clip the LED in. I used a lot of hot glue to keep the LED in place. Using the 4-pin I2C cable connect the header end over the four RGB LED pins and solder the other ends into the USB charger, The RED LED pin goes to the DC IN + pin. The next LED pin goes to Status Pin #2 and the last LED pin goes to Status Pin #1. The cathode pin of the LED is connected to ground.
This circuit can be tested by connecting the battery using the JST pin and plugging in a USB cable to the charger. When the battery is charging, the LED color will be orange. When charging is complete, the LED color will be purple.
Instead of trying to expose the USB port for charging, I soldered in a DC barrel connector. Connect the center pin of the DC barrel connecter to DC IN + and the outer pin to DC IN -. I connected a USB cable to the barrel connector with a voltage meter to verify the correct connections.
The DC barrel connector I used required a 1/2" hole in the side of the box for mounting.
I used a hot glue to mount the battery inside the box. I mounted every part to the top portion of the box to make it easier to remove the bottom plate.
Power Booster
I use a power booster to take the 3.7 V from the Lithium Ion Polymer Battery to a voltage big enough for the 5V regulator. The regulator I chose has a 0.4V linear drop-out, so the voltage needs to be at least 5.4V. The booster I chose has an adjustable output voltage and uses a 28-turn potentiometer making it precisely tunable. I adjusted mine to 9V since I had previously been using a 9V battery to power the original box.
The power booster could be eliminated by using a 3.3V regulator and connecting the load terminal of the charger directly to input of the power regulator circuit. This would run the ATtiny85 at 3.3V. If you plan to use this method, it is important to run the ATtiny85 at 8 MHz.
Solder the JST wire that came with the USB LiIon/LiPoly charger from Adafruit to the input side of the power booster through the switch. The red wire goes to one pole on the switch and the other pole of the switch goes to the positive (+) terminal on the booster. The black wire goes to the negative (–) terminal on the booster.
I mounted the power switch to the back of the device and added one of those flip up guards to make the switch look cool. A hole needs to be drilled in the back to mount the switch. The size of the hole will depend on the switch you purchase.
The output side of the power booster will be the input to the power regulator circuit. Simply solder two wires about 4 inches into these terminals.
Power Regulator
The power regulator circuit and the LED flasher circuit are built onto the perfboard PCB. It is up to you if you want to build them both at the same time or build the regulator first. I like to build and test the regulator before adding the rest of the circuit.
The power regulator circuit is comprised of the 3-pin regulator and the two capacitors. There is no right or wrong way to add these to the perfboard as long as you follow the circuit diagram and leave enough room for the LED flasher circuit.
After soldering the components, solder the wires from the output side of the power booster to the input of the regulator. Next power it up and measure the output of the regulator using a meter. The output voltage of course should be 5V.
LED Flasher
The final circuit is comprised of the 8-pin DIP socket, two resistors and the red LED.
The ATtiny85 will be inserted into the DIP socket after it has been programmed.
I mounted the LED in the top center of the box using a chrome beveled holder (to keep it as close to the original as possible). Drill the appropriate size hole in the top based on the LED holder you have purchased.
Again, following the circuit schematic solder the components onto the perfboard and connect the power supply and ground using 24 AWG wire. I connected the LED by soldering 24 AWG wire directly to the leads of the LED.
Programming the ATtiny85The code was written using the Arduino IDE and programmed to the ATtiny85 using the Sparkfun Tiny AVR Programmer.
Download the source sketch from the GitHub repository link at the bottom of the project. Insert the ATtiny85 into the programmer and place the programmer into your USB port.
In the Arduino IDE select the ATtiny85 and the USBtinyISP programmer. If you have not installed the ATtiny85 board in the Arduino IDE check out my ATtiny @ 16 MHz project or DHT Tiny Breakout for the Raspberry Pi.
If you do not have a programmer, you can use an Arduino Uno (or similar board). Take a look at one or more of the articles listed below for help.
- Programming ATtiny85 with Arduino Uno on Hackster.io
When the ATtiny85 programming is complete, remove the chip from the programmer and place it into the DIP socket on the perfboard ensuring to orient it correctly.
Now you're ready to turn it on! The sketch will alternate between flashing the LED and a breathing effect. The length of time each runs and the number of flashes are random.
Of course, you can change the code to do whatever you like with the LED!
The Final SceneSo how did Jen's presentation turn out? Not bad. Her presentation was a hit and Moss and Roy did not get the expected satisfaction from their prank. Watch the clip below.
For more information on the TV series go to http://www.channel4.com/programmes/the-it-crowd.
Comments