Dobrodošli v spletni trgovini SMAKshop - spletna trgovina za ustvarjalne

Senzor : 3 osni senzor pospeškometer (accelerometer) in 3 osni žiroskop (gyroscope) MPU6050 z Kalman filtrom

Več pogledov

Senzor : 3 osni senzor pospeškometer (accelerometer) in 3 osni žiroskop (gyroscope) MPU6050 z Kalman filtrom
19,99 €

Dobavljivost: na zalogi

Senzor : 3 osni senzor pospeškometer (accelerometer) in 3 osni žiroskop (gyroscope) MPU6050 z Kalman filtrom
Ali
Opis

Podorobnosti

Senzor - 3-osni pospeškometer (accelerometer) in 3-osni žiroskop (gyroscope) z Kalman filtrom

Vezje je sestavljen iz procesorja STM32 (kalman filter) in MPU6050, ki vsebuje :

  • 3-osni pospeškometer (accelerometer) - razpon pospeškometra: ±2, ±4, ±8, ±16g
  • 3-osni žiroskop (gyroscope) - razpon žiroskopa : ± 250, 500, 1000, 2000 °/s

MPU6050 omogoča meritve obeh, neodvisno, vendar oba temeljita na istih osi, s čimer se odpravijo težave medsebojnih napak pri uporabi ločenih senzorjev.

Podatki:

  • standard komunikacije : serijsko komunikacijo - Baudrate : 115200, 9600 (v Serial monitor,  type 'c'  to set 115200, 'd' for 9600)
  • razpon napajanja: 3.3V - 5V

enostavna koda v Python za izpis verednosti

import serial

jy_61 = serial.Serial('COM5', 9600, timeout=.1)
while True:
data1 = jy_61.read() #readline()# [:-2] #the last bit gets rid of the new-line chars
if data1:
if hex(ord(data1)) == '0x55':
data2 = jy_61.read()
if hex(ord(data2)) == '0x51':
dataaxl = jy_61.read()
dataaxh = jy_61.read()
dataayl = jy_61.read()
dataayh = jy_61.read()
dataazl = jy_61.read()
dataazh = jy_61.read()
datatl = jy_61.read()
datath = jy_61.read()
ax = (float.fromhex(hex(ord(dataaxh))) * 256 + float.fromhex(hex(ord(dataaxl)))) / float(32768) * float(16)
ay = (float.fromhex(hex(ord(dataayh))) * 256 + float.fromhex(hex(ord(dataayl)))) / float(32768) * float(16)
az = (float.fromhex(hex(ord(dataazh))) * 256 + float.fromhex(hex(ord(dataazl)))) / float(32768) * float(16)
t = (float.fromhex(hex(ord(datath))) * 256 + float.fromhex(hex(ord(datatl))))/340*36.53 # / float(32768) * float(16)
print('Acceleration Output: ', 'x:', ax, ' + y:', ay, ' + z:', az, ' + temp:', t)
if hex(ord(data2)) == '0x52':
datawxl = jy_61.read()
datawxh = jy_61.read()
datawyl = jy_61.read()
datawyh = jy_61.read()
datawzl = jy_61.read()
datawzh = jy_61.read()
datatl = jy_61.read()
datath = jy_61.read()
wx = (float.fromhex(hex(ord(datawxh))) * 256 + float.fromhex(hex(ord(datawxl)))) / float(32768) * float(2000)
wy = (float.fromhex(hex(ord(datawyh))) * 256 + float.fromhex(hex(ord(datawyl)))) / float(32768) * float(2000)
wz = (float.fromhex(hex(ord(datawzh))) * 256 + float.fromhex(hex(ord(datawzl)))) / float(32768) * float(2000)
t = (float.fromhex(hex(ord(datath))) * 256 + float.fromhex(hex(ord(datatl))))/340*36.53 # / float(32768) * float(16)
print('Angular velocity output: ', 'x:', wx, ' + y:', wy, ' + z:', wz, ' + temp:', t)
if hex(ord(data2)) == '0x53':
datarl = jy_61.read()
datarh = jy_61.read()
datapl = jy_61.read()
dataph = jy_61.read()
datayl = jy_61.read()
datayh = jy_61.read()
datatl = jy_61.read()
datath = jy_61.read()
r = (float.fromhex(hex(ord(datarh))) * 256 + float.fromhex(hex(ord(datarl)))) / float(32768) * float(180)
p = (float.fromhex(hex(ord(dataph))) * 256 + float.fromhex(hex(ord(datapl)))) / float(32768) * float(180)
y = (float.fromhex(hex(ord(datayh))) * 256 + float.fromhex(hex(ord(datayl)))) / float(32768) * float(180)
t = (float.fromhex(hex(ord(datath))) * 256 + float.fromhex(hex(ord(datatl))))/340*36.53 # / float(32768) * float(16)
print('Angle Output: ', 'Roll:', r, ' + Pitch:', p, ' + Yaw:', y, ' + temp:', t)

#Acceleration Output -> UQ \xAXL \xAXH \xAYL \xAYH \xAZL \xAZH \xTL \xTH \xchecksum
#Angular velocity output -> UR \xWXL \xWXH \xWYL \xWYH \xWZL \xWZH \xTL \xTH \xchecksum
#Angle Output -> US \xRL \xRH \xPL \xPH \xYL \xYH \xTL \xTH \xchecksum

povezave:

Ocene

Oznake izdelka

Uporabite presledek za ločevanje oznak in enojni narekovaj (') za ločevanje fraz.