Jump to content
Daniel Wee

My little NAV/OSD project - under construction

Recommended Posts

Daniel, you are having wayyy too much fun! Now artificial horizon is something that interest me as well!

I guess head tracking is much easier on a Futaba? I'm not a electronic whiz like you but it seems JR are more difficult to work with since it's been an issue for some time now. Question... do you figure your head tracking is relative small in size? Does it incorporate the same theories as the present units available on todays market? I think you might do well even if you double or triple the price you you figure it will cost! Asking too cheap of a price is not always good for you and personally I have no problems paying more for someones hard work! ;) Or a second idea is to again offer a plan or unassembled kit. ;) And again... they should be priced at according to fair market price :lol: but I think you already know that! :D

Share this post


Link to post
Share on other sites

They're all very good units but Daniel's unit will get just as much attention :lol:

Share this post


Link to post
Share on other sites

Thanks for the nice comments guys. I think we're all building on one another's experiences here so it's all good.

Okay, I've managed to get quite a bit of work done on the device. Just a few comments first - I'm using an Altoids style casing to shield the main boards from the GPS. This is working well enough to get some readings out of the GPS module but I am suspecting that accuracy is compromised. It is, however, good enough to demonstrate the software working so that's what this video is about. Secondly, I'm not sure if it's the interference but there are times when the position fluctuates quite a bit - this may be due to unstable lock on the satellites so it keeps changing sats for the positional fix. In any case, if you observe carefully - the altitude especially, is not very precise at all. I'd say, at this point (interference and all), we're looking at maybe a few (5?) meters reliability but certainly not 1-meter or sub-meter accuracy. The position, well, that varies - sometimes it is pretty good, other times it is not so great. Besides all that, there are still some bugs I need to sort out that could be impacting performance and efficiency of the code. I also see some lagging in the updated data and I'm not sure if this is inherent to the module, or due to my system buffer. In any case, I'll be looking at tweaking the code for performance and accuracy.

The first few minutes of the video shows the GPS satellite acquisition. This screen disappears once a home position has been fixed. The home-fixing process requires a number of reliable readings before it is accepted as valid. Thus you see the countdown (and aborted countdowns) as indicative of this algorithm. In this test, the number of required readings was a bit low since I didn't want to spend a lot of time waiting for a good fix. After the first few minutes, I spliced in the video of normal operation (due in part to a bug that didn't let the acquisition screen show up again - fixed now).

Without much ado (25.2MB DiVx file):-

OSD Test 8

Note that the peak readings disappear once you start moving. The threshold was 0.2 km/h in the video but I've increased it. The GPS info at the lower left should normally disappear but because we were too low (below a certain ratio of the distance, it remained on. I had it set to about 0.2 times the distance as the cutoff altitude in this video but I lowered this now to 0.1. That worked out to about 20m altitude at 100m distance, now it should be about 10m.

All suggestions and comments welcome. Have to warn that code and memory space is limited though, so I can't implement everything. I still have stuff to implement including the rudder home feature.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

in my opinion virtual horitzon is not something essencial, it just emboss the screen,

that's just needed for heli's so they can know how they are moving, but in a plane...? not essencial imo.

as you said, GPS altitud is not the most acurate way, an altimeter is much more precise,

MX from rcgroups is doing a project, "rcap + alt hold + waypoint sequencer +PRISM photo maker" and some cool features like implement FMA copilot by software, and much more things,

http://www.rcgroups.com/forums/showthread.php?t=682910

speak with him, maybe he is interested in your OSD and you can work with him in order that you and mx sell an "all in one gadget"

and your osd could read ALT from zlog of wps-2 board,

maybe he can modify wps2 size to much your osd and join both to something like that:

boardsidebigoy4.jpg

i saw your last video and i must say one more time, it's the most smart and beautifull OSD i saw to date.

when numbers become flashing they don't got black border so they can't be seen when sky is cloudy, bcos usually cameras give contraste when they don0t know how to adjust qhite balance, maybe u can add a black frame too when highlighting? don't know,

good luck,

Edited by wallaguest1

Share this post


Link to post
Share on other sites

I have a pressure sensor on the way for altitude - hopefully that works. As for the flashing - I tried flashing to black but somehow the black doesn't seem as striking as white, that's how I ended up with white. I was looking for the best way to get my attention. Perhaps I'll try black again to see if it feels any different.

Yes, the artificial horizon is more for night-flying purposes. It would be nice to fly by instrument purely!

Right now I can already enter waypoints into the system but I need to get the new crystal for the BOB-4 before I proceed further. I am in the process of designing a PCB so the board can be more compact and neater. That will take me a few days to get right.

Daniel

Share this post


Link to post
Share on other sites

waypoints? mmmmm is not just an osd your project then, is an autopilot too,

for stabilize the plane fma copilot will be needed right?

Edited by wallaguest1

Share this post


Link to post
Share on other sites

Technically you will need an FMA, right now I'm hoping that a simple tacking algorithm will suffice to rudder the plane home without the use of FMA. I've no idea how well this will work though.

Daniel

Share this post


Link to post
Share on other sites

Minor update: I just got the PCB lay-out done. I'll try to etch a prototype today or tomorrow. It looks pretty much the same, but neater, less jumpering and better component spacing. I believe the dimensions are just a tad smaller and match the BOB-4 better. I'm continuing to pore over it to make sure I don't miss something important but we're getting there!

Daniel

Share this post


Link to post
Share on other sites

Hi Dan,

really impressive work so far and I also like the layout and the font of the OSD very much ! Only the white flashing characters, a bit too bright in my opinion. Good luck for the further progress ...

Like also the great idea to merge your OSD and MX's WPS2 :) !

Erwin

Edited by helitron

Share this post


Link to post
Share on other sites

Thanks - when in actual flight, a lot of the screen data gets turned off automatically when not needed leaving a fairly clean screen.

Update: Ran into a minor inconvenience - I can't find any PCB etchant locally! Turns out that it is a controlled substance. Dang, this is going to slow me down.

Daniel

Share this post


Link to post
Share on other sites

Daniel, there are a couple of different options, if you can't get ammonium persulphate, try and find some ferric chloride.

Ammonium Persulphate is a strong oxidisder and can be used to make weak explosives.

You dont have your location listed.. where you from?

Edited by Mark Harris

Share this post


Link to post
Share on other sites

Ferric Cholride is also hard to get here - actually I can't find any at all. I'm in Singapore. I'm so desperate I'm thinking of maybe getting HCl and some H2O2 to make my own etchant, assuming I can find HCl in the first place.

Daniel

Software question: Do you prefer to see a) ground distance B) absolute distance c) both d) ground distance when up closer, absolute distance when further out?

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

the problem with h202 is that youcant get it pure enough, and when it is pure enough its extremely dangerous!

There must be some place to get it, don't you have electronics stores there which sell such things?

Software: c)

Share this post


Link to post
Share on other sites

software question: A)

because absolute distance can be calculed with altitud if you need it, but there is no need to emboss image with non important data,

A) or C) is good for me any way. I think that should be configured by usser, bcos there is no perfect osd of all :P

Edited by wallaguest1

Share this post


Link to post
Share on other sites

I have sodium persulphate, works well too...

Software question: C. Ground distance will do it most of the time, but when one is planning a high altitude flight it could be cool to change to 3D distance, as the difference will be significant and that's what counts for the radio link performances.

Share this post


Link to post
Share on other sites

Okay, I've got it so that it shows both ground distance (only when closer than about 300m) as well as absolute (line of sight) distance. The reason for this is because as you go further out, the two distances start to converge so there's no need to have two numbers on the screen, it will turn the ground distance off. I picked the absolute distance as the default because the radio range is dependent primarily on the this, the line of sight distance, and not on the ground distance. My primary concern is to not fly out of radio range.

On the other front, I managed to concoct some etchant out of some common chemicals - the concentration was very low though, and took ages to etch the board. However, it is done now so I have a new board - with the same dimensions as the prototype board pictured earlier. As I mentioned before, the limitation is not so much the routing but the parts themselves taking up space. The PCB is not as congested, spacing is better, and I have a ground plane on the component side to help cut down interference. The regulator now gets bolted down to the ground plane which will double as a heatsink. Tomorrow I will sand down the edges to the correct size which will be a bit smaller than the prototype and will match the BOB-4S better. There are no components below the board now (there were a few before) and very few jumpers (2). The interconnect between the two boards is much neater now as well, with less wires too. In re-boarding the controller, I made some minor changes, switching to the use of Shottky diodes all round for better performance. The only drawback is that this new board has no provision for in-situ programming. Instead, it has connectors for the rudder and elevator channels (both in and out) and for the control channel - a total of 5 PWM ports. I've added a lot more de-coupling and made other minor design improvements (hopefully).

Meanwhile, I have a lung full of fibre-glass dust!!! I hate cutting FG - should have gotten phenolic paper boards instead. I'll do that next time. I'm also thinking of whether to invest in another BOB-4S or to rip out the one from the prototype and use it instead? I wish it wasn't so darn expensive. I also need to test the servo pass-through and scope it to measure the latency. The EEPROM code is done and I have space to record down the GPS position and info for 20-minutes at about 20 second intervals. I'm not sure if such crude resolution will have any use but it can then be dumped out and converted into GoogleMaps format I suppose. I'm still debating the usefulness of this feature.

Daniel

A thought: Actually this has been a very quick development - from scratch, to conceptualization, hardware design, tthrough 3 prototype boards so far, coding, testing to now - all in the space of about 2-weeks (not counting the 1-week that I was away and the days that I didn't do anything). Looking at the final board now, I think this thing may be marketable - the software needs some extra features but I've already added code to set internal preferences through either a PC/serial port, or a dedicated device/LCD and buttons. Once I get hold of that crystal for the BOB-4S, I should be able to test all the other fun stuff such as rudder-home etc.

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

yes a back home function when failsafe become on is a good feauture to add,

maybe you can try to do what MX is doing on his board; add FMA Copilot by software in order to remove the weight of one part of the copilot hardware,

an alt holding fuction is available too or not yet? mmyabe if you read the wps2 theard of MX you can get some ideas, or the RCAP v3 from Eladiomf, at

Rcapv3 http://www.rcgroups.com/forums/showthread.php?t=652952

and

Wps-2 from MX http://www.rcgroups.com/forums/showthread.php?t=682910

Share this post


Link to post
Share on other sites
Looking at the final board now, I think this thing may be marketable.

Definitely marketable. It looks great! Let me know if you need a Bob-4. I've got two that don't seem to be working. It would be a matter of re-routing some damaged traces/contacts. Can't promise if they would come back to life, but, you're welcome to them...

Edited by docphi

Share this post


Link to post
Share on other sites

A friend brought this thread to my attention. Congratulations, it looks very good.

A few months ago I started a project similar to yours. I also considered the BOB4 but I did not want to make HW and opted for the BlackBoxCamera platform. Development stalled the last months, for various reasons but I plan to pick it up. (http://www.rcgroups.com/forums/member.php?u=14137)

I should be able to test all the other fun stuff such as rudder-home etc.

I have a basic rudder-home mechanism in my project but it currently is a bit too simple; mainly due to GPS latency I sometimes get nasty oscillations. I now use a linear relation of required correction and rudder-deflection, clipped at -45 and +45 degrees. . I have all sorts of algorithms is mind to improve it. What algorithm do you use or plan using?

Thanks

Frederic

Edited by FredericG

Share this post


Link to post
Share on other sites

First, some updates: The servo passthrough code is working but I've not had time to measure the latency. I'll do that tomorrow. My guess is that this should not be a problem. Also, I've got the 74MHz crystals and they do solve the problem. However, there is a side effect in that the screen is stretched horizontally just a hair (about 1.3% longer) but this is easily dealt with, plus vertical lines look better now. I must warn that removing the crystal isn't a job for the faint-hearted (and with bad eyesight like me)! This means I can now push on to testing in flight!! Yayyy!

Hi FredericG,

You sir, were one of the reasons I got inspired to roll my own OSD. I saw what you were doing and thought it looked nice. That got me pointed to the BOB-4 and now I am here. See how we all help each other in ways we never imagined! :)

My thinking about the rudder home will be a heavily damped response to the heading. Generally, what I am expecting is a very slow turn, which will reduce more as the angular error to home gets smaller. I expect the plane to overshoot a bit but the correction will be very gentle. The resulting effect that I am predicting is something like an slow S-shaped path towards home. This is akin to what is known as "tacking" - a kind of zig-zag path. There will be lots of averaging done to damp (basically low pass filtering) the data to prevent fast oscillations.

I should say that I don't intend to use other assists such as the FMA devices. I will track the rate of turn to see how effective the system is responding. So, if wind is causing a lower than expected (or even negative) rate of turn, it can either apply stronger rudder or other strategies (maybe turn the other way) to get on the home path. My controller has control of both rudder and elevator so it will try to maintain altitude as it comes home. Since I don't have attitude information, I have to extrapolate whatever I can out of the rate of turn (and altitude) data.

How well is your rudder home algorithm working? Have you tried it without the FMA in operation? Does it work well? I'm open to suggestions but I'll have more concrete ideas myself once I get the thing tested a bit more. I also have a pressure sensor sitting here that I might want to add in but I'll see how well the GPS altitude performs first.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites
You sir, was one of the reasons I got inspired to roll my own OSD. I saw what you were doing and thought it looked nice. That got me pointed to the BOB-4 and now I am here. See how we all help each other in ways we never imagined!
Ah, good...

How well is your rudder home algorithm working? Have you tried it without the FMA in operation? Does it work well? I'm open to suggestions but I'll have more concrete ideas myself once I get the thing tested a bit more.
Without co-pilot it does not work; I don't think it is possible with only GPS as feedback. The simple approach I use now, works very well, most of the times, but not always. The root cause is the lag in the GPS data. This can of course be solved my taking a slow turn. The problem is that the wind can prevent the plane to turn, so you need rather important rudder deviation. But the problem is than that the plane turns too fast in the case the wind is assisting the turn. Sometimes this results in oscillations that can no longer be called zigzagging to the target.

Frederic

Share this post


Link to post
Share on other sites

you can add some memory reserved to save gps data so we can draw in google earth the router automatically,

i still think your project should be fussioned with wps-2, wich is the most complet autopilot, with alt hold, gain to servos and much more things,

Share this post


Link to post
Share on other sites

I have enough memory to record 1 position (with heading and speed and time) once every 20 seconds for 20 minutes (roughly), or every 10 seconds for 10 minutes.

As for fusing - I'm trying to keep this controller as simple and stand-alone as possible at the moment. Let me give it a shot first, at pulling off the navigation without extarnal aids (and more money spent). I have some ideas I'd like to try for navigating the plane. Incorporating FMA Co-pilot would be trivial though, if I should need it later.

Daniel

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...