Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Stepper motor control through serial communication.

Status
Not open for further replies.

kishore680

Member level 5
Joined
Mar 14, 2012
Messages
81
Helped
3
Reputation
6
Reaction score
4
Trophy points
1,298
Location
Bangalore
Activity points
1,833
Hi i want to control stepper motor. I am using Matlab to read a file which contains temperature value say 25 degree. If threshold value is 24 and current temperature is more than threshold send data(signal) to actuate stepper motor via serial port otherwise do nothing.I have written serial code.
Code:
 s = serial('COM1','BaudRate',9600);
 fopen(s);
 fprintf(s,'A');
I want to use Pic16F84a as the microcontroller. So if uc receives 'A'. stepper motor should turn on.I think i should use interrupt to monitor continuosly from the serial port. could someone help me where i can look for this interrupt programming and is the overall steps are correct?
 

One key point is to understand that step motors aren't regular dc motors, they need to be pulsed with a sequence off signals to rotate, Your mat lab program must define how many steps you want the motor to rotate, acording to this your pic device will put the correct sequences off pulses on the motor passing by a power bridge, Step motor's dont turn on, they act on pulses, while the pulses are there on a correct sequence they will turn to one or another side ( accordinng to the sequence ), as sons as the pulses stop, the motor will stop imediately.

Take a look on those links

**broken link removed**

**broken link removed**

Regards

Carlos
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top