Fabrication industrielle
Internet des objets industriel | Matériaux industriels | Entretien et réparation d'équipement | Programmation industrielle |
home  MfgRobots >> Fabrication industrielle >  >> Manufacturing Technology >> Processus de fabrication

Contrôle d'un Servomoteur via Bluetooth avec Arduino Uno et HC‑05

Composants et Fournitures

Composant Description Qté
Arduino UNO 1
Servomoteur SG90 (9g) 1
Module Bluetooth HC-05 1
Plaque d'essai (breadboard) 1
Fils de connexion 1

Applications et Services

À Propos du Projet

Ce projet montre comment contrôler un servomoteur via une application smartphone et Bluetooth. Deux parties :

  1. Application Android : envoie des paquets de données au module HC-05.
  2. Matériel : HC-05, Arduino Uno, servomoteur.

Fonctionnement

L'application envoie des données → HC-05 → communication série vers Arduino → Arduino génère le signal PWM pour le servomoteur selon la valeur reçue.

Attention : Le HC-05 doit être alimenté en 3,3 V (pas 5 V) pour éviter de l'endommager.

Mise en Route

  1. Télécharger l'application Android.
  2. Téléverser le code sur l'Arduino.
  3. Réaliser le câblage (voir schéma).
  4. Appairer le HC-05 avec l'application (chercher périphériques, sélectionner HC-05).
  5. Utiliser le curseur ou saisie manuelle pour contrôler l'angle du bras.

Code Arduino

#include <SoftwareSerial.h>
#include <Servo.h>

Servo monServo;
int btTx = 9;  // TX HC-05 → Pin 9 Arduino
int btRx = 10; // RX HC-05 → Pin 10 Arduino
SoftwareSerial bluetooth(btTx, btRx);

void setup() {
  monServo.attach(11); // Servo sur pin 11
  Serial.begin(9600);
  bluetooth.begin(9600);
}

void loop() {
  if (bluetooth.available() > 0) {
    int pos = bluetooth.read(); // 0-180
    Serial.println(pos);
    monServo.write(pos);
  }
}

Schéma de Câblage

Voir image schématique : HC-05 (VCC→3.3V, GND→GND, TX→Pin 9, RX→Pin 10), Servo (Signal→Pin 11, VCC→5V, GND→GND).

Processus de fabrication

  1. Construire un robot Raspberry Pi piloté par Bluetooth avec retour audio
  2. Créer un système Ambilight spectaculaire pour moniteur avec Arduino
  3. Créer un jeu Pong classique sur Arduino UNO avec écran OLED – Tutoriel étape par étape
  4. Transformez une vieille voiture RC en véhicule piloté au joystick avec Arduino
  5. Détecteur de fréquence audio Arduino — Mesurer le pic sonore avec module haute sensibilité
  6. Contrôler une LED par Bluetooth avec Arduino et MIT App Inventor
  7. Construisez votre propre Tamagotchi Arduino : Un animal de compagnie numérique DIY
  8. Morpion sur matrice LED MAX7219 avec boîtier en carton
  9. Robot commandé par la voix avec Arduino Nano et Bluetooth