Moto1. 28BYJ-48 Stepper Motor. Ausgabe Copyright by Joy-IT 1

Similar documents
Gravity: 12-Bit I2C DAC Module SKU: DFR0552

Grove - Collision Sensor

CamJam EduKit Robotics Worksheet Nine Obstacle Avoidance camjam.me/edukit

Total Hours Registration through Website or for further details please visit (Refer Upcoming Events Section)

CamJam EduKit Robotics Worksheet Six Distance Sensor camjam.me/edukit

User Manual. Grove - IR Distance Interrupter. Release date: 2015/9/22. Version: 1.0

Grove - HCHO Sensor. Release date: 9/20/2015. Version: 1.0. Wiki:

Project Kit Project Guide

J. La Favre Using Arduino with Raspberry Pi February 7, 2018

Figure 1. Digilent DC Motor

Fading a RGB LED on BeagleBone Black

Motor Driver HAT User Manual

Adafruit 16 Channel Servo Driver with Raspberry Pi

FABO ACADEMY X ELECTRONIC DESIGN

Grove - Gas Sensor(MQ9)

J. La Favre Controlling Servos with Raspberry Pi November 27, 2017

Pibrella Fairground Ride. This lesson follows on from the Pelican Crossing lesson

CPSC 226 Lab Four Spring 2018

The Motor sketch. One Direction ON-OFF DC Motor

VMA435 DIGITAL ROTARY ENCODER MODULE USER MANUAL

Arduino and Servo Motor

가치창조기술. Motors need a lot of energy, especially cheap motors since they're less efficient.

Python Programming For Arduino

Adafruit's Raspberry Pi Lesson 8. Using a Servo Motor

Adafruit 16-Channel PWM/Servo HAT & Bonnet for Raspberry Pi

Adafruit 16-Channel PWM/Servo HAT for Raspberry Pi

INA169 Breakout Board Hookup Guide

Computational Crafting with Arduino. Christopher Michaud Marist School ECEP Programs, Georgia Tech

Grove - Infrared Receiver

So-Lo. Team 12. Department of Electrical and Computer Engineer

LEVEL A: SCOPE AND SEQUENCE

Setting up Volumio to get great audio

Raspberry Pi Cookbook Ebooks Free

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

PWM CONTROL USING ARDUINO. Learn to Control DC Motor Speed and LED Brightness

Arduino Control of Tetrix Prizm Robotics. Motors and Servos Introduction to Robotics and Engineering Marist School

Grove - 433MHz Simple RF link kit User Manual

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

9/Working with Webcams

Parts List. Robotic Arm segments ¼ inch screws Cable XBEE module or Wifi module

Programming a Servo. Servo. Red Wire. Black Wire. White Wire

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

100UF CAPACITOR POTENTIOMETER SERVO MOTOR MOTOR ARM. MALE HEADER PIN (3 pins) INGREDIENTS

Explore and Challenge:

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Megamark Arduino Library Documentation

Operating Mode: Serial; (PWM) passive control mode; Autonomous Mode; On/OFF Mode

Pololu DRV8835 Dual Motor Driver Kit for Raspberry Pi B+

Adafruit 16-Channel Servo Driver with Arduino

Development of a Remotely-Controlled Autofocus System For a Microscope

Arduino Lesson 1. Blink. Created by Simon Monk

Make: Sensors. Tero Karvinen, Kimmo Karvinen, and Ville Valtokari. (Hi MAKER MEDIA SEBASTOPOL. CA

Experiment 4.B. Position Control. ECEN 2270 Electronics Design Laboratory 1

Chroma Servo Board v3 for Raspberry Pi. (Firmware 0.1 and 0.2)

Setup Download the Arduino library (link) for Processing and the Lab 12 sketches (link).

Grove - I2C Color Sensor User Manual

IoT using Raspberry Pi

URM37 V3.2 Ultrasonic Sensor (SKU:SEN0001)

APDS-9960 RGB and Gesture Sensor Hookup Guide

Assignments from last week

LED + Servo 2 devices, 1 Arduino

Sensorkit X40. You can find code-examples and software on our website

AS726X NIR/VIS Spectral Sensor Hookup Guide

USER MANUAL SERIAL IR SENSOR ARRAY5

Follow this and additional works at: Part of the Engineering Commons

Adafruit 16-Channel Servo Driver with Arduino

Design with Microprocessors Year III Computer Science 1-st Semester

POLOLU DUAL MC33926 MOTOR DRIVER FOR RASPBERRY PI (ASSEMBLED) USER S GUIDE

Learning Objectives. References 10/26/11. Using servos with an Arduino. EAS 199A Fall 2011

Arduino DC Motor Control Tutorial L298N PWM H-Bridge

Using Servos with an Arduino

Mechatronics. STEAM Clown Production. STEAM Clown & Productions Copyright 2016 STEAM Clown

CONSTRUCTION GUIDE Light Robot. Robobox. Level VI

ABCs of Arduino. Kurt Turchan -

Portland State University MICROCONTROLLERS

Lab 5: Arduino Uno Microcontroller Innovation Fellows Program Bootcamp Prof. Steven S. Saliterman

Lesson4 Obstacle avoidance car

Internet of Things Student STEM Project Jackson High School. Lesson 3: Arduino Solar Tracker

Development of Indian Coin based automatic shoe Polishing Machine using Raspberry pi with Open CV

Sensors and Motor Control Lab Individual lab report #1 October 16, 2015

EARTH PEOPLE TECHNOLOGY. EPT-200TMP-TS-U2 Temperature Sensor Docking Board User Manual

CURIE Academy, Summer 2014 Lab 2: Computer Engineering Software Perspective Sign-Off Sheet

Circuit Playground Quick Draw

Pololu Dual G2 High-Power Motor Driver for Raspberry Pi

Smart Garden Inc. Auto Watering System

- Introduction - Minecraft Pi Edition. - Introduction - What you will need. - Introduction - Running Minecraft

DHT11 Electronic Brick of Digital Temperature & Humidity Sensor

Arduino Sensor Beginners Guide

Robotic Arm Assembly Instructions

Programming 2 Servos. Learn to connect and write code to control two servos.

Adafruit 16-Channel Servo Driver with Arduino

Build your own SDR. By Julie VK3FOWL and Joe VK3YSP

Implementation Of Vision-Based Landing Target Detection For VTOL UAV Using Raspberry Pi

Arduino Intro. Introduction to Arduino For linux geeks. By Peter Sjöberg peters-oclug at techwiz point ca.

NAMASKAR ROBOT-WHICH PROVIDES SERVICE

Sten BOT Robot Kit 1 Stensat Group LLC, Copyright 2016

Adafruit SGP30 TVOC/eCO2 Gas Sensor

For this exercise, you will need a partner, an Arduino kit (in the plastic tub), and a laptop with the Arduino programming environment.

Eye Monitored Wheelchair System Using Raspberry Pi

Moving Object Follower

Transcription:

28BYJ-48 Stepper Motor Ausgabe 07.07.2017 Copyright by Joy-IT 1

Index 1. Using with an Arduino 1.1 Connecting the motor 1.2 Installing the library 1.3 Using the motor 2. Using with a Raspberry Pi 2.1 Connecting the motor 2.2 Installing the software 2.3 Using the motor 3. Support Ausgabe 07.07.2017 Copyright by Joy-IT 2

Dear customer, thank you for purchasing our product. Please find our instructions below. 1. Using with an Arduino 1.1 Connecting the motor Connect the motor to the driver-board with the pin connector. Connect the board, as seen in the following image and in the following table, to the pins of your Arduino. Ausgabe 07.07.2017 Copyright by Joy-IT 3

Arduino PIN Driver-Board PIN +5V + GND - 8 INT1 9 INT2 10 INT3 11 INT4 1.2 Installing the library Before transferring the code to your Arduino, you need to add the CheapStepper library. This library extends your Arduino library by the needed functions to provide a perfect usage of the product. This library was made by Tyler Henry and was published under the GNU General Public License and can be accesed here. Open your Arduino DIE and select, as seen in the following image, the Arduino library manager. Ausgabe 07.07.2017 Copyright by Joy-IT 4

Now you can install the CheapStepper library by searching for 28BYJ-48. Ausgabe 07.07.2017 Copyright by Joy-IT 5

1.3 Using the motor With the following example, you can use the motor with an Arduino. In this specific example, the motor rotates in to the one direction and then to the other. You can, of course, modify this example to fit your needs. #include <CheapStepper.h> CheapStepper stepper; //Direction setup boolean moveclockwise = true; void setup() { Serial.begin(9600); Serial.println("28BYJ-48 bereit."); } void loop() { for (int s=0; s<4096; s++){ //one complete turn contains 4096 steps stepper.step(moveclockwise); //printing the current position to the console int nstep = stepper.getstep(); if (nstep%64==0) { Serial.print("current step position: "); Serial.print(nStep); Serial.println(); } } delay(1000); //change direction after one turn moveclockwise =!moveclockwise; } Ausgabe 07.07.2017 Copyright by Joy-IT 6

1. Using with a Raspberry Pi 1.1 Connecting the motor Connect the motor to the driver-board with the pin connector. Connect the board, as seen in the following image and in the following table, to the pins of your Raspberry Pi. Ausgabe 07.07.2017 Copyright by Joy-IT 7

Raspberry PIN Driver-Board PIN PIN 4 (5V) + PIN 6 (Ground) - PIN 12 (BCM 18) INT1 PIN 16 (BCM 23) INT2 PIN 18 (BCM 24) INT3 PIN 22 (BCM 25) INT4 2.2 Installing the software You can skip this step and continue with Step 2.3 if you are already using the latest Raspbian system on your Raspberry. Install the latest Raspbain Image to your SD-Card with the Win32 Disk Imager -Tool. You can find the latest Raspbian image here. Ausgabe 07.07.2017 Copyright by Joy-IT 8

2.3 Using the motor You can use the motor with the following code example. In this example, the motor will make one complete turn. To create this example, open the terminal and create a new file: sudo nano motor.py Enter the following code in the now opened editor. You can save the file by pressing CTRL+O and quit by pressing CTRL+X. from time import sleep import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) # PIN-Assignment A=18 B=23 C=24 D=25 time = 0.001 # defining the PINs GPIO.setup(A,GPIO.OUT) GPIO.setup(B,GPIO.OUT) GPIO.setup(C,GPIO.OUT) GPIO.setup(D,GPIO.OUT) GPIO.output(A, False) GPIO.output(B, False) GPIO.output(C, False) GPIO.output(D, False) # driving the motor def Step1(): GPIO.output(D, True) GPIO.output(D, False) Ausgabe 07.07.2017 Copyright by Joy-IT 9

def Step2(): GPIO.output(D, True) GPIO.output(C, True) GPIO.output(D, False) GPIO.output(C, False) def Step4(): GPIO.output(B, True) GPIO.output(C, True) GPIO.output(B, False) GPIO.output(C, False) def Step5(): GPIO.output(B, True) GPIO.output(B, False) def Step6(): GPIO.output(A, True) GPIO.output(B, True) GPIO.output(A, False) GPIO.output(B, False) def Step7(): GPIO.output(A, True) GPIO.output(A, False) def Step8(): GPIO.output(D, True) GPIO.output(A, True) GPIO.output(D, False) GPIO.output(A, False) Ausgabe 07.07.2017 Copyright by Joy-IT 10

# start one complete turn for i in range (512): Step1() Step2() Step3() Step4() Step5() Step6() Step7() Step8() GPIO.cleanup() After you saved your code and quit the edior, you can start the example by entering: sudo python motor.py Ausgabe 07.07.2017 Copyright by Joy-IT 11

5 Zoll HDMI LCD 3. Support We also support you after your purchase. If you have any questions left or encounter any problems, feel free to contact us by E-Mail, phone or with our ticket-supportsystem on our website. E-Mail: service@joy-it.net Ticket-System: http://support.joy-it.net Phone: +49 (0)2845 98469 66 (11-18 Uhr) For further informations, please visit our website: www.joy-it.net Ausgabe 07.07.2017 Copyright by Joy-IT 12