View previous topic :: View next topic |
Author |
Message |
armando Guest
|
Accelerometer with Pic16f877 |
Posted: Tue Jun 17, 2003 12:45 pm |
|
|
I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
thnx,
Armando
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515328 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Accelerometer with Pic16f877 |
Posted: Tue Jun 17, 2003 1:09 pm |
|
|
:=I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
:=
-----------------------------------------------------------
This chip outputs the acceleration as a PWM encoded signal.
So you need a method of measuring pulse widths. The PIC's
CCP module would be good for this. Look at the CCS example
file, EX_CCPMP.C. Do you have the CCS compiler ?
If not, that file is available online, here:
<a href="http://www.cc.puv.fi/~t0101190/projekti/source/Examples/" TARGET="_blank">http://www.cc.puv.fi/~t0101190/projekti/source/Examples/</a>
Analog Devices has a large number of appnotes on this device.
Go here, and look in the section on MEMS Technology:
<a href="http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/" TARGET="_blank">http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/</a>
Look at AN-604: Using the ADXL202 Duty Cycle Output
Also, AN-596, while not written for C, looks like it might
offer some useful tips.
Look at the CCS example file
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515330 |
|
|
armando Guest
|
Re: Accelerometer with Pic16f877 |
Posted: Tue Jun 17, 2003 3:23 pm |
|
|
Thanks alot. The two sites were very helpful.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515335 |
|
|
Kenny
Joined: 07 Sep 2003 Posts: 173 Location: Australia
|
Re: Accelerometer with Pic16f877 |
Posted: Tue Jun 17, 2003 6:11 pm |
|
|
<font face="Courier New" size=-1>:=I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
:=
:=thnx,
:=Armando
I have used a lot of these.
It is sometimes better to use the analog outputs at Xfilt and Yfilt into the PIC 10 bit A/D inputs. If low accelerations are to be measured then I use LM324 quad op-amps (one per axis) to boost the signal to suit the range of the A/D.
Spare op-amps are used to buffer an extra RC filter and restore the offset or zero adjustment.
The duty cycle modulator adds extra errors. It has a lower frequency response too but this is usually not a problem.
Another problem is separating tilt and acceleration. The acceleration response is reduced by the cosine of the angle to the axis and there will be a tilt component as well in the output if the device is not horizontal.
Good luck soldering them - the pads are under the package!
Regards
Kenny
</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515339 |
|
|
Acid Guest
|
Re: Accelerometer with Pic16f877 |
Posted: Wed Jun 18, 2003 12:57 am |
|
|
..Armando Do you know the chip for optical mouse..?
Bye
:=:=I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
:=:=
:=-----------------------------------------------------------
:=
:=This chip outputs the acceleration as a PWM encoded signal.
:=So you need a method of measuring pulse widths. The PIC's
:=CCP module would be good for this. Look at the CCS example
:=file, EX_CCPMP.C. Do you have the CCS compiler ?
:=If not, that file is available online, here:
:= <a href="http://www.cc.puv.fi/~t0101190/projekti/source/Examples/" TARGET="_blank"> <a href="http://www.cc.puv.fi/~t0101190/projekti/source/Examples/" TARGET="_blank">http://www.cc.puv.fi/~t0101190/projekti/source/Examples/</a></a>
:=
:=Analog Devices has a large number of appnotes on this device.
:=Go here, and look in the section on MEMS Technology:
:= <a href="http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/" TARGET="_blank"> <a href="http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/" TARGET="_blank">http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/</a></a>
:=Look at AN-604: Using the ADXL202 Duty Cycle Output
:=
:=Also, AN-596, while not written for C, looks like it might
:=offer some useful tips.
:=
:=Look at the CCS example file
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515343 |
|
|
Bill Turnip Guest
|
Re: Accelerometer with Pic16f877 |
Posted: Thu Jun 26, 2003 7:51 pm |
|
|
Armando -
I just interfaced this accelerometer to the 16f877 and 16f863 (or 4?) using the analog outputs (the PWM outputs dropped across a simple low-pass filter). It was pretty easy using ADCs.
Another question:
Is it possible to measure BOTH accelerometer axes at the same time (or close to it) using PWM outputs and the timers of the PIC?
Bill
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515591 |
|
|
|