Making my own instant "UFO" drone

Just got this 5V – 60 multicolor LED ring, about 7” diameter off Ebay.
(Each of the 60 LEDs is independently addressable/controllable.)

Using a 5V Arduino Mini Pro (computer about the size of a quarter) to control the LED ring patterns.

Then mount (the LEDs, Arduino, & BEC) on a board under one of my F450 quads (with autonomous flight & RTL capabilities), fly in the dark of night…
Instant UFO…. :wink:

1 Like

That looks cool. Next thing is that we will read more and more UFO sights from local newspapers :slight_smile:

How do you control that LED ring, is it via I2C or serial? Would you mind to post your code?

Just two 5V power wires and a single controller digi-port connection.
The Arduino IDE with a library…
Code is kinda long. (It has 8 different flashing designs that are randomly chosen in the “loop” mainline.)

//----------------------------------------------
 #include < Adafruit_NeoPixel.h>
 #define PIN            10                // The one digi control connection
 #define NUMPIXELS      60       // The number of LEDs in the ring

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
              randomSeed(analogRead(3));  // Random seed generator.
              pixels.begin(); // This initializes the NeoPixel library.
              pixels.show();  // Turn all LEDs off.
            }

void loop() 
        {
       switch (random(0,10))
         {
          case 0:
            whiteflasher();
            break;  
         case 1:
            whitechase();
            break;  
         case 2:
            greenchase();
            break; 
         case 3:
           redchase();
           break;
         case 4:
           bluechase();
           break;
         case 5:
           whiteflasher();
           break;
         case 6:
           wiper();
           break;
         case 7:
           fullflash();
           break;
         case 8:
           randomflash();
           break;
         case 9:
           randomflash();
           break;
         default:
           whiteflasher();
           break;
       }

}

//------------------------------------------------------------------------------

void whiteflasher()
   {
   for (int i=0;i<100;i++)
      {
      flasher(255,255,255,20,30);
      }
   }   



//------------------------------------------------------------------------------

void whitechase()
    {
      for (int j=0; j<20; j++) 
          {  
           for (int q=0; q < 3; q++) 
              {
                for (int i=0; i < 60; i=i+3) 
                  {
                   pixels.setPixelColor(i+q, pixels.Color(255,255,255)); 
                  }
                pixels.show();
                delay(60);
                for (int i=0; i < 60; i=i+3) 
                   {
                     pixels.setPixelColor(i+q, pixels.Color(0,0,0));        //turn every third pixel off
                   }
                }
         }
    }


//-----------------------------------------------------------------------------------------------------------------------

void greenchase()
    {
      for (int j=0; j<20; j++) 
          {  
           for (int q=0; q < 3; q++) 
              {
                for (int i=0; i < 60; i=i+3) 
                  {
                   pixels.setPixelColor(i+q, pixels.Color(0,255,0)); 
                  }
                pixels.show();
                delay(60);
                for (int i=0; i < 60; i=i+3) 
                   {
                     pixels.setPixelColor(i+q, pixels.Color(0,0,0));        //turn every third pixel off
                   }
                }
         }
    }

//-----------------------------------------------------------------------------------------------------------------------

void redchase()
    {
      for (int j=0; j<20; j++) 
          {  
           for (int q=0; q < 3; q++) 
              {
                for (int i=0; i < 60; i=i+3) 
                  {
                   pixels.setPixelColor(i+q, pixels.Color(255,0,0)); 
                  }
                pixels.show();
                delay(60);
                for (int i=0; i < 60; i=i+3) 
                   {
                     pixels.setPixelColor(i+q, pixels.Color(0,0,0));        //turn every third pixel off
                   }
                }
         }
    }


//-----------------------------------------------------------------------------------------------------------------------

void bluechase()
    {
      for (int j=0; j<20; j++) 
          {  
           for (int q=0; q < 3; q++) 
              {
                for (int i=0; i < 60; i=i+3) 
                  {
                   pixels.setPixelColor(i+q, pixels.Color(0,0,255)); 
                  }
                pixels.show();
                delay(60);
                for (int i=0; i < 60; i=i+3) 
                   {
                     pixels.setPixelColor(i+q, pixels.Color(0,0,0));        //turn every third pixel off
                   }
                }
         }
    }





//-------------------------------------------------------------------------------------------------------------



void wiper()
   {
    for (int x=0;x<2;x++)
      { 
       for(int i=0; i<60; i++) 
          {
             pixels.setPixelColor(i, pixels.Color(255,255,255)); 
             pixels.show();
             delay(10);
          }
        for(int i=0; i<60; i++) 
           {
              pixels.setPixelColor(i, pixels.Color(255,0,0)); 
              pixels.show();
              delay(10);
           }
        for(int i=0; i<60; i++) 
          {
              pixels.setPixelColor(i, pixels.Color(0,255,0)); 
              pixels.show();
              delay(10);
          }
       for(int i=0; i<60; i++) 
          {
             pixels.setPixelColor(i, pixels.Color(0,0,255)); 
             pixels.show();
             delay(10);
          }
      }

  }


//------------------------------------------------------------------------------

void fullflash()
   {
      for (int i=0;i<6;i++) 
        {
          flasher(255,255,255,200,200);
        }
      for (int i=0;i<6;i++) 
        {
          flasher(0,0,255,200,200);
        }
     for (int i=0;i<6;i++) 
       {
         flasher(0,255,0,200,200);
       }
    for (int i=0;i<6;i++) 
      {
        flasher(255,0,0,200,200);
     }
    for (int i=0;i<6;i++) 
     {
       flasher(255,255,255,200,200);
     }
  }

//-----------------------------------------------------------------------------

void randomflash()
   {
      for (int i=1;i<75;i++)
        {
        switch (random(0,4)){
          case 0:
            flasher(255,0,0,50,150);
            break;  
         case 1:
            flasher(0,255,0,50,150);
            break;  
         case 2:
            flasher(0,0,255,50,150);
            break; 
         case 3:
           flasher(190,190,190,50,150);
           break;
         default:
           flasher(175,175,175,50,150);
           break;
       }
   }
   }

//------------------------------------------------------------------------------

void flasher(uint8_t r,uint8_t g,uint8_t b, uint8_t s, uint8_t l) 
   {
    for(int i=0;i<NUMPIXELS;i++){
        pixels.setPixelColor(i, pixels.Color(r,g,b)); 
      }
        pixels.show(); 
     delay(random(s,l));
     for(int i=0;i<NUMPIXELS;i++){
       pixels.setPixelColor(i, pixels.Color(0,0,0)); 
     }
       pixels.show();
      delay(random(s,l));
  }
1 Like

Where I ordered the ring:
http://www.ebay.com/itm/131594455055?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Where I ordered the Mini-Pro Arduino ($2 each):
http://www.ebay.com/itm/331594491708?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

And where I ordered the ultra-mini (size of a Nickle) adjustable (3 Amp) BEC ($0.59 each):
http://www.ebay.com/itm/361527486079?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Ah yeah NeoPixel. Those are nice little devices and easy to control. I can see a lot of different application for those LEDs.

OT: Hmm I wonder why discourse did not highligh your code. Oh well, I will check that later
(EDIT: Now it looks nicer, formatted code)

Flew last night over a local park (Auto-flight mode, with a flight plan) circle slowly 6 times at 150ft & RTL.

It’s next to a residential (low-traffic) street. Saw several cars slow as they noticed, with some pulling over to watch.

At that altitude, the “theater-chase” light mode (hardest code of the program) just didn’t show well. Deleted all the “chase” modes and replaced them with colored copies of the “whiteflasher” routine, which looks awesome. (“redflasher”, “greenflasher”, & “blueflasher” routines.)

The fast (20ms-30ms, slightly random) flashing catches the eye, and makes it almost impossible to ignore.

neat idea, i have done something similar with my Kite, but it just has 8 RGB
leds, and i am using a small board from Photon factory.
( Plasma Drive )

http://www.thephotonfactory.com/PD-V1-24.shtml

flying between 300-500ft with a 8ft wide kite, it gets attention also, and especially since it is almost totally silent.

1 Like

Neighbor suggested adding “weird sounds” to the UFO.

Found a miniature MP3 decoder (with a 2 watt amp included), for $0.77. It’s the size of a nickel.
Then add a couple of these mini & light speakers for a buck or so…. :slight_smile: :slight_smile:

http://www.ebay.com/itm/321874006716?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
http://www.ebay.com/itm/381359127857?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Cannot helpit… but this is first thing that comes to my mind :wink:

https://www.youtube.com/watch?v=AphKxQ2NsQo

SO…

UFO-drone flight up at Chumash Park.
(It’s ¼ block from the local High School, having an activity tonight.)

Bet the yells and screams could be heard for well over a mile…. :wink:

Hehehehehehe…

I neeeed to have video of that flight :wink:

Awesome!! Nice! Yells and screams…! :joy: