Jump to content
Daniel Wee

My little NAV/OSD project - under construction

Recommended Posts

Daniel,

What kind of diode are you using in the bottom statement?

Thanks!

"2. I've taken out the 2N3906 transistor, the 4.7k and the 10k next to it, and put in a diode. Basically the diode points towards the GPS module side from the DSPIC. I added a 10ohm resistor in series with this diode, and added a 1.37k pull-up from pin-12 of the dsPIC to +5V. Basically, this is accomplished by replacing the 10k with a 1.37k, replacing the 4.7k with a 10ohm, and connecting a diode across where the transistor used to be, namely the diode pointing in the direction of the direction (physically) of the GPS socket (not using the grounded pin of the transistor holes). To put it another way, of the three holes where the 2N3906 used to go, the diode occupies the 2-holes furthest away from the GPS socket, and points in the directon of the socket. Electrically, the diode points towards the GPS TX connection, through the 10 ohm resistor that's replaced the 4.7k."

Share this post


Link to post
Share on other sites

Daniel,

Here's what I'm seeing on the ACS755-050 output:

With no load, it's .6v

With a 2A load, .7v

after the diode/capacitor/resistor, I see:

No load: .2v

2A load: .3v

Does this look normal? Also, I used an electrolytic capacitor (that's all I had laying around) instead of the tantalum. This should will work fine, just more temp drift, right? You didn't have the polarity on the capacitor labeled, but I assume - to GND.

Share this post


Link to post
Share on other sites
docphi,

I'm pretty sure it's a 1N4148, since he's using it as a level shifter. That's what I used, and it worked fine.

Ahh yes. Makes sense. Thanks!

Share this post


Link to post
Share on other sites

Nice! We have progress! The GPS UTC is being displayed, however, no sats are acquiring. The OSD shows "Home not set". So close! Just need to nail down the GPS data and add the servo connectors.

It's all on a breadboard and instead of the SIMM BOB-4, I'm using the BOB-4H with the header connector.

Daniel, this is a brilliant project! :D

Share this post


Link to post
Share on other sites

OK, I figured it out. I had the current sensor connected to the wrong port. It's supposed to go to AN3. To make matters worse, I'm not using a separate receiver battery (I use one battery in this plane), so I didn't have anything connected to AN1. I didn't realize that the OSD needs to have AN1 connected to a battery (if you're using one battery for everything, just connect it to the same battery). If you don't do this, the OSD has no way of calculating wattage (it doesn't know the voltage).

I'm currently testing the accuracy of my sensor to see how it compares...

Share this post


Link to post
Share on other sites

Wow, so much has happened while I was gone for a few hours.

Okay, first things first - docphi - do you have an altitude reading of 137m? Basically you want to ensure that bi-directional communications with the GPS is good. The fact that you have the UTC clock going suggests that it is correctly reading the GPS module. But you also want to make sure that the connection from the controller to the GPS is connected correctly. This is quite easy to check since it is basically a direct link. If you get the satellite bars in the middle of the screen, it means that the commands are being received correctly at the GPS module. So, check that the TX from the dsPIC is going to the RX wire on the GPS module.

rimb05, ok, good that you have the current sensor working. Be warned that the current readings aren't well calibrated so if you get any discrepancy, please not it down because I don't have a wattmeter with me at the moment. The mAh meter is working well for me but I've not tested it with too many ESCs. They are more accurate when you fly it for a bit. Accuracy many vary according to component tolerances, and the AMPSZERO setting - for the moment leave it at 44 first unless it is not reading low currents.

As to the config - you may need to increase your end-points since the blanking is sufficient. I can't really quantize the range but it's at the very end, near 2ms pulse width. Can you ensure that you don't have any kind of mixes programmed in your aileron and elevators which may lead to interaction between the two. Can you carefully describe the partial working of the controls in the menu. Also, check that your wiring is correct. On my system I have no problems at all. Like I said, try to assign the control to a 3-way switch instead of the knob or slider as those may be jittery. The three positions should be MENU, NORMAL, AUTOPILOT. When you're happy with your settings, you can increase the MENU to BLANKING. I hardly use the blanking feature myself but put it in because some people didn't like the on-screen data in their videos. Me, I like it there all the time, that's why I built this thing.

BTW, I don't know if I mentioned this but for the servo and receiver connectors - the +5V line from the receiver goes direct to the +5V of the servos. These do not connect to the on-board +5V supply. So basically just connect all the 5V of the inputs, and jumper it to the 5V of all the servo outputs. Note however that the second output connector is different and is NOT a servo connector so it sees a different connection. And since this jumper wire carries the full servo current load, it should not be flimsy - use some thicker gauge wire for it, not one of those tiny 4-strand wires.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

"Okay, first things first - docphi - do you have an altitude reading of 137m? Basically you want to ensure that bi-directional communications with the GPS is good. The fact that you have the UTC clock going suggests that it is correctly reading the GPS module. But you also want to make sure that the connection from the controller to the GPS is connected correctly. This is quite easy to check since it is basically a direct link. If you get the satellite bars in the middle of the screen, it means that the commands are being received correctly at the GPS module. So, check that the TX from the dsPIC is going to the RX wire on the GPS module."

Yes, I have an altitude reading of 137m. I have one sat bar in the middle of the screen. I'll try it outside today.

Edit: Got it! GPS is working. Just needed some extra time to get the sats. Home is set and lots of good info on the screen. There are two numbers flashing on the top - one is "0.15v" and the other is "-135.5m". What is the significance of these numbers flashing?

Btw - I plugged in my 2.4ghz video transmitter (200mw) and it jammed the wireless port on my laptop. LOL! Never had that happen before. :lol:

K

Edited by docphi

Share this post


Link to post
Share on other sites

well, the top left 0.15V indicates that your voltage reading is too low. In this case, it looks like there's something wrong with your voltage connection. You may want to re-trace the connections to AN0, AN1 and AN2. It is flashing because the voltage is too low. Usually it will auto-detect if this is a 2S or 3S Li-po, and will flash at the respective cutoff voltages (when it is getting low) as a warning.

Likewise, your altitude is indicating that you're underground or something -135.5m so it flashes it as a warning. Normally, the cutoff is a function of altitude and distance from home, and the LOWALTRATIO setting in the configuration screen. Basically, if the altitude is less than LOWALTRATIO * ground distance to home, the altitude reading will begin to flash to indicate that you're getting too low, and the GPS readings will show up. The idea with this is so that when your plane is getting too low, you are likely to want the GPS position in case of a crash and recovery is needed. The further you go, the higher you ought to be, hence the proportional cutoff altitude. When the plane is real close to you, you don't really need the GPS info and you are allowed to be lower.

There are a number of other warnings such as the mAh warning, which can be set in the configuration as well. This will start flashing the mAh reading when it goes beyond the threshold. You can also set a threshold where the ground distance is no longer displayed. Mainly the idea with this is that the further away you go, the closer your LOS distance will be to your ground distance, and you don't need to clutter up the screen with more info than necessary. The philosophy with all this is that, the OSD can be set to turn off non-critical or non-relevant displays so that you have the cleanest screen possible and yes retain full functionality.

Don't forget to change MINVALID and VALIDHDOP to the one I recommended. MINVALID is the minimum valid HDOP readings required for the home to be set. If for some reason it cannot maintain that number of valid HDOP readings, it will reset and start again. I normally use 75 but if your GPS readings are not good and cannot achieve a lock for that long, you can reduce this number, but risk more error in the home location. The VALIDHDOP is the maximum HDOP value that's considered acceptable. However, this is somewhat dynamic. So say you have a VALIDHDOP of 1.5 and the GPS HDOP gets to 1.4, then it will start counting how many consecutive HDOP of 1.4 is received and if the count reaches MINVALID, home will be set. However, if after 10 readings of 1.4 and the HDOP improves to 1.2, for example, the VALIDHDOP will now automatically be improved to 1.2. So that if the reading now degrades back to 1.3 or 1.4, the count will be aborted and MINVALID reset to 1.5. It's complicated but the aim is to provide the most stable reading before setting the home.

For the moment I have disabled WAAS/SBAS because we don't get that in this part of the world so I can't test how much that affects the performance. If you have info on this, I'd be happy to hear about it.

Daniel

Share this post


Link to post
Share on other sites

Daniel,

WAAS will improve the altitude accuracy of the GPS unit for those of us that have it in their locations. It is supposed to be on by default from the factory. I think it would help to have it enabled for some of us.

Share this post


Link to post
Share on other sites

I suppose I could do that. I'm just not sure if it's been tested and shown to work well. Also, assigning WAAS in an area without WAAS may take up one of your channels. I'll re-enable it then in my next version of software.

Edit: I just checked and it seems that I've removed the code to turn it off in the current version, so that it will follow whatever is the default for the module.

Edit: I've also just tested the menu controls and it looks like it works fine. Even in boundary conditions it should not work too strangely. Not sure what's going on with rimb05's setup but it may be that something else is wrong with the board.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

No problem, I'll try to recreate a specific scenario for you step by step when I get a chance. I'm having some level shifting issues with my plane right now, so I'll need to work that out this weekend.

Share this post


Link to post
Share on other sites

It works! Up and running. Nice and slick. I need to add the current circuit (waiting on the sensor) and then pack it all in my plane for some in-flight testing. WoooHoooo!

Daniel, the "LOS" line in the bottom right is still cut off slightly in NTSC mode. It needs to come up a little (I'm using sw version 3.6).

Menu works great. Just need to figure out how to put it on a switch instead of a dial.

:D:D:D:D

Edited by docphi

Share this post


Link to post
Share on other sites

Definitely not the monitor. I've tried several different ones. A screenshot is attached.

I can confirm there is a menu bug. I have to go to "MaxRange" to adjust "LowAltRatio" in the menu. And even then, I can't increase the value by moving the aileron stick to the right. I go to "MaxRange" to adjust the "LowAltRatio" higher than the value I want and then go back to "MaxRange" to decrease the value down to my target value. Am I making any sense? :P

Did I say how cool this is? :lol:

Snapshot_0001

Edited by docphi

Share this post


Link to post
Share on other sites
Definitely not the monitor. I've tried several different ones. A screenshot is attached.

I can confirm there is a menu bug. I have to go to "MaxRange" to adjust "LowAltRatio" in the menu. And even then, I can't increase the value by moving the aileron stick to the right. I go to "MaxRange" to adjust the "LowAltRatio" higher than the value I want and then go back to "MaxRange" to decrease the value down to my target value. Am I making any sense? :P

Did I say how cool this is? :lol:

Save the file and change the extension to .jpg and it'll work. I think it's a Mac thing. The attachment doesn't seem to be Windows friendly.

So have you started to go insane yet? :lol: As for the picture, yeah I can't see it because I'm using a PC. Anyway is there a way for you to save it to a different format? On my end I see it as a Quick Time file and when I download it, all I see is text, numbers and diamonds, spades etc.. computer gibberish. :huh:

Share this post


Link to post
Share on other sites

Looks great doc! I wonder if I raised the lower display bits too much. I raised it 2 more pixels but when I review the first photo you posted, it seems that you were in fact using version 3.4 and not version 3.6. That confused me a bit because I've already raised it a bit more in version 3.6 and raised it some more in 3.8. So now, I've lowered the lower-display by 2 pixels back to the 3.6 levels. This will be reflected in version 3.9 onwards.

And you really need to look at your voltage divider around the AN0 part. Are you missing a 22k resistor to the pin 1 of the regulator? Or maybe you've got a wrong value for the 11k, possibly even a short somewhere there. You'll want to check that out carefully because the 2nd number on the top left should reflect the battery voltage to your board.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Daniel,

3.8 is the ticket. Menu works perfectly.

I'm actually using the DE-SW050 switching volt regulator from Dimension Engineering. I haven't completed that part of the circuit yet.

Share this post


Link to post
Share on other sites

Good to hear the progress you guys are making here.

Just to let you all know, I think this project is going to end up being called the DragonOSD - don't ask me why - long story. I will probably release the source code in C some time this week, provided everything is stabilized.

There are a few features that I have not implemented as yet:-

1) Auto logging of flights, including a page to display the last 10 flight's peak values, location and times.

2) 20-second interval recording of position fix for the most recent flights (up to 20-minutes worth) that you can download to your PC and maybe into Google Earth Plus to show your flight path.

3) A bootloader that you can use to update the software with just the serial port so no separate programmer is needed.

4) The One-Wire support which will include barometric pressure sensors, temperature sensors, and possibly an artificial horizon module (mainly for flying in the clouds).

5) Code to put the plane in a circling pattern once it reaches a certain distance from home. This is to prevent it from flying overhead when on autopilot, leading to loss of video.

6) Maybe support for multiple waypoints.

These are the stuff that I've not done, or maybe have no time to do. The source code is meant to be compiled under the MikroC for dsPIC from MikroElektronia, which is probably the cheapest full compiler for the dsPIC out there at the moment. It should be fairly easy to port to the C30 compiler from MicroChip, although some syntax may need to be changed here and there. I've tried not to use any obscure library functions and am still cleaning up the code to be less compiler and library dependent.

My hope is that more heads are better than one, and someone else can help take some of the basic stuff I've done to the next level. The condition for using the code is to give the results back to this community. Of course making some money is a good idea too.

Also, in a few days, we'll be hearing of some news about board offerings to go with this project in case you are not into making them yourselves.

If you have any more suggestions as to how to further improve this NAV/OSD, please let me know and I'll see about making the necessary changes.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

docphi, if you are using the switching regulator in place of the LM2940, it may not really be that necessary being that:-

1. The current draw of the board and GPS is actually pretty low and it doesn't really get all that hot when powered from a 2S pack, or even a 3S - gets a bit warm but nothing to worry about. Once the GPS has stabilized, it draws even less current. Of course, you could power the 5V camera off that line I suppose, and even the TX off it. Just make sure it's capable of handling the load.

2. The ADCs on board the dsPIC is likely to work better with a linear power supply since it doesn't have to deal with the noise inherent in switching power supplies. This could impact the accuracy and reliability of the various ADC readings. This is especially the case if you will be powering the TX and camera off the same regulator.

3. The DE module is rather big and will stick out like a sore thumb. I have mine on another separate board, together with another DE Anyvolt which I use for the camera (non-5V unit).

Daniel

Share this post


Link to post
Share on other sites

Daniel,

Thanks for the update. You've really given your project a lot of thought.

Did you get a chance to look at the PCB file I sent you? Feel free to use it in any way you would like. It is, after all, a modification of your original file. :D

What do you think about integrating the header for the BOB-4H? I realize it increases the overall board size and weight, however, I thought it would be nice to have it plug-and-play.

The only reason I switched to the DE regulator is because the LM2940 on my breadboard setup was running very hot. Although I am powering the transmitter and camera (both 5V units) using one regulator.

K

Edited by docphi

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...