loading

I was shopping around on Amazon the other day and came across a product that I thought was genius. It is called Fake TV and it acts as a burglar deterrent while you are away from the house. At night, the Fake TV turns on and uses a series of LEDs to project random colors that looks as though someone is inside watching TV when viewed through curtains or shades. There are some videos of it in action on YouTube and I have to say it really does look like someone is inside watching TV. This should scare off the large majority of petty thieves that are just looking for the quick opportunity. If someone is casing your house, this probably isn't going to help you though. See the commercial version here:

In another language

Another view that shows comparison to a real TV

Anyway, they wanted $25+ for these things that are nothing more than a microcontroller and some LEDs. I thought about it and had the solution I am presenting here dreamed up in about 5 minutes. About 2 hours later I had a finished product using only left over bits I had from other projects. If you purchased these items you could likely build your own for under $10 too. My solution uses an AT Tiny 85 and Neopixels. You could easily swap in a full Arduino for the ATTiny, or swap in some transistors and LED's or RGB LED's for the Neopixels. It would only take very minor tweaks to the code.

This solution is better than the commercial product in my eyes because it is fully customizable! I even included a potentiometer you can use to adjust the brightness to get the exact effect you are looking for!

Step 1: Gather Your Parts

Here is my parts list:

  • ATTiny 85 - 8 pin microcontroller - purchased mine from Jameco here
  • 8 pin DIP socket - optional but helpful for future reprograming - purchased mine from Amazon here
  • WS2812B RGB LEDs - aka NeoPixels (60 per meter) purchased mine from eBay, see detail below
  • 10 uF electrolytic capacitor - pulled out of an assortment pack I purchased from Amazon here
  • Resistor - somewhere between 300 and 500 Ohms will be perfect - pulled out of an assortment pack I purchased from Amazon here
  • Hookup wire - helpful to have 3 colors, but not necessary - I think I got mine from RadioShack
  • Perfboard - I prefer double sided with tinned holes, but you can manage with others - from Microtivity on Amazon here
  • Barrel Jack - This is optional, you could solder your power supply directly to the device - purchased mine from Amazon here
  • 10K potentiometer - Not necessary, but helpful for fine tuning the brightness to get the right look and feel - mine came in an Arduino starter pack but these on Amazon are cheap and should be perfect
  • Power adapter - something between 3.5 and 5.5v. Or something with a higher voltage that you can step down with a voltage regulator - pick one of these up from a garage sale, your junk drawer, etc

I had all of these parts laying around from other projects but they are all easy to pick up at many online retailers. The only "high cost" item is the WS2812B LEDs. These are best known by the name NeoPixels as marketed by Adafruit. If you want to support Adafruit then go buy them from their website. I, however, found them for less than half the cost on eBay. I purchased my NeoPixels here. They have worked great on 4 different projects with no dead pixels or any issues whatsoever.

Considerations:

Power Adapter: You likely have several of these laying around the house that no longer serve their purpose or the item they powered has long since been lost/broken/tossed. I picked one up at a garage sale a few days ago for 25 cents to add to my collection. For this project you will need an adapter that will output somewhere between 3.5v and 5.5v. It needs to stay within that range when under load and when under no/low load. It also needs to be able to source enough current. The LEDs should consume a maximum of 60 mA per LED (20 mA per color). In my design this means I need 60 mA * 8 LEDs = 480 mA plus whatever the microcontroller consumes. I estimated that the ATTiny likely isn't consuming more than 40 mA for this application (pulled that guess out of thin air) so my total maximum current draw should be 520 mA. I had one laying around that stated it could deliver 4.8v @ 800 mA. I plugged it in and the voltage under no load was 4.95v per my multimeter. Be careful because this is not always the case, many times these power adapters can have near double the voltage at low/no load. This device covers a wide range of current draw which could result in a large fluctuation in voltage on some of the lower quality power adapters. Read more about power adapters on Adafruit's learning site here. One of the cheapest and easiest solutions is likely to pick up a cheap cell phone charger from the grocery store checkout isle, you know the pink rhinestone kind they sell for $2. Then power your device with an old USB cable you don't mind tearing apart. Those little adapters typically source 500 mA @ 5v and are regulated supplies. Or you can use a larger wall wart, batteries, etc and step the voltage down with a 5v regulator. Here is some info on those.

Step 2: Breadboard It With an Arduino

I suggest you breadboard everything before you start soldering. It is always nice to get the bugs worked out BEFORE you have soldered a single connection. With that, I also suggest, if you have an Arduino UNO or other full sized Arduino with headers for easy connections that you program and test the setup before switching over to the ATTiny, it is just much easier to work with.

I am going to show you this setup first with an Arduino Uno serving as the microcontroller. No pins need to be changed or reassigned in the code to make this work. You will see a few steps later that all we then have to do is pull out the wires leading to the Arduino and replace it with the ATTiny, add power supply, and you are ready to test the final setup.

For the purposes of breadboarding and the final build I like to use three colors of wire in simple applications like this. Red is always Vcc (Voltage high), Black is always Ground, Green is always Data. Those are the three colors of hookup wire I had available, you may prefer something else. Whatever floats your boat.

Place the components like I have shown in the Fritzing diagram above.

A little detail:

The potentiometer (orange looking plus) - This is acting as a voltage divider. It takes power and ground and as you turn it CW or CCW the voltage output on the top pin will change from supply voltage down to zero. What I have used is a 10K pot, you can use pretty much any value. This will output a voltage which will be picked up by our Arduino (and ATTiny 85) on A1. This will then be mapped to a max brightness value that will control the maximum brightness output by the device.

WS2812B (aka NeoPixels): Ignore the pins identified in the Fritzing diagram, they do not have WS2812B version. Instead recognize that 5v goes to the solder tab marked "5V" on the strip. Ground goes to "GND". Data is routed from digital pin 4 on the Arduino (also digital pin 4 on the ATTiny 85) through a resistor (between 300 and 500 Ohms) and to the tab marked "DI" on the strip. The capacitor is in place to help remove voltage spikes as pixels flash on and off. There is a great tutorial on these LEDs on Adafruit's website found here. IMPORTANT: If you are using only 8 pixels to create your Fake TV then you should be ok, the Arduino can source 500 mA via USB. IF YOU ARE USING MORE PIXELS you will need to provide an alternate power source for this part of the setup.

Plug the Arduino into your computer via USB. Nothing smoking? Great! Something smoking? BAD!

Step 3: Load the Code

If you have done everything correctly you should be able to just copy and paste this code (attachment) into your Arduino IDE and upload straight to the Arduino. Within seconds you should see the breadboarded prototype glowing in all its glory.

I am only a few months into coding so my code is likely very inefficient and could be picked apart by some of you out there that are far smarter than me. Feel free to comment with any constructive criticism regarding the code.

You will need the Adafruit Neopixel library. You can download it here.

Some points on the code:

In the main "void loop()" section the code is simply generating random colors, brightness and time delays in order to simulate the changing scenes that might be in place if you were watching TV.

The potentiometer setting determines what the maximum brightness of the Fake TV will be. Low brightness is already set. Brightness on the pixels varies from 0 (off) to 255 (full on). Each pixel consumes the most power possible when Red, Green and Blue are all maxed out at 255 and Brightness is maxed out at 255. This is full on, all white light and the pixels should consume about 60 mA each in this moment. Feel free to alter the code to generate a lower maximum brightness to keep your power consumption down if that is of concern.

A note about the colors: I initially had the colors set up to randomly generate values from 0 to 255 but I found that certain times you would get something like Red = 255, Green = 3, Blue = 10 which produced almost pure red light or at times pure Green or Blue. This just did not seem to mimic the TV look very well so I jacked the minimum color values up to 150 in order to get more subtle colors that were more "white" like you get out of an LED TV. Feel free to play around with this as you see fit.

Everything working? Play with the potentiometer and see if your brightness changes. If you are staring straight at the pixels, you may be blind by now. These suckers are bright!

Moving along!

Step 4: Program Your ATTiny 85

Ok, here is where I will gladly point you to other sources. This is really quite simple but does not warrant me rephrasing everything. I first messed around with controlling NeoPixels using ATTiny 85 after reading danasf's post "Use a $1 ATTiny to drive addressable RGB LEDs". It gives you a pretty good guide of how to program your ATTiny 85 for this purposed. It is based on work done by High/Low Tech in which they use your Arduino to program the ATTiny. There are also other solutions, but I liked this on the best.

Find more at High/Low Tech's pages:

http://highlowtech.org/?p=1695

http://highlowtech.org/?p=1706

Big thing here is to be sure to load the bootloader after selecting the 8 MHz INTERNAL clock. If you burn the fuses wrong it won't work. After you load the bootloader you just then upload the code I supplied and then your ATTiny is programmed and ready for your Fake TV device!

Move on to testing it on the breadboard.

Step 5: Return to the Breadboard - With the ATTiny 85

Now that your ATTiny is programmed you can return to the breadboard.

Pinout Confusion.

Pin 1 on the ATTiny 85 is marked with a small dot, arrange the chip such that you are looking at it with the dot in the upper left so you can follow along. Now take a look at the pinout diagram (courtesy of Sparkfun) in the pictures above and prepare to be confused if you are a newbie. The "physical
pins" count sequentially down the left side 1,2,3,4 with pin 4 being in the lower left. Then jump across to pin
5 in the lower right and count sequentially up the right side 5,6,7,8. Easy, right? Wrong. Those are the physical
pins, but what the microcontroller calls those pins for the purpose of programming is completely different. I
will save myself from typing it all out and just focus on the pins we will be using for this application (other than the programming).

Ground: Found on physical pin 4.

Vcc: "Positive" or your voltage high. Found on physical pin 8.

A1: Analog 1. Found on physical pin 7. Can also be assigned as digital 2, but we are using it to read the voltage from the potentiometer.

I/O 4: Digital Pin 4. Found on physical pin 3.

I know, I know, where do they come up with this stuff?? 3 is 4, 1 is 7 but sometimes 2... thank goodness someone already put this on a diagram, or my head would hurt.

Remove the wires from the Arduino, wire in your barrel jack or other power supply and connect to wires for power and ground to your ATTiny 85 and you should be up and running with your now shrinkified project. Your program should be working just as before and behaving nicely. Play with the potentiometer, make sure everything works. If so, you are ready to move on to soldering it all up to your perf board.

Step 6: Solder It All Together

Your layout may be different than mine. I tend to just sit down and start soldering without much forethought and planning. You may be more careful and meticulous than me. Either way, if you follow the Fritzing diagram from the previous step as your schematic, you should be all set.

If you break the pixel strip up into two or more pieces as I did, you will need to connect a wire from "DO" of the first strip into "DI" of the second strip. Follow the arrows as the data can only flow one direction.

I am not the best as soldering but here is my finished product.

Step 7: Plug It in and Test! You Are Finished.

My final product was small enough to fit in the palm of my hand yet bright enough to light up the whole room at max brightness. I played with the potentiometer to dial in the right brightness and took a look from outside. Looks like a TV to me. Overall this build from concept to finished product took about 3 hours. Now that you have the code and the layout you should be able to construct yours in half the time!

There you have it, your very own, fully customizable burglar deterrent. Plug this bad boy in when you are away and rest assured that the low level thieves will steer clear of your home. I would suggest plugging the power supply into a wall timer for full effect.

I intend to update this with more features as I have time.

Some additional improvements you may want to add:

- Real Time Clock chip to turn the device on and off at different times of the day/night.

- A second potentiometer or mode button to set a variable low level brightness.

- A reflective hood to channel the light more effectively

- A nice project enclosure or acrylic box.

- Integration into your Nest thermostat's away feature or home automation system.

Leave the comments, favorite it or follow me for future projects.

<p>I added a few more pixels and wireless so it could be controlled via home automation software, and will probably add some environmental sensors to it. Just need to finish the case. Thanks for posting this great project.</p>
<p>great project, been meaning to do some projects with the ATtiny, this just gave me the shove I needed. I'll be adding this into my DIY home automation/security system. I've got another version I've made, but I think yours is a bit more realistic. Thanks for posting!</p>
<p><a href="https://www.instructables.com/member/dj55nava/" rel="nofollow">dj55nava</a>, here is a link to my version, the derivative Fake TV. It has, amongst it's other complications, a 24-hour timer function to turn it off and on. It also has many knobs and a button, but you can omit all of that and just have it run automatically each night.<br><br>https://www.instructables.com/id/Arduino-Totally-Derivative-Fake-TV/</p>
<p>Just wondered.. 5 months down the line.. have you been burglared? :-) Hope not.<br><br>I hae my version 'guard' an empty house for a while already (combined with random lights) and no burglaries yet :-), though there have been burglaries in the neighbourhood</p>
<p>All has been good! No burglars.</p>
<p>same here :-)</p>
<p><strong>thanks for sharing the project, you created a new code on and off day and night? Thank you</strong></p>
<p>No I have not. Unless you add an RTC module you would be reliant on a light sensor, simple delay function or a plug in wall timer. I chose to just use a plug in wall timer and it gets the job done nicely and inexpensively.</p>
<p>Cool design. I already have one of the commercial Fake TV devices so I thought I would share some info about that one which may be helpful for expanding on this or similar DIY designs.</p><p>The commercial one has 16 high output surface mount LEDs, 6 are white, 3 are green, 2 are blue, and 1 is red. My guess is they studied the average TV color content to come up with that particular mix. They are quite bright, like something you might find in a small flashlight. The lights are controlled by a PIC16F506 connected to 7 transistors to drive a 3x4 array of LED's. In operation, each LED color is grouped together (ex. all green lights transition together, all white lights transition together, etc), individual LEDs are not addressed even though the hardware appears capable of more granular control.</p><p>All of the transitions use fading, and the speed of the fades vary, sometime fast, and sometimes slow. At times all LEDs dim to almost off.</p><p>The PIC they are using has 1K memory, 67 bytes of ram, 11 I/O pins, and 1 eight bit timer. Even though it does not directly support PWM, the MCU is still able to vary the brightness of the LEDs, no doubt by writing their own PWM routine in the main code.</p><p>The front side of the box has a diffuser panel. The back side has a four position mode switch and a photo sensor. The modes are: Off; On; turn on at dusk for 4 hours; turn on at dusk for 7 hours. It uses a 9V switching supply walwart, with a 78L05 regulator internally for the MCU. It appears the LEDs are driven by the 9V supply after a protection diode.</p>
<p>that is interesting. There are several models of FakeTV (3 I think) would nbe interesting to know if they all had the same set up. I am a bit surprised at the 7 transistors to drive what is in fact 4 colors. It might be a bit difficult to drive 6 blue leds in series from 9Volt, but even then it should be possible to have 3 parallel strings of 2 blue leds (each string with its own resistor) and drive that with one transistor. Indeed, there usually isnt that much red in a TV image, so maybe that is why they only have one Red LED. I would be interested to hear yr opinion on the 'Real' FakeTV, as from other sources I heard that it didnt really look that real and the repetition cycle was too short so it would easily be recognized as 'repetitive'</p>
<p>I built this project, but using the Adafruit Trinket mini-microcontroller ($6.95). I chose that because it has a bootloader and it's programmable by the Arduino IDE (with Adafruit extensions) and a mini-USB cable. The attached picture shows it running an Adafruit NeoPixel demo program, but your code TV code compiles and runs just fine. I did hard-code the brightness to the max.</p><p>I chose your particular Instructable to build with my 7 yo son. He's been interested in electronics for over a year and has just started programming. This project has a nice basic intro level that covered both topics and worked out perfectly for us. Thank you for the Instructable.</p>
Quick followup. Went camping this week, and left my fake TV standing guard in an upstairs bedroom window. Although my son and I built this as just a fun little project, it was surprisingly comforting to come home and see that &quot;TV&quot; flickering through the blinds.<br><br>I think I'll work the code over a bit. Although it's quite realistic flickering through the blinds, I think it could be improved with a few longer &quot;scenes&quot; and an occasional fade to black.
Really glad it was something you could build with your son. I am all about getting kids involved in the sciences and can't wait until my boys are old enough to tinker with me. I appreciate the positive feedback.
<p>add sounds from the news! </p>
<p>Neopixels are what this entire instructable is based upon.</p>
For precise color control, use FadeCandy. <br><br>http://www.adafruit.com/products/1689
<p>That would more than triple the cost of the project and is not necessary for what this is trying to accomplish.</p>
<p>Ha! Cool idea, but my Glock 19 is a bit more effective. </p>
<p>The purpose of this is to drive burglars away while you are away from the house, not while you are there. So either you have a very intelligent, automated 9mm, or your comment is useless and adds no value to the conversation. Thanks anyway.</p>
<p>Interesting, was just makng one of my own, but with regular LEDs. Works great on an Arduino, but I ported the code to an attiny. Currently waiting for my LEDs to make it complete and publish.<br>I am using 4 different LEDs: RBG and white.<br>If I am allowed a bit of criticism on yr result: the light is too purple from time to time</p>
<p>I fully agree that the color, frequency and transitions need work. I built this thing one night starting at 10 pm and had to be at work the next day at 7 am. I wrote the instructable over lunch the next day. There are a lot of things that can be improved and I look forward to seeing what other people create.</p><p>How are you planning to control the LEDs with the ATTiny? I believe it only has 2 PWM pins so I am confused how you can do more color mixing other than something like Red = On, White = On, Blue = Off, Green = Off.</p>
<p>Let me start with saying I admire yr project, in spite of the remark I had about the light.<br>The Attiny has in fact 3 PWM's albeit that one pin doesn&rsquo;t have the AnalogWrite implemented.<br>However, it has two timers, that have an overflow and a compare mode so I use those to generate interrupts that I use for PWM.<br>I have it now working on a breadboard. will publish it when I get my LEDs (ordered 200 in China, may take a few weeks).<br>I think I cant upload a video here, but I attach a picture of my currebnt setup</p>
<p>Great to know! I am pretty new to the world of Attiny and coding in general so I appreciate exchanges like this so I can learn from more experienced individuals like yourself. No offense was taken on the light comment, I noticed that from the video myself and it has to do with putting no controls on the random color selection, other than keeping the minimum values higher to keep out the &quot;strong primary colors&quot;.</p><p>I have started tweaking the code to solve this and the transition problems between brightness and colors but with 8 variables (old brightness, new brightness, old red val, new red val, old blue, new blue, old green and new green) all having to go into one function call for the &quot;colorWipe&quot; I am scratching my head a bit. Hoping I can load it this weekend and check it out.</p><p>Looking forward to seeing your results. Let me know when you post yours.</p>
<p>I will, if i dont forget :-) Getting older, tend to do that :-)<br>But as I guess I will have 'Fake TV' in my title and probably some keywords the same, it will most likely show up in the right column next to this article</p>
<p>circuit. As said, waiting for my LED's</p>
<p>Your Red current will be the highest of all the other colors, making the color </p><p>Red very bright at 25 ma</p><p>(3x2.1+o.1 = 6.4V) = LEDs &amp; Q</p><p>I = V / R = (12-6.4)/220 = 5.6/220 = 25.5ma</p><p>Blue will be dim at 0.9 ma</p><p>(3x3.3+o.1 = 10V) = LEDs &amp; Q</p><p>I = V / R = (12-10)/220 = 2/220 =o.9ma</p><p>Do you know why ?</p>
<p>btw it is not 0.9mA but 9mA, but check my earlier comment for full reply</p>
<p>Right you are 9ma it is ... and now have read the full comment of a discerning user. Sorry to tie up your time with my ego.</p>
<p>no worries, didn't tie up my time and I saw no ego.<br>actually I may wel add a 4th red led just to not waste too much power in the resistor. That may be too bright then compared with the 3 leds per other color, but then I can limit the current a bit... so there is still finetuning.<br>The 220 Ohm was just a ballpark figure that needs to be adjusted.<br>With regard to my earlier remark about the light being too purplish... in my prototype it didnt seem to be purple, just reds and blues... but then I added some diffusion that mixed the colors... might be too much purple in my program too.<br><br>What I do is that i defined a couple of scenes that are chosen randomly, but some more random than others. That way it is easy to add or change particular scenes</p>
<p>well i suppose because the leds have different forward voltages and therefore by the same resistor different currents.<br>But as I presume you are referring to my circuit... I am very well aware of it, but I have to wait till I have the LEDs, then check the forward voltage, and then adapt the resistor. Subsequently I will have to do a visual check to see if at same current the LEDs are equally bright.<br>That is the main reason that I havent published it yet.<br>Though forward voltages are specified all over the internet for different colors, there is much variation in the voltages mentiuoned for one color so i dont rely on that. Have to measure it on the actual LEDs</p>
<p>don't get me wrong, you did great and it is really bright and well visible</p>
<p>Updated some code. Less red hues and higher minimum brightness along with transitions (albeit quick) between colors. Posted the new video to the last step. I think it looks better now. Let me know your thoughts.</p>
<p>Real TV will go completely black from time to time between scenes, flicker and flash.</p>
<p>yes, much better</p>
<p>Great idea! +D</p>
<p>How would this work for 'Ground Effects' lighting on an automobile/motorcycle? It would seem to be tailor made for sprucing up the chassis, or in the wheel wells on a custom ride. I'm not the brightest light in the harbor, but You've written this I'ble in such a fashion that I just might have to attempt it.</p>
It would work perfectly. The link I have posted in the parts list for the LEDs will take you to an eBay page where you can order. One of the options there is a waterproof strip that you would want to use. Stay tuned for another instructable I will post that lets you change the &quot;mode&quot; with a button push you could have mounted on your handle bars or your dash. I have also attempted to use these for a Persistence of vision setup but their refresh rate is too low. Follow me for future posts.
<p>all of the transitions from one colour to another are harsh and the off state shows up too often. if you had a few fades and less chance of it turning off then it would be more realistic looking.</p>
<p>Updated some code. Less red hues and higher minimum brightness along with transitions (albeit quick) between colors. Posted the new video to the last step. I think it looks better now. Let me know your thoughts.</p>
<p>Completely agree. I already adjusted the code to increase the minimum brightness from 10 to 75. It looks much better now. The color transition is something else I could work on. The beauty of this project is that it is fully customizable to your liking.</p>
<p>Thx for posting this - this is a great project</p>
<p>Can you use a color timeline from film ? </p><p>Something like that </p>
<p>I think that would overwhelm the memory of the ATTiny 85 rather quickly. Assuming you could get the color timeline you posted into an array of sorts I assume it could be accomplished, just not sure the ATTiny 85 could do the job. Perhaps a smaller snippet of it? But then it might be too repetitive.</p>
<p>This is a really neat idea but could to update the guide with some links to the parts. I want to make this but not sure if I'm searching the right parts.</p>
<p>Done, just for you. Happy making.</p>
<p>Thanks!</p>
This is a great idea!!!

About This Instructable

64,514views

438favorites

License:

Bio: Petroleum Engineer working in Tulsa, OK. Started messing around with electronics in 2014 when I purchased an Arduino Uno. I think I'm hooked now ... More »
More by JonBush:Get Off Your Butt Timer Where in the world are Mom & Dad? Rock Paper Scissors Lizard Spock Desk Toy 
Add instructable to: