Introduction To Capacitive MEMS Accelerometers and A Case Study On An Elevator
For many, acceleration is a concept that is taught in elementary physics but rarely matures past a discussion of gravity: think of a ball being thrown in the air, a pendulum swinging, or a cart rolling down an incline. In engineering, however, acceleration describes many of the complex phenomena at work in the aerospace, automotive, architectural, and seismological fields - just to name a few. A measurement or approximation of acceleration relates to the forces acting on a system, which can prevent disasters or loss of resources.
Consider the mass-spring system shown in Figure 1. Its differential equation is commonly written as:
where k is the spring constant, m is the mass of the object, and x is displacement. We can say that the second time derivative of the displacement is the acceleration, and we end up with the following:
Now, imagine the double-walled mass-spring system shown in Figure 2. The only difference between the double-walled case and the simple mass-spring system above is a factor of two, assuming the springs are identical. It is also important to realize that the entire system moves, resulting in opposition of motion from the mass according to Newton's 2nd law, F = ma. Consequently, with prescribed mass and springs, the displacement of the mass is proportional to the accelerations experienced by the system. This problem is the first fundamental step toward creating what is called a capacitive accelerometer.
Capacitive MEMS Accelerometer
A micro-electromechanical system (MEMS) is a classification that describes microscopic devices made of both electrical and mechanical parts. A MEMS accelerometer is a device that measures acceleration by utilizing the techniques described above, but on a micro scale. The mass-spring system is the mechanical side of the MEMS device, and capacitance is the electrical portion. The capacitance of a parallel-plate capacitor is:
where C is capacitance, Q is charge, V is voltage, A is the area of the plate, ε is called the permitivity (constant), and d is the distance between the plates. Capcitance plays a key role in calculating the acceleration from the mass-spring system by measuring a change in voltage as the distance between two capacitive plates is changed.
Imagine now a mass-spring system with the adjustments shown in the following image:
One method for balancing the system above is to break down the electrical contributions using conservation of charge:
Furthermore, when the system is set into motion, the capacitances change and the setup can be explicitly modeled as follows:
In Figure 5, the conservation of charge can be written as:
Again, the variable of interest is the displacement between the capacitors - this distance acts as the indicator of force applied to the mass, which will ultimately bestow information about the acceleration of the system. Utilizing the equations for capacitance, we have:
And finally, we can solve the above algebraic equation for the displacement of the mass:
At this point, it is easy to see how we can relate the knowns in the system to find acceleration:
This simple result endows us with immense power. The above equation states that with prescribed values of spring constants, movable mass, capacitor equilibrium separation distance, and an applied voltage, we can determine the acceleration of the system just by reading a voltage. This is an impressive conclusion despite the complex nature of the problem. It is a basis for understanding the capacitive MEMS accelerometers that are used and still built today, and it is also the foundation for the sensor used in the experiment below, which utilizes a capacitive MEMS accelerometer to measure forces and distance traveled in a commercial elevator.
Accelerometer on an Elevator
On an elevator, weight fluctuates based on the acceleration of the vessel. If an elevator is accelerating upward, then a mass's weight will increase, and the opposite is true for a descending elevator. With all of this in mind, along with the knowledge of how a MEMS accelerometer works, I decided to verify Newton's 2nd law and the theory of gravitation (on earth's surface, at least). I used an ADXL345 (datasheet here, get one here), and interfaced with an Arduino and an iPhone using the HM-10 module and Bluetooth. That way, I was able to telemeter the acceleration data at roughly 17 samples/second in real time. The ADXL345 is capable of 100 samples/sec, so there was no worry of accuracy in time. However, the accuracy of the sensor itself proved to be less than ideal, along with positioning inaccuracies, as well as other shortcomings. These, however, will be discussed during the analysis section. The goal for this project was to analyze the maximum accelerations of a specific elevator (located in the Marshak Science Building on the campus of the City College of New York, see Figure 7), and examine the accuracy of numerical integration of a MEMS accelerometer to approximate distance traveled.
The procedure for this experiment is simple:
- Take continuous measurements of acceleration on an elevator
- Ensure that multiple distances are measured - this means taking multiple rides in the elevator to different floors
- Normalize the accelerometer data to account for gravity
- Integrate the acceleration data over time to approximate instantaneous velocity
- Integrate velocity data and sum to approximate displacement
- Find maximum acceleration to investigate maximum forces
An example acceleration plot after application of a simple running mean filter is shown in Figure 8.
figure 8: Plot of Acceleration for one instance where 5 floors were traversed by an elevator. It is important to realize that the elevator accelerates in one direction to move upward or downward, and decelerates to stop and let people disembark. The above data was smoothed to eliminate erroneous data points. The accelerometer data was also normalized by gravity to account for only the acceleration of the body in its own frame of reference.
After acquiring the acceleration data and smoothing it with a simple high frequency filter, the effects of gravity need to be eliminated to ensure we only integrate the moving acceleration of the body (elevator). After approximating the influence of gravity from the steady-state of the sensor, I numerically integrated the discrete data using the following trapezoidal method:
After carrying out the above integration, we now have instantaneous velocity data and with instantaneous velocity, displacement can easily be calculated. At this point, the velocity can be integrated via the same procedure, or the displacement can be obtained from the sum of the velocities multiplied by the time spacing between them - either one should be a good approximation for this particular case.
Finally, we arrive at a displacement. I carried out several of these calculations of displacement for multiple traverses between building floors in the Marshak Science Building (Figure 7), and I arrived at a plot of floors traversed vs. distance calculated, as shown in Figure 9.
The fit shown in Figure 9 concludes that the height of each floor is approximately 10.9 ft. This appears to be a fairly accurate prediction of the height of this particular building, due to the prior knowledge of its height (166 ft). There are 13 stories in the building accessible by elevator, and 2 additional floors to arrive at the roof. Therefore, the approximate building height from these calculations heeds 163.7 ft, which is within 2% of the actual building height.
Where a' is the fluctuating acceleration after gravity is subtracted. The negative sign states that if the fluctuating acceleration is greater than zero, then the body is traveling in the same direction as gravity, resulting in a net loss of weight; and for a negative fluctuating acceleration, the body is traveling against gravity, resulting in a net gain of weight. This is a fascinating study, and one that I'm sure manufacturers have to account for in fabrication of elevators and other transportation machinery. The experiments using an Arduino board, Bluetooth communication, Python for post-processing, and some elementary physics proved to be highly accurate and elucidatory for a classic physics and engineering problem that many of us take for granted.
POLYFIT FOR FLOOR HEIGHT LINEAR REGRESSION
IMPORTING, FILTERING, AND PLOTTING CSV ACCELEROMETER DATA