/dist/images/branding/favicon

Assigning parameters to a poti

Discussion in 'Cinestar Misc' started by Dave King, May 9, 2013.

  1. Gary Haynes

    Gary Haynes Administrator
    Staff Member

    Joined:
    Jul 6, 2012
    Messages:
    5,211
    Likes Received:
    460
    Andy that's the way I think it works based on Thiago's videos from last year. Seem to remember him being able to see the adjustments. But you need the Xbee Wireless to do this effectively.
     
  2. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Thanks, Gary. I never did manage to program the Smart OSD to use the Xbee UART and make contact with MK Tool....

    Andy.
     
  3. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,712
    Likes Received:
    311
    Sorry Steve! I thought I read you were the one trying to adjust Gyro's for vibration it must have been someone else.
     
  4. Dave King

    Dave King Well-Known Member

    Joined:
    Dec 24, 2012
    Messages:
    2,712
    Likes Received:
    311
    Really? It's rather easy but I found it to act a little slower and delayed when connected to the OSD board so when I need to connect to the Xbee I disconnect the connector to the OSD board and run the X bee directly to the Nav board.
     
  5. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Interesting, Dave. When I try and change the parameter in the Smart OSD software to use UART: Xbee Direct, I click Test, Apply -- and that, according to the documentation should write the setting out to the SOSD board. However, if I then do a Get, the Transparent UART port reverts back to USB.

    What are you doing to make the change to Xbee/Direct permanent?

    Andy
     
  6. Gary Haynes

    Gary Haynes Administrator
    Staff Member

    Joined:
    Jul 6, 2012
    Messages:
    5,211
    Likes Received:
    460
    Don't do the get. Do the write and then see if you can connect MKTool. I'm not sure what version I am on but making any kind of changes to the settings on the OSD using the Xbee were fraught with errors and frustration.
     
  7. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    OK. So there's no way of actually checking by reading the parameters back from the SOSD board.
    I'll just do the change, Test, then Apply, then connect up the Xbee and see if I can establish contact.

    I suspect the Xbee introduces propagation and timing delays (hence the problem with MK firmware updates) and that's why it doesn't work well with the SOSD changes either.

    Andy.
     
  8. Gary Haynes

    Gary Haynes Administrator
    Staff Member

    Joined:
    Jul 6, 2012
    Messages:
    5,211
    Likes Received:
    460
    Andy the setting on the OSD side that works for Xbee for me is set it to XBee and Direct on the Global Parameters Tab.

    Steve I was able to control a Poti via the Radio. Example for GPS Gain on the Navi Screen I change the gain to Poti 7 (this one used to be used to control a camera from the FC board). Then on the channels screen look at Poti 7, default is channel 11, at least on mine. Since I have the MC-32 my first open channel was 14 so I entered 14 for the channel. After each of those two steps I did the Write command.

    To test I watched the Channels screen. Moving my slider (same as a rotary) I could see the value change as expected on the right side bars. Also across the bottom of the MKTools screens you should see the 8 Potis listed, small green squares, with an = sign and a value. That appears to be the value that is being sent to the assigned parameter.

    Now my warning. I can see the value of the Poti changing with my slider. What I don't know is whether the 85 I see assigned next to the Poti value is really transmitting and changing to 85% on the GPS gain value. So use this at your own peril. :eek:
     
  9. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Thanks. I'll see if that works any better.

    And that's how I remembered it -- so you're left with the disquieting feeling of, "OK, now I've got it set where I want it, what number do I type in to replace the POTI number for the same effect? And I think that's the crux of Steve's (and my) question.

    Andy.
     
  10. Gary Haynes

    Gary Haynes Administrator
    Staff Member

    Joined:
    Jul 6, 2012
    Messages:
    5,211
    Likes Received:
    460
    Just a guess, and you would need to try it on several values, but if you had a value for a parameter that was 0-50, then I would look at the Poti= value and see if that is the range you see. With the GPS Gain that I tested the 85 value was just below a center point which would have been about a -15 on the standard servo scale of -127 to +127. Clearly some further testing/evaluation needs to be done.
     
  11. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    It's not an unreasonable assumption. It assumes a straight line mapping of the POTI value to the "legal range of values" -- and it would be a bit perverse for that not to happen. I'm a bit under the gun on other projects for the next couple of weeks, but I'll make a note to download the 2.00 source code and see if I can figure out the mapping function between POTI range to legal value range.

    Andy.
     
  12. Steve Maller

    Steve Maller UAV Grief Counselor

    Joined:
    Oct 30, 2012
    Messages:
    3,981
    Likes Received:
    807
    It's good when you stump the smartest guys in the room. Makes me feel like a little less of an simpleton. :)
     
  13. Gary Haynes

    Gary Haynes Administrator
    Staff Member

    Joined:
    Jul 6, 2012
    Messages:
    5,211
    Likes Received:
    460
    And here's the answer with help from Thiago Krause in Brazil.

    My friend about the POTI question ….

    You have to set the gain to a POTI (easy)

    Then this POTI should be a knob on the radio …. (no difficult here)

    Now the tricky part is knowing the value …..

    Well , in the MKTools you have to choose FlightController or Navi Controller (mouse click)

    Wait for the infos to appear in the middle screen …. ( the green one that looks like a Cell phone from the 90's)

    IMG_1041.JPG

    Then using the arrows , (right arrow to be specific) (For GPS Gain, click the Navi Ctrl button and then right arrow to screen 4. The value is shown next to the G)

    Go and look for the parameter you are changing … like GPS GAIN ….. then rotate the KNOB , you will see the vale changing

    Easy !

    Just a tip … be careful , when using a Knob … each click ….. means like 7 points ……. its not 1 Click … 1 point !

    So be careful !

    In my example above following Thiago's advice I dialed the gain up and down. GPS Gain appears to have a value of 0-250 which happens to closely coincide with the values for a servo -127 - +127. So if I centered the slider the value shown was 126. With the slider adjusted so that I saw a 70 value the Channels tab looked like this for the value of the Poti 7.

    IMG_1042.JPG

    And finally I was using an Xbee wireless which means in real life I could setup my laptop, get my setting adjusted, click write, fly a quick test flight, land, make another adjustement, write and do it again.

    You could also do the more adventurous route by making adjustments in the air but one slip could lead to disaster.
     
  14. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    And don't, whatever you do, write any settings to the boards while you are airborne as that resets everything and the copter will drop out of the sky. Or so it is said.

    Andy
     
  15. Andy Johnson-Laird

    Andy Johnson-Laird Administrator
    Staff Member

    Joined:
    Jul 31, 2012
    Messages:
    10,383
    Likes Received:
    1,164
    Yeah. I was thinking Gary was omniscient.... :)
     
  16. Steve Maller

    Steve Maller UAV Grief Counselor

    Joined:
    Oct 30, 2012
    Messages:
    3,981
    Likes Received:
    807
    That's exactly what I was looking for!
    Now to get my XBee working again (I disconnected it a while ago)...
     
  17. Steve Maller

    Steve Maller UAV Grief Counselor

    Joined:
    Oct 30, 2012
    Messages:
    3,981
    Likes Received:
    807
    Well, I'm somewhat stumped on 2 fronts.
    • First of all, the method described above only seems to work with NAVI parameters, as I cannot find any place in the MK Tool UI that displays the current settings for the Gyros. It shows their readings, but not their settings.
    • Secondly, changing the +/- % in the mx20 for one of the CTRL dials assumes the midpoint of 0=127. There doesn't seem to be a way to make the dial be 0-based when turned all the way to the left. Maybe there's a way of making the control think more like a volume control and less like a "balance" control (who remembers stereos?). So if I want to test values between, say, 10-30, there doesn't seem to be a way to do that.
    Sigh.
     
  18. Steve Maller

    Steve Maller UAV Grief Counselor

    Joined:
    Oct 30, 2012
    Messages:
    3,981
    Likes Received:
    807

Share This Page