Inhaltsverzeichnis:

Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position) - Gunook
Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position) - Gunook

Video: Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position) - Gunook

Video: Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position) - Gunook
Video: 125 INNOVATIVSTE ELEKTROFAHRZEUGE UND PERSÖNLICHE TRANSPORTE 2024, Juli
Anonim
Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position)
Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position)
Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position)
Günstiger Smartphone-gesteuerter Arm (+ Option zum Speichern von Position)

Das Projekt

Fahren Sie einen Roboterarm, der über ein Bluetooth-Gerät per Smartphone gesteuert wird.

Modusbonus: Wir haben eine Schaltfläche, die es dem Arduino ermöglicht, sich an eine Position zu erinnern. Diese gespeicherte Position können wir jederzeit mit einer weiteren Taste anfahren.

NS

LE PROJET

Commander un robotisered bras construit à partir de carton und de servo-moteurs.

Le bras sera constitué d'une pince qui doit pouvoir prendre et poser un objet.

Auf der Commandera le BHs für Smartphones, die mit Bluetooth à l'arduino kommunizieren.

Modus-Bonus: Un bouton nous permettra de sauvegarder une position du bras. Lorsque l'on le souhaitera, nous pourrons retourner à la position sauvegardée.

Schritt 1: Benötigte Materialien

Materialien, die Sie brauchen
Materialien, die Sie brauchen

DE

1 Arduino UNO

4 Servomotoren SG90 (9g, Drehmoment: 1kg.cm)

1 Schrittmotoren 5V 24BYJ48 (Drehmoment: 39mN.m)

1 Treiber für die Schrittmotoren DRV8825

1 Stromversorgung 9V + 6V für die Motoren

1 Bluetooth-Modul HC-06

Klebepistole, Karton, Draht, elastisch

NS

1 Modul Arduino Uno

4 Servomotoren SG90 9g (Paar: 1kg.cm)

1 Motor pas-à-pas 5V (39mN.m) 24BYJ48

1 fahrer motor pap DRV8825

1 nahrung 9V pour l'arduino und 6V pour les moeurs

1 Modul Bluetooth HC-06 Pistolet à colle, Karton, Fils-Verbindung, élastique

Schritt 2: EINRICHTUNG

ERSTELLEN
ERSTELLEN

NS

ETAPE 1: Modul Bluetooth Le Modul Bluetooth (HC-06) est Connecté de la Manière suivante:

Rx Tx

Tx Rx

GND GND

VCC +5V

Il va permettre d'établir la Communication entre l'Arduino et le smartphone, via la voie Série (9600).

ETAPE 2: Le moteur pas à pas 24BYJ48

Nous avons connecté le moeur bipolaire pas à pas 24BYJ48 and son driver associé contenant le Circuit ULN2003. Il suffit de connecter les Inputs INx (x = 1, 2, 3, 4) aux sorties digitals de l'arduino. Auf alimentera le Treiber en +5V.

Pour coder, nous utiliserons la bibliothèque Stepper.h, ce qui nous permet de commander facilement le moteur en lui donnant la vitesse: nom.setSpeed(vitesse), ainsi que le pas désiré: nom.step(+ou-pas)

ETAPE 3: Les servo-motors SG90

Les servos moteurs se commandent facilement. Il suffit de brancher le fil rouge au +5V, le noir à la masse und le fil restant à une sortie PWM de l'arduino. On choisira ensuite l'angle du servo über la PWM (0 à 255).

Nous utiliserons la bibliothèque servo.h pour commander facilement le servo. Tout d'abord, on initialera le servo par son nom: Servo nom_servo, puis on lui rattachera la commande PWM: nom_servo.attach (pin choisi). Enfin, on commandera l'angle voulu: nom_servo.write(angle de 0 à 180).

ETAPE 4: Fabriquer le support Le support à été fabriqué en carton. Après avoir réalisé la base sur laquelle va tourner le bras und ou sera mis le moteur pas à pas, nous avons collé les servos moteurs à du carton pour donner la forme finale. La pince à été créée à partir de bâton de glace et fonctionne avec un élastique

Schritt 3: Der Code

Der Code
Der Code

// 24.02.2017 - Programm C - Commande de plusieurs servo moteurs dynamiques par smartphone, via bluetooth - App Erfinder 2 utilisé - Carte Arduino (ici UNO), Modul Bluetooth// Ce program a pour objectif de: //// Le moteur (fils 1 2 3 4) est branché sur les sorties 8 12 10 11 de l'Arduino (und sur GND, +V) Stepper small_stepper(STEPS, 8, 10, 12, 11); //********************ERKLÄRUNGEN**************************** * Wortwiederholung; // mot envoyé du module Arduino au Smartphone int cmd = 3; // variable commande du servo moteur (troisième fil (orange, jaune)) Servo moteur; // auf définit notre servomoteur int cmd1 = 5; Servomotor1; Servomotor2;Servomotor3; int cmd2=9; int cmd3=6; int angle2, angle3; int-Winkel; int-Winkel1; int-Pass; int r, r1, r2, r3; int-Registrierer; Wort w; // Variabler Gesandter des Smartphone-Au-Moduls Arduino int angle; // Drehwinkel (0 a 180) //********************SETUP******************** ****************** Void setup () {moteur.attach (cmd); // auf dem objekt au pin de commande moteur1.attach (cmd1); moteur2.attach (cmd2); moteur3.attach (cmd3); motor.write(12); motor1.write(23); Serial.begin (9600); // permettra de Communiquer au-Modul Bluetooth} //********************BOUCLE******************** **************** Void Schleife () { recevoir (); // on va recevoir une information du smartphone, la variable w if (w==206)reproduire();// va nous permettre de reproduire la position enregistrée if(w==205)enregistrer=1;// va nous permettre d'enregistrer la valeur des servos moteurs lorsque l'on apuiera sur un bouton if (w==204)enregistrer=0; for (int k=100;k<151;k++) { if (w == k) { angle2 = map(k, 100, 150, 0, 180); motor2.write (Winkel2); if (Einschreiber==1)r2=Winkel2; }} for (int j=151;j<201;j++) { if (w == j) { angle3 = map(j, 151, 200, 0, 150); moteur3.write (Winkel3); if (Einschreiber==1) r3=Winkel3; }} for (int i=0;i<34;i++) { if (w == i) { angle = map(i, 0, 34, 0, 70); motor.write (Winkel); if (enregistrer==1)r=Winkel; }} for (int l=34;l<=66;l++) { if (w == l) { angle1 = map(l, 34, 66, 90, 0); motor1.write (Winkel1); if (Registrierer==1)r1=Winkel1; }} for (int m=67;m<=99;m++) { if (w == m) { if (w86){ small_stepper.setSpeed(80);small_stepper.step(-5);} else small_stepper.step (0); } } } //****************************FUNKTIONEN**************** ******************** void reproduire() // fonction permettant de reproduire la position sauvegardée { moteur2.write(r2);moteur.write(r);moteur1. write(r1);moteur3.write(r3); aufrechtzuerhalten. Void recevoir () {// Funktion permettant de recevoir l'information du smartphone if (Serial.available ()) {w = Serial.read (); Serial.flush(); }} - Connecter le Servo moteur + module bluetooth au module arduino // - Envoyer un mot/phrase/nombre au smartphone // - Recevoir une commande via smartphone // Program réalisé par Techno_Fabrik //********* **********BIBLIOTHEQUES**************************** #include #include// bibliothèque permettant d' utiliser les commandes pour servomoteurs facilement #include

Schritt 4: Smartphone-APP (hergestellt auf APP Inventor 2)

Smartphone-APP (Erstellt auf APP Inventor 2)
Smartphone-APP (Erstellt auf APP Inventor 2)

Schritt 5: Videorealisation

Danke fürs Zusehen.!

Um mehr zu erfahren, besuchen Sie unsere Website:

Oder folgen Sie uns auf Google+:

Vielen Dank !

Empfohlen: