SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Nov 29, 2012, 01:28 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
@Rick...
Thanks for testing, great to see
You should really consider to use 5 Hz GPS update-rate, it helps a lot.

1) Current-sensor should just be calibrated to match the sensor used. There is a little note in the config-file, but as your device is made for 3.3v adc you most likely have to multiply the value with 5/3.3 = 1.52

2) Just checked what I could, my altitude-offset works just fine no matter what I try. I have also checked with imperial-units. Do you mind to try again just on the bench? I'm pretty confident that it's working just fine. Only negative altitude haven't been taken care of yet.

3) The ADC in the atmega microcontroller is linear, and so is the voltage-divider. Do you use 3.3K resistor and 10K resistor, or the voltage-divider in the current-sensor? If the resistors in the voltage-divider is too high it will be less tolerant to noise etc.
Furthermore, if the supply-voltage to the microcontroller is not stable you will also get some noise on the readings. Sorry, but I'm pretty confident this is not an error in the software.

4) LOS is not hooked up? Do you mean RSSI? The numbers will show if you have enabled RSSI in the config-menu. As it's an ADC, the controller have no way to detect if RSSI is attached or not.
Most UHF-systems have 2 power-levels and in a plane with low noise-level it should have plenty of range. If you start to get fail-safe, slow reaction etc. you know you are reaching the limit, but have a little extra juice if needed. It was a bit more exciting on 35 MHz where you have to increase the antenna-height to gain some range. But not that bad really.
I have been quite a few kilometers out and up without OSD and on 35Mhz. Worked pretty well.

5) It was explained earlier, but it shows the angle of the plane seen from your position. Basically, the number can be used directly for antenna-tracker, as it shows the direction of your plane relative to yourself.

6) All the parameters for when to show summary is in the config-file and copy-pasted here a few posts back when you asked
Just modify it to match your needs

7) 38400 bauds should work just fine. Unfortunately, I think the problem is your GPS. The BAUD2 is used for some test with the GPS-unit I used, where it starts at 9600 baud, set some settings, change baud-setings to 38400 etc.

8) Pressure-sensor is still just an idea, so don't expect anything right away. This OSD-project was meant as a winter-project and posted officially like a week ago
Too many exams, hours at work etc. to finish it right away.

9) It can be changed to reset when you are airborne, but I don't really care too much as I'm normally airborne within a minute or two. Not quite sure how you would prefer it to count/reset?

10) If the Naza-GPS uses NMEA-strings, sure. If not, you have to re-write the serial-reading stuff.
Dennis Frie is offline Find More Posts by Dennis Frie
Last edited by Dennis Frie; Nov 29, 2012 at 01:33 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Nov 30, 2012, 02:04 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,

On one hand, I’m so sorry man, I did not realize you were a student. Had I had a hobby like this while I was going to school, I never would have graduated !!

On the other hand, I have been thinking about your sentence about the gps units.
You said, it needs to be running at 5hz.

So looking around, apparently this is a very common gps unit by MediaTek.
In fact, it appears Flytron says the gps unit with the MediaTek powered chipset is “best in the World”.
So, I’m thinking we probably want to work with these too...yes?
The default settings are 9600 at 1 hz – but it can be changed with firmware or it appears, a small piece of code...yes? For example, from

https://docs.google.com/document/edi...nnwHaCbXB-Olzc

-Change unit refresh rate:
$PMTK220,100*2F //Will set the GPS to 10hz (or updates every 100 milliseconds)
$PMTK220,250*29 //Will set the GPS to 4hz (or updates every 250 milliseconds)
$PMTK220,1000*1F //Will set the GPS to 1hz (updates every 1000 milliseconds)

Am I off base here?

Oh... and you were right, - altitude-offset appears to be working - I must have screwed up on my side... and my gps is not helping.

Thanks again,

Rick
RickEis is offline Find More Posts by RickEis
Last edited by RickEis; Nov 30, 2012 at 02:48 PM.
Reply With Quote
Old Nov 30, 2012, 03:01 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,

On one hand, I’m so sorry man, I did not realize you were a student. Had I had a hobby like this while I was going to school, I never would have graduated !!

On the other hand, I have been thinking about your sentence about the gps units.
You said, it needs to be running at 5hz.

So looking around, apparently this is a very common gps unit by MediaTek.
In fact, it appears Flytron says the gps unit with the MediaTek powered chipset is “best in the World”.
So, I’m thinking we probably want to work with these too...yes?
The default settings are 9600 at 1 hz – but it can be changed with firmware or a it appears a small piece of code...yes? For example, from

https://docs.google.com/document/edi...nnwHaCbXB-Olzc

-Change unit refresh rate:
$PMTK220,100*2F //Will set the GPS to 10hz (or updates every 100 milliseconds)
$PMTK220,250*29 //Will set the GPS to 4hz (or updates every 250 milliseconds)
$PMTK220,1000*1F //Will set the GPS to 1hz (updates every 1000 milliseconds)

Am I off base here?

Oh... and you were right, - altitude-offset appears to be working - I must have screwed up on my side... and my gps is not helping.

Thanks again,

Rick
Don't be sorry, being a student is not necessarily a bad thing. .
I've just been quite busy lately, as I'm also working a couple of days a week, live at a college and have a few other projects going on.

Regarding GPS - have you noticed the boot-screen?
It does exactly what you are asking for,

It will keep the baud setting, but change update-rate to 5 hz. To run 10 Hz you need higher baud-settings.

The baud2 setting was used as a test, to automatic change baud-settings and set 10Hz update-rate, but the GPS seem to behave "weird" with 10Hz update-rate, so I'll keep it at 5hz until it have been tested properly (I can't get proper GPS-signal inside and it's freezing outside atm.

Great to hear altitude_offset works, please let me know if you experience the problem again.
Dennis Frie is offline Find More Posts by Dennis Frie
Reply With Quote
Old Nov 30, 2012, 08:07 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,

I think maybe I was not clear, I'm not sorry you are a student. Being a student is a good thing. I'm sorry you are so busy and have such an interesting hobby.….That is hard !!! For example, I would have had a hard time focusing on differential equations when I was so close to finishing something with the Max7456_OSD. That is hard because the hobby (fun stuff) screams out for attention, at least for me.

Being a college student is a good thing. I know! I was one once and I currently have 5 kids and my wife all In College. You might be able to imagine, I also know what it is like to be busy. The hard part is..... I have so many awesome thing I want to do.

On the other hand I'm not sorry at all – College is a fun time in life and this hobby is amazing stuff today

So....... I think I found your bootscreen

Line 47 initBootScreen(); // Boot-screen + GPS-settings

Line 49 // initGPS(); // Test with 10Hz GPS settings.

Line 566 // Used to set the GPS update-rate to 5 hz, and GPGGA and GPRMC gps-strings (Only for MKT-GPS).

Line 570 unsigned char GPS_init1[]={"$PMTK300,200,0,0,0,0*2F"};

Hmm...all this is looking a bit familiar here, particularly line 570.
I had posted

$PMTK220,100*2F //Will set the GPS to 10hz (or updates every 100 milliseconds)
$PMTK220,250*29 //Will set the GPS to 4hz (or updates every 250 milliseconds)
$PMTK220,1000*1F //Will set the GPS to 1hz (updates every 1000 milliseconds)


So your $PMTK300 mustbe for 5hz hmm....I wonder what would happen if I left out all the 0's and simply put $PMTK220,300*2F as in the example - I'll try that

So this is it – I found two versions of firm ware and played with them. Both set it to 1 hz - the factory default firmware is 9600 baud 1hz and DIY Drones firmware jumps it to the 38400 baud 1 hz. On power off the temp settings are lost and all goes back to the firmware.

I guess you can send your unit in with a custom firmware request so when power shuts down one does not loose their settings.

Or one can initialize the gps on startup – but it will always fall back to the firmware...yes?

-To change the baud rates:
$PMTK251,4800*14
$PMTK251,9600*17
$PMTK251,19200*22
$PMTK251,38400*27

Sometimes I wish I was a computer programmer.

Rick
RickEis is offline Find More Posts by RickEis
Last edited by RickEis; Nov 30, 2012 at 08:16 PM.
Reply With Quote
Old Dec 01, 2012, 07:54 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,

I think maybe I was not clear, I'm not sorry you are a student. Being a student is a good thing. I'm sorry you are so busy and have such an interesting hobby.….That is hard !!! For example, I would have had a hard time focusing on differential equations when I was so close to finishing something with the Max7456_OSD. That is hard because the hobby (fun stuff) screams out for attention, at least for me.

Being a college student is a good thing. I know! I was one once and I currently have 5 kids and my wife all In College. You might be able to imagine, I also know what it is like to be busy. The hard part is..... I have so many awesome thing I want to do.

On the other hand I'm not sorry at all – College is a fun time in life and this hobby is amazing stuff today

So....... I think I found your bootscreen

Line 47 initBootScreen(); // Boot-screen + GPS-settings

Line 49 // initGPS(); // Test with 10Hz GPS settings.

Line 566 // Used to set the GPS update-rate to 5 hz, and GPGGA and GPRMC gps-strings (Only for MKT-GPS).

Line 570 unsigned char GPS_init1[]={"$PMTK300,200,0,0,0,0*2F"};

Hmm...all this is looking a bit familiar here, particularly line 570.
I had posted

$PMTK220,100*2F //Will set the GPS to 10hz (or updates every 100 milliseconds)
$PMTK220,250*29 //Will set the GPS to 4hz (or updates every 250 milliseconds)
$PMTK220,1000*1F //Will set the GPS to 1hz (updates every 1000 milliseconds)


So your $PMTK300 mustbe for 5hz hmm....I wonder what would happen if I left out all the 0's and simply put $PMTK220,300*2F as in the example - I'll try that

So this is it – I found two versions of firm ware and played with them. Both set it to 1 hz - the factory default firmware is 9600 baud 1hz and DIY Drones firmware jumps it to the 38400 baud 1 hz. On power off the temp settings are lost and all goes back to the firmware.

I guess you can send your unit in with a custom firmware request so when power shuts down one does not loose their settings.

Or one can initialize the gps on startup – but it will always fall back to the firmware...yes?

-To change the baud rates:
$PMTK251,4800*14
$PMTK251,9600*17
$PMTK251,19200*22
$PMTK251,38400*27

Sometimes I wish I was a computer programmer.

Rick
I think you can change the GPS-settings permanently if you want to, but I'm not completely sure. You have to check the datasheet or something similar.
I just run the little piece of code on start-up, to get 5Hz update-rate and only the necessary strings. It will be done before I even get a chance to get my googles on etc. so haven't really checked if it can be saved permanently.
The string you mentioned for 3Hz update-rate, remember that the last 2 characters is checksum and must match.
Dennis Frie is offline Find More Posts by Dennis Frie
Reply With Quote
Old Dec 01, 2012, 09:58 AM
Registered User
Joined Jan 2010
51 Posts
Dennis,

I've attached everything per Rick's schematic (Thanks to the both of you) loaded the BETA2 code and everything is working fantastically... except the Chinese symbols on the screen.

I was understanding that if the MAX breakout was connected during the compile that it would re-write the characters? I'm sure I'm missing a step... any pointers?

Thanks again for your time.
Flying Munkee is offline Find More Posts by Flying Munkee
Reply With Quote
Old Dec 01, 2012, 10:09 AM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
Quote:
Originally Posted by Flying Munkee View Post
Dennis,

I've attached everything per Rick's schematic (Thanks to the both of you) loaded the BETA2 code and everything is working fantastically... except the Chinese symbols on the screen.

I was understanding that if the MAX breakout was connected during the compile that it would re-write the characters? I'm sure I'm missing a step... any pointers?

Thanks again for your time.
Great to hear
The easiest way to solve the chinese-character problem, without doing anything with the code is:
- Download first Beta version, and upload (doesn't matter if MAX7456 is connected or not)
- Upload Beta_v2 again (with MAX7456 connected)

Another solution is to find this in Beta2 (line 57 MAX7456_osd.ino file), and replace 10 with something else - 9 for example.
if (EEPROM.read(0) != 10) {
write_chars();
EEPROM.write(0,10);
}
Dennis Frie is offline Find More Posts by Dennis Frie
Last edited by Dennis Frie; Dec 01, 2012 at 10:48 AM.
Reply With Quote
Old Dec 01, 2012, 12:10 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Quote:
Originally Posted by Flying Munkee View Post
Dennis,

I've attached everything per Rick's schematic (Thanks to the both of you) loaded the BETA2 code and everything is working fantastically... except the Chinese symbols on the screen.

I was understanding that if the MAX breakout was connected during the compile that it would re-write the characters? I'm sure I'm missing a step... any pointers?

Thanks again for your time.
Flying Munkee,
That's awesome .... Yes I got rid of the Chinese symbols the "The easiest way" Dennis describes - Worked first time
Keep us posted how things go - I'm interested in what sensors you use
Thanks,
RIck
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Dec 01, 2012, 07:34 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,

Getting closer

Here is another little MAX OSD test 3 - mostly looking at gps data.

https://www.dropbox.com/s/wgs6ygo5g0...SD%20test3.AVI

Loaded factory default firmware onto the MediaTek 3329 - supposedly sets baud to 9600 1hz

I'm assuming since I brought gps back to 9600 the code is tweaking it to 5hz.

MAX_OSD settings as follows:

#define VIDEO_SYSTEM 1
#define UNITS 0
#define BAUD 9600
#define VOLT_GAIN 0.79
#define CUR_GAIN 2
#define ALTITUDE_OFFSET 1

No RSSI connected yet

Other then that, keep tweaking cur_gain trial and error - getting closer but don't see any formula's.

Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Dec 01, 2012, 07:42 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
Thanks for sharing
The video is downloading atm, I'll watch it in a minute.

What current-sensor are you using? 25A 50A?
In your case, I believe you should use:
25A = 0.24 * (5.0 / 3.3) = 0.364
50A = 0.49 * (5.0 / 3.3) = 0.74
100A = 0.98 * (5.0 / 3.3) = 1.48

Edit: The 5Hz update-rate seems to work, great.

Have you checked the current-sensor and calibrated with a multimeter or something similiar to be sure? Just in case you have no clue if it's right or not.
Dennis Frie is offline Find More Posts by Dennis Frie
Last edited by Dennis Frie; Dec 01, 2012 at 07:50 PM.
Reply With Quote
Old Dec 01, 2012, 08:22 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,
I'm using the exact one that is pictured in the schematic 50 Volt 90 amp AttoPilot
Have not calibrated with a multimeter. Do you have a good way to do this? Similarly, I know the voltage is good with no load, but it appears to measure too high under load as opposed to other meters.
Thanks,
Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Dec 01, 2012, 08:27 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,
I'm using the exact one that is pictured in the schematic 50 Volt 90 amp AttoPilot
Have not calibrated with a multimeter. Do you have a good way to do this? Similarly, I know the voltage is good with no load, but it appears to measure too high under load as opposed to other meters.
Thanks,
Rick
That would give something around 1.35 as calibration-value for the current-sensor. Is that anywhere near what you are using, or am I far off?

The voltage-drops must be caused by unstable supply-voltage to Arduino or something like that. Try to measure if it gets a good stable 5-volt under load. That could be the problem
Dennis Frie is offline Find More Posts by Dennis Frie
Reply With Quote
Old Dec 01, 2012, 08:37 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Quote:
Originally Posted by Dennis Frie View Post
That would give something around 1.35 as calibration-value for the current-sensor. Is that anywhere near what you are using, or am I far off?

The voltage-drops must be caused by unstable supply-voltage to Arduino or something like that. Try to measure if it gets a good stable 5-volt under load. That could be the problem
Dennis,

#define CUR_GAIN is set to 2
I'll st it to 1.35 next and show you what it does.

The supply Voltage is an Erc switching 6A BEC
It has 3 settings 5.0V, 5.5Vand 6.0V.
I currently have it set to 5.0 Volts.
Maybe I will set it at 5.5V and see if makes a difference based on what you are saying.

Thanks again,

Rick
RickEis is offline Find More Posts by RickEis
Reply With Quote
Old Dec 01, 2012, 08:42 PM
Just another user
Dennis Frie's Avatar
Denmark, Capital Region of Denmark, Naerum
Joined Feb 2011
1,037 Posts
Quote:
Originally Posted by RickEis View Post
Dennis,

#define CUR_GAIN is set to 2
I'll st it to 1.35 next and show you what it does.

The supply Voltage is an Erc switching 6A BEC
It has 3 settings 5.0V, 5.5Vand 6.0V.
I currently have it set to 5.0 Volts.
Maybe I will set it at 5.5V and see if makes a difference based on what you are saying.

Thanks again,

Rick
That's a bad idea, MAX7456 is rated at max 5.25 volt
Just add a little extra capacitor or similar.
Dennis Frie is offline Find More Posts by Dennis Frie
Reply With Quote
Old Dec 01, 2012, 08:49 PM
Registered User
United States, AZ, Prescott Valley
Joined Feb 2012
178 Posts
Dennis,

You were asking for project ideas......

How hard would it be to build something that can check our antennas and something to check how noisy all these other electronics are? Maybe you have built something like that already?

The GoPro was sending the NAZA gps all over the place. I wrapped the GoPro in a copper foil which apparently fixed the problem. But what about all the other electronics? Are they making noise that will cause problems one day?

It would be cool to have something that would detect and or analyze all these things.
It would be a blast to build one if possible?

Rick
RickEis is offline Find More Posts by RickEis
Last edited by RickEis; Dec 01, 2012 at 10:56 PM.
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! OSD version UNKNOWN and fail to update (error) dROb Eagle Tree Systems 9 May 16, 2012 06:12 PM
Sold EASY OSD (Version 1.2) Brand New . $75 shipped. LHTPlane FPV Equipment (FS/W) 7 Mar 20, 2012 11:45 PM
For Sale MAX7456 OSD Break out board. ziomatrixacs FPV Equipment (FS/W) 4 Jun 18, 2011 04:50 PM