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

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    That's where getting an accurate sample as fast as you can comes into play.
    But, with the A/D on a PIC, you can sample too fast and kill your accuracy.
    So, you've got to play with it and find a balance between sampling fast and keeping a decent amount of accuracy. Also, whether or not the acceleration is constant isn't really an issue. The speed of sampling takes care of that for you. The less time between the samples, the less chance there is of the rate of acceleration actually changing enough to matter between those samples.
    That program you posted, are you saying that it's working, it's just that you can't get a decent output from it? Not large enough or what? Not 'sensitive' enough?

    I just did a bit of math. Apparently, at .66mv/deg/sec, with a 10bit A/D on the PIC (5v Vref = 4.8828125mv/bit), the lowest rate you'll be able to detect would be 7.4deg/sec.
    Maybe you should change your +Vref and -Vref.
    How about a resistive divider running off the 5v/Ground rail. Get 3 resistors that are almost EXACTLY the same. That should be able to get you down to 2.46deg/sec.
    And you could do that all day, but then you run into the problem of range. You can have one but not the other.
    I think a better fix for this might be to go with an A/D with more BITS! Maybe an external 16 bit A/D (if not more!).
    Last edited by skimask; - 26th March 2007 at 17:43.

  3. #3
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    yes as i said my changing value is not large enough it is like only 2 volts variation a low angular speed (like my head moving) so i m losing 3volts

    i ll try with the resistive divider but i heard it is very bad for the temperature drifting....??

    and i have a reference voltage with my sensor (pin 3) it is like 2.4v very accurate do you think i can use that in a way as a vref+ and - (with diodes or something)


    thank s anyways

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fefenin View Post
    yes as i said my changing value is not large enough it is like only 2 volts variation a low angular speed (like my head moving) so i m losing 3volts

    i ll try with the resistive divider but i heard it is very bad for the temperature drifting....??

    and i have a reference voltage with my sensor (pin 3) it is like 2.4v very accurate do you think i can use that in a way as a vref+ and - (with diodes or something)

    thank s anyways
    resistive divider - I would think that as long as you have 3 resistors, same manufacturer, same age, same values, etc.etc., I would think that they'd drift fairly equally.

    You may have a 2.4v Vref on your sensor, but you still have to be able to get a 'spread' at the PIC.

    What's the fastest you think this sensor will ever turn (I guess the real question is how fast can you spin head?)?

  5. #5
    Join Date
    Mar 2007
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    i really don t have any idea how fast i can spin my head but anyway ican t go quicker than the servo motor and i guess the signal is refresh every 20ms

    because i just took the sensor without amplifiers the sensitivity is bad!

    the bord had apparently an amplifiers just straight after the sensor mount in instrumentation amplifier (don t know the exact name in english!)

    the sensor shows me very poor resolutions i ll probably need to buy a rc gyro and mesure the pulse between 1ms and 2ms and integrate it (maybe more acurate???)

    i have to finished this project anyways so you ll see me later on i think!

    thank's all for the moment! and again sorry for my english (not very proper)

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fefenin View Post
    i really don t have any idea how fast i can spin my head but anyway ican t go quicker than the servo motor and i guess the signal is refresh every 20ms

    because i just took the sensor without amplifiers the sensitivity is bad!

    the bord had apparently an amplifiers just straight after the sensor mount in instrumentation amplifier (don t know the exact name in english!)

    the sensor shows me very poor resolutions i ll probably need to buy a rc gyro and mesure the pulse between 1ms and 2ms and integrate it (maybe more acurate???)

    i have to finished this project anyways so you ll see me later on i think!

    thank's all for the moment! and again sorry for my english (not very proper)
    Sure, you could amplify the output with a simple op-amp circuit, no problem there, a hundred different ways to get a better resolution.

    Signal refresh- that's probably the one going to servos, every 20ms, the capability to read the sensor with a PIC is far greater, good enough for what you're thinking about. I'd roll with the project until it worked, I wouldn't get rid of it yet.
    Your english is good enough for me, most of the time anyways

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