View previous topic :: View next topic |
Author |
Message |
horizontech Guest
|
ANGLE CALCULATION |
Posted: Wed Jul 09, 2003 8:21 pm |
|
|
HI!
I try to get Angle from ADXL105 is analog output,
is very instable ..... i have connected to PIC16f876 in A0
analog input pin.. in 8 bit is not get wide range between 0 to 90 tilt.
in 16bit is moving right but is not stable ???
My question is what is the best way or sensor to get the right
tilt angle, i need .5 degre bettwen step
thank for your help
Alain Tanguay
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515830 |
|
|
Kenny
Joined: 07 Sep 2003 Posts: 173 Location: Australia
|
Re: ANGLE CALCULATION |
Posted: Wed Jul 09, 2003 11:21 pm |
|
|
<font face="Courier New" size=-1>:=HI!
:=
:=I try to get Angle from ADXL105 is analog output,
:=is very instable ..... i have connected to PIC16f876 in A0
:=analog input pin.. in 8 bit is not get wide range between 0 to 90 tilt.
:=
:=in 16bit is moving right but is not stable ???
:=
:=My question is what is the best way or sensor to get the right
:=tilt angle, i need .5 degre bettwen step
:=
:=thank for your help
:=
:=Alain Tanguay
I dont think it will be possible to get the performance you need, especially for high tilt angles.
In any case the signal must be amplified and filtered first using op-amps before going into the A/D of the PIC. Scaling should be 1g for full scale of the A/D and 10 bit sampling.
Most of the noise is high frequency so filtering to around 1Hz will give much better performance.
Regards
Kenny
</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515832 |
|
|
Bill Turnip Guest
|
Re: ANGLE CALCULATION |
Posted: Thu Jul 10, 2003 8:05 am |
|
|
Alain -
Even with an 8- or 10-bit ADC you can do OK, that's not the problem.
You will not get enough sensitivity at high angles with a single axis sensor. The output of the sesnor is proportional to Sin(angle), the sensitivity then goes as Cos(theta), which heads towards 0 as you approach +/- 90 degrees. Single axis devices are usually used when the angle is confined to +/- 60 degrees from the horizontal.
Good luck,
Bill
:=HI!
:=
:=I try to get Angle from ADXL105 is analog output,
:=is very instable ..... i have connected to PIC16f876 in A0
:=analog input pin.. in 8 bit is not get wide range between 0 to 90 tilt.
:=
:=in 16bit is moving right but is not stable ???
:=
:=My question is what is the best way or sensor to get the right
:=tilt angle, i need .5 degre bettwen step
:=
:=thank for your help
:=
:=Alain Tanguay
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515845 |
|
|
Neutone
Joined: 08 Sep 2003 Posts: 839 Location: Houston
|
Re: ANGLE CALCULATION |
Posted: Thu Jul 10, 2003 3:40 pm |
|
|
:=HI!
:=
:=I try to get Angle from ADXL105 is analog output,
:=is very instable ..... i have connected to PIC16f876 in A0
:=analog input pin.. in 8 bit is not get wide range between 0 to 90 tilt.
:=
:=in 16bit is moving right but is not stable ???
:=
:=My question is what is the best way or sensor to get the right
:=tilt angle, i need .5 degre bettwen step
:=
:=thank for your help
:=
:=Alain Tanguay
Use a input filter. An RC circuit will work or you can oversample and use a digital filter. Here is one that I like because it aproximates an RC circuit.
Filtered_input=Filtered_input-(Filtered_input/8)+(Raw_input/8)
This works very good for a noisy input. This method requires about 16 samples to become stable.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515859 |
|
|
|