Interactive Yard Lights , Walkway Lights

by practical projects in Circuits > LEDs

615 Views, 9 Favorites, 0 Comments

Interactive Yard Lights , Walkway Lights

Dollar_Store_Solar-1.jpg
dollar-solar-lights-solar.jpg

I wanted to build some kind of interactive yard lights for my back yard. The idea was, when someone walked one way it would set off a animation in the direction you were walking. I started with Dollar General $1.00 solar lights

Gut the Solor Lights

20180814_165711.jpg
20180814_165607.jpg
20180814_165441.jpg
20180814_165450.jpg
1536544148623909300926.jpg
15365442158261741920305.jpg

The first step was to gut the lights to make way for more fun stuff. I started by cutting out the original led and battery. Be sure to save these parts as they will be useful in another project I also removed the chrome dome that was on the bottom of the solar light and glued it to the top as seen in photos

Installing Better Lights

20180814_205529.jpg
20180814_173425.jpg
20180814_164914.jpg
20180814_164931.jpg
20180814_164954.jpg
153654434479096063403.jpg

for the led i used waterproof ws2811b which can be found here

https://www.ebay.com/itm/50-X-12mm-LED-Module-RGB-...

I originally planed on putting the PIR sensors inside the solar lights. but this proved to be some what problematic because the sensor basically couldn't see past the plastic. it must have some sort of UV filtering propriety. so i opted for something more like this

https://www.thingiverse.com/thing:2590216

Coding

Arduino WS2811 NeoPixel Yard Lights

if you want to make the lights not use sensor or just run all the time just look for the place that is commented as "changing flag state" and set it to ether 1 or 0 i will add more pics when i complete this for myself so its still a work in progress but I think its too neat not to share right away. thanks for looking

void setup() { // put your setup code here, to run once: FastLED.addLeds(leds, NUM_LEDS); Serial.begin(9600); pinMode(buttonPin1, INPUT); pinMode(buttonPin2, INPUT); }

void loop() {

Serial.println(FlagState); if(FlagState == 0){ ForwardLeds(); } if(FlagState == 1){ RevLeds(); } if(FlagState == 2){ Waiting(); } }

void ForwardLeds(){ FirstLed = -1; LastLed = 16; for(int i=0; i < 8; i++){ LastLed--; FirstLed++; leds[LastLed] = CRGB::White; leds[FirstLed] = CRGB::White; delay(750); FastLED.show(); Serial.print ("white Pass "); Serial.print ( i); Serial.println (" of 8"); } FirstLed = -1; LastLed = 16; for(int i=0; i < 8; i++){ LastLed--; FirstLed++; leds[LastLed] = CRGB::Blue; leds[FirstLed] = CRGB::Blue; delay(250); FastLED.show(); Serial.print ("Blue Pass "); Serial.print ( i); Serial.println (" of 8"); } FirstLed = -1; LastLed = 16; for(int i=0; i < 8; i++){ LastLed--; FirstLed++; leds[LastLed] = CRGB::Purple; leds[FirstLed] = CRGB::Purple; delay(250); FastLED.show(); Serial.print ("Red Pass "); Serial.print ( i); Serial.println (" of 8"); } FirstLed = -1; LastLed = 16; for(int i=0; i < 8; i++){ LastLed--; FirstLed++; leds[LastLed] = CRGB::Black; leds[FirstLed] = CRGB::Black; delay(250); FastLED.show(); Serial.print (" Turning off led "); Serial.print ( i); Serial.println (" of 8"); } FlagState = 2; // changing flag state } void RevLeds(){ Serial.println("in reverse"); FirstLed = 8; LastLed = 7; for(int i=0; i < 8; i++){ LastLed++; FirstLed--; leds[LastLed] = CRGB::White; leds[FirstLed] = CRGB::White; delay(750); FastLED.show(); Serial.print (" White pass "); Serial.print ( i); Serial.println (" of 8"); } FirstLed = 8; LastLed = 7; for(int i=0; i < 8; i++){ LastLed++; FirstLed--; leds[LastLed] = CRGB::Blue; leds[FirstLed] = CRGB::Blue; delay(250); FastLED.show(); Serial.print (" Blue pass "); Serial.print ( i); Serial.println (" of 8"); } FirstLed = 8; LastLed = 7; for(int i=0; i < 8; i++){ LastLed++; FirstLed--; leds[LastLed] = CRGB::Purple; leds[FirstLed] = CRGB::Purple; delay(250); FastLED.show(); Serial.print (" Red pass "); Serial.print ( i); Serial.println (" of 8"); }

FirstLed = 8; LastLed = 7; for(int i=0; i < 8; i++){ LastLed++; FirstLed--; leds[LastLed] = CRGB::Black; leds[FirstLed] = CRGB::Black; delay(250); FastLED.show(); Serial.print (" Turning off Led "); Serial.print ( i); Serial.println (" of 8"); } FlagState = 2; //changing flag state } void Waiting(){ buttonState1 = digitalRead(buttonPin1); buttonState2 = digitalRead(buttonPin2); if(buttonState1 == HIGH){ Serial.println("forward triggered"); FlagState = 0; } else if(buttonState2 == HIGH){ Serial.println("Rev triggered"); FlagState = 1; } Serial.println("loop Finished waiting"); }