Page 1 of 1

Automatic landing lights controlled by sonar altitude

Posted: Fri May 18, 2012 4:55 pm
by Tommie
Since my integrated sonar does not do much at the moment, I decided to equip my copter with automatic landing lights.

Once my copter descends below a certain altitude above ground (e.g. 50cm) for a safe landing, the ATMega automatically engages a bunch of white LEDs below its belly, illuminating the landing area. Once you dust off again, the lights are turned off as well.

This is done through controll pin 23 (PC0) and a transistor. The software necessary to control the pin is - as always - available at my github account:
https://github.com/wertarbyte/multiwii- ... dinglights

Re: Automatic landing lights controlled by sonar altitude

Posted: Tue May 29, 2012 3:30 am
by raptor30
I have SR04 sonar module, can this be used in crius multiwii lite?

nice project of yours, hoping to incorporate this in my multiwii soon :)

Re: Automatic landing lights controlled by sonar altitude

Posted: Tue May 29, 2012 8:50 am
by Tommie
I don't know about MultiWii Lite, but if you can solder a transistor to a pin of your contoller and if your SR04 sonar is already working, this should be simple to incorporate. Try using my github master branch as our firmware, it is a clone of the MultiWii SVN with all my additional changes already incorporated (TinyGPS, i2c refactoring, landing lights, LED flasher, etc.)

Re: Automatic landing lights controlled by sonar altitude

Posted: Tue May 29, 2012 10:18 am
by Katch
cool feature!

I've also got an SR04 lying around - might have a look at getting this to work on my MEGA

Re: Automatic landing lights controlled by sonar altitude

Posted: Tue May 29, 2012 10:43 am
by Tommie
Please note that my changes do not include the code necessary to access the SR04 itself; it is handled by my separate tinyGPS controller. But if sonar works, the landing lights should work as well :-)

Re: Automatic landing lights controlled by sonar altitude

Posted: Fri Jun 01, 2012 10:11 am
by Tommie
Here's a video where you can see the landing lights in action: http://www.youtube.com/watch?v=nDUwpgNWASg
The white LEDs are activated once the copter hovers below 50cm above ground.
The copter also uses the LED flasher code.

Re: Automatic landing lights controlled by sonar altitude

Posted: Fri Jun 01, 2012 11:22 am
by kos
Tommie wrote:Please note that my changes do not include the code necessary to access the SR04 itself; it is handled by my separate tinyGPS controller. But if sonar works, the landing lights should work as well :-)


added to the wiki http://wiki.devbase.be/index.php?title= ... ifications

;)

Re: Automatic landing lights controlled by sonar altitude

Posted: Sun Jun 03, 2012 8:59 am
by Tommie
I adapted the code so that the landing lights are used by the blinkLed function as well (to indicate gyro calibration etc.). Please merge my changes, I synced to the latest shared svn release:

https://github.com/wertarbyte/multiwii- ... les_bucket (select "Files Changed")
or: https://github.com/wertarbyte/multiwii- ... ights.diff

Re: Automatic landing lights controlled by sonar altitude

Posted: Mon Jun 18, 2012 11:35 pm
by realpastaman
Hi Tommie, I've looking at your landing light system and i'm really impressed! I wonder if at all possible you could help me with a similar lighting scheme. Basically im using some really hi power air cooled nav lights.

http://www.youtube.com/watch?v=Nkync_UXhBI

These lights are controlled by a LED driver that turn on with a logic input of 5volts.

Due to the high current and cooling etc im using them only when the props are on.

Im not a programmer but I wonder if there is a short piece of code i could use to give a 5V output when the throttle pulse is above 1250

Im using the latest dev 20120606 and connection diagram 3b

http://www.rcgroups.com/forums/showthread.php?t=1340771

Ive only really got pin a2 free i think.

This feature is for nav lights but i also want it to turn on and off a video tx in future. What do you think? I wish i was a programmer!!!