mobiDrone nano arduino OSD for MultiWii with PID config

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by mahowik »

MichalM_sk wrote:Hi, it is not possible to connect two devices to one serial port. You need i2c gps board to solute it.


Hi Michal,

But actually if you don't need configure/init (with PMTK commands) GPS from arduino (or crius etc.) it's possible to use only TX from GPS and RX on arduino side accordingly.
So we have arduino TX for OSD! :) Or in your implementation it's required both TX/RX in any case, i.e. for some kind of initialization?
Also probably you are planning to support I2C for mobiDrone? Or there are not enough resources in mega328 to keep OSD functions and I2C?

thx-
Alex

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by p25o1 »

i'm also intrested in the i2c model, since my mwc share serial and usb :-(

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by copterrichie »

Michal, If I may suggest to make the PID config portion of the ModiDrone a User definable option, personally I don't need it.

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by ankimo »

Test result on June 24
Radar screen is tested.
http://www.youtube.com/watch?v=d1FbfjryVxc

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by nhadrian »

Hi, MWI 2.1 RC is out, how are you going with the release 7?

BR
Adrian

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

nhadrian wrote:Hi, MWI 2.1 RC is out, how are you going with the release 7?

BR
Adrian

I think its very hard job.
MultiWii v2.1 changes its serial communication protocol.
New serial protocol has been modified as separate MW side change and OSD side change. It's good news to each side developer, but old mobiDrone OSD is deeply depends on MW serial.ino.

I think Mr.MichalM need little bit more time to modify old mobiDrone, and also needs time to adjust to a new job!

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by nhadrian »

Yes, I know this... but still, without modification we can!t use the new code with Mobidrone. :(
So I hope MichalM will do it soon. I wish him all my best.

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi,
dont worry I am working on changes. I would like to release PRE7 this week.

Current status:

/- mobiDrone OSD v 2.3 PRE Release 7
+ new menu attributes (bat1,bat2 voltage correction, roll, pitch senitivity, current sensor sellection, screen switch sellection) 100%
+ better code optimisation 100% - currently has a smaller size than previous PRE6 version
+ new serial protocol for MWC 2.1 (in dev)
+ new Pid & Mode configuration (90%)
+ automatic detection of camera resolution (100%)
+ check the consistency of EEPROM data (100%)
+ OSD configuration moved to a new file - config.h (100%)
+ GPS speed bug removed , speed now in units - m/s (tested by ankimo) (100%)
+ remove bug in compass (opposite direction of rotation) (contributed by ymita) (100%)
+ remove bug in voltage comparator (is no longer necessary adjust bat2 voltage - bat2_correction parameter) (100%)
+ you can enable/disable latitude & longitude (100%)
+ added support for new current sensor - Flytron Ultralight 50A Current Sensor (tested by nhadrian) (100%)

BR
Michal M

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by msev »

Option for speed in km/h would be cool :D

carlonb
Posts: 210
Joined: Sun Apr 03, 2011 6:29 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by carlonb »

msev wrote:Option for speed in km/h would be cool :D


+1 :mrgreen:
Ciao, Carlo

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by ankimo »

>dont worry I am working on changes. I would like to release PRE7 this week.
It is wonderful. :D

The question about Radar screen
Possibly the position of a home display is a right-and-left contrary?
http://www.youtube.com/watch?v=d1FbfjryVxc

Kazz

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi ankimo.

Opposite rotation of Home is fixed in PRE7.

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi,

so PRE7 is finished & ready for debugging. There is no longer needed to make multiwii patching procedure. New serial protocol is fully implemented (data, PID config... )

BR
Michal M.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by copterrichie »

Awesome, Awesome and another Awesome!

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by ankimo »

It is wonderful!
I am ready for debugging always. :D

Kazz

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

Great!
I'm ready for debugging and modify, too!
Mr. Michal, if you don't mind, please release and debug together!

nhadrian
Posts: 421
Joined: Tue Oct 25, 2011 9:25 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by nhadrian »

The same here...
release and let us help debugging..... ;)

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by mahowik »

Where it's possible to download PRE7? I see on download page only PRE6
https://code.google.com/p/mobidrone/downloads/list

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

mahowik wrote:Where it's possible to download PRE7? I see on download page only PRE6
https://code.google.com/p/mobidrone/downloads/list

Not yet ! Now Mr.Michel is debugging.

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi,

so today will be released PRE7 (Alpha) for testers on my codepage.
I think that the new serial protocol implementation in the OSD works better than the old protocol :)

BR
Michal M.

Tazzy
Posts: 75
Joined: Sun Jun 19, 2011 4:45 pm
Location: Sweden

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Tazzy »

sounds great thanks for the good work :)

// TAzzy

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi,

so mobiDrone OSD PRE RELEASE 7 (ALPHA) is released on my code page. This is alpha version for testers ;)

BR
Michal M.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by copterrichie »

Awesome

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

MichalM_sk wrote:Hi,

so mobiDrone OSD PRE RELEASE 7 (ALPHA) is released on my code page. This is alpha version for testers ;)

BR
Michal M.

Thank you Mr.Michal.

I already find one bug about AHI sensitivity.

The sensitivity of roll and pitch can't set value under 10.
If set under 10, AHI stop act.

to fix it, change line 4239

Code: Select all

                   readedRollAngle = min((int)readedRollAngle/10, 40);
                   readedRollAngle *= eepromBuffer[ROLL_SENSITIVITY]/10;       //value  -40 to 40 deg
   
                   readedPitchAngle = min((int)readedPitchAngle/10, 40);
                   readedPitchAngle *= eepromBuffer[PITCH_SENSITIVITY]/10;    //value  -40 to 40 deg

like this.

Code: Select all

                   readedRollAngle = min((int)readedRollAngle/10, 40);
                   readedRollAngle *= (float)eepromBuffer[ROLL_SENSITIVITY]/10;       //value  -40 to 40 deg
   
                   readedPitchAngle = min((int)readedPitchAngle/10, 40);
                   readedPitchAngle *= (float)eepromBuffer[PITCH_SENSITIVITY]/10;    //value  -40 to 40 deg

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi, thanks you for bug reporting.

I have fixed some bugs also:
1. Bug in GPS data processing (LATITUDE, LONGITUDE reading problem)
2. Problem with detection of camera resolution when the camera is turned on later than osd

ALPHA 2 version with fixed bugs is released on codepage.

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

Mr.Michal, some bugs report from Mr.Ankimo in japanese.

The compass seems strange, start at N, angle is 0. Turn right, angle increase, but pass South, suddenly angle goes 0.

I little bit look at source code but can't fix it.

Also he says Arrow seems dirty, but source code is same as before, and I can't recognise durty.

Thanks.

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Y.Mita wrote:Mr.Michal, some bugs report from Mr.Ankimo in japanese.

The compass seems strange, start at N, angle is 0. Turn right, angle increase, but pass South, suddenly angle goes 0.

I little bit look at source code but can't fix it.

Also he says Arrow seems dirty, but source code is same as before, and I can't recognise durty.

Thanks.



Hi Y.Mita,

ok I will check it

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

MichalM_sk wrote:
Y.Mita wrote:Mr.Michal, some bugs report from Mr.Ankimo in japanese.

The compass seems strange, start at N, angle is 0. Turn right, angle increase, but pass South, suddenly angle goes 0.

I little bit look at source code but can't fix it.

Also he says Arrow seems dirty, but source code is same as before, and I can't recognise durty.

Thanks.



Hi Y.Mita,

ok I will check it


Hi Y.Mita,

so I fixed Bugs whitch you describe, new (BETA) version is ready.

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

MichalM_sk wrote:Hi Y.Mita,

so I fixed Bugs whitch you describe, new (BETA) version is ready.


Thank you, Mr.Michal !
I'll try it this week end.

tasospap
Posts: 7
Joined: Wed Jul 11, 2012 6:29 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by tasospap »

Hi i try to upload version OSD PRE RELEASE 7 (ALPHA) and i get the message ''avrdude: stk500_getsync(): not in sync: resp=0x00''
What i do error ?

Y.Mita
Posts: 46
Joined: Thu Sep 15, 2011 11:25 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Y.Mita »

tasospap wrote:Hi i try to upload version OSD PRE RELEASE 7 (ALPHA) and i get the message ''avrdude: stk500_getsync(): not in sync: resp=0x00''
What i do error ?

FTDI connection error. Or you miss the trick of firmware loading.
Visit mobiDrone shop site and read carefully "Steps to load new firmware to OSD:".
http://www.toptel.sk/multicopter/index. ... ien6k1i400
Good luck!

Tazzy
Posts: 75
Joined: Sun Jun 19, 2011 4:45 pm
Location: Sweden

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Tazzy »

Thanks all devs of mobidrone.
Now my mobidrone are connected again to my multiwii that running latest 2.1 rc and it looks so wonderful and smooth.
I have missed my mobidrone for long time now because i have messed with gps and dev versions, so as soon the weather will be better i will fly with osd again !!!!
THANKS ALL FOR THE GOOD WORK !!
// Tazzy

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by ankimo »

Test report

HOME arrow loses its shape in OFF of latitude and longitude display.

Kazz

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

ankimo wrote:Test report

HOME arrow loses its shape in OFF of latitude and longitude display.

Kazz


Hi Kazz,
thanks for bug report. I can fix it.

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by timecop »

I have a question to MichalM_sk about white/black levels as currently done by the osd.

I have a static pattern on line 66 of video that I'm triggering on the scope:
Image

However, what it ends up doing is 'adding' high to current video levels (and then getting dropped some by the resistor + 75R termination resistor). So when incoming video is dark, the overlay gets dark as well:

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

Here I'm moving the camera around, and as levels on line 66 change, so does the 'white' level.
Is this also happening on mobidrone, as I don't see any analog switch-like / clamping circuitry to disconnect video and output high pixel only without adding.

Tazzy
Posts: 75
Joined: Sun Jun 19, 2011 4:45 pm
Location: Sweden

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Tazzy »

I have a quick and possible dumb question ;) but how will i change from ordinary osd to radarscreen ? why will the radar screen kick in sometimes lol what im doing wrong

// tazzy

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

to dongs: This is true and what is the question ?

You have two options to improve visibility:

1. Adjust the higher white contrast by trimmer on the OSD board.
2. Change this resistor (see attachments) on the OSD board for a darker background (smaller value for the darker background - default value 100 or 75 ohm)

to tazzy:
- there is attribute SCR.SW in the menu to set the aux channel for switch between screens
- there is a little bug in radar screen (a bit laggy ) , I will fix it. ;)
Attachments
bg.png
(148.24 KiB) Not downloaded yet

Tazzy
Posts: 75
Joined: Sun Jun 19, 2011 4:45 pm
Location: Sweden

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Tazzy »

Thanks Michel_sk That solved my mystery lol
Is it possible to NOT assign any aux chan to the radar screen ?
no problem if not i then put it on a not allot used aux ;) i was just curious
Thanks again Michael I love this osd :)

// Tazzy

p25o1
Posts: 33
Joined: Thu Mar 29, 2012 3:19 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by p25o1 »

i really like the way this osd is thought of,

such a small foot print!!!

can i ask for some clarification,

if i'm using the i2c link for a gps sensor,, can i use the same port for the osd ?
if not ,
is there an alternative way to get the osd data from the mwc ?

thx

Tazzy
Posts: 75
Joined: Sun Jun 19, 2011 4:45 pm
Location: Sweden

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Tazzy »

Here is a small video from my test fly with latest mobidrone and multiwii 2.1 on my quad thank you all dev for this wonderful pice of soft and hardware.
http://www.youtube.com/watch?v=U2aVgFVhlQg

// Tazzy

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

p25o1 wrote:i really like the way this osd is thought of,

such a small foot print!!!

can i ask for some clarification,

if i'm using the i2c link for a gps sensor,, can i use the same port for the osd ?
if not ,
is there an alternative way to get the osd data from the mwc ?

thx


Hi, mobiDrone OSD is currently using the UART interface to communicate with multiwii.

Project update:

FINAL version of mobiDrone OSD PRE RELEASE 7 is out.

jpeti29
Posts: 22
Joined: Wed Mar 07, 2012 9:19 am
Location: Hungary

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by jpeti29 »

If i would like to use flytron 100A current sensor, what modifications should i have do in the pre 7 final code.

is it wil be good if i replace this:

Code: Select all

case 3:
            #ifdef MOBIDRONEOSD_V2
              currentValue += compCorrection;
            #endif
            currentValue *= 0.049;
            break;


with this:

Code: Select all

case 3:
            #ifdef MOBIDRONEOSD_V2
              currentValue += compCorrection;
            #endif
            currentValue *= 0.049 * 0.5;
            break;

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

jpeti29 wrote:If i would like to use flytron 100A current sensor, what modifications should i have do in the pre 7 final code.

is it wil be good if i replace this:

Code: Select all

case 3:
            #ifdef MOBIDRONEOSD_V2
              currentValue += compCorrection;
            #endif
            currentValue *= 0.049;
            break;


with this:

Code: Select all

case 3:
            #ifdef MOBIDRONEOSD_V2
              currentValue += compCorrection;
            #endif
            currentValue *= 0.049 * 0.5;
            break;



Hi, for the 100A sensor you should change the constant 0.049 to 0.098

Code: Select all

currentValue *= 0.098;

jpeti29
Posts: 22
Joined: Wed Mar 07, 2012 9:19 am
Location: Hungary

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by jpeti29 »

Don't know why, but the good value is 0.043 to show correct current values.

Another question. what can be the problem, if the bat1 value is always stay 0.0V? if i adjust the bat1 value in the menu, then it stays on that value forever.

ankimo
Posts: 30
Joined: Fri Jan 20, 2012 7:31 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by ankimo »

Pre7(FINAL)Test report

Probably the direction of home is reverse. ;)

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

Kazz
Last edited by ankimo on Sun Jul 22, 2012 9:21 am, edited 1 time in total.

Deet
Posts: 129
Joined: Sun Jul 08, 2012 1:54 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by Deet »

Using release 7 final, do I need to uncomment anything in V2.1 to enable the feedback to the OSD or does it do all the polling for data itself?

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by msev »

Is there maybe a function to change the thickness of the osd text?

jpeti29
Posts: 22
Joined: Wed Mar 07, 2012 9:19 am
Location: Hungary

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by jpeti29 »

jpeti29 wrote:Don't know why, but the good value is 0.043 to show correct current values.

Another question. what can be the problem, if the bat1 value is always stay 0.0V? if i adjust the bat1 value in the menu, then it stays on that value forever.


Problem solved! nhadrian found the problem. The Bat1 value is coming from the mwc, bat2 value is from the wire which is connected to the osd.

thx Adrian!

MichalM_sk
Posts: 89
Joined: Wed Jun 15, 2011 5:04 pm
Location: Slovakia

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by MichalM_sk »

Hi,

jpeti29 wrote:Don't know why, but the good value is 0.043 to show correct current values.

Another question. what can be the problem, if the bat1 value is always stay 0.0V? if i adjust the bat1 value in the menu, then it stays on that value forever.


For viewing bat1 voltage is necessary to allow VBAT monitoring in multiwii.

Your sensor (100A flytron) should work correctly with this modification:
Find readCurrent () routine and replace 'case 3:' with this code.

case 3:
currentValue *= 0.098;
break;

In the normal state there is blocked a correction of voltage so it dont work for you. (It works correctly only with 50A flytron sensor)

ankimo wrote:Pre7(FINAL)Test report

Probably the direction of home is reverse. ;)

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

Kazz


I will check this problem.


msev wrote:Is there maybe a function to change the thickness of the osd text?


At this time, this function isnt implemented.

Solutions for better visibility in direct sunlight (stronger background)
Image

1. Remove resistor shown in Figure.
2. If it is still weak, change resistor for background with value about 20 ohm.

jpeti29 wrote:
Problem solved! nhadrian found the problem. The Bat1 value is coming from the mwc, bat2 value is from the wire which is connected to the osd.

thx Adrian!


Sorry, I was away from home at the weekend.

Deet wrote:Using release 7 final, do I need to uncomment anything in V2.1 to enable the feedback to the OSD or does it do all the polling for data itself?


Hi, there is not need to make any changes in multiwii configuration.

mahowik
Posts: 332
Joined: Sun Apr 10, 2011 6:26 pm

Re: mobiDrone nano arduino OSD for MultiWii with PID config

Post by mahowik »

MichalM_sk wrote:Solutions for better visibility in direct sunlight (stronger background)
Image

1. Remove resistor shown in Figure.
2. If it is still weak, change resistor for background with value about 20 ohm.


What is the resistor numbers from scheme here http://www.toptel.sk/multicopter/downlo ... 0_schm.pdf need to be changed/removed?

Also I have found out that when i connect the OSD to the video line, the brightness reduces to 20-30%... So I changed R4 from 100 to 470 ohm to solve this... It works and I hope it's correct. Right?

thx-
Alex

Post Reply