NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Quad copter landing pad lights

March 14, 2015
by scootergarrett
scootergarrett's Avatar

A few months ago I bought a quadcopter and now that its mud season I decided to build a little landing pad for it, then I thought it should have some lights on it, and they should blink.

Top PIC

I drilled 8 holes around the outside and pushed the brightest LED's I had kicking around through. I then wired them to the center circuit board

Bottom Picture

CD

I already had a 324p plugged in to my development board so I decided to just use that. The code is about as basic as it gets:

// for NerdKits with ATmega324 //

int main()
{
    uint16_t k;

    // Set port A to all output and off //
    DDRA = 0xFF;
    PORTA = 0x00;

    /// power save modes ///
    PRR = (1<<PRTWI)        // turn off TWI
        | (1<<PRTIM2)       // turn off Timer/Counter 2
        | (1<<PRTIM0)       // turn off Timer/Counter 0
        | (1<<PRUSART1)     // turn off Reduction USART1
        | (1<<PRTIM1)       // turn off Timer/Counter1
        | (1<<PRSPI)        // turn off Serial Peripheral Interface
        | (1<<PRUSART0)     // turn off USART0
        | (1<<PRADC);       // turn off ADC

    while(true)
    {
        // 1 Light on at a time in a row //
        for(k=1;k<256;k*=2)
        {
            PORTA = k;

            delay_ms(50);

        }
    }

    return 0;
}

I used the fuse settings to use the internal clock, so the 50ms not correct. I used all the power save options to get the MCU power consumption from 23mA down to 14mA. The one thing I did forget was a drop down resistor on the LED, but it seems to work fine, am I going to burn something out?

I have made no attempt to make this project pretty I have done basically every thing free hand. Also I'm making a mini wind sock. Hopefully the pictures scale.

March 14, 2015
by esoderberg
esoderberg's Avatar

Scooter,

You're probably exceeding spec max pin output current by a wide margin (I think 40mA is max, 20mA probably safer). Don't know what your forward drop on LEDs but if around 3 V, you should use (5v - 3v)/R = 20mA or R = 100 Ohm as min resistance in series. As you're not running at 100% duty cycle you might get away with exceedance for a little while but it'll probably burn out the pins over time without some additional resistance.

Eric

March 14, 2015
by scootergarrett
scootergarrett's Avatar

I think I was saved by a bad harborfreight battery. I didn't want to put a resistor for each LED but there is only ever 1 on at at time so I just put one resistor for all of them as shown:

CD

Link to landing

March 15, 2015
by sask55
sask55's Avatar

I have the basically the same quad. Mine is a Phantom 2 vision +.

I found out the hard way that the plastic becomes very brittle in the cold conditions. After a little mishap this winter I damaged a couple of prop guards and props so I have restricted myself to flying in temperatures that are near or above freezing. Up hear that can be some very long layoffs between suitable days in the winter.

March 17, 2015
by esoderberg
esoderberg's Avatar

Scooter,

Nice landing. As a Navy helo pilot I appreciate a controlled landing to a small pad.

Eric

March 29, 2015
by missle3944
missle3944's Avatar

If only it was an automated landing!

March 30, 2015
by Ralphxyz
Ralphxyz's Avatar

I just got a small HUBSAN X4 what a lot of fun. I still could come no where close to landing in a specific spot.

Post a Reply

Please log in to post a reply.

Did you know that you can build a circuit to convert the "dit" and "dah" of Morse code back into letters automatically? Learn more...