Skip to content

RC Aircraft Navigation Lights

Wanting to light up the night sky with your RC Plane, but scared of losing track of it? Well you are in luck! TinyCircuits is back with a full on tutorial on installing RC Aircraft Navigation Lights!


Description

This project uses the TinyLily Mini or TinyDuino platform to add functional navigation lights to your flying radio control model.

The red and green LEDs (A) on the left and right wingtips respectively remain constantly on. The white LEDS (D) at the backs of the wingtips blink quickly, while the white LED (E) at the tail blinks at a slower rate. The red LEDS (B) on the top rear and bottom front of the fuselage pulse slowly to mimic a rotating beacon. Finally, the two white LEDs (C) at the front center of each wing can be controlled by an RC channel from your receiver, or set to be constantly on or off in the Arduino code.

(Photo Credit: http://pages.suddenlink.net/billwhite/RCNavLights.htm)

The board will be powered by your RC receiver through a servo connector. The switchable Landing Lights will also be controlled through the same connector.

In this tutorial I am using a TinyLily Mini Processor and USB adapter, however you could alternatively use a TinyDuino Processor, USB Board, and Proto Board.

Learn more about the TinyDuino Platform

Learn more about the TinyLily Mini Platform

Technical Details

Power Requirements

  • Voltage: 5V

Pins Used: LED letters correspond to the illustration above.

  • GND - Ground for servo connector and LEDs.
  • VCC - +5V power from servo connector, and to red and green wingtip LEDs.
  • Digital 0 - Positive connection for Landing Lights (C)
  • Digital 1 - Positive connection for white Wingtip Strobe Lights (D)
  • Digital 2 - Senses any change from the servo signal wire.
  • Digital 3 - Positive connection for red pulsing beacons (B)
  • Analog 0 - Positive connection for Tail Strobe Light (E)

Dimensions

  • TinyDuino: 20mm x 20mm (0.79 inches x 0.79 inches)
  • TinyLily Mini: 14mm (0.55 inches) diameter
  • TinyDuino Total Weight: 2g (0.018oz.)
  • TinyLily Mini Total Weight: 0.5g (0.07oz.

Materials

Hardware materials

Hardware

NOTE: Soldering is required for this tutorial

Software


Assembly

If you're using a servo wire that is yellow, red and brown, yellow is signal, red is +5V, and brown is ground. If your servo wire is white, red and black, white is signal, red is +5V, and black is ground.

Step 1

Setup: If you haven't already, download the Arduino IDE from here, and download the RC Navigation Light Code below and unzip the folder. Connect your processor board to the USB TinyShield and connect them to your computer with a micro USB cable. Open the RC Navigation Code in the Arduino IDE and, under the "Tools" tab, select "Arduino Pro or Pro Mini" for Board, and "Atmega 328 (3.3, 8MHz)" for Processor. For Port, select whichever com port your board is plugged into. If you are unsure, you can check Device Manager.


Step 2

Program: Once everything is connected as outlined in the above step, press the upload button near the top left of the Arduino window. The code should compile and program onto your processor board. This may take a few seconds.

Aircraft Navigation Lights Arduino Sketch
//-------------------------------------------------------------------------------
//  TinyDuino RC Aircraft Navigation Lights Example Sketch
//  Last Updated 3/12/2018
//
//  This project controls a variety of aircraft navigation lights for radio
//  control airplanes using the millis() function to blink and pulse many LEDs
//  at different rates. This project also uses an RC receiver channel to turn
//  landing lights on or off, depending on a transmitter switch.
//
//  Written by Nick DiVitto for TinyCircuits, https://tinycircuits.com
//
//  This example is free software; you can redistribute it and/or
//  modify it under the terms of the GNU Lesser General Public
//  License as published by the Free Software Foundation; either
//  version 2.1 of the License, or (at your option) any later version.
//-------------------------------------------------------------------------------

//Pin Number Assignments:
const int wStrobe = 1;                //White wingtip strobes
const int Beacon = 0;                 //Red for & aft rotating beacons
const int Landing = 3;                //White landing lights
const int tStrobe = 4;                //White aft strobe

//LED States:
int wStrobeState = LOW;               //LED states to set LED
int BeaconState = LOW;
int tStrobeState = LOW;

//Time Variables:
unsigned long wStrobePreviousMillis = 0;     //Last time LED was updated
unsigned long tStrobePreviousMillis = 0;

volatile int pwm_value = 0;           //volotile variables for pwm measurement
volatile int prev_time = 0;

//Intervals                          //Sets time intervals for each on/off period
const long wStrobeON = 3;            //Time on in milliseconds
const long wStrobeOFF = 25;          //Time off in milliseconds
const long BeaconPeriod = 250;       //SINE period
const long tStrobeON = 7;            //Time on in milliseconds
const long tStrobeOFF = 50;          //Time off in milliseconds

void setup() {
  pinMode(wStrobe, OUTPUT);          //sets LED pins as outputs
  pinMode(Landing, OUTPUT);
  pinMode(tStrobe, OUTPUT);

  attachInterrupt(0, rising, RISING);    //When D2 goes high, call the RISING function
}

void loop() {
  unsigned long CurrentMillis = millis();

  //Landing Lights:
  if (pwm_value > 750) {                //If pulse width is larger than 750ms, landing lights should be on.
    digitalWrite(Landing, HIGH);
  }
  else {
    digitalWrite(Landing, LOW);
  }

  //wStrobe:
  if ((wStrobeState == HIGH) && (CurrentMillis - wStrobePreviousMillis >= wStrobeON)) {           //If wStrobe is on and it is time to turn it off...
    wStrobeState = LOW;               //Turn it off
    wStrobePreviousMillis = CurrentMillis;    //Remember the time
    digitalWrite(wStrobe, wStrobeState);      //Update the actual LED
  }
  else if ((wStrobeState == LOW) && (CurrentMillis - wStrobePreviousMillis >= wStrobeOFF)) {
    wStrobeState = HIGH;              //Turn it on
    wStrobePreviousMillis = CurrentMillis;    //Remember the time
    digitalWrite(wStrobe, wStrobeState);      //Update the actual LED
  }

  //Beacon (Sinusoidal Pulse):
  BeaconState = 128 + 127 * cos(2 * PI / BeaconPeriod * CurrentMillis); //Sets beacon state to follow a Sin wave depending on time
  analogWrite(Beacon, BeaconState);            //Sets analog output to match BeaconState

  //tStrobe:
  if ((tStrobeState == HIGH) && (CurrentMillis - tStrobePreviousMillis >= tStrobeON)) {           //If tStrobe is on and it is time to turn it off...
    tStrobeState = LOW;               //Turn it off
    tStrobePreviousMillis = CurrentMillis;    //Remember the time
    digitalWrite(tStrobe, tStrobeState);      //Update the LED
  }
  else if ((tStrobeState == LOW) && (CurrentMillis - tStrobePreviousMillis >= tStrobeOFF)) {
    tStrobeState = HIGH;              //Turn it on
    tStrobePreviousMillis = CurrentMillis;    //Remember the time
    digitalWrite(tStrobe, tStrobeState);      //Update the LED
  }
}

//functions for PWM Landing Gear channel measurement:
void rising() {
  attachInterrupt(0, falling, FALLING);
  prev_time = micros();
}

void falling() {
  attachInterrupt(0, rising, RISING);
  pwm_value = micros() - prev_time;
}

Step 3

Solder Servo Connector: Once the processor is programmed, it is time to start soldering! First, solder the servo connector wires. If you're using a TinyLily Mini, you will be soldering on the processor board itself. If you are using a TinyDuino, you will be soldering to the proto shield. In either case, the power wire will be soldered to VCC, the ground wire will be soldered to GND, and the signal wire will be soldered to Digital pin 2.

3A

If you're using a servo wire that is yellow, red, and brown: yellow is signal, red is +5V, and brown is ground. If your servo wire is white, red, and black: white is signal, red is +5V, and black is ground.


Step 4

Solder Resistors to LEDs: LEDs require a resistor soldered to them in series to prevent damage to the LED (i.e. current limiting resistor). You can buy LEDs that are pre-wired with a current limiting resistor already added, but if you have normal LEDs, you will need to add resistors yourself.

4A

To Add Resistors Yourself: Trim one lead on the resistor to be about 5mm long, and trim the long leg on the LED to be about the same length. The long LED leg is the positive lead. Solder the trimmed leads together. Do this to all of the LEDs and put heat shrink tubing over the other lead to prevent it from touching the solder joint.


Step 5

Attach Wires to LEDs: Trim the leads on the LEDs and resistors so that there is about 5mm exposed, and solder some thin wire to each lead. It would be best to use two different colors of wire, one for the positive wire, and one for ground. Measure the wire against the aircraft wings and fuselage and give yourself a little extra to work with. you can trim excess wire later. Use the illustration above to plan out where all of the LEDs should be mounted on the aircraft. cover all solder joints and exposed leads with heat shrink tubing.


Step 6

Route Wires and Mount LEDs: Once all LEDs have resistors, and wires that are roughly the correct length for their position, you can begin to mount them and route the wires through the wing and fuselage. It helps to use a stick or a stiff rod to fish the wires through tight spaces. You may need to poke holes for LEDs to stick out of. Fasten them with hot glue. Route all of the wires to the location where you want to mount your processor board. This should be close to your RC receiver so that it can be connected by the servo cable.


Step 7

Solder LED Connections: Now, solder the wires to the processor board. Group all of the ground wires together and solder them to the GND terminals on the processor (TinyLily Mini) or Proto Board (TinyDuino). Next, solder both positive wires for the red and green wingtip LEDs to the VCC terminal. Solder both positive wires for the white wingtip LEDs to digital pin 1, the positive wire for the white tail LED to analog pin 0, both positive wires for the red LEDs on the top and bottom of the fuselage to digital pin 3, and both positive LEDs for the white LEDs in the middle of the wing can be attached to digital Pin 0. Pins used are listed about for reference.


Step 8

Fly! Once everything is soldered and the servo connector is plugged into a spare channel on your receiver, you're done! When power is supplied to the receiver, the lights will begin to operate. Flipping the switch on your transmitter that corresponds to the receiver channel that the processor is plugged into will turn the Landing Lights on and off.

Want to know more? You know you do, so click the pic above and it'll send you on your way to the shop link!


Contact Us

If you have any questions or feedback, feel free to email us or make a post on our forum. Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it.

Thanks for making with us!