Automatic landing lights controlled by sonar altitude

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Automatic landing lights controlled by sonar altitude

Post 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

raptor30
Posts: 4
Joined: Wed Mar 14, 2012 1:38 pm

Re: Automatic landing lights controlled by sonar altitude

Post 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 :)

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Automatic landing lights controlled by sonar altitude

Post 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.)

Katch
Posts: 280
Joined: Thu Aug 04, 2011 1:44 pm

Re: Automatic landing lights controlled by sonar altitude

Post by Katch »

cool feature!

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

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Automatic landing lights controlled by sonar altitude

Post 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 :-)

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Automatic landing lights controlled by sonar altitude

Post 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.

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Automatic landing lights controlled by sonar altitude

Post 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

;)

Tommie
Posts: 438
Joined: Sun Apr 08, 2012 9:50 am

Re: Automatic landing lights controlled by sonar altitude

Post 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

realpastaman
Posts: 93
Joined: Thu Jan 12, 2012 1:10 am

Re: Automatic landing lights controlled by sonar altitude

Post 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!!!

Post Reply