Senzor - pospeška/accelerometer - 3-osni analogni (ADXL335)

7,99 €
Na zalogi
SKU
el-in-ADXL335
Senzor - pospeška/accelerometer - 3-osni analogni (ADXL335)

Senzor - pospeška/accelerometer - 3-osni analogni (ADXL335)

Modul je triosni senzor pospeška, ki temelji na ADXL335 integriranem vezju. ADXL335 je merilnik pospeška s trojno osjo z izredno nizkim šumom in porabo energije. Senzor ima celotno območje zaznavanja +/- 3g. Lahko meri statični pospešek teže pri aplikacijah, ki zaznavajo nagib, pa tudi dinamični pospešek, ki je posledica gibanja, udarca ali vibracij. Za napajanje ADXL335 je na voljo napetostni regulator 3.3V, tako da mora biti napajanje med 3.3V in 6V DC.

Specifikacije:

  • analogno branje posameznih osi
  • ADXL335 3-osni merilnik pospeška - datasheet
  • merilno področje : +/- 3g
  • vgrajen regulator napetosti 3.3V, primeren za priključitev na 5V in 3,3V sisteme
  • analogna izhodna napetost centrira na 1.65V

Koda za Arduino

// these constants describe the pins. They won't change:
const int xpin = A1;                  // x-axis of the accelerometer
const int ypin = A2;                  // y-axis
const int zpin = A3;                  // z-axis (only on 3-axis models)

int sampleDelay = 500;   //number of milliseconds between readings

void setup()
{
  // initialize the serial communications:
  Serial.begin(9600);
  //Make sure the analog-to-digital converter takes its reference voltage from the AREF pin
  analogReference(EXTERNAL);
  pinMode(xpin, INPUT);
  pinMode(ypin, INPUT);
  pinMode(zpin, INPUT);
}

void loop()
{
  int x = analogRead(xpin);

  //add a small delay between pin readings.  I read that you should do this but haven't tested the importance
 delay(1);
 

int y = analogRead(ypin);
  //add a small delay between pin readings.  I read that you should do this but haven't tested the importance
    delay(1);

  int z = analogRead(zpin);
  //zero_G is the reading we expect from the sensor when it detects
  //no acceleration.  Subtract this value from the sensor reading to
  //get a shifted sensor reading.

  float zero_G = 512.0;

  //scale is the number of units we expect the sensor reading to
  //change when the acceleration along an axis changes by 1G.
  //Divide the shifted sensor reading by scale to get acceleration in Gs.

  float scale = 102.3;

  Serial.print(((float)x - zero_G)/scale);
  Serial.print("t");

  Serial.print(((float)y - zero_G)/scale);
  Serial.print("t");

  Serial.print(((float)z - zero_G)/scale);
  Serial.print("n");

  // delay before next reading:
  delay(sampleDelay);
}

Napišite vaše lastno mnenje
Pregledujete:Senzor - pospeška/accelerometer - 3-osni analogni (ADXL335)
Vaša ocena
SMAKshop - © 2003-2019 - by SMAK d.o.o., Ob železnici 14, si-1000 Ljubljana - All Rights Reserved.