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

Voiture RC Wi‑Fi à recharge Qi : Kit voiture télécommandée sans fil

Composants et fournitures

Outils nécessaires

Applications et services en ligne

À propos de ce projet

Ce que vous allez construire

Une voiture RC commandée par Wi-Fi qui se recharge automatiquement par induction (standard Qi) lorsqu'elle est garée sur sa base.

Principe de fonctionnement

Construction hardware

  1. Soudure : fils sur bornes moteurs ; fils rouge/noir sur sorties OUT/GND du récepteur Qi.
  2. Circuit électronique : sur breadboard ou soudé selon schéma (voir image). Attention : batterie Li-Po ≥700 mAh impératif (risque surchauffe/explosion).
  3. Réglage CN6009 : ajuster la vis pour obtenir 5 V en sortie (vérifier au voltmètre sur OUT+/OUT-).
  4. Fixation récepteur Qi : base en plastique (ex. carte) collée sous le châssis ; récepteur collé dessus (silicone). Fil rouge → VIN Arduino, fil noir → GND.
  5. Stabilisation : attacher batterie et breadboard au châssis avec colliers.

Partie logicielle – Connexion Wi-Fi

Dans le code, renseigner SSID et mot de passe (lignes 12–13). Prévu pour WPA/WPA2 ; instructions en commentaires pour WEP/réseau ouvert (lignes 34–37).

Utilisation

  1. Connexion au MKR1000 : deux options — (a) hotspot mobile (recommandé, pas de routeur nécessaire) ou (b) même routeur Wi-Fi que le téléphone. Renseigner SSID/mot de passe dans le code.
  2. Récupérer l'IP : si hotspot, visible dans les paramètres du hotspot (ex. 192.168.1.1) ; si routeur, dans l'interface d'administration.
  3. Accéder au serveur web : navigateur → https://<IP_ARDUINO>.
  4. Base de charge : brancher l'émetteur Qi sur secteur via adaptateur 5 V DC.
  5. Piloter ! : interface web avec gros boutons (AVANT, ARRIÈRE, GAUCHE, DROITE, STOP) et choix vitesse (RAPIDE/LENT).

Code

Arduino_IDT_Wi-Fi_Car.ino

#include 
#include 

const int motor1Control = 2;   // Moteur droit
const int motor2Control = 3;   // Moteur gauche
const int motor1Input1 = 4;
const int motor1Input2 = 5;
const int motor2Input1 = 8;
const int motor2Input2 = 9;
const int wifiLed = 10;

char ssid[] = "example";   // ← VOTRE SSID
char pass[] = "password";  // ← VOTRE MOT DE PASSE
int keyIndex = 0;
int status = WL_IDLE_STATUS;
String readString;
WiFiServer server(80);
String speedMode = "fast";

void setup() {
  pinMode(motor1Control, OUTPUT); pinMode(motor2Control, OUTPUT);
  pinMode(motor1Input1, OUTPUT); pinMode(motor1Input2, OUTPUT);
  pinMode(motor2Input1, OUTPUT); pinMode(motor2Input2, OUTPUT);
  pinMode(wifiLed, OUTPUT);

  while (status != WL_CONNECTED) {
    status = WiFi.begin(ssid, pass);      // WPA/WPA2
    // status = WiFi.begin(ssid, keyIndex, pass); // WEP
    // status = WiFi.begin(ssid);                 // Open
    delay(10000);
  }
  server.begin();
  digitalWrite(wifiLed, HIGH);  // LED = connecté
}

void loop() {
  WiFiClient client = server.available();
  if (client) {
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        if (readString.length() < 100) readString += c;
        if (c == '\n') {
          // Réponse HTTP + page HTML
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          client.println("");
          client.println("FORWARDS
"); client.println("LEFT"); client.println("STOP"); client.println("RIGHT
"); client.println("BACKWARDS

"); client.println("

SPEED MODES

"); client.println("FAST"); client.println("SLOW"); client.println(""); break; } // Traitement commandes if (readString.indexOf("?fast") > 0) { speedMode = "fast"; readString = ""; } if (readString.indexOf("?slow") > 0) { speedMode = "slow"; readString = ""; } if (speedMode == "fast") { if (readString.indexOf("?moveForwards") > 0) { moveForwards(); readString = ""; } if (readString.indexOf("?moveBackwards") > 0) { moveBackwards(); readString = ""; } } else { if (readString.indexOf("?moveForwards") > 0) { moveForwardsSlow(); readString = ""; } if (readString.indexOf("?moveBackwards") > 0) { moveBackwardsSlow(); readString = ""; } } if (readString.indexOf("?turnLeft") > 0) { turnLeft(); readString = ""; } if (readString.indexOf("?turnRight") > 0) { turnRight(); readString = ""; } if (readString.indexOf("?stopMoving") > 0) { stopMoving(); readString = ""; } } } delay(1); client.stop(); } } // --- Fonctions mouvement --- void moveForwards() { digitalWrite(motor1Control, HIGH); digitalWrite(motor2Control, HIGH); digitalWrite(motor1Input1, LOW); digitalWrite(motor1Input2, HIGH); digitalWrite(motor2Input1, LOW); digitalWrite(motor2Input2, HIGH); } void moveBackwards() { digitalWrite(motor1Control, HIGH); digitalWrite(motor2Control, HIGH); digitalWrite(motor1Input1, HIGH); digitalWrite(motor1Input2, LOW); digitalWrite(motor2Input1, HIGH); digitalWrite(motor2Input2, LOW); } void turnRight() { analogWrite(motor1Control, 0); analogWrite(motor2Control, 200); digitalWrite(motor1Input1, HIGH); digitalWrite(motor1Input2, LOW); digitalWrite(motor2Input1, LOW); digitalWrite(motor2Input2, HIGH); } void turnLeft() { analogWrite(motor1Control, 200); analogWrite(motor2Control, 0); digitalWrite(motor1Input1, LOW); digitalWrite(motor1Input2, HIGH); digitalWrite(motor2Input1, HIGH); digitalWrite(motor2Input2, LOW); } void stopMoving() { digitalWrite(motor1Control, LOW); digitalWrite(motor2Control, LOW); digitalWrite(motor1Input1, LOW); digitalWrite(motor1Input2, LOW); digitalWrite(motor2Input1, LOW); digitalWrite(motor2Input2, LOW); } void moveForwardsSlow() { analogWrite(motor1Control, 200); analogWrite(motor2Control, 200); digitalWrite(motor1Input1, LOW); digitalWrite(motor1Input2, HIGH); digitalWrite(motor2Input1, LOW); digitalWrite(motor2Input2, HIGH); } void moveBackwardsSlow() { analogWrite(motor1Control, 200); analogWrite(motor2Control, 200); digitalWrite(motor1Input1, HIGH); digitalWrite(motor1Input2, LOW); digitalWrite(motor2Input1, HIGH); digitalWrite(motor2Input2, LOW); }

Pièces personnalisées / Boîtiers

Fichier CAO : Arduino IDT Wireless charging wifi car.cad

Schéma

Schéma de câblage complet (image fournie).

Processus de fabrication

  1. Constructeurs C# : Types, exemples et patterns avancés
  2. Comprendre les classes imbriquées C# : Définition, utilisation et héritage
  3. Maîtriser la surcharge de constructeurs en C#
  4. Pourquoi les appareils IoT Wi-Fi posent une menace de sécurité croissante
  5. Fabrication de pièces moteurs de précision premium avec tours CNC et fraisage
  6. Maîtriser le cric automobile : types, usages et conseils de sécurité
  7. Comment le nombre de cylindres façonne la performance des moteurs modernes
  8. Comment fonctionne un moteur de voiture : à l'intérieur de la puissance au volant
  9. Comment réparer une fuite d'essence sur sa voiture rapidement et en sécurité