Shop OBEX P1 Docs P2 Docs Learn Events
Blinky Blinky RC Airplane Lights — Parallax Forums

Blinky Blinky RC Airplane Lights

xanaduxanadu Posts: 3,347
edited 2012-11-17 22:19 in Propeller 1
[video=youtube_share;zqv8cyJkHlY]

Sure, it needs a little more work.
{{

Airplane Anti-Collision, Position, and Nav light testing

}}

CON

 _clkmode = xtal1 + pll16x  
 _xinfreq = 5_000_000

VAR

 long beacons [100] 'stack space
 long strobess [100] 'stack space 

PUB main

                   'enable output pins
 dira[16] := 1     'green nav 
 dira[17] := 1     'land/taxi
 dira[18] := 1     'red nav
 dira[19] := 1     'white pos
 dira[20] := 1     'beacon/AC
 dira[21] := 1     'strobes


 cognew(beacon, @beacons)
 cognew(strobes, @strobess) 

 repeat
  
  outa[16] := 1    
  outa[17] := 1    
  outa[18] := 1  
  outa[19] := 1    
     
   
     
    
PUB beacon

 dira[20] := 1     'beacon/AC

 repeat

  outa[20] := 1
  waitcnt(clkfreq * 1 + cnt)
  outa[20] := 0
  waitcnt(clkfreq * 1 + cnt)


PUB strobes

 dira[21] := 1     'strobes   
 
repeat
  
  outa[21] := 1
  waitcnt(clkfreq / 10 + cnt)
  
  outa[21] := 0
  waitcnt(clkfreq / 10 + cnt)
  
  outa[21] := 1
  waitcnt(clkfreq / 10 + cnt)
  
  outa[21] := 0
  waitcnt(clkfreq / 10 + cnt)
  
  outa[21] := 1
  waitcnt(clkfreq / 10 + cnt)

  outa[21] := 0
  waitcnt(clkfreq / 10 + cnt)

  outa[21] := 1
  waitcnt(clkfreq / 10 + cnt)
  
  outa[21] := 0
  waitcnt(clkfreq * 2 + cnt)   

Comments

  • ctwardellctwardell Posts: 1,716
    edited 2012-11-11 13:19
    Nice work Xanadu. Seeing the outline of that Cessna makes me miss flying.

    C.W.
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 14:10
    Very nice.

    But the rotating beacon needs work.
    Go out to the airport and watch one again for a few minutes.
    It doesn't just blink on and off.
    There are a lot of little brief low intensity flashes that leak through between the rotating parts.
    :)
  • xanaduxanadu Posts: 3,347
    edited 2012-11-11 17:20
    cavelamb wrote: »
    Very nice.

    But the rotating beacon needs work.
    Go out to the airport and watch one again for a few minutes.
    It doesn't just blink on and off.
    There are a lot of little brief low intensity flashes that leak through between the rotating parts.
    :)

    Yes, thank you. I'm actually a pilot and see them all the time. I'm trying to find a publication that states exactly what it is supposed to do but apparently just like strobes it varies my manufacturer. The light intensity and viewing angle are set in stone.

    My red beacon isn't going to flash like a real airplane, I want it on more than off for visibility flying the airplane at night ;)
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-11-11 17:22
    Hi cavelamb;
    cavelamb wrote: »
    Very nice.

    But the rotating beacon needs work.
    Go out to the airport and watch one again for a few minutes.
    It doesn't just blink on and off.
    There are a lot of little brief low intensity flashes that leak through between the rotating parts.
    :)
    Well yes, an airport beacon uses a rotating lens arrangement to produce the blink pattern.
    However, the rotating mechanism isn't strictly a requirement. Just the blink pattern.

    For practical reasons lamps aren't usually bright enough to send the blink pattern omnidirectional.
    There are xenon arc lamps that can do it but are very expensive compared to the less costly rotating lens version.

    For small scale RC use flashing LEDs actually can produce the exact "Legal" requirement.

    Duane J
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-11-11 17:54
    Added info:
    Aerodrome beacon
    And
    Airway beacon

    Duane J
  • edited 2012-11-11 18:57
    The FAA requirements for anti collision light flash rates are contained in Part 25 of the Federal Aviation Regulations, Section 1401 paragraph (c). 40 to 100 flashes per minute. Part 25 applies to the certification of transport category aircraft.

    The requirements for aerodrome beacon flash rates are different and they are different colors depending on the type of aerodrome.

    Sandy
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 19:03
    xanadu wrote: »
    Yes, thank you. I'm actually a pilot and see them all the time. I'm trying to find a publication that states exactly what it is supposed to do but apparently just like strobes it varies my manufacturer. The light intensity and viewing angle are set in stone.

    My red beacon isn't going to flash like a real airplane, I want it on more than off for visibility flying the airplane at night ;)

    Look closely at how the rotating beacon is built.
    There are (USUALLY!) three lenses mounted in a rotating frame.
    So there is a low level "glow" between the lenses then the bright "flash".

    I'd launch the rotating beacon in a different cog.
    Pulse width modulate that LED down to a steady background "glow",
    then pulse it on hard for the flash.


    For night flying, I'd leave the wing tip position lights on rather than blink.
    That's the way they are on most light aircraft anyway.
  • xanaduxanadu Posts: 3,347
    edited 2012-11-11 21:14
    cavelamb wrote: »
    Look closely at how the rotating beacon is built.
    There are (USUALLY!) three lenses mounted in a rotating frame.
    So there is a low level "glow" between the lenses then the bright "flash".

    I'd launch the rotating beacon in a different cog.
    Pulse width modulate that LED down to a steady background "glow",
    then pulse it on hard for the flash.


    For night flying, I'd leave the wing tip position lights on rather than blink.
    That's the way they are on most light aircraft anyway.

    I get exactly what you're saying and appreciate the feedback. This is why in my original post I said it still needs some work lol.
  • xanaduxanadu Posts: 3,347
    edited 2012-11-11 21:19
    The FAA requirements for anti collision light flash rates are contained in Part 25 of the Federal Aviation Regulations, Section 1401 paragraph (c). 40 to 100 flashes per minute. Part 25 applies to the certification of transport category aircraft.

    The requirements for aerodrome beacon flash rates are different and they are different colors depending on the type of aerodrome.

    Sandy

    Thanks, my FAR doesn't have part 25, guess that is why I never saw it. Anyway this was never meant to be FAA legal and I want to be able to see it well so I might just leave it on most of the time with a small blink, closer to 100 flashes per minute.
  • xanaduxanadu Posts: 3,347
    edited 2012-11-11 22:11
    And actually, in all aircraft I've been checked out in never had a physically rotating beacon. They are just a strobe, and in older aircraft like the C-152 you can hear the strobe through the audio panel, and also during runup when you kill the alternator you can see the amps dip when it flashes.

    Either way I can't wait to put this puppy on my RC airplane.
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 22:38
    xanadu,

    I had something like this in mind...
    A nice little throb - with a blink or two.
    I tried this with a large red LED and a 220 ohm resistor.
    I suspect that the resistor could be smaller for a brighter light.
    It spends quite a bit of time off, so it shouldn't heat the IO up much.

    It's not Jonny Mac, of course!
    But it puts a bit of action in the thing.

    See what you think?
    { Beacon.Spin }
    CON     
    _CLKMODE=XTAL2
    _XINFREQ =5_000_000
    MSec   = _XINFREQ / 1_000
    USec   = _XINFREQ / 1_000_000
    Tshort = Usec * 400                                          
    Tlong = Msec * 350                                  
    Tsteps= 50
                    
    VAR
    Byte X, LED
    
    PUB  Throb
       LED := 9
      dira [LED] :=1
        Repeat                              
          Repeat X from 1 to Tsteps step 2   
             outa[LED] := 1                                     
             waitCNT ((X*Tshort) +cnt)        
             outa[LED] := 0                                      
             waitCNT ((Tsteps-X+1)*Tshort+cnt)
          outa[LED] := 1
                               
          waitcnt(Tlong +cnt)
          
          Repeat X from 1 to Tsteps step 2          
             outa[LED] := 1    
             waitCNT ((Tsteps-X+1)*Tshort+cnt)
             outa[LED] := 0                                         
             waitCNT ((X*Tshort) +cnt)
    
         repeat 20
             outa[LED] := 1                                     
             waitCNT (5*Msec +cnt)        
             outa[LED] := 0                                      
             waitCNT (25*Msec +cnt)
    
  • cavelambcavelamb Posts: 720
    edited 2012-11-11 22:41
    xanadu wrote: »
    And actually, in all aircraft I've been checked out in never had a physically rotating beacon.

    Kids...
  • RS_JimRS_Jim Posts: 1,766
    edited 2012-11-12 05:44
    ctwardell wrote: »
    Nice work Xanadu. Seeing the outline of that Cessna makes me miss flying.

    C.W.
    Me too!
    Jim
  • xanaduxanadu Posts: 3,347
    edited 2012-11-12 08:45
    cavelamb wrote: »
    xanadu,

    I had something like this in mind...
    A nice little throb - with a blink or two.

    I just loaded it and it blinks a little fast, but THANKS! I can modify this and also learn a little more about spin in the meantime. I'd like to have it pulsate more than turn completely on/off.
  • xanaduxanadu Posts: 3,347
    edited 2012-11-12 23:25
    [video=youtube_share;3tvktpBYVbY]
  • xanaduxanadu Posts: 3,347
    edited 2012-11-17 22:19
    worked pretty well

    night.jpg
    960 x 540 - 93K
Sign In or Register to comment.