SciFi Model Action

The Arduino Exchange => The Arduino Exchange => Topic started by: Tshark on March 14, 2018, 04:02:01 pm

Title: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on March 14, 2018, 04:02:01 pm
I have completed the preliminary bench tests of my bussard lighting and running lights for my 18" (1:650 scale) TOS Enterprise.  I call these "Shadow Bussards" because the animation of the rotors is done by LED animation causing movement of the rotor shadows within the bussard domes.  Compared to motorized rotors this setup is much simpler to wire-up and easier to physically construct within the nacelles.  Additionally the animation speed of both nacelles is exactly the same and it is completely silent.  My initial bench test was with an Arduino Uno, but I recently used a Sparkfun Arduino Pro mini with no problems.  The entire system is running off of a 5 volt wall wart.  This bussard lighting may also work for smaller scales such as the 1/1000 scale TOS Enterprise.

Here is a video of my bench test:

https://www.youtube.com/watch?v=1aFZbrLPVJ8

Here is a tutorial on the Shadow Bussard construction:

https://www.youtube.com/watch?v=_1w1n-JKdxg&t=11s

The colors of the bussards and animation look better in real life, but the video gives you an idea of what I am going for.

Here is the parts list for the Shadow Bussards:
1) Arduino compatible board 5volt 16Mhz

2) Adafruit NeoPixel LED Side Light Strip - Black 120 LED PRODUCT ID: 3634

3) 1 ea 1000uf capacitor and 1 ea 470 Ohm resistor for LED strip power hook-up (per Adafruit's Neopixel tutorial)

4) 120VAC to 5VDC/2 amp power adapter

5) JT-Graphics Bussard Collectors Part# JTR-033  (I have also tried the DLM bussard collectors and they look good too.)
    *Note: The original nacelle caps can be used by cutting off the domes and replacing them with 7/8" (22.2mm) Clear domes from KitKraft part#303851.

6) Paragrafix - STAR TREK 18 INCH ENTERPRISE ACCURIZING PHOTOETCHED SET - PGX116 (for the rotors)

The Neopixel strip is cut into two segments of 19 LED's each.  Three leads are soldered to one end of each segment.  On each segment two of these leads are for positive and negative power with the third lead being for data (as per Adafruit's Neopixel tutorial).  The Arduino uses just one pin to send data to both segments.  These segments are then rolled to fit within the nacelles, hot glued on the back side to keep shape, then placed one segment per nacelle. 

With this set-up you now have 19 LED's in each nacelle that are individually addressable (you can control color, brightness, and speed of animation) all within the Arduino sketch.

After placing the Neopixel rolls in each nacelle, I ground out the center of the JT-Graphics bussard caps so that the LED's could shine through it.  I used the top parts of the Paragraphix photoetch rotors and placed them inside the bussard caps.  The rotors need to be placed back about 1/8 inch from the inner surface of the bussard domes so that the shadow is cast on the inside of the domes.  You can play with the distances of the rotors to dome to find the best look.  A light sanding of the inside of the domes with 220 grit sand paper frosted the domes enough for me.

The Arduino sketch I used is a modified TheaterChase animation combined with a running light sketch provided by Ross Waddell.  To add the running light feature to the TheaterChase sketch required the removal of the timing delays used by Adafruit's stock Neopixel TheaterChase sketch.  You will have to download the following libraries to your Arduino IDE program:

1) Adafruit Neopixel library. Instructions found here: https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-installation
2) LEDfader and Curve library found here: https://github.com/jgillick/arduino-LEDFader

After installing the libraries just select the code below, right click and copy it.  Then paste it in an Arduino sketch.
---------------------------------------------------------------

#include <Curve.h>                    // Part of library below; helps make fade in/out more smooth
#include <LEDFader.h>                 // Library used to fade running lights LEDs without using delay()

#define FADE_TIME_RUN_LTS 125    // Number sets speed of running lights fade up and down
LEDFader ledRunLts;

#define LED_RUN_LTS_PIN 10
const int LED_RUN_LTS_ON_DUR = (1500 - FADE_TIME_RUN_LTS*2);  // Running lights time on in milliseconds
                                                              // This takes into account the fade in/down time
const int LED_RUN_LTS_OFF_DUR = 500;  // Running lights time off in milliseconds
boolean ledRunLtsState = HIGH;

#include <Adafruit_NeoPixel.h>

#define PIXELSPIN   6     //  Output pin on Arduino for Neopixel data
#define NUMPIXELS   19    //  Number of pixels in a segment
#define CALIBRATIONTIME 20000

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

unsigned long pixelsInterval=110;  // Speed of TheaterChase higher # means slower
unsigned long theaterChasePreviousMillis=0;

int theaterChaseQ = 0;

uint16_t currentPixel = 0;// what pixel are we operating on

void setup() {
  currentPixel = 0;
 
  pixels.begin(); // This initializes the NeoPixel library.
  pixels.show(); // This sends the updated pixel color to the hardware.

  ledRunLts = LEDFader(LED_RUN_LTS_PIN);
  ledRunLts.set_curve(&Curve::exponential);
  ledRunLts.fade(255,FADE_TIME_RUN_LTS);
}

void loop () {
    unsigned long ms = millis();     
      ledRunLts.update();
      blinkLED_Run_Lts(ms);
               
        if ((unsigned long)(millis() - theaterChasePreviousMillis) >= pixelsInterval) {
          theaterChasePreviousMillis = millis();
          theaterChase(pixels.Color(65, 15, 5)); // Base color of bussards
        }
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c) {
  for (int i=0; i < pixels.numPixels(); i=i+3) {
      pixels.setPixelColor(i+theaterChaseQ, c);    //turn every third pixel on
     if (i+theaterChaseQ==13) {pixels.setPixelColor(13, 0, 0, 60); // set pixel #13 to blue in animation
          }
          if (i+theaterChaseQ==9) {pixels.setPixelColor(9, 0, 40, 0); // set pixel #9 to green pixel in animation
          }
 }
    pixels.show();
    for (int i=0; i < pixels.numPixels(); i=i+3) {
      pixels.setPixelColor(i+theaterChaseQ, 0);        //turn every third pixel off
    }
    theaterChaseQ++;
    if(theaterChaseQ >= 3) theaterChaseQ = 0;
}
void blinkLED_Run_Lts(unsigned long currentTime)
{
/*

  Function has parameter (unsigned long currentTime) to determine if it's now time to blink on or off the LED.

  In this case, rather than simply turn on or off the LED a fade is initiated using LEDFader. But, LED will not
  turn off or on again until the specified time has elapsed.

  Returns: nothing

*/

  static unsigned long msLast1;

  if (currentTime - msLast1 >= (ledRunLtsState ? LED_RUN_LTS_ON_DUR : LED_RUN_LTS_OFF_DUR)) {
      ledRunLtsState = !ledRunLtsState;
     
      if(ledRunLtsState == HIGH)
      {
        // Fade up


        ledRunLts.fade(255, FADE_TIME_RUN_LTS); // Number sets brightness of running lights
      }
      else
      {
        // Fade down


        ledRunLts.fade(0, FADE_TIME_RUN_LTS);
      }
     
      msLast1 = currentTime;
  }


------------------------------------------------------

Forgive me if the code is a bit clunky as I am still new to the Arduino programming.

Feel free to use this info for private use.  I will keep you updated as I progress.

Tshark
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: ImWolf on March 15, 2018, 05:42:41 am
The effect looks good Shark..... hope it's as you expected in person.

Are you working on an old AMT kit or the newer R2 issue?

Wolf
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on March 15, 2018, 08:07:00 am
Thanks!  The effect look even better in person, so I am very happy.  Using the Neopixel strips this way you can still motorize the rotors as there is a hole in the center of the LED roll for a drive shaft, but IMO what you gain visually is outweighed by the additional complexity, long term reliability, and of course sound issues.  This is the R2 50th Anniversary kit. 
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: RossW on March 16, 2018, 08:01:17 am
Looks great!
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on March 16, 2018, 01:59:38 pm
Looks great!

Thanks Ross.  Considering the high quality of the work you put into your bussard/lighting system I take that as high praise.  Also your sketch on the navigation lights with regard to the "milli" timing gave me the clues I needed to get the Theaterchase sketch revamped.

I do have one question.  Where are the strobe lights used on the 1/350 TOS E?  Watching the series I could not find strobes anywhere.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: MarkW on March 18, 2018, 06:55:32 am
T, the strobes are the "Ion pods" on the back lateral line of the the secondary hull, by the hangar bay.  Featured in this episode:

https://en.wikipedia.org/wiki/Court_Martial_(Star_Trek:_The_Original_Series)

The effect looks great.  One comment though. The two rotors should appear to counter rotate "in" towards each other.  It looks like both were going clockwise?  I.e. from the starboard nacelle should be clockwise, and the port nacelle should be counter clockwise.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on March 18, 2018, 09:09:55 am
T, the strobes are the "Ion pods" on the back lateral line of the the secondary hull, by the hangar bay.  Featured in this episode:

https://en.wikipedia.org/wiki/Court_Martial_(Star_Trek:_The_Original_Series)

The effect looks great.  One comment though. The two rotors should appear to counter rotate "in" towards each other.  It looks like both were going clockwise?  I.e. from the starboard nacelle should be clockwise, and the port nacelle should be counter clockwise.

Thanks Mark.  If you look at the rotor effect long enough it can change directions which is a side effect of the optical illusion.  The Theaterchase of the LED strips are counter-rotating.  I have another set of photoetch rotors on order and plan on cutting off some of the rotor arms.  Hopefully that along with changing the timing of the LED animation will make the rotor direction more distinctive.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: RossW on March 18, 2018, 07:53:20 pm
Looks great!

Thanks Ross.  Considering the high quality of the work you put into your bussard/lighting system I take that as high praise.  Also your sketch on the navigation lights with regard to the "milli" timing gave me the clues I needed to get the Theaterchase sketch revamped.

I do have one question.  Where are the strobe lights used on the 1/350 TOS E?  Watching the series I could not find strobes anywhere.
:)
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on March 19, 2018, 05:33:24 pm
I have amended my initial post to include additional instructions and the code needed to program the Arduino board.  The comments after the // give you an idea which parameters can be changed.

Enjoy

Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: scottminium on March 31, 2018, 07:14:49 pm
might you consider posting the wiring schematic for how you connected everything to the arduino board?
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on April 01, 2018, 08:58:28 am
might you consider posting the wiring schematic for how you connected everything to the arduino board?

Yes, I do need to post a schematic or at least a picture of the bread board set-up.  I am waiting for an Adafruit Trinket Pro to come in first, since that is what I will be using for the final build.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: RossW on April 02, 2018, 08:53:50 am
might you consider posting the wiring schematic for how you connected everything to the arduino board?

Yes, I do need to post a schematic or at least a picture of the bread board set-up.  I am waiting for an Adafruit Trinket Pro to come in first, since that is what I will be using for the final build.
Try fritzing (http://fritzing.org/home/ (http://fritzing.org/home/)) for circuit schematics - it is free, easy to use and very powerful.

Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on April 02, 2018, 09:21:18 am
Thanks Ross.  I added a Fritzing diagram at the bottom of my original post.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: RossW on April 03, 2018, 09:15:25 pm
Thanks Ross.  I added a Fritzing diagram at the bottom of my original post.
;)
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on April 08, 2018, 10:25:38 am
I added a construction tutorial for the bussards here:

https://www.youtube.com/watch?v=_1w1n-JKdxg&t=11s
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: RossW on April 08, 2018, 11:21:59 am
I added a construction tutorial for the bussards here:

https://www.youtube.com/watch?v=_1w1n-JKdxg&t=11s
Excellent!
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on June 09, 2018, 10:57:04 am
Here is the wiring for my Shadow Bussards and pylon windows.  I wanted all three windows in the pylon lit, but LED's or fiber optics for each was going to be over-complicated.  I created a light tunnel in pylon with bare metal foil and regular tin foil wrapped around a coffee stir straw. The straw not only serves as a wall for the light tunnel it also provides a conduit for my wiring.  I placed a SMD LED at the top of the tunnel for all three windows.  I decided to use pieces of plastic tree to function as stops for the Neopixel coils rather than earthquake putty to facilitate replacement if ever necessary.  I also re-enforced the upper nacelle half with 1/16 sq brass bar to prevent nacelle droop.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: MurphyPeoples on July 11, 2018, 05:09:28 pm
Enjoyed the video. I'm starting to just now get my feet wet with Arduino. My goal is to have an Uno operate 3 servos doing separate functions, and 3 sets of lights doing independent off and on. Fingers crossed.
Murphy
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Markeno on August 08, 2018, 09:30:14 pm
This looks great, thanks for posting so much helpful information with it.  I will certainly keep this in mind for when I work on that model which I have sitting on the top of my shelf here.  While I am looking forward to doing it, I have no less than 3 models ahead, and I am very slow at doing them. :)
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on September 02, 2018, 11:01:49 am
Here is the final in-model wiring for my TOS Enterprise. I am using magnet wire to limit light obstruction (Trekworks tip). In the secondary hull I used a drinking straw wrapped in foil as a conduit for wiring to keep it away from light source and windows. The connections are soldered and the red globs are liquid electrical tape to insulate and provide strain relief. Coming out of the model are four magnet wires to power a total of 58 LEDs (38 LEDs for Shadow bussards, 3 Nav, the rest window). I have run this 5VDC system for several hours with no problems.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on November 19, 2018, 05:27:33 pm
Here is a YouTube video of the Shadow Bussards in the finished model.  Also included is a brief description of the basic components used.

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

Below is a Fritzing of my final wiring.

Hope you enjoy this.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: jdonigan on November 30, 2018, 03:29:46 pm
I can't decide if I should mount my Metro Mini horizontally in the engineering hull or vertically into the dorsal. I've been working on modifying TShark's code to get different light patterns from the rolled NeoPixel strips, but I don't have the ParaGrafix engine fans yet to check them out. I'm not planning on lighting any windows. If I mount vertically, I can plug directly into the USB at the underside of the engineering hull and re-program it at any time. Horizontally, and all I can get to is the power connector I mount instead, unless I do something funky with the deflector mount... Any suggestions will be welcome. I've already seen that I can drive all of the LEDs from the USB port with a large enough USB power supply.

I have separated out the left and right NeoPixel strips in software, so I can roll both of them in the same direction, make a spare, and still only have used half of the roll. The "right" strip is simply driven backwards from the "left." With separate inputs, I can also have different pixels light up in blue and green between the two at the same time, so that one is not just the mirror image of the other.
Title: Re: Shadow Bussards and running lights for 18" TOS E
Post by: Tshark on December 01, 2018, 08:14:40 am
I can't decide if I should mount my Metro Mini horizontally in the engineering hull or vertically into the dorsal. I've been working on modifying TShark's code to get different light patterns from the rolled NeoPixel strips, but I don't have the ParaGrafix engine fans yet to check them out. I'm not planning on lighting any windows. If I mount vertically, I can plug directly into the USB at the underside of the engineering hull and re-program it at any time. Horizontally, and all I can get to is the power connector I mount instead, unless I do something funky with the deflector mount... Any suggestions will be welcome. I've already seen that I can drive all of the LEDs from the USB port with a large enough USB power supply.

I have separated out the left and right NeoPixel strips in software, so I can roll both of them in the same direction, make a spare, and still only have used half of the roll. The "right" strip is simply driven backwards from the "left." With separate inputs, I can also have different pixels light up in blue and green between the two at the same time, so that one is not just the mirror image of the other.

Sounds like the vertical mount would be the way to go.  The wall wart power supply that I mentioned in my posts also has a USB jack in it and a microUSB adapter, so you should be able to use it to power the Neopixels.  I found that having one strip driven backwards did not seem to affect the optical illusion of movement.  If you look at one bussard long enough it appears to move both directions.  However, this maybe affected by timing, number of pixels, distance of the rotor blade from the bussard cap, etc.   I would love to see some video when you get it up and running.  Please keep us posted!