Home > News
News
contact us
  • Tel: 0086-519-88298833
           0086-15380462663
  • E-mail: info@sunrisemotor-cn.com
  • Address:No.15-2-1608, Jiuzhou New World, Changzhou, Jiangsu, China 213001

News

CONTROL SOFTWARE EXAMPLES

View:91307/09/2018  

Below you will find some small pieces of code, mostly in C/C++, some in Assembly language for various processors and microcontrollers. This code is by no means complete, but is provided only to give a basic understanding of the software involved in controlling stepper motors both with and without the use of a hardware translator circuit. 


Words of caution: 


When making connections to either a PC parallel port, or I/O pins of a microcontroller, be sure to isolate the motor well. High voltage spikes of several hundered volts are possible as back EMF from stepper motor coils. Always use clamping diodes to short these spikes back to the motor's power bus. The use of optical isolation devices (optoisolators) will add yet another layer or protection between the delicate control logic and the high-voltage potentials which may be present in the power output stage. Whenever possible, use separate power supplies for the motor and the translator / microcontroller. This further reduces the chance of destructive voltages reaching the controller, and reduces or eliminates power supply noise that may be introduced by the motor. 


If you're using a computer that has a parallel port as part of its onboard I/O, you may want to consider purchasing a parallel port card to use instead. I've seen them for as little as $9.99 at Fry's Electronics and other computer stores. Not only does this reduce the risk of permanently damaging or destroying your motherboard (it happened to a friend of mine!), but it will also allow you to experiment without the need for swapping cables or flipping a switchbox when you want to use your parallel printer, since your experiments won't be sharing its port. It is much cheaper to throw out a $10.00 parallel port card than it is to replace your motherboard! 


Complete Software Control: 


Under complete software control, there is no translator circuit external to the Parallel port or microcontroller. This scheme reduces parts count, component cost, and makes for simpler board design. On the other hand, it places the responsibility of generating all of the sequencing signals on the software. If the PC or microcontroller is not fast enough (due to code inefficiency or slow processor speed), or too many motors are driven simultaneously, things can begin to slow down. Interrupts and other system events can plague the control software more in this case. Despite the downfalls of addressing a stepper motor directly in this manner, it is definitely the easiest and most straightforward approach to controlling a stepper motor. This method of controlling a motor can also be useful where the hardware is not critical at first and a simple interface is needed to allow more time to be spent on the development of the software before the hardware is refined.


View More(Total0)Comment Lists
No Comment
I want to comment
Content *
    
    
>>Drag the slider to verify<<
  

Related News

1.Sunrise Motor main products---DC MOTOR(BLDC motor and PMDC motor)
2.Welcome to visit our website, Thanks!
3.new brushless dc motor for drill machine
4.Bifilar Motors