Jump to content
Daniel Wee

My little NAV/OSD project - under construction

Recommended Posts

Wow, that's a great ending to what could have been disaster. It's good to keep getting reminded how easy it is for things to go wrong. Commercial jets have triple redundancy, but all it takes for an RC plane is a simple prop fail...

Edited by rimb05

Share this post


Link to post
Share on other sites

NTSC!! I've haven't been so excitied for an inferior standard since... I don't know, VHS?

It works great now. Time to get this puppy integrated into my plane and fly it!

I noticed one small bug, but certainly not a show stopper. If you make changes to the configuration, and the cursor is on the "Save Config" line when you exit the config screen, you can't make any more changes to the configuration if you decide to go there later. It stays stuck on the "Save Config" option. In other words:

1. Go to the configuration screen

2. Make some changes

3. Go to Save Changes, and select Done

4. Exit the configuration screen

5. Go back to the configuration screen.

6. You can't move the cursor off the Save Config line

No big deal, I just have to remember to make all my changes after I land.

I just got my ACS755-050 in today. Does this just connect directly to pin3 of the Pic? I believe you're still fine tuning this section of the code, but I should get some ballpark values?

What's the best way to test fly the autopilot? Should I leave the settings where they are, then play with the ROT and ROC settings?

Daniel, I've got to hand it to you, you've got one incredible OSD here. The FPV community will be thanking you for years to come.

Share this post


Link to post
Share on other sites

OK, one more small thing I've noticed, now that the GPS acquired. The bottom distance line is cut off (I can only read half the line). I'm talking about the distance to home. If this were lined up vertically with the compass, it would be seen just fine, because the compass is at the absolute bottom of my screen.

Here's a screenshot:

post-6-1187795384_thumb.jpg

Edited by rimb05

Share this post


Link to post
Share on other sites

Hi rimb05,

Two things - can you confirm that you cannot change your menu selection? Try moving the elevator up and down? I've looked at the code and can't see any obvious problem with it - besides I've been using it for quite a bit without problems. I'll do more testing when I get some time tomorrow.

I can move the display higher a bit - just tried 40 pixels higher but it's easy to move it up. I'm also wondering why in your peak values display, there is no altitude. Hmm...

Lastly, the ACS755 - you need some circuitry - not a direct connection. I'll post the diagram soon.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Daniel,

I think it has to do with the position of the OSD control input. To get the configuration screen up, I'm having to set the control "servo" from around 41% to 78%. What's the correct value that the OSD looks for to switch to the config screen? I think I may not have been exactly at this value when I went back to the config screen. The config items were on the screen, but it wouldn't let me move the cursor, until I readjusted my control slider to the sweet spot. I've also discovered that to switch to the autopilot mode, the control input needs to be at -100%. Is this correct?

As far as the peak values, the peak values also keep switching on and off. I assumed this was normal. Should it be doing this?

Edited by rimb05

Share this post


Link to post
Share on other sites

rimb05,

okay, try this one - this fixes the display (I hope).

NAVOSD software version 3.6

Can you test the menu problem a bit more. I can't see a problem in the code yet.

Edit: A bit more info:-

1. Yes, the Peak values turn on or off depending on the ground speed. So when the lock is poor and the position is drifting, it comes on and off. When out in the field, the display only comes on when the plane has stopped, usually.

2. The positioning is as follows (using Futaba terminology):-

100% blank overlay (nothing displayed over the picture)

90% or thereabouts - configuration menu

0% - normal display

-100% autopilot

More will be added though, including display of flight logs and other diagnostics but this is what we have at the moment. I usually assign this to a 3-way switch on my JR - such as the flap switch if you're not using flaps.

There are also other display features that are automatically turned off that you've not seen, but which you will see when you plug in the current sensor, for example. This thing is actually loaded with features, and I'm still added stuff.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

docphi, maybe you can try these steps:-

1. See if your TX/RX is reversed on the GPS cable.

2. Check that the 5V is correctly going to the module (first two wires)

3. If you have a scope, put it on the fifth wire - should see a strong square wave

4. If you scope the RX (pin 12 I think) on the dsPIC, you should see a square wave

That's the minimum you will need to get the thing working. "Waiting for GPS" means that the the dsPIC is not seeing any kind of data on the RX pin.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

The new version is perfect in terms of the NTSC positioning. Everything is viewable now. Looks great.

I think the issue I had with the cursor not responing in the config mode has to do with the control input position. I had this assigned to a pot on my transmitter, so I could see what the different values did, and sometimes when I went back to the config screen, I couldn't move the cursor. It's not consistant. Then again, it's not a real problem, because as soon as I go back again, it works. It seems to have something to do with what value the control input has...

I'm going to try to fly it tomorrow! Any hints on how to adjust the autopilot settings?

Share this post


Link to post
Share on other sites

Good to hear that. As for the autopilot, okay, here're a few pointers.

1. Try to have the control assigned to a switch so you can consistently turn stuff on and off, especially the autopilot.

2. Make sure that the ELESERVODIR and RDRSERVODIR are set so that the navigation in the menus are correct.

3. I don't know what your plane aileron throws are so I think I'll just generalize here. There are two main controls that will be of interest to you and these are the ROTSTEPGAIN and the ROCSTEPGAIN.

4. To start with, set ROCSTEPGAIN to 0 so we won't have to worry about altitude control for the moment.

5. Remember that even when autopilot has engaged, you can still control the plane with the stick inputs - they get mixed so if things go awry, just take over first. Then switch autopilot off.

6. You want to aim for a very gentle turning so give the controller time to respond.

7. It is best to test in wind-less or low-wind conditions so you can see what's happening.

8. The higher the ROTSTEPGAIN (rate of turn, pertaining to heading change and aileron control), the harder the controller will turn the plane. Too much is bad because your plane may roll. Try to get it as low as you can get away with. Too low and the plane will seem like it's not responding at all. It is better, however to start low and go up slowly. I've not gone higher than 10 or lower than 4. But your plane will be different so try 5 for a start and go up if that's not enough.

9. Before making these adjustments, make sure your plane is as well trimmed out as possible. That will improve performance.

10. It is best if you have a PCM receiver for which you can programme failsafe positions. This allows you to engage the autopilot automatically when the receiver goes into failsafe. Also for failsafe, have the throttle set so the plane can cruise and climb a bit if it wants to. For me, this is just below mid-stick. Also have the aileron and elevator in neutral (trimmed) position for the failsafe.

11. I usually do my tests at over 150m. Gives me more time to respond.

12. Looking through the video - make sure that the GPS has a good lock and that the heading reading on the compass is steady. Some EB-85A's can produce lagged readings if you've been diving or climbing hard. Fly smoothly, nothing erratic - this will allow the GPS readings to be stable and reliable. That's a good time to engage autopilot. Watch for sudden movements.

13. Oh, and try to keep the plane a few hundred meters away from you when testing because it gets over your head, it will start turning round and round. I suggest start the autopilot around 500m out and watch to see if it comes back.

14. This all assumes that your link is reliable to start with. Be sure to do a range check and get your wiring neat and clean. Use clip on chokes if you must.

15. Keep the receiver clear of the controller board if possible. This is especially if you don't have a ground plane.

Good luck! Let us know how it goes. And post some photos!!

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Daniel,

Thanks for the tips. I'll try as you suggested. One question, on the bench, I had servos connected to both aileron and elevator outputs on the OSD. When the autopilot is engaged, I tried manual stick input to override the autopilot, and it seemed as if there were only a few steps. For example, the servo would only step between 9 o'clock, 12 o'clock and 3 o'clock positions (it quickly jumps between these positions, but not in between). Is this normal?

I have both a twinstar and an easystar set up for FPV. I'll be putting this into the easystar tomorrow. The receiver is PCM, and my failsafes are set up correctly already.

Speaking of the EB-85s, I heard this as well in other threads. Do you know if this was a firmware issue, and later units were fixed, or is this just a random problem. I thought I read it had to do with a buffer overflow.

Share this post


Link to post
Share on other sites

Yes, that's normal - I should fix that but in flight you can't really feel it. I'll see about doing something so that it's smoother.

E-tek has apparently done some firmware fix for this EB-85A problem but the new units have yet to hit the markets. Should be doing so real soon. This however means that there is tacit acknowledgment of the bug (which is bad news actually) and they seem to have solved it (which is the good news part). I should be getting one of the "fixed" modules soon to test so I'll know if it's in fact fixed.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Just to make a note - please remember to change the default VALIDHDOP to 1.3 instead of 3.3 and the MINVALID to 75 instead of 15. More accurate that way. I lowered it for testing and forgot to restore it.

Today I went flying again, after changing my motor mount configuration and flew two packs. First pack I flew for 20 minutes and still had about 300mAh left. (OSD indicated 1779mAh used, charger put 1770mAh back). The second pack was shorter because I had to go pick my daughter up from school (OSD indicated 1174mAh used, charger put 1050mAh back - different charger from the first pack). I think the mAh meter is close enough to the ball park for me. In any case, I tested the autopilot in moderately windy conditions and it worked well. The last version of software is pretty stable - only one problem that I know of with a possible video glitch in the menu screen.

As for my video link, I've been flying with the LNA and it appears to be working well. However, there's something about this video link that's bugging me. Occassionally the bright areas become fuzzy. I don't know if this means that the output frequency is not accurate enough or that the level's calibration is off. In any case, it's spoiling an otherwise perfect setup. I'll have to look into it at some point.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

OK, sounds good. I'll check with E-tek. Any chance on getting a quick schematic drawn up for the current sensor? Would be great to test that as well.

Share this post


Link to post
Share on other sites

The current sensor schematic is as follows:-

CurrentSensor.jpg

The connections on the board as per the board photo, from top to bottom:-

1. +5V (Can be traced to the +5V on the regulator)

2. Sense/Vout

3. Gnd

4. VExt (Traced to 22k resistor)

Note that the current configuration allows for a maximum of 15V or so input so if you're using 4S Li-Pos, some mods should be made. Also, the resistor measures around 22.3k in actuality. This could affect accuracy but we can work at that later.

Some photos of the sensor as I've done mine up. You can always do it differently.

DSC_6443.jpg

DSC_6444.jpg

The AMPSZERO setting in the config screen is used to adjust for 0.0A reading when there is no current. You can achieve this by plugging only the battery side to the sensor but not the ESC side. 44 works for me but yours may be slightly higher or lower. There is a bit of jitter so it may jump to 0.1A sometimes but that's okay. If you have AMPSZERO too high, the zero will be very solid but you won't get any readings for low current draws. The way to calibrate this is to adjust until the reading is barely zero. Then as you power up the motor even slowly, there should be a current reading. I think it will be within 1 or 2 from 44 but a lot depends on the component variations. This will also affect the accuracy of the mAh meter since it relies on the current sensor. Note that the ESC beeps have a way of giving false high amperage readings so it's probably best to ignore the readings during those beeps.

The moment the controller senses a voltage on the sensor, you'll see more stuff show up on the screen (bottom left in this case). Also, Peak Values will now show the MAX Current drawn during the flight. Neat eh :)

I've not really calibrated the Amps reading so if you have a Watt-meter and you can test it, please let me know, at the highest amps possible, what your meter reads and what the OSD says. I can then just make the error adjustment accordingly.

Hope this works for you.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

You can't really see much because of the shrink tubing. It's just the sensor taking up most of the board and the few components. I actually cut my tabs down in order to solder the deans to it, so they're quite short, just the width of the deans tabs. Is there anything in particular that you're wondering about?

Oh, and I actually CA'ed the matrix board to the sensor itself before soldering the connections. Just to make it sturdier.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Daniel,

The IFOSD used to have the same sort of current sensor board, problem is - it's very weak - the plugs can break off and the board under the current sensor can move and bust the pins.... We ended up switching to the board design you see now.

Share this post


Link to post
Share on other sites

Well, no flying yesterday, it was much too windy. We actually had 75MPH winds with a storm that came through. Lots of damage and power outage in Chicago...

I'm crossing my fingers for today...

Share this post


Link to post
Share on other sites

Can't wait to hear your test report rimb05. Awaiting it with bated breath.

Actually the current sensor plug is really tough. I couldn't break it off if I tried. The deans tabs are soldered direct to the ACS sensor tabs and the solder connection is pretty strong. The board doesn't hold any tension, it only holds the signal conditioning parts and the connection to the ACS outputs. The only place I might be worried would be the output cabling which may be flexed quite a bit. For that I used better multistrand cables, but this is a problem that would affect any connection.

Daniel

Edited by Daniel Wee

Share this post


Link to post
Share on other sites

Actually that device is not really suitable for a number of reasons:-

1. Lacks isolation - this is a shunt sensor whereas the Allegro parts we're using are Hall sensors which provide much better electrical isolation.

2. Because it's a shunt sensor, you need an accurate shunt to begin with, and it's hard to make accurate shunts for such high currents as we're measuring, especially if you're home-brewing these circuits. Your results will vary widely.

3. The component count will be considerably higher compared to the Allegro sensor with this chip because you need to configure the I2C address, operation modes and so on. Plus it has more pins to take care of.

4. The voltage sensor is redundant because most controllers incorporate multiple 10-bit ADCs which are easier to work with since they're integral to the controller.

Daniel

Share this post


Link to post
Share on other sites

Another minor code update - I fixed the control jerkiness in autopilot mode. Now it's as smooth as if it were normal flying. Hopefully this doesn't produce any other unwanted interactions. I've not really tested it fully but there should not be any problems as far as I can tell.

NAVOSD software version 3.7

Daniel

Share this post


Link to post
Share on other sites

Daniel,

Still bad weather here, so I hope to try again tomorrow :( In the mean time, I've been trying to get the current sensor to work, no luck. I don't see any amp reading on the screen. What kind of voltage swing should I be seeing on the AN1 pin?

Also, there's definitely some sort of bug in the control page. When I turn the rotary knob on my transmitter to switch to the config page on the OSD, if I don't have the value on the knob set just right, I can't move the cursor. Even though the config screen is being displayed, moving the aileron stick does not move the cursor. However, moving the elevator does change a value, but not the value that's under the cursor (it changes the next value). Very strange. If I move the rotary knob (control input) a bit higher, then the config screen works fine. The trouble is, I don't know exactly what value it's looking for to get into the config screen. Also, the OSD won't enter blank mode (no text mode) if I move the rotary knob _from_ the config screen to the blank screen mode. If I go from the normal screen to the blank screen mode, it blanks the text correctly. Just thought I'd share this...

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