Newbie here.

I've been trying to figure out how/where to connect motor mount LED's, but there seems to be a few different ways to connect them, requiring code entries and compilation.  I'm just getting started, and using the mission planner for config and downloads.  Is there a way to get lights working?

 

Thanks - Steve

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Thanks to all for sharing their work controlling the motor mount LED's.  Specially Max Levine for the mod allowing the use of  Strip LED's.

    I'd like to mirror the Red and Green (APM A & C) LED's to the back two arms of my X configured quad.  The front arms will be static white for the moment.

    3692320540?profile=original

    I've had some partial success with this by altering the LEDS.PDE file with changes like this...

    if (GPS_light){
    digitalWrite(C_LED_PIN, LED_OFF);digitalWrite(LE_LED, LOW);
    }else{
    digitalWrite(C_LED_PIN, LED_ON);digitalWrite(LE_LED, HIGH);

    and

    if(motor_light){
    digitalWrite(A_LED_PIN, LED_ON);digitalWrite(RI_LED, HIGH);
    }else{
    digitalWrite(A_LED_PIN, LED_OFF);digitalWrite(RI_LED, LOW);

    Very basic, as in the examples above, wherever the A or C LED's are turned on or off, I've added an extra control for the motor LED's.

    This works just as intended UNTIL the motors are armed.  The Green (A) LED on the APM is on as usual but the Green arm LED's are off for some reason.

    Could someone have a quick look and see where I'm going wrong?

    I've attached my modded leds.pde file to show the full extent of the changes.

    P.S. I suspect my motor arm LED's are connected in an unusual order, as the two back arms seem to respond to LEFT and RIGHT LED commands and the two front, to FRONT and BACK.

    leds.pde

  • Developer

    This is my led file, see my video:

     

    https://www.youtube.com/watch?v=GCC9lqKYCqU

     

    Mark

    UserCode.pde

  • I added the ULN2003 chip and strip LED lights per this example;

    http://code.google.com/p/arducopter/wiki/AC2_frameLEDs

     

    What I get is all lights on when the ESC's are armed, and no lights when they are not.  Is the expected result, or am I doing something wrong?  I'm running the .49 firmware as provided by the mission planner.

     

  • I'm all up for adding some LED's but I really don't fancy soldering directly on the IMU.

     

    Does anyone know of a ready made expansion board ?   I'm thinking along the lines of an additional board the fits between the IMU and the Ardu exposing the expansion pins.

     

    Otherwise has anyone got any photos of LED connections to the IMU ?

  • 100KM

    Acutally I have something up and running since arducopter version 2.0.45 orso on my hexa.  I call it showleds.  They use AN8-15.

    They switch on when motors are armed and go into 'normal' showled operation.  

    In 'normal' showled mode, different blinking patterns can be selected with channel 7, WITHOUT affecting other chan7 functions, like simple, RTL or waypoint saving.  For this you put chan7 on a dial on your TX.  Since you can visually confirm which blinking mode you are in, it's no problem selecting them with dial.  Crank the dial full open and you have "standard" chan7 function engaged (simple, rtl, waypoint save, hoovering throttle, etc)  What's more, you could ALSO program a blinking pattern in this position of chan7, so you get a visual indication that waypoint is saved, or that simple is engaged.

    Current programmed patterns include :

    -rotating lights which increase rotating speed when throttle is increased.  

    -all leds on

    - 3 arms on (tri-copter looking)

    - the other 3 arms on

    -crear arm on and front 2 arms blinking alternating (looks like police lights if you put blue leds on front arms)

    - 4 arms on (looks like quad)

    - 2 arms on (front and rear in my + configuration)

    - 2 arms on and rotating

    - 3 arms on alternating

     

    It gets even better.  As battery gets low, the 'normal' led patterns get overridden automatically and the copter switches to 1 standard blinking pattern (3 arms on, 3 arms blinking), indicating you are low on battery.

    As the battery voltage gets below a second treshold, the low battery pattern starts blinking faster.

    So you get a double warning :

    1st : you have about a minute flighttime left

    2nd : put the copter down NOW. (about 15sec left)

     

    I have asked Jason if my code could be integrated in Arducopter and he said fine, just post it.  I posted my modified files (4) in that thread and in the 'issues' section about userhooks.  Interest seemed low though for a reason unknown to me, it hasn't been implemented (yet?).

    I had all code encapsulated in #if SHOW_LEDS == 1 ... #endif, so it was only compiled in if wanted.

     

    Now I'm working on integrating it in the userhooks.

     

    It would not be difficult at all to make the different patterns indicate which mode you are in.  Would only require a change of the condition in if(condition) {}

     

    Here's a demonstration video on the ground (had nobody to film, so couldn't fly it) :

  • Developer

    I am working on this issue and we try to get update on it as soon as possible. If you have nice proposals on how leds should blink, let us know.

  • Developer

     

    There is only one way and it is in the Wiki. It does not need any firmware compilation.

     

    The other ways are obsolete methods that you certainly did find with Google and they will not work or create conflicts.

     

    http://code.google.com/p/arducopter/wiki/AC2_frameLEDs

     

    http://diydrones.com/profiles/blogs/321-blink

     

This reply was deleted.

Activity