R/C Airplane LED FlasherR/C Airplane LED Flasher - 2
Description: This was designed to flash a pair of LEDs to be mounted on the wing tips of a Parkzone Citabria R/C (remote control) airplane. The unmodified Parkzone Citabria only weighs 20 grams (about 0.7 oz), so weight, and therefore the number and size of the electrical components for the flasher are critical. Another major constraint was the range of power supply voltage and current draw. The battery in the Parkzone Citabria varies from 3.7 to 4.2 volts, which rules out circuits such as the Simplest LED Flasher Circuit, which requires a higher voltage. Current draw also needs to be kept low because the battery is tiny. The CMOS AVR controller handles both of these requirements beautifully.
I used the AVR ATTINY12 controller from Atmel because I have plenty left over from other projects. With some modification to the code, you can use the ATTINY13, which is also available in both 8 pin DIP and surface mount packages, or nearly any AVR or other small CMOS controller. See firmware discussion below.
Here is the pin assignment for the ATTINY12 and ATTINY13.
Pin 1 Battery +
Pin 2 PORTB3 4 Hz, 50 ms positive pulse
Pin 3 PORTB4 10 Hz 50 ms positive pulse (square wave)
Pin 4 Battery -
Pin 5 PORTB0 4 Hz 100 ms positive pulse
Pin 6 PORTB1 2 Hz 50 ms positive pulse
Pin 7 PORTB2 4 Hz 100 ms positive pulse
Pin 8 Battery +
The "heartbeat" of the firmware is a subroutine named wait_50ms which sets up the 8-bit timer to interrupt the processor, and then puts the processor to sleep. After 50 milliseconds, the processor is awakened by the timer interrupt, the interrupt is cleared, and the subroutine returns to the instruction in the main routine after the instruction that called wait_50ms.
The main routine merely sets or clears bits on the output pins and then waits for 50 milliseconds, and sets and clears pins as appropriate to reproduce the intended waveforms on the output pins. Since there is only one timing routine, all changes on the output pins take place according to the 50-millisecond granularity of this timing method. It should be noted that because there are varying numbers of instructions between calls to wait_50ms, the timing between changes in the output pins varies throughout the entire 1-second cycle by a few microseconds. This tiny variation in timing is not visible. Using this method to control the timing of the drive pulses brings a new meaning to the term "flash memory".
You may notice that pin 5 has the same pattern as pin 7. Each pin drives a 50-millisecond pulse at 4 Hz. The pulses from the two pins are synchronized and in phase. On an ATTINY12, each pin can supply up to 40 milliamps, for a total of 80 milliamps to drive the LEDs.
The internal clock for the ATTINY12 is 1.2 MHz while the internal clock for the ATTINY13 can be either 4.8 MHz or 9.6 MHz. If you use the ATTINY13, you will have to either accept that the flashes will be at a higher frequency and a shorter duration, or modify the code to take into account that higher clock speed. It may also be necessary to modify the setup of the timer in the ATTINY13.
The circuit utilizes a compact design to minimize weight while ensuring efficient operation within the specified voltage range. The ATTINY12 or ATTINY13 microcontrollers serve as the central processing unit, executing the programmed firmware that controls the LED flashing sequences. The power supply is connected to pins 1 and 8, providing the necessary voltage to the microcontroller and the LEDs.
Output pins (PORTB0, PORTB1, PORTB2, PORTB3, and PORTB4) are configured to generate specific pulse widths and frequencies, allowing for the desired LED flashing patterns. The use of a timer interrupt allows for accurate timing control, ensuring that the LED flashes occur at the intended intervals without excessive power consumption.
The design must consider the maximum current output of the microcontroller pins while ensuring that the total current draw remains within the limits of the battery capacity. The firmware's efficiency is crucial in maintaining low power consumption, particularly given the limited battery resources available in the Parkzone Citabria. The synchronization of the output pins enhances the visual effect of the flashing LEDs, providing clear visibility during flight.
Overall, this LED flasher circuit effectively meets the design constraints of weight, power consumption, and voltage requirements while delivering a functional and visually appealing solution for R/C airplane enthusiasts.This was designed to flash a pair of LEDs to be mounted on the wing tips of a Parkzone Citabria R/C (remote control) airplane. The unmodified Parkzone Citabria only weights 20 grams (about 0.7 oz), so weight, and therefore the number and size of the electrical components for the flasher are critical.
Another major constraint was the range of power supply voltage and current draw. The battery in the Parkzone Citabria varies from 3.7 to 4.2 volts. which rules out circuits such as the Simplest LED Flasher Circuit, which requires a higher voltage. Current draw also needs to be kept low because the battery is tiny. The CMOS AVR controller handles both of these requirements beautifully. I used the AVR ATTINY12 controller from Atmel because I have plenty left over from other projects. With some modification to the code, you can use the ATTINY13, which is also available in both 8 pin DIP and surface mount packages, or nearly any AVR or other small CMOS controller. See firmware discussion below. Here is the pin assignment for the ATTINY12 and ATTINY13. Pin 1 Battery +
Pin 2 PORTB3 4 Hz, 50 ms positive pulse
Pin 3 PORTB4 10 Hz 50 ms positive pulse (square wave)
Pin 4 Battery -
Pin 5 PORTB0 4 Hz 100 ms positive pulse
Pin 6 PORTB1 2 Hz 50 ms positive pulse
Pin 7 PORTB2 4 Hz 100 ms positive pulse
Pin 8 Battery +
The "heartbeat" of the firmware is a subroutine routine named wait_50ms sets up the 8 bit timer to interrupt the processor, and then puts the processor to sleep.
After 50 milliseconds, the processor is awakened by the timer interrupt, the interrupt is cleared, and subroutine returns to the instruction in the main routine after the instruction that called wait_50ms . The main routine merely sets or clears bits on the output pins and then waits for 50 milliseconds, and sets and clears pins as appropriate to reproduce the intended wave forms on the output pins.
Since there is only one timing routine, all changes on the output pins take place according to the 50 millisecond granularity of this timing method. It should be noted that because there are varying numbers of instructions between calls to wait_50ms, the timing between changes in the output pins varies throughout the entire 1 second cycle by a few microseconds.
This tiny variation in timing is not visible. Using this method to control the timing of the drive pulses brings a new meaning to the term "flash memory". You may notice that pin 5 has the same pattern as pin 7. Each pin drives a 50 millisecond pulse at 4 Hz. The pulses from the two pins are synchronized and in phase. On an ATTINY12, each pin can supply up to 40 milliamps, for a total of 80 milliamps to drive the LEDs.
The internal clock for the ATTINY12 is 1.2 MHz while the internal clock for the ATINY13 can be either 4.8 MHz or 9.6 MHz. If you use the ATTINY13, you will have to either accept that that the flashes will be at a higher frequency and a shorter duration, or modify the code to take into account that higher clock speed into account.
It may also be necessary to modify the setup of the timer in the ATTINY13.
This electronic breadboard circuit for beginners in electronics activates an LED automatically when the ambient light level falls below a specific threshold.
This circuit utilizes a light-dependent resistor (LDR) as the primary sensor to detect ambient light levels. The LDR is...
The power supply utilized in this circuit is of the capacitive type, eliminating the need for a transformer and allowing for a compact design that can be easily installed in small spaces. The circuit employs LEDs instead of traditional filament...
This simple LED light flasher project utilizes a Hex Inverter 74C04 integrated circuit (IC) to generate a square wave pulse, which is employed to alternately turn two LEDs on and off.
The circuit design comprises a 74C04 Hex Inverter IC, which...
This toy traffic signal utilizes a single low-cost hex Schmitt-trigger inverter IC (IC1a-IC1f) to directly control three colored LEDs (red, green, and amber). Upon activation, the circuit illuminates the red signal for 30 seconds, followed by green for 6 seconds,...
In various industrial processes, it is essential to rotate a DC (or AC) motor both forward and reverse for a specified duration. Initially, the motor rotates forward (clockwise) for a certain period (approximately 2 to 3 minutes), then stops for...
ECL integrated circuit non-saturated digital logic circuits. CMOS and ECL interface circuit shown in cross.
ECL (Emitter Coupled Logic) integrated circuits are designed to operate in a non-saturated mode, providing high-speed digital logic functionality. These circuits are characterized by their fast...
The multivibrator flashing light emitting diode (LED) display driver circuit can be utilized in toys, creating flashing effects in the eyes of animals or monsters.
This circuit employs a multivibrator configuration, typically a 555 timer IC or a similar component, to...
A couple of inexpensive CMOS integrated circuits are utilized to digitally generate audio sine waves across a broad frequency range in this compact battery-operated test instrument. The oscillator features both unbalanced and balanced outputs. Signal generators are frequently used in...
This document presents a circuit diagram for a simple and easy-to-construct battery level indicator. Typically, in mobile phones, battery levels are shown in either dot or bar format, allowing users to easily recognize the battery status.
The battery level indicator circuit...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more