1 UNIVERSITY OF THESSALY SCHOOL OF ENGINEERING MECHANICAL ENGINEERING DEPARTMENT Pedion Areos, 383 34 Volos, Greece http://www.mie.uth.gr/n_labs_main.asp?id=1 LABORATORY OF THERMODYNAMICS & THERMAL ENGINES Director: Professor A.M. Stamatelos MM803 Αυτόματος Ελεγχος, Εαρινό Εξάμηνο 2018-19 Συλλογή εργαστηριακών ασκήσεων επίδειξης με χρήση του μικροελεγκτή Arduino MEGA 2560 Συντάκτης: Αντιόπη-Μαλβίνα Σταματέλλου Volos, April 2019
25
Embed
SCHOOL OF ENGINEERING MECHANICAL ...12 3. Μέτρηση ατμοσφαιρικής πίεσης Ο αισθητήρας BMP180 είναι ένας χαμηλού κόστους αισθητήρας
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
The 28BYJ-48 is a small, cheap, 5 volt geared stepping motors. These stepping motors are apparently widely used to control things like automated blinds, A/C units and are mass
produced. Due to the gear reduction ratio of *approximately* 64:1 it offers decent torque for its size at speeds of about 15 rotations per minute (RPM). With some software “trickery” to accelerate gradually and a higher voltage power source (I tested them with 12 volts DC) I was able to get about 25+ RPM. These little steppers can be purchased together with a small breakout board for the Arduino compatible ULN2003 stepper motor driver at very low price, compared to the price of a geared DC motor, a DC motor controller and a wheel encoder! The low cost and small size makes the 28BYJ-48 an ideal option for small robotic applications, and an excellent introduction to stepper motor control with Arduino.
Figure 23 28BYJ-48 stepper motor
22
Figure 24 Τρόπος διέγερσης του βηματικού κινητήρα
The motor has 4 coils of wire that are powered in a sequence to make the magnetic motor shaft spin. When using the full-step method, 2 of the 4 coils are powered at each step. The default stepper library that comes pre-installed with the Arduino IDE uses this method. The 28BYH-48 datasheet specifies that the preferred method for driving this stepper is using the half-step method, where we first power coil 1 only, then coil 1 and 2 together, then coil 2 only and so on…With 4 coils, this means 8 different signals όπως στο Figure 18.
Figure 25 Βηματικός κινητήρας 28BYJ-48 (5 V DC)
23
Stepper_ULN2003.ino
#include <AccelStepper.h> #define HALFSTEP 8 // Motor pin definitions #define motorPin1 3 // IN1 on the ULN2003 driver 1 #define motorPin2 4 // IN2 on the ULN2003 driver 1 #define motorPin3 5 // IN3 on the ULN2003 driver 1 #define motorPin4 6 // IN4 on the ULN2003 driver 1 // Initialize with pin sequence IN1-IN3-IN2-IN4 for using the AccelStepper with 28BYJ-48 AccelStepper stepper1(HALFSTEP, motorPin1, motorPin3, motorPin2, motorPin4); void setup() { stepper1.setMaxSpeed(1000.0); stepper1.setAcceleration(100.0); stepper1.setSpeed(200); stepper1.moveTo(20000); }//--(end setup )--- void loop() { //Change direction when the stepper reaches the target position if (stepper1.distanceToGo() == 0) { stepper1.moveTo(-stepper1.currentPosition()); } stepper1.run(); }
24
8. Χειρισμός Linear Motion system με κινητήρα 2-phase 4 αγωγών
Figure 26 Stepper Motor with linear motion system
9. Χειρισμός Linear Motion system κινητήρα NEMA 17 4-phase 5 αγωγών
Figure 27 Linear motion system with NEMA 17 Stepper Motor
25
10. Συμπεράσματα
Στα πλαίσια της διδασκαλίας του μαθήματος ΜΜ803 Αυτόματος έλεγχος,
(2018-19) και προκειμένου να εξοικειωθούν οι φοιτητές με τις έννοιες του
αισθητήρα μέτρησης μιάς μεταβλητής ελέγχου, της συνάρτησης μεταφοράς
αισθητήρα (signal processing), του ενεργοποιητή (actuator) και της
συνάρτησης μεταφοράς του, την έννοια του ελεγκτή, του ψηφιακού και
αναλογικού σήματος, των εισόδων και εξόδων του μικροελεγκτή,
σχεδιάστηκε ένα τετράωρο μάθημα επίδειξης.
Στα πλαίσια του τετράωρου μαθήματος υλοποιήθηκε μιά σειρά από
πειράματα επίδειξης της λειτουργίας διαφόρων τύπων αισθητήρων
(sensors) και ενεργοποιητών (actuators) στην πλατφόρμα του
μικροεπεξεργαστή Arduino MEGA 2560, τα οποία συνοψίζονται στην
παρούσα τεχνική έκθεση.
ΒΙΒΛΙΟΓΡΑΦΙΑ
Reference List
1. Cameron, N., Arduino Applied - Comprehensive Projects for Everyday
Electronics. 2019: Apress.
2. Cicolani, J., Beginning Robotics with Raspberry Pi and Arduino_ Using
Python and OpenCV. 2018: Apress.
3. Nussey, J., Arduino For Dummies. 2nd Edition ed. 2018: John Wiley &