#68 NeoPixel TV Simulator - Security for your home - Easy!

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ค. 2024
  • New! ralphbacon.blog
    Perhaps you're already familiar with a TV Simulator - a gadget that shines light onto a wall, curtain or blind in such a way as to simulate a TV, thus indicating someone is home and that this house is not a good target for opportunistic thieves.
    This Arduino-controlled Neopixel (WS2812B) ring does the job splendidly, at a low cost and best of all YOU have control of what the multicolour pattern looks like.
    The code here is simple, with lots of randomisation. It demonstrates just how easy it is to use the FastLED library to control each individual LED's colour and brightness - super quick too!
    I've installed this in my lounge and taken a look from outside; I could not tell that a real TV was not switched on, but using just a tiny fraction of the power that a proper TV would consume.
    The 12-LED 5050 WS2812B ring I'm using here costs less than two British pounds (about $2.60) so you can immediately see how cost effective this could be. Even factoring in the cost of an Arduino Nano, a box to put it all in and a 5v PSU I estimate you could build this for less than a tenner! And the satisfaction in doing so? Priceless!
    Here are the links you'll need, all on Github:
    Demo Code and a copy of the FastLED library:
    github.com/RalphBacon/TV_Simu...
    Additionally, the most recent FastLED library can be found here (just click the download button and unzip it): github.com/FastLED/FastLED
    I recommend you run the FastLED examples, they can be very mesmerising!
    If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)
    My channel is here:
    ------------------------------------------------------------------
    / ralphbacon
    ------------------------------------------------------------------
    How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 27

  • @maxximumb
    @maxximumb 7 ปีที่แล้ว

    I made one of these as my first Arduino project. I only had a 7 pixel circle, but when bounced off a light coloured wall, it looks fine. I also added an LDR (just to the left of the neopixels) which checks the light level in the room every few minutes. When it drops below a preset threshold, it turns the lights on, for a random time between 4-6 hours, using a variable to count blocks of 60,000 milliseconds. Once the time limit is reached, it turns off the lights until it gets light the next morning. Then the system restarts.
    I also added a red LED for a power indicator, chopped a few holed in an old power adaptor and boxed it all up with a USB cable, so it can be run of a cheap 5v phone charger. I think the whole thing cost just under a fiver.
    Thanks for another interesting video. It was interesting to see a different way to sequence the lights.

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Wow! As a first project that was pretty ambitious IMHO (of course, for all I know, you're a guru programmer!). Yes, the addition of an LDR and running it for a few hours after darkness with an auto switch off is definitely required. The problem with the commercial unit I have is that it does this - but in the summer (dark at 9pm) and winter (dark at 5pm) it runs for either too long or too short a time! It really needs an RTC / GPS embedded but that just adds complexity & cost. Thanks for your interesting post, nice to see that others have approached this in different, cost-effective ways.

    • @maxximumb
      @maxximumb 7 ปีที่แล้ว +1

      I can program, so the Arduino doesn't have a huge learning curve. It's more for teaching myself the electronics side of things. So the LDR was to learn about voltage dividers.

  • @abedbug9953
    @abedbug9953 7 ปีที่แล้ว

    finally revealed! great idea, you can imagine looking looking from outside at a window with all these light reflections going off. could also use a rtc for timing or even esp8266 to control remotely. great project Ralph, cheers Alan

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Hello Alan! Yes, it's quite effective. RTC desirable (see my comment to Maxx B below) but adds to the cost and then there's that awkward Daylight Saving Time twice a year to put the clock out. ESP8266 simpler as it could pick the time up from wi-fi. Mmm.
      Unfortunately I was my local "pound shop" (B&M) today and found you can buy that commercial unit now for GBP 5.99 - but far less fun of course! I also found there an LED strip you adhere to the back of your TV that generates soft light to reduce eye fatigue when watching TV in a dark room. Now *there's* a project - detect the basic colour from the TV picture and gently fade into that colour at the rear of the TV in a soft, pastel shade. Could be a future project...

  • @oncledan282
    @oncledan282 4 ปีที่แล้ว

    Good day, my Friend !
    Thank you for pointing this video to me, Ralph. It sure helped me a bit on the code comprehension, although there is some concepts I fail to grasp but, with further digging, and practice, it'll come fast enough, I'm confident.
    Have a great day and take good care. God bless !!

    • @RalphBacon
      @RalphBacon  4 ปีที่แล้ว +1

      Practice makes perfect, Daniel! You will do it I'm sure.

    • @oncledan8509
      @oncledan8509 4 ปีที่แล้ว +1

      @@RalphBacon Good day, my Friend.
      I just put my hand on the most complete visual effect codes (separate) and this is great for me, since it shows how to make it happen. Of course, it's not well explained .. in fact, not at all, but it allows me to dig the nitty gritty and intricacy of that device. I'll get back to you (on this Comment, that is), once I managed to comprehend most of it, so I can share it with all your viewers.
      Until then, have a great day and, please, take care. God bless.

  • @digihz_data
    @digihz_data 5 ปีที่แล้ว

    Perfect to add to a home security system. Thanks Ralph.

    • @RalphBacon
      @RalphBacon  5 ปีที่แล้ว

      Indeed, Hans, it works very convincingly. Thanks for posting.

  • @Ernzt8
    @Ernzt8 7 ปีที่แล้ว

    Ralph thanks for this great tutorial, something like this crossed my mind before. An idea for sports fans is to use more green. Any burglar would not believe when I would use it though, maybe some more black and red for my house as I am more into horror movies than green fields ;)

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว +1

      Ha ha! The beauty of this project, of course, is that you, the developer, can control exactly which colours you want to emphasise. But seriously, when this is running, and I am outside my house, I truly think it is a TV that is on, not a simulator. If I were a burglar I would choose a different house to burgle!

  • @SpeccyMan
    @SpeccyMan 7 ปีที่แล้ว

    I have run a 12 LED Neopixel ring on an ATtiny85 but I was using Adafruit's Neopixel library and not the FastLED one.

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Well, at the end of the day the code must send out the correct pulse sequence so six of one and half a dozen of the other, library-wise I guess! Adafruit stuff is, of course, industry standard and doubtless offers similar functionality to the FastLED library. Great to know this works with an ATtiny85 (ideally suited: small, cheap) and I guess whichever library is best for you (any Arduinite) is the best one to use. Thanks for letting me (and everybody reading this) that there are other ways to get a Neopixel ring to run and we can choose the best option according to our needs (and budget). Happy New Year, NIck (2 days premature, but hey, with that leap second on its way, who's counting?!!!)

    • @SpeccyMan
      @SpeccyMan 7 ปีที่แล้ว +1

      I forgot to mention I was also running the tiny on its internal 8MHz oscillator so no XTAL overhead either. Happy New Year to you as well.

  • @zodak9999b
    @zodak9999b 7 ปีที่แล้ว

    Hi, Ralph. I got your sketch (or a reasonable retyping of it) working on a bare ATtiny85 using the FastLEd library just a few minutes ago. I had to add a 'volatile unsigned long timer0_millis=0;' to the sketch to satisfy the linker, and in FastLED.cpp I had to change the 'if defined....' stuff around the call to yield(). The bare chip isn't really supported, but it was easy enough to work around. I temporarily stuck the LED strip on the wall and went outside to see through the bay window - it 100% looks like the TV is on! I feel safer already. :)
    I think I'll move it over to an ESP8266, though. That way I can modify it to run only between certain hours, and only if a ping of my phone on the LAN doesn't give a response.

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Fantastic zodak! I'm, glad you got it going on an ATTiny85, I really want to further investigate this little device. And isn't it amazing how the LEDs really do emulate a TV? Great idea to run it from an ESP8266 (or an Uno with an Ethernet module, of course). Thanks for posting this progress, perhaps others will be motivated by your success too!

  • @SuperBoobaloo
    @SuperBoobaloo 6 ปีที่แล้ว

    According to the Arduino documentation, I'm not sure you should be loading Vin when getting power over USB.

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      Hmm, interesting point there SuperBooBaloo. I was taking the power from Vin (which is connected to the INPUT of the voltage regulator, in other words the input power socket) but in the demo the board was actually being powered by USB - the first question in my mind is "How did that even work?". Was current being reverse routed via the regulator to the Vin pin? I wonder if my clone UNO is wired up subtly differently that allowed this to work? The USB +5v is (nearly) connected directly to the +5v (via a MOSFET) but not to Vin. Good point you make there, I shall read the schematics more closely to see if I can discover *why* this worked and whether it was a bad thing to do.

  • @websitesthatneedanem
    @websitesthatneedanem 7 ปีที่แล้ว

    Could you show us your studio setup, especially your video switcher please?

    • @RalphBacon
      @RalphBacon  7 ปีที่แล้ว

      Nothing special in my setup: I use the well-known OBS to record the video and because that allows hot key switching between sources have built an Arduino-based video switcher (what else!) so that I don't have to use the keyboard whilst videoing. The touch switch keyboard emulator is covered in video #30 Cap1188 Touch Sensor. I use it every time I make a video. I just haven't got round to making it look particularly pretty but it's certainly functional!

    • @websitesthatneedanem
      @websitesthatneedanem 7 ปีที่แล้ว +1

      Many thanks!

  • @andyfraser5876
    @andyfraser5876 6 ปีที่แล้ว

    I tried to make this, but the ring went to full brightness white and stayed there. I tried various other examples from the FastLED library, but with the same result. I suspected the new 2812B ring, but before I rejected it, I tried some examples from the Adafruit_NeoPixel library, which worked fine. Any thoughts?

    • @RalphBacon
      @RalphBacon  6 ปีที่แล้ว

      This is strange, Andy. You sure your ring is the "B" version (4 connections per LED, not 6)? You modified the sketch for the correct number of LEDs in your ring or stick in line 7 of the sketch? Connections all correct pin-wise (but as you got it working with Adafruit I suspect the answers are all Yes)?
      The reason I use the FastLED library here is because, well, it *is* fast! Performance is far better than say, the stock Adafruit one but if that is the only one you can get working you could modify the sketch to make the equivalent Adafruit library calls (but you shouldn't have to do this).
      I have a couple of different Neopixel devices at home but as I'm in a different country at the moment I can't experiment. I'll connect up one of the others between Xmas and New Year to see how they react to that sketch and let you know (unless you tell me you got it working). OK? Nudge me if I forget... (as if)

    • @andyfraser5876
      @andyfraser5876 6 ปีที่แล้ว

      Yes, definitely a B version with 4 pins/LED, and I changed the NUM_LEDS to 16. I gather that the timings for these chips is critical, so maybe it's a tolerance issue with the particular batch in the ring I bought. I looked at modifying the sketch to work with the Adafruit_NeoPixel library, but that's beyond my skill set.

  • @m1geo
    @m1geo 9 หลายเดือนก่อน

    How realistic is this for a TV simulator? It changes almost every second, whereas on a TV, you'd see long scenes, then short jumps, then back to long gradual scenes.
    Just curious.

    • @RalphBacon
      @RalphBacon  9 หลายเดือนก่อน +1

      I have a commercial version of a TV simulator too and it does pretty much the same.
      Of course, if you build your own, you could randomise the colour change timing as you wish.
      I tested mine simply by looking at it from outside (as though I was casing the joint, so to speak) and I was fooled!