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.
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.
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.
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
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...
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 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.
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.
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!
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?!!!)
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 ;)
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!
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!
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.
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!
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.
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?
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)
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.
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.
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.
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.
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
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...
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 !!
Practice makes perfect, Daniel! You will do it I'm sure.
@@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.
Perfect to add to a home security system. Thanks Ralph.
Indeed, Hans, it works very convincingly. Thanks for posting.
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.
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!
I have run a 12 LED Neopixel ring on an ATtiny85 but I was using Adafruit's Neopixel library and not the FastLED one.
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?!!!)
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.
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 ;)
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!
Could you show us your studio setup, especially your video switcher please?
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!
Many thanks!
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.
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!
According to the Arduino documentation, I'm not sure you should be loading Vin when getting power over USB.
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.
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?
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)
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.