angular speed and gyrometer


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    ok i get it
    i already try harder
    will see
    i ll tell you when it is done you could probably help me after to get it optimised


    bye

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fefenin View Post
    ok i get it
    i already try harder
    will see
    i ll tell you when it is done you could probably help me after to get it optimised


    bye
    That's better. And no 'free help' here...
    Don't tell 'ME' when the code is done and don't expect 'ME' to help you optimize it.
    Post to the whole 'FORUM' that the code is done and ask the whole 'FORUM' if anybody has any suggestions for optimizations.
    And I don't see anything substantial in that code above...just a few statements testing this and that. It's like saying:
    "I building a car. Here's a spare tire, a seat, and a steering wheel cover. Oh, I have to pick up a few things yet, but I'm practically done."
    There's nothing about angles, nothing about integration, no 'real' math, etc.etc. I could go on and on...

  3. #3
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    i know there is no math yet i just post the soft working for sending ppm trame with my radio,there is still the angle soft and stuff like you said.

    i found you a bit hard with me i told you i m very new in programing and very bad in math

    i m actually working on the math part (trying some things like test adc value one time and just straight after an other test so i have to values)

    i m probably in the right way to make that works



    thank s again all

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fefenin View Post
    i know there is no math yet i just post the soft working for sending ppm trame with my radio,there is still the angle soft and stuff like you said.
    i found you a bit hard with me i told you i m very new in programing and very bad in math
    i m actually working on the math part (trying some things like test adc value one time and just straight after an other test so i have to values)
    i m probably in the right way to make that works
    thank s again all
    Yep, but then again, sometimes, that's what it takes...a bit of drilling before it finally sinks in...
    But I do have to reiterate...once you get something you think is good, I'm positive a bunch of us will be more than happy to look it over to obvious (and not so obvious) mistakes or logic problems, as long as we've got a good explanation of what the end result is supposed to be...
    Now, going with that...
    You said you're using a radio setup to move a servo remotely. You also said you're a beginner. I don't know how much of a beginner you are, but I can see a problem coming up....that is...trying to do too much at once.
    Build it up in steps...and I think most importantly, keep the radio link as the very last step. Get the A/D working, make the servo move, make the servo move with the A/D, etc.etc.etc. I think you get the picture...

  5. #5
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    ok so if i anderstood:

    my value a first is , lets say 2.267volts it s is my first value
    if i take two mesurement separeted by 1 i know that, if the second one is differente than the first one,i moved isnt it?
    so if i moved i probably want to know the angle (how many degrees i traveled)

    lets say the second mesurement is 2.320volts that probably means i moved one way (actually left)

    i know that the sensor sensibility is 0.66mv/deg/sec

    my mesurement is spaced by 1s so i probably moved 2.320-2.267=0.053v so 53mv that would say i moved around 80,3 deg is that right?


    if i m right then i could do mesurement spaced by 10 us it will be better for me

    and how can i do something proper with only a 16f88 without proper math (integer) calcualtion?

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fefenin View Post
    my value a first is , lets say 2.267volts it s is my first value
    if i take two mesurement separeted by 1 i know that, if the second one is differente than the first one,i moved isnt it?
    so if i moved i probably want to know the angle (how many degrees i traveled)

    lets say the second mesurement is 2.320volts that probably means i moved one way (actually left)

    i know that the sensor sensibility is 0.66mv/deg/sec

    my mesurement is spaced by 1s so i probably moved 2.320-2.267=0.053v so 53mv that would say i moved around 80,3 deg is that right?

    if i m right then i could do mesurement spaced by 10 us it will be better for me

    and how can i do something proper with only a 16f88 without proper math (integer) calcualtion?
    You can't do it proper with integer math. But what you can do is multiply all of the numbers by 10 or 100 or whatever (whatever WON'T cause an overflow in the middle somewhere), then divide the end result by whatever you multiplied it all UP by.

    As far as you're math goes...you've ALMOST got it, ooo sooo close..Example..
    You start at time 0 - moving at 0 degrees/second
    You measure at time 1 - and see the sensor is at a rate of (in your example) 80.3 degrees/second.
    That doesn't mean you moved 80.3 degrees, actually it should mean (assuming the angular acceleration was absolutely constant) that you moved 40.15 degrees/second.
    Look at it this way...if I accelerate from a stop at a rate of 10 feet per second during every second, at the end of 1 second, I'll be MOVING at 10 feet per second, but I'll only haved MOVED 5 feet, like an average between start and stop. (I'm looking for a word or a phrase to throw out, but I can't think of it at the moment).
    And yes, the less the time between successive measurements, the tighter you end result will be.

  7. #7
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    ok i get the idea for the average of my rate,
    but now how can i do if i don t have a clue how fast i move (not a constant acceleration)

    there is tyle an unknow parameter


    for the moment i m trying that:

    main:

    ReadAD:

    ADCON0.2 = 1 ' Start conversion

    AD0H = ADRESH
    AD0L = ADRESL
    AD0=(AD0H*4)+(AD0L/64)

    pause 1000

    ADCON0.2 = 1 ' Start conversion

    AD1H = ADRESH
    AD1L = ADRESL
    AD1=(AD1H*4)+(AD1L/64)

    SEROUT2 PORTA.2,32,[$A3,$01] 'clear alcd and locate in 0,0
    SEROUT2 PORTA.2,32,["ado:",dec ad0]
    SEROUT2 PORTA.2,32,[$A1,0,1]
    sEROUT2 PORTA.2,32,["ad1:",dec ad1]

    if ad0 > ad1 then
    pan= ad0-ad1
    SEROUT2 PORTA.2,32,[$A1,0,3]
    sEROUT2 PORTA.2,32,["pan: +",dec pan ]
    endif

    if ad1 > ad0 then
    pan= ad1-ad0
    SEROUT2 PORTA.2,32,[$A1,0,3]
    sEROUT2 PORTA.2,32,["pan: -",dec pan ]
    endif


    goto main


    i can get a result but the variation of pan is very low from -60 to 60 if i move the sensor very fast

    if think i should use +vref and - vref cause it ll be more accurate

    i don 't know

    i just HATE math

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts