Adafruit Industries ADXL345 Скачать руководство пользователя страница 7

 

© Adafruit Industries

https://learn.adafruit.com/adxl345-digital-accelerometer

Page 7 of 17

Содержание ADXL345

Страница 1: ...ADXL345 Digital Accelerometer Created by Bill Earl Last updated on 2018 12 07 07 32 33 PM UTC ...

Страница 2: ...est Calibrate Gravity as a Calibration Reference Calibration Method Mount the Sensor Load the Calibration Sketch Position the Block Reposition the Block https adafru it c5g Repeat Hint Calibration Results Calibration Sketch Typical Calibration Output Library Reference Constructor Initialization Sensor Details Getting and Setting the operating range Getting and Setting the Data Rate Reading Sensor ...

Страница 3: ...ttps adafru it c5e How it Works https adafru it c5f MEMS Micro Electro Mechanical Systems The sensor consists of a micro machined structure on a silicon wafer The structure is suspended by polysilicon springs which allow it to deflect smoothly in any direction when subject to acceleration in the X Y and or Z axis Deflection causes a change in capacitance between fixed plates and plates attached to...

Страница 4: ... Adafruit Industries https learn adafruit com adxl345 digital accelerometer Page 4 of 17 ...

Страница 5: ... connectors However for applications subject to extreme accelerations shock or vibration locking connectors or direct soldering is advised Assembly Position the Header Cut the header to size if necessary Then plug the header long pins down into a breadboard to stabilize it for soldering Adafruit Industries https learn adafruit com adxl345 digital accelerometer Page 5 of 17 ...

Страница 6: ...e I2C bus with other I2C devices as long as each device has a unique address Only 4 connections are required for I2C communication GND GND VIN 5v SDA SDA Analog 4 on Classic Arduinos SCL SCL Analog 5 on Classic Arduinos The Adafruit breakout has level shifting and regulation circuitry so you can power it from 3 5V and use 3V or 5V logic levels for i2c Adafruit Industries https learn adafruit com a...

Страница 7: ... Adafruit Industries https learn adafruit com adxl345 digital accelerometer Page 7 of 17 ...

Страница 8: ...ch to the Arduino You should see output similar to below Watch the values change as you move the board around Calibrate The ADXL chips are calibrated at the factory to a level of precision sufficient for most purposes For critical applications where a higher degree of accuracy is required you may wish to re calibrate the sensor yourself Calibration does not change the sensor outputs But it tells y...

Страница 9: ...hen it is precisely aligned with the axis of gravitational pull Laboratory quality calibration uses precision positioning jigs The method described here is simple and gives surprisingly good results with just a block of wood Mount the Sensor FIrst mount the sensor securely to a block or a box The size is not important as long as all the sides are at right angles The material is not important as lo...

Страница 10: ...nt on that axis and print the results Reposition the Block Turn the block so a different side is flat on the table and type another key to measure that axis https adafru it c5g Repeat Repeat for all six sides of the block to measure the positive and negative aspects of each axis Adafruit Industries https learn adafruit com adxl345 digital accelerometer Page 10 of 17 ...

Страница 11: ...ding Calibration Results Once all six sides have been sampled the values printed in the Serial Monitor will represent actual measurements for 1G forces on each axis These values can be used to re scale readings for better accuracy Calibration Sketch Adafruit Industries https learn adafruit com adxl345 digital accelerometer Page 11 of 17 ...

Страница 12: ...ew sensor event sensors_event_t accelEvent accel getEvent accelEvent if accelEvent acceleration x AccelMinX AccelMinX accelEvent acceleration x if accelEvent acceleration x AccelMaxX AccelMaxX accelEvent acceleration x if accelEvent acceleration y AccelMinY AccelMinY accelEvent acceleration y if accelEvent acceleration y AccelMaxY AccelMaxY accelEvent acceleration y if accelEvent acceleration z Ac...

Страница 13: ...0 0 00 Accel Maximums 0 12 0 20 1 14 Type key when ready Accel Minimums 0 00 0 00 0 24 Accel Maximums 0 12 1 37 1 14 Type key when ready Accel Minimums 0 00 0 00 0 24 Accel Maximums 0 12 1 37 1 14 Type key when ready Accel Minimums 0 00 1 22 0 27 Accel Maximums 0 12 1 37 1 14 Type key when ready Accel Minimums 0 00 1 22 0 27 Accel Maximums 0 12 1 37 1 14 Type key when ready Accel Minimums 1 18 1 2...

Страница 14: ... the Adafruit Sensor Library Getting and Setting the operating range void setRange range_t range The setRange function sets the operating range for the sensor Higher values will have a wider measurement range Lower values will have more sensitivity Valid range constants are ADXL345_RANGE_16_G ADXL345_RANGE_8_G ADXL345_RANGE_4_G ADXL345_RANGE_2_G default value range_t getRange void The getRange fun...

Страница 15: ...ue dataRate_t getDataRate void The getDataRate function returns the current data rate as set by setDataRate Reading Sensor Events void getEvent sensors_event_t The getEvent function returns the next available reading in the form of a sensor_event The sensor_event contains the sensor_id as passed to the constructor as well as the X Y and Z axis readings from the accelerometer For more information a...

Страница 16: ...fru it c5e Fritzing object in the Adafruit Fritzing Library https adafru it aP3 EagleCAD PCB files on GitHub https adafru it rEH Schematic Fabrication Print Adafruit Industries https learn adafruit com adxl345 digital accelerometer Page 16 of 17 ...

Страница 17: ... Adafruit Industries Last Updated 2018 12 07 07 32 32 PM UTC Page 17 of 17 ...

Отзывы: