Ask a Question
Welcome to the MotorForum.RfidEpc.CoM Servo & Stepper Motor Industrial Automation Technology Community Forum


+3 votes
193 views
How to control servo motor without microcontroller?How to control the speed of the servo motor without a single-chip microcomputer? How to control the operation of servo motors without a single-chip microcomputer? Can a single-chip microcomputer control a servo? How does the microcomputer control the servo motor drive? MCU control servo motor wiring diagram?
by (34.6k points)
edited by

5 Answers

+1 vote
 
Best answer

How to directly control the motor with a computer without using a single-chip microcomputer, etc.?

How to directly control the motor with a computer without using a single-chip microcomputer, etc.?

Only need to control the switch of the motor, do not need to control the speed, can be directly controlled through the PC?

Control the motor is too vague, simple motor control is a switch plus commutation, complex such as servo motor to be equipped with a special drive, the drive is more expensive than your computer, if equipped with this dongdong is not considered computer control? Look at what interface your control interface is, if it is not the interface that the computer has, then obviously not. If you can add a converter as long as it does not contain a single-chip microcomputer, then the answer is controllable, but it depends on what level you want to control, if you are not allowed to increase the use of FPGAs, single-chip microcomputers and other things that will increase the control logic function, through the existing converter or make a converter yourself, control an on, stop, step pulse, PWM are all possible, but like a servo motor to accurately control the torque speed position according to a bunch of sensors, it is not impossible, you can get a real-time operating system on the computer, Or write your own program naked, there is no problem at all.

As for many answers, what strong and weak current drive current, that has nothing to do with whether it can be controlled or not, you also need those circuits with a single-chip microcomputer.

by (62.8k points)
selected by
+1 vote

How to control servo motor with single-chip microcomputer?

Servo motor is a kind of motor we commonly use, in the case of this article, we will learn how to use a single-chip microcomputer to control the servo motor, the case uses PIC16F877A single-chip microcomputer as an interface connection and control example.

What is a servo motor?

A servo motor is a special motor that operates according to a given instruction. It provides precise angle control, which also means that it is not the same as other motors that rotate when energized. The servo motor only rotates to a certain extent or until the next rotation is required, before the motor stops and waits for the next command before performing further actions. Therefore, the servo motor needs to be controlled by the servo circuit to rotate as required, its angular rotation and final motion are determined by position feedback, and the input of its control line also determines the required position of the output shaft.

Servo motor circuit diagram of servo motor interface with PIC16F877A.

It has a very simple circuit diagram. The control line of the servo motor is directly connected to the RB0 pin of the microcontroller. This pin will provide the required angular displacement of the motor.

In this project, suppose we are using a servo motor whose angular rotation is limited to 0°-180°. We can control the rotation of the motor with the highest precision to achieve the desired angle by using pulses with width changes.

A pulse is supplied to the servo motor after every 20 milliseconds (20,000 microseconds). The angular position of the motor is determined by the length of this pulse. Angular positions 0°, 90°, and 180° are demonstrated in the code.

by (62.8k points)
+1 vote

Below is the C code of the PIC microcontroller interface for controlling the servo motor, and we write the following servo motor code with the PIC interface in the compiler:

Servo motor C language code

void Rotation0() //0 degrees

{

unsigned int i;

for(i=0; i<50; i++)

{

PORTB. F0 = 1;

Delay_us(800); 800us pulse

PORTB. F0 = 0;

Delay_us(19200);

}

}

void Rotation 90() //90 degrees

{

unsigned int i;

for(i=0; i<50; i++)

{

PORTB. F0 = 1;

Delay_us(1500); Pulse of 1500us

PORTB. F0 = 0;

Delay_us(18500);

}

}

void Rotation 180() //180 degrees

{

unsigned int i;

for(i=0; i<50; i++)

{

PORTB. F0 = 1;

Delay_us(2200); Pulse of 2200us

PORTB. F0 = 0;

Delay_us(17800);

}

}

void main()

{

TRISB = 0; PORTB as the output port

do

{

Rotation0(); 0 degrees

Delay_ms(2000);

Rotation90(); 90 degrees

Delay_ms(2000);

Rotation180(); 180 degrees

}while(1);

}

by (62.8k points)
edited by
+1

The individual functions of the motor angular rotation of 0°, 90°, and 180° have been declared at the beginning of the code. In this tutorial, we did not use the actual pulse width modulation function of the PIC16F877A to generate the pulse.

Rather, the pulse is generated with the help of a program delay. The delay duration for a particular angle is equal to the length of the pulse required for the motor to rotate to the corresponding angle.

That is, for the 0° angle, the pulse width is about 800ms, so an 800ms delay is introduced when the PORT pin RB0 is set high. Similarly, rotating 90° requires 1500ms of pulse, and 180° angle requires 2200ms.

In the main program, PORTB is set as the output port, and all three functions are called, with a delay of 2000ms between them.

This program causes the motor to rotate in a certain pattern, such as 0°–90°–180°–0°, and so on. This will run continuously in an infinite loop "do-while" loop until the program is aborted.

+1 vote

How to directly control the motor with a computer without using a single-chip microcomputer, etc.?

Yes, many servo motors that support serial communication protocols are examples of an Eston pulse servo, control mode RS485 communication, Modbus RTU and ASCII communication protocol control software: a class Labview and Visual Studio host computer development software category II Eston, Delta, Villuntong and other touch screen development software three categories Serial port debugging assistant, Modbus poll, etc. support Modbus master function software control mode: internal torque, speed, Position mode example two Hangzhou operation control all-in-one machine (servo motor) control mode RS485 communication, Modbus RTU communication protocol control software: a class Labview and Visual Studio host computer development software class II Eston, Delta, Velentong and other touch screen development software three categories Serial port debugging assistant, Modbus poll, etc. support Modbus master function software control mode: torque, speed, Position mode example three Copley drive control mode RS232 communication, ASCII communication protocol From the driver's ASCII Programmer's Guide, there are many parameters modified and set, which means that more complex motion control can be achieved. The specific available software requires post-testing to respond.

by (34.6k points)
+1 vote

How to directly control the servo motor with 51 microcontroller without a driver?

The port of the single-chip microcomputer can absorb a maximum of 20mA, but the working current of the servo motor is more than 100mA, how about? Either burn out the single-chip microcomputer, or the motor cannot work, so there is a drive!

Do you want to use a single-chip microcomputer to control a switch such as a MOS tube, and then the MOS tube drives the motor to work? Of course. Of course, to ensure the smooth rotation of the motor, it is a very test of your program skills.

Does your servo motor have a servo controller? If soft-start and slow to fast or variable speed switching are required, pulses for frequency conversion are required. You can use the timer in the single-chip microcomputer to complete the control of this pulse output time, such as setting the initial time to adjust this pulse. Drive --- motor: Power line: UVW ground, which is supplied to... Click to go to the details page

Depending on the setting of your servo motor, position mode, the signal can be PULSE+PULSE or PULSE+DIR mode, and double pulse or pulse + direction. You only need two control IO ports, PUL- and DIR- to GND. A pulse signal is required for the servo motor to operate, and the speed of the servo motor is determined by the frequency of the pulse signal.

The role of the driver is to have a large current output, if the current is directly controlled by a single-chip microcomputer, it is not reachable, and the current output of a single chip is only tens of milliamps at most

The stepper motor is okay under the control of the single-chip microcomputer, and the DSP is required for servo control.

Generally, the servo control object is a three-phase motor, the drive control is complicated, and those who are interested can go to the "inverter world" to see.

That is to say, even if there is a driver microcomputer, it cannot control the servo motor, regardless of hardware and software.

by (128k points)

Related questions

+3 votes
1 answer 37 views
37 views asked Apr 19, 2023 by Motor Manufacturers (34.6k points)
+3 votes
1 answer 330 views
330 views asked Aug 12 by Stepper-Motor (116k points)
+1 vote
1 answer 262 views
+1 vote
1 answer 38 views
+2 votes
2 answers 51 views
51 views asked Apr 19, 2023 by Motor Manufacturers (34.6k points)
+2 votes
1 answer 325 views
+1 vote
2 answers 42 views
+1 vote
1 answer 60 views
...