Hello and welcome to our community! Is this your first visit?
Register
Page 1 of 14 12311 ... LastLast
Results 1 to 10 of 136
  1. #1
    Senior Pilot
    Join Date
    Nov 2010
    Location
    Christchurch, New Zealand
    Posts
    152
    Blog Entries
    2
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    OSD implementation using MAX7456

    Hi all,

    I've written a basic OSD class for the AeroQuad, using the MAX7456 chip to overlay information on a live video feed. Currently, it can display battery voltage, altitude, compass heading, a flight timer and a centre reticle. It uses the corresponding AeroQuad classes for battery, altitude and heading. Here's a short video of it in action:



    There was no compass heading display in this video as I was flying with ARG, no magnetometer.

    To use it, you'll need a MAX7456 attached to the appropriate pins - marked 'OSD' on the AeroQuad v2 shield. I used the SparkFun breakout board (http://www.sparkfun.com/products/9168). If you use the SparkFun breakout board, you'll probably need to add a 10kOhm pullup resistor between 5V and the RESET pin - mine kept resetting at random without this.
    You'll also need to update the character memory for the MAX7456. The MAX7456 has an onboard EEPROM which stores up to 256 12x18 pixel characters. To print the battery, compass, clock icons etc, you need to have these icons in the character memory. I've attached the required character set and some code for loading it in char_utility.zip - this is the tool made by dfraser from the Arduino forums. You'll need to upload the MAX7456_mcm_font.pde sketch to your AeroQuad (ENSURE your motors do not have power!) before sending the ascii_with_aq_font_set.mcm text file via serial. You can use HyperTerm's 'send text file' option under Windows to send the .mcm file, or if using Linux you can simply cat /path/to/.mcm > /dev/ttyUSB0 (or whatever label your Arduino has - could be USB1 etc). It'll take 2-3 minutes to send the entire character set. You'll get progress messages and a message 'Done with file download' sent back via serial when it's finished.

    You can get the OSD code from my master branch on Git: https://github.com/EwanColdicott/AeroQuad. I'm new to Git so please yell at me if I've stuffed something up!

    Edit 26/5: Mikro has written about performing the character upload process under Windows in more detail here.
    The OSD now has a basic attitude indicator, using horizontal lines. There's a video of it on page 3 of this thread.
    Attached Files Attached Files
    Last edited by alamo; 05-26-2011 at 03:52 AM. Reason: updates

  2. #2
    Senior Pilot
    Join Date
    Mar 2011
    Posts
    156
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    4
    Just what I was looking for. Thanks for sharing!

  3. #3
    Administrator AeroQuad Founder Mikro's Avatar
    Join Date
    Jun 2009
    Posts
    3,238
    Downloads
    4
    Uploads
    7
    Reputation Points (Add)
    9
    You rock Alamo! Thanks very much for sharing!!! I'm going to make this a sticky so it doesn't get lost. May I get your permission to add this to a future rev of the flight software?

    Do you think the MAX7456 has enough pixels to do an on screen artificial horizon too?

  4. #4
    Senior Pilot
    Join Date
    Nov 2010
    Location
    Christchurch, New Zealand
    Posts
    152
    Blog Entries
    2
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    No worries guys, glad to give something back to the project!

    I'm happy for this to go into a future version of the flight software, though it could do with some more features first. I'd like to make it easier to update the character memory - loading a sketch and using HyperTerm is a bit of a hassle for users. It would be easy enough to add this functionality to the AQ software using SerialCom. Perhaps a section could be added to the Configurator for loading new character sets?

    Not sure about an on screen artificial horizon with the MAX7456. I've seen artificial horizons on commercial OSDs before, but not on one based on the MAX7456. The problem is that the programmer can't send data for individual pixels to the MAX7456. All you can do is tell it to overlay a certain 18*12 pixel character from its EEPROM. It takes ~12ms to write a new character to the EEPROM, so we can't update the EEPROM in real time (and it'd toast the EEPROM!).

    Suppose we wanted to draw an artificial horizon line with a maximum roll of 45 degrees, which moved up and down with pitch and was as straight as possible (ie minimal jagged edges). I think we'd need at least 242 characters to hold every required line character. We'd need:
    • 18 characters holding horizontal lines - one character for each row
    • 38 characters holding two line segments of length 6 pixels, one row apart. We'd need 19 for pitch right and 19 for pitch left.
    • 40 characters holding three line segments of length 4 pixels, each one row apart. We'd need 20 for pitch right and 20 for pitch left
      etc, up to a 45 degree line - 12 line segments of length 1 pixel, one row apart.
    • etc, up to 12 line segments of 1 pixel long, one row apart


    This wouldn't leave enough space for the alphabet etc - the MAX7456 can only hold 256 characters. We could still show pitch/roll but accept some jagged edges in the line. Eg we could have 18 characters - a horizontal line on each of 18 rows. This could still show attitude quite well - have a look at the new version of Remzibi's OSD here: http://www.youtube.com/watch?v=xBpv7EwDtds.
    Last edited by alamo; 05-26-2011 at 03:47 AM.

  5. #5
    AeroQuad Lead Software Architect Kenny9999's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Jean-sur-Richelieu, Quebec, Canada
    Posts
    2,332
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    7
    I'm also interested into that!

    Will look into it and see how it could fit as libraries! Most interesting feature to me would be eventually, altitude indicator, battery monitor, but, the most important, AH so, if you can find a way, that would be very cool
    Truly superior pilots are those who use their superior judgment to avoid those situations where they might have to use their superior skills"- Author unknown

  6. #6
    Moderator AeroQuad Technologist Honk's Avatar
    Join Date
    Apr 2010
    Location
    Stockholm
    Posts
    5,442
    Blog Entries
    2
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    1
    Seems nice. Could you post more documentation on your hardware used and how you implemented it? Would get more clear then I think. Thanks.
    Smart people don't need a signature.
    http://thechive.files.wordpress.com/...rd-signs-3.jpg

  7. #7
    Senior Pilot blacknoir's Avatar
    Join Date
    Apr 2011
    Location
    Centerville, Minnesota, United States
    Posts
    206
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    That is just plain cool... almost too cool.. makes me want to rig up a bb-gun or something so i can ping targets..

  8. #8
    Senior Pilot jsmcms's Avatar
    Join Date
    Mar 2010
    Location
    Detroit, Michigan USA
    Posts
    339
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    3
    Do we really need an AH? How about a using a column of characters on each side of the centerpoint to build presentation? My guess is that standard ASCII characters ►, ◄, ▲, and ▼ could work. Something like this:

    ▬▬▬
    ▬Φ▬ level,
    ▬▬▬

    ▲▬▲
    ▬Φ▬ climbing,
    ▬▬▬

    ▲▬▬
    ▬Φ▬ turning right.
    ▬▬▼

    Or you could use a a technique that was part of a General Aviation guide where a series of LEDs were used to indicate attitude. It used a cross pattern.

    __o__
    __o__
    ooooo
    __o__
    __o__ level

    __*__
    __*__
    oo*oo
    __o__
    __o__ climbing

    __o__
    __*__
    oo***
    __o__
    __o__ climbing and turning right

    What do you think?
    Last edited by jsmcms; 05-07-2011 at 08:58 PM.
    Work hard, but play harder!

  9. #9
    Administrator AeroQuad Founder Mikro's Avatar
    Join Date
    Jun 2009
    Posts
    3,238
    Downloads
    4
    Uploads
    7
    Reputation Points (Add)
    9
    I've been trying to do FPV, one real challenge is that I find that I'm drifting too much but can't really tell how much just through the FPV screen. I might just need to improve as a pilot in this mode, but maybe instead of asking for an AI, what we really need is what jsmcms is proposing? I really like the look of the first set of graphics he proposed.

  10. #10
    Senior Pilot KirAsh4's Avatar
    Join Date
    Mar 2011
    Location
    Boulder, CO
    Posts
    504
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    I'd love to grab one of TI's DaVinci modules and build some kick-arse OSD with them ... like the DM355 ... I know, totally and complete overkill just for OSD, but that's what some people are using it for, full graphics. I may just hunker down and get one just to screw with.


 
Page 1 of 14 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •