Jump to content
Daniel Wee

My little NAV/OSD project - under construction

Recommended Posts

Yes, this is a bit of a concern for me because we are relying on the GPS data to find its own way home. I did think about going with the EM406A instead but I wasn't sure it would meet my requirements. I guess we'll just have to live with this defect for the moment, which is a real pity because the EB85A is otherwise a very nice GPS module.

In today's tests, the problem has not surfaced yet, I have one more test to see if the problem recurs. I certainly wasn't looping, mainly just climbing out. If I find anything interesting, I'll post it here.

Daniel

Share this post


Link to post
Share on other sites

Some updates on another front - I was experiencing quite a bit of interference in my video so I decided to bite the bullet and track down the problem. After quite a bit of work, I narrowed the problem down to 2 issues, namely vibrations and audio-over-modulation. The audio is easy to fix - I just put a small variable resistor inline with the wire and that solved the problem. The vibration issue was a bit trickier as I wasn't sure exactly which part was being affected. When I tap the TX casing, there would be lines. As it turned out (I think), it was the metal shielding cover, the one that comes off, that was being affected by the vibrations. This may have been made worse by the fact that the TX was mounted just behind the cowling where the motor was. I put a bit of solder and pressed it down hard and that seemed to solve the problem. I also had to try various channels to see which one was clearest - not all channels work equally well.

So, today at dawn, I took the bird up for a test flight. I also had my other camera (1/4 CCD) on - lower definition but better color. Unfortunately, due to some incompatibility with my DV recorder the colors are not as nice as they appear in the goggles. There's a lot more saturation and reds in the goggles, which look very very nice. The colors are, however, better than the 1/3 CCD camera. It was early and the sun was barely up so things are a little dark. Please also ignore some of the spurious characters just at the edges - I need to get some timing issues sorted out. Those characters are affecting the sync a little bit but normally they're not there and the picture would otherwise have been perfect. Also in this video - my personal record - 312m and about 0.7km line of sight (664m ground), FPV.

Dawn Test Flight (38.5MB DiVx)

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Thomas, I have a question concerning your observations about the EB-85A GPS module giving out erratic data at times - did this occur for you when you have the module updating once every position fix? (5Hz mode), or did it occur for you as well at lower rates? I recall that initially you were running at something like 3Hz which is, I suppose, one update every 2 position fixes.

The reason I ask is because I am wondering if the lag is because the GPS module can't keep up with outputting so much data when there are large position changes. Can you confirm this for me? It may just be that if we lower the update rates to something less than one output per position fix, to say one per two fixes, the problem may go away. What do you think?

Daniel

Share this post


Link to post
Share on other sites

More ancillary discoveries, and this may apply to those using higher resolution SONY chipset based cameras. Anyways, I have been switching between two of my cameras - roughly the equivalent of a KX-131 and maybe the KX-151. I've noticed a number of things here. Let's refer to these as camera A and B respectively, where A is a 1/4-inch CCD and B is a 1/3-inch CCD camera. B has higher resolution and what appears to be better colour saturation, whereas A is a little smaller, lighter, and has lower resolution. Colour is still good. Both are specified as 12V cameras but I've been running them off 2S Li-Po's. Both come with built in microphones so it is very convenient.

1. Camera A will continue to work to almost 5V, whereas Camera B craps out around 7V. Both get rather warm in operation (these are metal cased cameras).

2. Camera B, being 1/3-inch CCD, has a wider FOV for any given lense. It picks up more detail.

3. Both seem to handle contrast changes roughly equally well.

4. As the voltage drops, the colour saturation of the cameras get poorer and poorer. This is one of the reason why my videos had been lacking in colour saturation. I'll have to look into stepping up the 2S to 12V to get better colour out of those cameras.

So for those of you who are interested in getting better colour out of your KX-151, you may want to try a higher voltage, or at least something closer to 12V.

Daniel

Share this post


Link to post
Share on other sites

Well, I don't think many of us use 12V cams on 2s...

Just use 3S, and it will be fine.

Share this post


Link to post
Share on other sites
Just wanted to add a few comments about the autopilot progress. I had initially intended a rudder-home feature but today's testing revealed that using the rudder to turn the plane resulted in large loss of altitude, as compared to using the ailerons. Because of this, I will be changing the direction of the code to use the ailerons instead of the rudder.
Combined with FMA, I have huge altitude losses because the co-pilot is counter-acting so that the plane executes a flat-turn. But this is only the case for a very limited amount of time; when flying toward the target, the corrections are small.

I would think that without co-pilot, steering with the ailerons is even more difficult, no?

Frederic

Share this post


Link to post
Share on other sites

Why do you think that it might be more difficult? Technically speaking you can execute smoother turns with the ailerons, I think. Is there some specific benefit of steering with the rudder?

Daniel

Share this post


Link to post
Share on other sites

I might be completely wrong but I have the feeling that with the aileron the plane could more easily roll-over. Again, it is just a feeling, I have never tested how a plane reacts to a fixed/sustained amount of rudder or aileron.

It would be fun if we could have a flight-simulator that generates GPS-coordinates and that or system can control … Now that I think of this, I believe someone once mentioned that there are simulators (for real aircraft I think) that generate GPS. All we would need is a servo-output to joystick interface.

I thought a KX131 is 5V, am I wrong here too? :huh:

Frederic

Share this post


Link to post
Share on other sites
I thought a KX131 is 5V, am I wrong here too? :huh:

Nono, it IS 5V. He said his cam resembles it, but it isn't one.

Edited by Kilrah

Share this post


Link to post
Share on other sites

Kilrah is correct - this is NOT the KX-131 but similar except for the voltage. The KX-151, on the other hand, is even more similar in that it is specced at 12V +-10% which is pretty much the same as my B camera. Consequently, it is possible that the colour saturation is similarly affected by supply voltage as it does on mine. My operating voltage range on 2S goes from about 8.4V down to 6V. Camera B won't work below about 7V, while Camera A keeps going. Both seem to have poor colour saturation at those low voltages but when powered from 12V or 3S, the colour is MUCH better.

Daniel

Share this post


Link to post
Share on other sites

BTW, even if I don't use stuff outside of the specs I did try to power the KX151 with lower voltages on the bench too after receiving it, it did cut at about 7V too, but the image was perfect until then, no change in saturation.

Share this post


Link to post
Share on other sites

yes KX151 works much better at 10V than at 12V

actually 12V will run it out of spech due to hi temperature

the internal powersupply have much less loss at 10V

Share this post


Link to post
Share on other sites

On another related front - my basic OSD is pretty stable now with all the known bugs resolved and the autopilot code is shaping up real well. I've not actually tested it in control of the plane bu the numbers are correct. A lot of the rest will have to come from actual tweaking.

Now, while I was thinking about the TX/RX link and going through the DigiKey catalog - I noticed that the antennas that are commonly used with our modules - and advertised as 3dBi, is actually 2dBi in the catalog - same length. The 3.2dBi ones are longer and I have one of those as well. I have noticed slightly better performance with the longer antenna but the nulls are deeper. Anyway, I thought I'd just mention this little point of advertising discrepancy - we're mostly using 2dBi antennas, not 3dBi ones. On the plane, I still prefer the 2dBi antenna since it is more omnidirectional and lighter.

Daniel

Share this post


Link to post
Share on other sites

If you talk about length of the entire antenna (i.e package), that doesn't mean a thing.

The commonly advertised 5dBi omni is like twice the length of the usual 3dBi whips you mention, but if you dismantle them you see the element is the same size in both (different shape of course though), the rest is just "cosmetic" plastic.

Share this post


Link to post
Share on other sites

I know what you mean Kilrah - of course we can't judge from the looks alone. However, the similarity in the design - the drawing looks exactly like what is commonly used, leads me to suspect that perhaps what we're using is in fact the 2dBi ones. Of course I could be wrong but it would be a great coincidence in every aspect of the design. There is certainly nothing to stop someone from using the exact same exterior and have an improved radiator inside of it but to be honest, we can't know either way without some test equipment to compare, or ripping the thing apart. So I'm saying that there is a likelihood that what we've been using turns out to be 2dBi antennas.

Daniel

Share this post


Link to post
Share on other sites

Well, the theory is to maintain a known rate of turn. For example, if the plane is flying level with no wind, the rate of turn (ROT) should be zero or close to it. If it gets hit by wind from the side, the rate of turn will now increase and the plane will counteract that rate of turn. That's the idea anyway - no idea how well it will work in practice. But it does mean that the plane will be in a constant state of adjustment. I've attached a video where you can see the computed data where:-

ROT = rate of turn (calculated at the turn of every second)

DROT = desired rate of turn (calculated from difference from home heading with limit)

ELE/RDR = actual offset to be added to the servo PPM pulse from center position

In this video, the gain was a little high on the rate of turn so I've moderated that a bit but roughly speaking, that's what it is supposed to do.

Video here (61.4MB DiVx)

FPV Flight 4

On another front - I broke 410m (+10m for ground adjustment = 420m/1378ft) today! Wow, it's quite a view from up there, which leaves me wondering - just how high do you guys normally fly anyway? I see some videos but they do not indicate if the height is in meters (metres) or in feet. A few look like they've got to be nearly a km up or so.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites
Well, the theory is to maintain a known rate of turn. For example, if the plane is flying level with no wind, the rate of turn (ROT) should be zero or close to it. If it gets hit by wind from the side, the rate of turn will now increase and the plane will counteract that rate of turn.

Sure, but without an active device like the copilot your plane won't ever stay flat and fly straight for more than a few seconds without corrective control input, even stable things like an easyglider.

Height - Went up to 2750m once for fun, but frankly above 1000m there's not much interest. You won't have a much more open view anyway, and even then the cam's resulition gets way too low so that you don't see any detail anymore.

I haven't been flying high for a long time, but brought the easyglider to 800m 2 days ago while doing some in-flight range tests with OSD. There were ~40km/h winds so it was easier to climb than to fly far horizontally, and safer too. I've rarely been flying with alt display so far, but I'd say I rarely exceed 400-500m usually. Most under 300m.

As a side note, it was pretty cool flying by instruments, and switching between forward/backwards flight relative to ground :P

Pull lightly, watch speed go down and up again but with heading indicator reversed and homing arrow pointing the wrong way :lol:

I then found myself a challenge, hold 0km/h for as long as possible. Managed to stay "hung" at the same position and altitude for 56 seconds :P

Regarding the copilot thing - managing this required continuous action on all 3 axes. And it was pretty stable up there.

Oh, seems your link is dead too.

Edited by Kilrah

Share this post


Link to post
Share on other sites

Link corrected - slight typo in the URL.

Regarding the stability, that is not all that important to me at this point of time although in the long term stability would be good to have - especially when I implement multiple waypoints. For the moment, the aim is to get the plane back into range and so the expected flight path with this algorithm is going to be "S" shaped as it tacks back and forth the desired heading. There is some code to filter out the high-frequency jitters but I think it will still be pretty jumpy but should hopefully be sufficient to bring the plane back to me (in theory).

Yes, I did feel quite good at 400m or so today - the wind seemed worse at 250m than at 400m for some reason. In any case, my goal is to get up to 1km or so but this little plane does not have enough power to climb out that high so I think 400-500 is about as much as I can manage with this little guy and still have enough power to come back.

I've not been paying a lot of attention to ground speed while flying - mainly I've been looking at the altitude and the home indicators, as well as the range indicators, just so I don't fly out too far. I'm still putting some final touches and thinking of moving everything to a bigger plane - something like the Magister - but worried that it doesn't have good flight time.

Daniel

Share this post


Link to post
Share on other sites
the wind seemed worse at 250m than at 400m for some reason.

It's often so, as high up the air is less disturbed by terrain and obstacles. The other day the wind was strong, but the ride up at 350m was very smooth. I've experienced the same in full scale flying, one of my smoothest rides was in 60km/h regular wind. Landing was much more bumpy as there are trees all around the airfield though.

Regarding time to come back, I really like the easyglider for that. I counted 12mins flight time from 450m back to ground without any power use, not flying particularly economically and having to fight the wind.

Edited by Kilrah

Share this post


Link to post
Share on other sites

After much dilly-dallying, I finally moved testing over to the new controller board (PCB). Unsoldered the BOB-4S connections and interfaced it to the new board and did some testing. After some initial hiccups, everything was working beautifully and the new board is less noisy than the old one, especially with the ground plane on one side.

So, with the new board, I was now able to put the plane under actual auto-pilot control so today I brought the plane up with ailerons (testing elevators later) interfaced to the controller. When in air, I activated the autopilot and for a short while it worked but started to oscillate badly. This was due to my step gain being way too high. I did have gain control on one of my levers but that was not sufficient to mitigate the gain issue. So now I have modified the gain loop to much lower gain and hopefully tomorrow I'll be able to test it out to see just how it performs. In general it is behaving as expected and looks like it might work. If it works well, I'll be putting in waypoint options, otherwise it will be mainly a "fly home" contingency.

So, we're moving again and things are shaping up. We'll soon know if we can navigate the plane reasonably without the use of a stabilizing controller such as the FMA. If this works, it will be great because it will save on cost and complexity of the project. I have a Magister and Cularis waiting to go up with my OSD/Navigator.

Share this post


Link to post
Share on other sites

Success!!!

Yesterday's autopilot test resulted in huge oscillations so I kicked the gain way down. This morning's first test resulted in too weak a control, the plane wasn't even moving much in response to the computer input. Finally, today, I upped the gain a little bit more and brought it out to test. It was cloudy and looked like there was a chance of precipitation but I was too excited to worry about rain at that point so I headed out to the field yet once again after re-flashing the latest navigation code - I also made some other algorithmic changes in the code.

The test, as before, involves only the ailerons under computer control. I have the thing setup so that I can add my input to the computer's input at any point, just in case it fails. This allows me to make minor adjustments while observing the computer-navigation behaviour and how it responds to various situations without having to dis-engage the autopilot completely.

Anyway, so I sent the plane up and brought it to about 350m away from me (ground distance) and turned the plane over to the auto-pilot. At first I wasn't sure if this was going to work or fail badly but to my amazement, the plane very gradually began to turn home and locked on to the home heading! Woo hoo!!! It works! I did this several times, bringing the plane away and letting the auto-pilot take over and each time, it brought the Cessna back over my head (which resulted in loss of video of course). There was some wind but it wasn't strong at all. I've not tested this under windy conditions but this bodes very well for the overall strategy. My small plane does get kicked around in the wind quite a bit though but I believe the software will systematically bring the plane back as long as it is not flipped over or in some such drastic attitude.

So, here's the proof of it - a video - 3 clips in this video showing the auto-pilot in action. I was in the low clouds so it's a bit blurry but it is good enough to see what's happening. In the third clip, you can see the "S" motion of the plane weaving around the home heading as was discussed some posts before this. Practice matches theory!

Autopilot in action (55.6MB DiVx)

Next I will be testing the altitude hold, and then waypoints after that. This is getting more and more exciting. Gosh! And I just found out how much Pico-Pilot costs too!

Daniel

Edited by Daniel Wee

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