HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 10, 2011, 03:07 PM
SX_
.........lost..........
Zambia, Lusaka, Lusaka
Joined Jun 2005
325 Posts
I really like where this is going........

Im finally getting my paypal here and im ordering 12 arduinos (which 5 will be Sanguino) and 3 wii MP, 3 nunchucks and 1 wii remote

Im very new to Hardware programing and this is interesting enough to keep me facinated for a while! Thanks Dennis!! i have to say its strange that there isnt a arduino autopilot except mega and ardupilot that you need to buy specific boards, it will be so much fun makin one from like 2 normal arduinos and the Wii sensors!

so funny with out this i prob wouldnt goten a arduino for a long time now ive got so many things i wanna do with it!

EDIT:
Wii MP and nunchuck can be used on I2C:
http://voidbot.net/nunchchuk-and-wii...lus-6-DOF.html

I was looking at the following code by "Ardvark":
http://www.arduino.cc/cgi-bin/yabb2/...num=1253202298
It includes a complementary filter, which lookst to smooth things out?

well thats where i was gonna start, ive downloaded the 6dof codes for IMU's too and they also look really neat, i think the best would be to use the best of all and tweak/recode to fit our objective


Thanks again Dennis!

Willie
SX_ is offline Find More Posts by SX_
Last edited by SX_; Oct 10, 2011 at 03:36 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 10, 2011, 03:12 PM
SX_
.........lost..........
Zambia, Lusaka, Lusaka
Joined Jun 2005
325 Posts
Quote:
Originally Posted by android78 View Post
from a coding perspective, i think it would be good to break the code into several files to make it easier to maintain as the project becomes larger too. For instance, it would be good to have a separate file for the sensors, one for the display, etc. This way, people with different sensors know that they can mess with the one file without messing up the display module.
The overhead with doing this shouldn't be too much, and it would make it much more readable.

Just my personal opinion though.
+1..
SX_ is offline Find More Posts by SX_
Reply With Quote
Old Oct 10, 2011, 05:15 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Quote:
Originally Posted by android78 View Post
From a coding perspective, I think it would be good to break the code into several files to make it easier to maintain as the project becomes larger too. For instance, it would be good to have a separate file for the sensors, one for the display, etc. This way, people with different sensors know that they can mess with the one file without messing up the display module.
The overhead with doing this shouldn't be too much, and it would make it much more readable.

Just my personal opinion though.
I have considered it quite a few times. Only reason why it's a single file is convenience for beginners. If you don't want to mess with the code you can just copy-paste and upload. But I gotta admit, it's getting a bit too long for a single file.

In the newest version (should be uploaded soon) most things can be configured with the menu.
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Oct 10, 2011 at 05:20 PM.
Reply With Quote
Old Oct 10, 2011, 05:19 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Quote:
Originally Posted by SX_ View Post
I really like where this is going........

Im finally getting my paypal here and im ordering 12 arduinos (which 5 will be Sanguino) and 3 wii MP, 3 nunchucks and 1 wii remote

Im very new to Hardware programing and this is interesting enough to keep me facinated for a while! Thanks Dennis!! i have to say its strange that there isnt a arduino autopilot except mega and ardupilot that you need to buy specific boards, it will be so much fun makin one from like 2 normal arduinos and the Wii sensors!

so funny with out this i prob wouldnt goten a arduino for a long time now ive got so many things i wanna do with it!

EDIT:
Wii MP and nunchuck can be used on I2C:
http://voidbot.net/nunchchuk-and-wii...lus-6-DOF.html

I was looking at the following code by "Ardvark":
http://www.arduino.cc/cgi-bin/yabb2/...num=1253202298
It includes a complementary filter, which lookst to smooth things out?

well thats where i was gonna start, ive downloaded the 6dof codes for IMU's too and they also look really neat, i think the best would be to use the best of all and tweak/recode to fit our objective


Thanks again Dennis!

Willie
Good to hear, that you have finally ordered some hardware

An autopilot/stabilization could be the next project.
If so, I have considered to write a kalman-filter etc. myself. Just for the fun of it
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 10, 2011, 05:49 PM
Registered User
Australia
Joined Mar 2010
156 Posts
Quote:
Originally Posted by Dennis Frie View Post
I have considered it quite a few times. Only reason why it's a single file is convenience for beginners. If you don't want to mess with the code you can just copy-paste and upload. But I gotta admit, it's getting a bit too long for a single file.

In the newest version (should be uploaded soon) most things can be configured with the menu.
That's pretty much what I figured. Although, I think it does make it harder for beginners looking to customize it since it's difficult to determine which part of code does what. I've started my own GPS module which is loosely based on what you have, but I plan on including the GPS handler for I2C as an option. I've looked at doing the same with the code for the display, but that seems trickier.
android78 is offline Find More Posts by android78
Reply With Quote
Old Oct 10, 2011, 07:21 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Hopefully one of the last software updates from me.
  • Menu added (configuration also saved when power-off)
  • Support for US units (altitude offset must be on)
  • Dimming removed from top characters (when showing decimals)
  • Version-number added on startup-screen
  • Plane-position can be shown (in degrees)

The menu will allow you to change these settings:
  • Show mah/km (on/off)
  • Show decimals (on/off)
  • Text alignment to center text
  • Show plane position (on/off)
  • Altitude alarm (set value)
  • LOS alarm (set value)
  • Volt alarm (set value)
  • mAh alarm (set value)

Exit must be chosen to save data. All data will be saved to eeprom, so they will stay until new data is written.
First time you load the new firmware the settings will be saved to the eeprom.
Even if you reload/flash the software the old values will be saved. If you want to update the values there is an option in the file to overwrite previously data. Just be sure to change the value back to 0, otherwise settings will be reloaded everytime.







When you upload the firmware the first time you might have to restart the hardware (turn it off and on again)
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Oct 10, 2011 at 08:04 PM.
Reply With Quote
Old Oct 10, 2011, 07:26 PM
Registered User
rimshotcopter's Avatar
United States, CA, Los Angeles
Joined Aug 2009
11,692 Posts
Great Work Dennis and Thank you!
rimshotcopter is offline Find More Posts by rimshotcopter
Reply With Quote
Old Oct 10, 2011, 07:40 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Quote:
Originally Posted by rimshotcopter View Post
Great Work Dennis and Thank you!
Thanks

Unless anyone find bugs this is probably the last update for now.
Right it shows all I need

Next up is hopefully some fun with OpenLRS, Arduino based stabilization and RTH, perhaps some antenna-tracker etc. Lets see
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 10, 2011, 07:43 PM
Registered User
rimshotcopter's Avatar
United States, CA, Los Angeles
Joined Aug 2009
11,692 Posts
At this stage, I can only dream. Too many other projects in the making but this DIYODS is the icing on a cake for me.
rimshotcopter is offline Find More Posts by rimshotcopter
Reply With Quote
Old Oct 10, 2011, 08:04 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Quote:
Originally Posted by rimshotcopter View Post
At this stage, I can only dream. Too many other projects in the making but this DIYODS is the icing on a cake for me.
It have been fun to make
- and now I have an OSD where I can actually read the numbers in my fatshark googles

Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Old Oct 11, 2011, 01:54 AM
Needs more cowbell...
Australia, QLD, Brisbane
Joined Jul 2011
27 Posts
delete
zach.h is offline Find More Posts by zach.h
Last edited by zach.h; Dec 01, 2011 at 08:08 PM.
Reply With Quote
Old Oct 11, 2011, 04:56 AM
Registered FPVer :)
markus123456's Avatar
Switzerland, LU, Buchrain
Joined Aug 2006
2,825 Posts
Question regarding GPS code

Dear Denis,

I'm looking at the section of your code that is titeled with "Calculate LOS and heading". There you write that the code is depending on the location of Denmark (58 degrees north). I now try to understand which part of the code makes this dependency. Could you elaborate this in two or three sentences?

TIA

Markus
markus123456 is online now Find More Posts by markus123456
Reply With Quote
Old Oct 11, 2011, 05:56 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Quote:
Originally Posted by zach.h View Post
Its been very interesting watching this thread progress. Many other similar threads have gone stagnant, so I hope someone else will pick up the torch when you stop developing this OSD. (It really needs a name).



I am relatively new to Arduino and electronics, so I am a bit unsure of some things. Are you getting the voltage reading from the current sensor as well as the current?

Thanks
The voltage-reading is done be connecting the battery to a voltage-divider and connecting it to one of the analog inputs. I think someone draw a schematic with the voltage-divider included. I don't think the schematic is up to date, but the voltage-divider is shown.

Quote:
Originally Posted by markus123456 View Post
Dear Denis,

I'm looking at the section of your code that is titeled with "Calculate LOS and heading". There you write that the code is depending on the location of Denmark (58 degrees north). I now try to understand which part of the code makes this dependency. Could you elaborate this in two or three sentences?

TIA

Markus
I'm sorry, that comment was one of those I "forgot to correct"
It no longer need to be used around Denmark, you should be able to use it worldwide
If you check the newest version (15) the comment regarding Denmark should be gone.
Dennis Frie is online now Find More Posts by Dennis Frie
Last edited by Dennis Frie; Oct 11, 2011 at 07:11 AM.
Reply With Quote
Old Oct 11, 2011, 07:51 AM
Registered FPVer :)
markus123456's Avatar
Switzerland, LU, Buchrain
Joined Aug 2006
2,825 Posts
Quote:
Originally Posted by Dennis Frie View Post
I'm sorry, that comment was one of those I "forgot to correct"
It no longer need to be used around Denmark, you should be able to use it worldwide
If you check the newest version (15) the comment regarding Denmark should be gone.
Thanks for makeing this clear. When looking at the GPS calculating code, I see two things which are not clear to me:

a) In you code you have this line:
losy = ((lathome - lats)*185)/1000;
Why is the multiply with 185?

b) The lines that look like this. Why is there the multiply with 57?
homehead = 90-asin(losy/(double(los)))*57;

Could you sheed some light on this? I try to understand your GPS calculations in general.

TIA

Markus
markus123456 is online now Find More Posts by markus123456
Reply With Quote
Old Oct 11, 2011, 08:00 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
809 Posts
Quote:
Originally Posted by markus123456 View Post
Thanks for makeing this clear. When looking at the GPS calculating code, I see two things which are not clear to me:

a) In you code you have this line:
losy = ((lathome - lats)*185)/1000;
Why is the multiply with 185?

b) The lines that look like this. Why is there the multiply with 57?
homehead = 90-asin(losy/(double(los)))*57;

Could you sheed some light on this? I try to understand your GPS calculations in general.

TIA

Markus
Sure.

a) GPS uses nautical miles (or, the coordinat system is based on nautical miles). 1 nautical mile = 1.85 km.
Google this to get the conversion (1 nautical mile to km)

b) From radians to degrees.
360 / (2 * pi) = 57
Dennis Frie is online now Find More Posts by Dennis Frie
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Diy osd karl k FPV Talk 2 May 03, 2011 12:31 AM
Idea New DIY OSD? atari7202 FPV Talk 1 Mar 25, 2011 12:08 AM
Discussion see my own diy OSD video Passion Aerial Photography 7 May 27, 2010 01:28 AM
Discussion REAL homebrew DIY OSD - Check it out! jafoca FPV Talk 8 Jun 29, 2009 06:52 PM
Discussion picoOSD DIY PIC12F683 based OSD in C kbosak FPV Talk 6 Jan 31, 2008 07:47 AM