After several days of trying to break the serial code from my Sears inclinometer (discussed in previous posts), I have decided just to harvest usable parts and transplant them into a device of my own design.
The accelerometer I have is a Memsic 2020EL (100 Hz model). The output is a PWM signal. The duty cycle is proportional to the gravitational force. The Sears unit fed that signal directly to the MCU (an 8051F103). The datasheet gives an alternative way to capture the data by converting the PWN to an analog voltage with a low-pass filter and then using the MCU's A/D.
I am using the 12F683, which has a 10-bit A/D. Clock will be 4 MHz. My question is, which is better, the direct approach or the analog approach?
A very rough estimate of the accuracy of either method comes to about 0.1% (i.e., 1 part in 1024 for the D/A conversion per se), which is probably more than adequate for my purpose. Is there a difference in stability of the readings, settling rate, temperature-related drift, or any other factor to help make the decision? This is my very first experience with an accelerometer.
Thanks, John
The accelerometer I have is a Memsic 2020EL (100 Hz model). The output is a PWM signal. The duty cycle is proportional to the gravitational force. The Sears unit fed that signal directly to the MCU (an 8051F103). The datasheet gives an alternative way to capture the data by converting the PWN to an analog voltage with a low-pass filter and then using the MCU's A/D.
I am using the 12F683, which has a 10-bit A/D. Clock will be 4 MHz. My question is, which is better, the direct approach or the analog approach?
A very rough estimate of the accuracy of either method comes to about 0.1% (i.e., 1 part in 1024 for the D/A conversion per se), which is probably more than adequate for my purpose. Is there a difference in stability of the readings, settling rate, temperature-related drift, or any other factor to help make the decision? This is my very first experience with an accelerometer.
Thanks, John