Commandé les jours ouvrables avant 14:00 = expédié le jour même. 30 jours pour changer d’avis 1 an de garantie

Schéma de câblage et exemple de code

Voici comment connecter le Accéléromètre et gyroscope à accélération I2C - MPU-6050 à un Arduino UNO ou à un ESP32, avec un exemple de sketch que tu peux téléverser directement.

Démo d’accéléromètre et de gyroscope MPU-6050

Ce projet lit les données d’accélération et de vitesse angulaire du capteur de suivi de mouvement 6 axes MPU-6050 via I2C. Connectez le capteur à l’Arduino Uno, téléversez le code et ouvrez le Serial Monitor à 115200 baud pour afficher les mesures de mouvement en temps réel lorsque vous inclinez et faites pivoter le module.

Schéma de câblage : Accéléromètre et gyroscope à accélération I2C - MPU-6050 sur un Arduino UNO
Schéma de câblage · Cliquez pour agrandir
Tableau de câblage : Accéléromètre et gyroscope à accélération I2C - MPU-6050 sur un Arduino UNO
Tableau de câblage · Cliquez pour agrandir
MPU_6050_Accelerometer_and_Gyroscope_Dem.ino · compilé et testé
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : MPU-6050 Accelerometer and Gyroscope Demo
 *  Board     : Arduino UNO (arduino:avr:uno)
 *  Parts     : Accelerometer and Gyroscope I2C MPU-6050
 *  Libraries : Adafruit MPU6050 2.2.9, Adafruit Unified Sensor 1.1.15, Adafruit BusIO 1.17.4
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>

Adafruit_MPU6050 mpu;

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    delay(10);
  }

  Serial.println(F("Initializing MPU-6050..."));
  if (!mpu.begin()) {
    Serial.println(F("Failed to find MPU-6050 chip. Check connections!"));
    while (1) {
      delay(10);
    }
  }
  Serial.println(F("MPU-6050 initialized successfully!"));

  // Configure sensor ranges and filter bandwidth
  mpu.setAccelerometerRange(MPU6050_RANGE_8_G);
  mpu.setGyroRange(MPU6050_RANGE_500_DEG);
  mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);
}

void loop() {
  sensors_event_t a, g, temp;
  mpu.getEvent(&a, &g, &temp);

  // Print acceleration in m/s^2
  Serial.print(F("Accel (m/s^2) X: "));
  Serial.print(a.acceleration.x, 2);
  Serial.print(F(", Y: "));
  Serial.print(a.acceleration.y, 2);
  Serial.print(F(", Z: "));
  Serial.print(a.acceleration.z, 2);

  // Print rotation rate in rad/s
  Serial.print(F(" | Gyro (rad/s) X: "));
  Serial.print(g.gyro.x, 2);
  Serial.print(F(", Y: "));
  Serial.print(g.gyro.y, 2);
  Serial.print(F(", Z: "));
  Serial.print(g.gyro.z, 2);

  // Print onboard temperature
  Serial.print(F(" | Temp: "));
  Serial.print(temp.temperature, 1);
  Serial.println(F(" C"));

  delay(500);
}

Bibliothèques nécessaires : Adafruit MPU6050 2.2.9, Adafruit Unified Sensor 1.1.15, Adafruit BusIO 1.17.4

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Démo du capteur de mouvement ESP32 MPU-6050

Ce projet lit l’accélération sur 3 axes, la vitesse de rotation et la température du capteur MPU-6050 via I2C. L’ESP32 lit les données du capteur à 10 Hz et affiche des valeurs formatées dans le Serial Monitor à 115200 baud. Ouvrez le Serial Plotter pour voir des graphiques en direct des mouvements du capteur.

Schéma de câblage : Accéléromètre et gyroscope à accélération I2C - MPU-6050 sur un ESP32 DevKit V1
Schéma de câblage · Cliquez pour agrandir
Tableau de câblage : Accéléromètre et gyroscope à accélération I2C - MPU-6050 sur un ESP32 DevKit V1
Tableau de câblage · Cliquez pour agrandir
ESP32_MPU_6050_Motion_Sensor_Demo.ino · compilé et testé
/*
 * ==================================================================
 *  Generated by Codey.online  —  https://www.codey.online
 * ==================================================================
 *  Project   : ESP32 MPU-6050 Motion Sensor Demo
 *  Board     : ESP32 DEVKIT V1 (esp32:esp32:esp32doit-devkit-v1)
 *  Parts     : Accelerometer and Gyroscope I2C MPU-6050
 *  Libraries : Adafruit MPU6050 2.2.9, Adafruit Unified Sensor 1.1.15
 *
 *  Codey Online is an AI-powered browser IDE for Arduino and ESP32.
 *  Describe your project and Codey writes the code, draws the wiring
 *  diagram and uploads it to your board, straight from the browser.
 *  This code is free to use, modify and share, without warranty.
 * ==================================================================
 */

#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>

Adafruit_MPU6050 mpu;

void setup() {
  Serial.begin(115200);
  while (!Serial) delay(10);

  Serial.println("Initializing MPU-6050...");

  // Initialize I2C on ESP32 default pins: SDA (GPIO 21), SCL (GPIO 22)
  Wire.begin(21, 22);

  if (!mpu.begin(0x68, &Wire)) {
    Serial.println("Failed to find MPU-6050 chip!");
    while (1) {
      delay(10);
    }
  }

  Serial.println("MPU-6050 Found!");

  // Configure sensor ranges
  mpu.setAccelerometerRange(MPU6050_RANGE_8_G);
  mpu.setGyroRange(MPU6050_RANGE_500_DEG);
  mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);

  delay(100);
}

void loop() {
  sensors_event_t a, g, temp;
  mpu.getEvent(&a, &g, &temp);

  Serial.print("Accel X: ");
  Serial.print(a.acceleration.x, 2);
  Serial.print(" m/s^2, Y: ");
  Serial.print(a.acceleration.y, 2);
  Serial.print(" m/s^2, Z: ");
  Serial.print(a.acceleration.z, 2);
  Serial.println(" m/s^2");

  Serial.print("Gyro X: ");
  Serial.print(g.gyro.x, 2);
  Serial.print(" rad/s, Y: ");
  Serial.print(g.gyro.y, 2);
  Serial.print(" rad/s, Z: ");
  Serial.print(g.gyro.z, 2);
  Serial.println(" rad/s");

  Serial.print("Temperature: ");
  Serial.print(temp.temperature, 1);
  Serial.println(" degC");
  Serial.println("------------------------------------");

  delay(500);
}

Bibliothèques nécessaires : Adafruit MPU6050 2.2.9, Adafruit Unified Sensor 1.1.15

Wiring diagram and example code generated by Codey.online — https://www.codey.online

Accéléromètre et gyroscope à accélération I2C - MPU-6050

Le module MPU-6050 intègre un capteur d’accélération à 3 axes et un gyroscope à 3 axes. En plus d’un encombrement réduit par rapport aux solutions individuelles, ce module résout également les problèmes de différences dans les systèmes multi-composants typiques.
La base de données InvenSense intégrée réduit le traitement complexe et fournit un cadre pour le développement d’applications et d’API.

I2C jusqu’à 400 kHz est disponible pour la transmission des données.

Données techniques
- Module MPU-6050 (gyro à trois axes + accélération à trois axes)
- Alimentation : 3- 5 V (différentiel basse tension interne)
- Communication : protocole de communication IIC standard
- Puce avec convertisseur AD 16 bits intégré, sortie de données 16 bits
- Plage du gyroscope : ±250, ±500, ±1000, ±2000 °/ s (16 bits)
- Plage d’accélération : ±2, ±4, ±8, ±16 g (16 bits)
- capteur de température intégré

Exemples d’utilisation
- Jeux de détection de mouvement
- réalité augmentée
- stabilisation électronique & optique de l’image

 

Dimensions
Longueur : 2,1cm
Largeur : 1,6cm
Hauteur : 0,34cm

  • capteur 3 axes
  • AD 16 bits
  • interface I2C
  • capteur de température
La lecture charge la vidéo depuis YouTube.

Pourquoi choisir ce produit ?

  • Mesure sur 3 axes – Capteur d'accélération et gyroscope dans un seul module.
  • Communication I2C – Transmission de données via le protocole IIC standard.
  • Jusqu'à 400 kHz – Convient pour une transmission de données rapide.
  • Traitement 16 bits – Convertisseur AD intégré et sortie de données.
  • Capteur de température – Pour des mesures supplémentaires sur la puce.
Spécifications
Largeur1,6 cm
InterfaceI2C
Longueur2,1 cm
Tension d'alimentation3-5V
Fréquencejusqu'à 400 kHz
Hauteur0,34 cm
Plage du gyroscope±250, ±500, ±1000, ±2000 °/s
Plage d'accélération±2, ±4, ±8, ±16 g

Souvent achetés ensemble

Total: € 11,63

Avis

★★★★★ 5,0/5 3 avis
  • ★★★★★Stijn GroenAchat vérifié

    Fonctionne bien

  • ★★★★★Ferre WillemsAchat vérifié

    C’était bien

  • ★★★★★WalterAchat vérifié

    fonctionne parfaitement !

Rédiger un avis
Votre note

Livraison & retours

Livraison

  • Colis avec suivi€ 6,353 jours ouvrés
  • Colis avec suivi€ 8,053 jours ouvrés
  • Colis avec suivi€ 9,153 jours ouvrés
  • Colis avec suivi€ 10,153 jours ouvrés
Tout sur la livraison

Retours

Pas satisfait ? Tu as 30 jours après réception pour renvoyer le produit.

Tout sur les retours

Récemment consultés

Porte-piles 3x AA (4.5V)

Porte-piles 3x AA (4.5V)

€ 0,85
Potentiomètre Trimpot 105 1M

Potentiomètre Trimpot 105 1M

€ 0,50
Adaptateur USB Host 2.0 ADK

Adaptateur USB Host 2.0 ADK

€ 11,15
Circuit intégré optocoupleur 4N35 DIP-6

Circuit intégré optocoupleur 4N35 DIP-6

€ 1,25
Combinaison Breadboard 4 en 1 Groupe

Combinaison Breadboard 4 en 1 Groupe

€ 10,40
Relais USB PC 2 canaux 5V

Relais USB PC 2 canaux 5V

€ 7,00
Interrupteur DIP 1 broche 2.54mm

Interrupteur DIP 1 broche 2.54mm

€ 0,90