"Scale Beleuchtung" mit einem Arduino Microcontroller Board

Unsere Jugendgruppe hat sich ein spannendes Elektronik Projekt überlegt. Eine Scale Beleuchtung für Modellflugzeuge. Folgende Beleuchtungselemente wurden programmiert:
Navigations-, Antikollisions- und Beacon-Lichter. Das Antikollisions- und das Beacon-Licht pulsieren nach Luftfahrtnorm in kurzen Intervallen
😉. Die Beleuchtung wird dann beim nächsten Flugzeug Bauprojekt in alle Jugendmodelle integriert.

Die Arduino Boards können direkt kleine LED´s mit insgesamt bis zu 200mA Strombedarf betreiben. Für stärkere LED´s kann man noch eine Transistor Treiber Stufe dazu nehmen.

Beim Versuchsaufbau wurde ein Arduino Uno Board benutzt. Zum Einbau in ein Modell würde sich dann das kleinere Arduino Nano Board gut eignen. Im Moment ist noch keine Ferngesteuerte Ein-Aus Funktion für die Beleuchtung geplant. Aber auch das würde sich relativ leicht integrieren lassen.

Der Schaltungsaufbau mit einem Breadboard:

Stacks Image 5

Stacks Image 9

Es funktioniert!

Stacks Image 11

Hier noch das Schaltbild und der Arduino Programmcode, für den Fall das es jemand nachbauen will.

Stacks Image 15


const int ledPin1 = 9; // LED 1 (wie bisher)
const int ledPin2 = 10; // LED 2 (Helligkeitsverlauf)
unsigned long previousMillis1 = 0;
unsigned long previousMillis2 = 0;
const long blinkInterval1 = 70;
const long pauseInterval1 = 2000;
int blinkCount1 = 0;
int ledState1 = LOW;
int currentState1 = 0; // 0 = Blinken, 1 = Pause
int fadeValue = 0;
int fadeDirection = 3; // 1 = heller, -1 = dunkler
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(8, OUTPUT);
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);

}

void loop() {

unsigned long currentMillis = millis();

// LED 1 (wie bisher)
if (currentState1 == 0) {
if (currentMillis - previousMillis1 >= blinkInterval1) {
previousMillis1 = currentMillis;
ledState1 = !ledState1;
digitalWrite(ledPin1, ledState1);
blinkCount1++;

if (blinkCount1 >= 4) {
blinkCount1 = 0;
currentState1 = 1;
previousMillis1 = currentMillis;
digitalWrite(ledPin1, LOW);
}
}
} else {
if (currentMillis - previousMillis1 >= pauseInterval1) {
currentState1 = 0;
previousMillis1 = currentMillis;
}
}

// LED 2 (Helligkeitsverlauf)
if (currentMillis - previousMillis2 >= 20) { // Helligkeitsänderungsgeschwindigkeit
previousMillis2 = currentMillis;
fadeValue += fadeDirection;

if (fadeValue <= 0 || fadeValue >= 255) {
fadeDirection *= -1; // Richtung umkehren
}

analogWrite(ledPin2, fadeValue);
}
digitalWrite(8, HIGH);

}