Semiconductor accelerometers are used in devices where it is required to determine acceleration in three coordinates at once. Such devices can transmit information about the measurement result in analog or digital form.
Instructions
Step 1
Read the markings on the accelerometer. Enter it into a search engine. If the designation consists of several lines, check them all separately, since it is not always clear which line contains the device type.
Step 2
After downloading the PDF file with the description of the accelerometer, find in it the data on its supply voltage, as well as the location of the pins intended for supplying this voltage, connecting to a common wire, and taking measurement results. The analog accelerometer has three outputs: X, Y, Z (by the number of coordinates), and the digital one has two: SCL (clock pulses) and SDA (data).
Step 3
If the accelerometer is positioned so that its cover is directed upwards, and the first terminal is to the left and closer to the observer, then the X axis for most devices will be directed to the right, the Y axis - away from the observer, and the Z axis - up. Consider this when choosing the location of the accelerometer body in your design. If it is impossible to place it in the required way, change the positions of the outputs of the analog device so that the order of their connection corresponds to the desired one, and in the case of using a digital device, make changes to the program of the microcontroller connected to it.
Step 4
Connect the microcircuit legs corresponding to the common wire and the power bus to the corresponding circuits of the structure. Connect between them, observing the polarity, an oxide capacitor with a capacity of about 100 microfarads. Shunt it with a ceramic container of several tens or hundreds of picofarads. Do not serve the food itself yet.
Step 5
Connect a ceramic or paper capacitor with a capacity of 100 picofarads to 0.5 microfarads between each of the outputs of the analog accelerometer and the common wire, depending on what kind of artificial inertia you want to introduce. The outputs of the digital accelerometer cannot be bypassed in this way. Connect the analog outputs to the microcontroller pins corresponding to the analog-to-digital converters, and the digital outputs to the legs that can quickly switch from the input mode to the output mode and vice versa.
Step 6
In order for the microcontroller to be able to perceive signals from an analog device, make a program taking into account the fact that half the supply voltage corresponds to zero acceleration along each of the axes, and with a positive acceleration this voltage increases almost to the supply voltage, and with a negative acceleration it drops to almost zero. To ensure interaction with the digital accelerometer, programmatically implement data exchange with it using the I2C protocol.
Step 7
If desired, the analog accelerometer can be used without a microcontroller, as part of a structure where data processing is carried out exclusively using operational amplifiers. In this case, it is convenient to supply all such amplifiers with a bipolar voltage, and only the accelerometer with a unipolar voltage. Immediately after it, place stages that convert the output voltages to bipolar, and adjust them so that zero acceleration corresponds to zero voltage.