0 Tw eet 0 Search
t opics
android app arduino code do it yourself Extra gadgets hacking gadgets just looking 3 Like ShareArduino Tutorial Series – Running
Epson Stepper Motor EM-546
Posted on December 27, 2012 by admin
...
A simple tool to run an EM-546 Stepper motor grabbed from a
junk Epson Stylus T10
just looking my projects Software
r ecent ar t icles
Western Digital My Passport 1TB
Intel RST for Cooler Platform Controller Hub (PCH)
I Installed a Lincensed ESET NOD32 Antivirus!
The Tale of Impulsive Upgrader | From Windows.3x to Windows 8 / 8.1
Bluetooth File Transfer Protocol Version 2
Blocking The Globe Tattoo Ghost Web Icon
A Laptop Cooling Pad Test
r ecent comment s
admin on The Huawei Mobile /*********************************
Using
-Arduino Uno
-e-Gizmo Motor Driver Shield with LB11847 3XN3 IC
-Epson Stepper motor EM-546
- connect the blue pin to A neg - cross connect the center pins - connect the last pin to B normal *********************************/
Pocket Wifi E5220
Miel on The Huawei Mobile Pocket Wifi E5220
Miel on The Huawei Mobile Pocket Wifi E5220
anne on The Huawei Mobile Pocket Wifi E5220
tan on Fixing the Slow Arduino IDE | More Than 20 Seconds Delay
t ags
android
arduino
battery
camera computer ddwrtelectricity
epsonfan
freedom planglobe
hard disk
harddrive
huawei
internet
laptop
lcd ldrled
ledslinux
mmorpg motor mp3phone
potentiometer pow er supply psu
push button
qos
routersamsung
const byte Aneg = 8; //OUTPUT A BAR const byte Anorm = 9; //OUTPUT A NORMAL const byte Bneg = 10; //OUTPUT B BAR const byte Bnorm = 11; //OUTPU B NORMAL // VM to external positive input
// Ground to external ground int motorspeed = 100;
void setup(){//void setup start brace //initiate serial communication
Serial.begin(9600);
//declaring all the pins //as OUTPUT
pinMode(Aneg,OUTPUT); pinMode(Anorm,OUTPUT); pinMode(Bneg,OUTPUT); pinMode(Bnorm,OUTPUT); }//void setup end brace
/********************************* ROTATE THE MOTOR CLOCKWISE
*********************************/
void clockwise(){// void clockwise start //step 1
digitalWrite(Aneg,HIGH); digitalWrite(Anorm,LOW); digitalWrite(Bneg,HIGH);
sd card seven segments smart
sony
stepper motorsun cellular
tattoo
toshibausb
wifi
windows
w irewordpress
digitalWrite(Bnorm,LOW); delay(motorspeed); //step 2 digitalWrite(Aneg,HIGH); digitalWrite(Anorm,HIGH); digitalWrite(Bneg,LOW); digitalWrite(Bnorm,HIGH); delay(motorspeed); //step 3 digitalWrite(Aneg,LOW); digitalWrite(Anorm,LOW); digitalWrite(Bneg,HIGH); digitalWrite(Bnorm,HIGH); delay(motorspeed); //step 4 digitalWrite(Aneg,LOW); digitalWrite(Anorm,HIGH); digitalWrite(Bneg,LOW); digitalWrite(Bnorm,LOW); delay(motorspeed);}//void clockwise end
/********************************* ROTATE THE MOTOR COUNTERCLOCKWISE *********************************/
void counterclock(){//void counterclock start //step 1
digitalWrite(Aneg,LOW); digitalWrite(Anorm,HIGH); digitalWrite(Bneg,LOW);
digitalWrite(Bnorm,HIGH); delay(motorspeed); //step 2 digitalWrite(Aneg,HIGH); digitalWrite(Anorm,LOW); digitalWrite(Bneg,HIGH); digitalWrite(Bnorm,HIGH); delay(motorspeed); //step 3 digitalWrite(Aneg,HIGH); digitalWrite(Anorm,HIGH); digitalWrite(Bneg,LOW); digitalWrite(Bnorm,LOW); delay(motorspeed); //step 4 digitalWrite(Aneg,LOW); digitalWrite(Anorm,LOW); digitalWrite(Bneg,HIGH); digitalWrite(Bnorm,LOW); delay(motorspeed);
}//void counterclock end /*********************** STOP THE RUNNING MOTOR ***********************/
void motorstop(){// void motorstop start digitalWrite(Aneg,LOW);
digitalWrite(Anorm,LOW); digitalWrite(Bneg,LOW); digitalWrite(Bnorm,LOW);
}//void motorstop end /************************ ENTERING THE VOID LOOP ************************/
void loop(){//void loop start brace
if (Serial.available() > 0){//if serial start brace int motoraction = Serial.read();
switch (motoraction){//switch start brace //move clockwise case 'a': clockwise(); motorstop(); break; //move counterclockwise case 'b': counterclock(); motorstop(); break; //stop case 'c': motorstop(); break;
//if none of the condition is //met, stop the motor
default:
motorstop();
2 THOUGHTS ON “ARDUINO TUTORIAL SERIES – RUNNING EPSON STEPPER MOTOR EM-546”
}//if serial end brace
//note that switchcase statement //is inside if Serial.read Statement }//void loop end brace
RE L A T E D P O S T S
1.
Arduino Tutorial Series – Seven Segments Part 1
2.
Arduino Tutorial Series – The Millis-Based Delay
3.
Simple Christmas Light Effects With Arduino
4.
Arduino Tutorial Series – The Blink Timer
...
0 Tw eet 0
This entry was posted in hacking gadgets and tagged arduino, em-546, epson, stepper motor by admin. Bookmark the permalink.
3
Like Share
Bob on August 27, 2013 at 3:56 am said:
You did a very impressive work here and thank you for
sharing it generously.
I just disassembled my epson printer took this specific
em546 motor and googled for info, and got interested in
your blog. I need the exact thing you did but im new to
arduino (read alot about it in the past but never owned it
yet). It surprised me that your from manila! kabayan! i
wish to contact you and inquire some questions if it wont
be of burden to you..
is it possible that this motor (together with the gear with
metal bushing beside it in the printer) could hold or rotate
if i attach a camera on it? to be used in panning.
is it possible to add speed control to your code/circuit?
thanks and God bless your generosity.
Reply ↓
Saroch kamjikong on September 24, 2013 at 9:43 am said:
Hello now i have EM 546 but i don’t know spec it. U can
tell me?
My code
#include
const int STEPS = 200;
Stepper stepper_F(STEPS, 11, 10, 9, 8);
void setup(){
Serial.begin(9600);
}
void loop(){
int i=0;
if (Serial.available() > 0){
int motoraction = Serial.read();
switch (motoraction){
case ‘a’:
Serial.println(“clockwise”);
stepper_F.setSpeed(140);
for(i=0;i<30;i++)
{
stepper_F.step(STEPS);
}
}
delay(500);
break;
//move counterclockwise
case 'b':
stepper_F.setSpeed(5);
stepper_F.step(-STEPS);
delay(500);
break;
}
}
}
- it slow and have a noise sound.
Reply ↓
Leave a Reply
Your email address will not be published. Required fields are marked *
Post Comment
Name
*
*
« «
Arduino Tutorial Series – Seven Segments Part 1
The Internals of 270 MB Quantum ProDrive
» »
© by luntianlaboratory.com 2010-2012 see change log, site rules & stuff