Mg995 steering gear Chinese information (parameters_size_controller)

Mg995 steering gear parameters and dimensions

Product size 40.7*19.7*42.9mm

Product weight 55g

Working torque 13KG/cm

Reaction speed: 53-62R/M

Working temperature: -30~+60°

Deadband setting: 4 microseconds

Plug type: JR, FUTABA Universal

Rotation angle: maximum 180 degrees

Servo Type: Analog Servo

Working current: 100mA

Use voltage: 3-7.2V

Structural material: metal copper tooth, hollow cup motor, double ball bearing no load

Operating speed: 0.17 seconds / 60 degrees (4.8V); 0.13 seconds / 60 degrees (6.0V)

Accessories include: rudder, length 30CM, fixing screws, rubber bushings and aluminum sleeves and other accessories

Mg995 steering gear use range

Scope of application: 1:10 and 1:8 flat sports cars, off-road vehicles, trucks, trucks, climbing cars, biped robots, robots, remote control boats, suitable for 50-90 methanol fixed-wing aircraft and 26cc-50cc gasoline Fixed-wing aircraft and other models.

Mg995 steering gear wiring

There are three lines on the steering gear, VCC, GND, and signal lines. The control signal generally requires a PWM signal with a period of 20 ms. VCC and GND need to be connected to drive the servos separately, and they need to share ground with the development board.

Mg995 steering gear Chinese (parameters_size_controller)

The middle is always the positive power supply.

Mg995 steering gear control principle

The servo control generally needs a time base pulse of 20ms. The high-level part of the pulse is generally an angle control pulse part in the range of 0.5ms to 2.5ms. Take a 180-degree angle servo as an example, then the corresponding control relationship is as follows:

0.5ms————–0 degree;

1.0ms --- 45 degrees;

1.5ms --- 90 degrees;

2.0ms———–135 degrees;

2.5ms———–180 degrees;

Mg995 steering gear Chinese information (parameters_size_controller)

LM811 PWM Control MG995 Servo Program

#include "hw_memmap.h"

#include "hw_types.h"

#include "sysctl.h"

#include "gpio.h"

#include "pwm.h"

#include "hw_ints.h"

#include "delay.h"

#define PH0_PWM2 GPIO_PIN_0

#define PH1_PWM3 GPIO_PIN_1

#define LED GPIO_PIN_6

Unsigned int jiaodu[]={12000,16000,12000,8000};

Unsigned int jiaodu1[]={12000,20000,12000,4000};

//unsigned int jiaodu1[]={148000,140000,148000,156000};

Void H_T();

Void Q_J();

/************************************************* ************************************************** ******

** Function name: main()

** Descriptions: main function

** input parameters: NONE

** output parameters: NONE

** Returned value: NONE

************************************************** ************************************************** *****/

Int main (void)

{

SysCtlClockSet(SYSCTL_SYSDIV_1 | /* Configure 6MHz External Crystal as Master Clock */

SYSCTL_USE_OSC |

SYSCTL_OSC_MAIN |

SYSCTL_XTAL_8MHZ);

SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH|SYSCTL_PERIPH_GPIOC); /* Enable PWM2 and PWM3 output GPIO */

SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM); /* Enable PWM module */

SysCtlPWMClockSet(SYSCTL_PWMDIV_1); /* PWM clock configuration: undivided*/

GPIOPinTypePWM(GPIO_PORTH_BASE, GPIO_PIN_0); /* PH0 is configured as PWM function*/

GPIOPinTypePWM(GPIO_PORTH_BASE, GPIO_PIN_1); /* PH1 is configured as PWM function*/

PWMGenConfigure(PWM_BASE, PWM_GEN_1, /* Configure PWM Generator 1: Up/Down Count*/

PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_NO_SYNC);

PWMGenPeriodSet(PWM_BASE, PWM_GEN_1, 160000); /* Set the period of PWM generator 1 */

PWMPulseWidthSet(PWM_BASE, PWM_OUT_2, jiaodu[0]); /* Set the PWM2 output pulse width*/

PWMPulseWidthSet(PWM_BASE, PWM_OUT_3, jiaodu[0]); /* Set the PWM3 output pulse width*/

// PWMSyncUpdate(PWM_BASE,PWM_GEN_1_BIT);

PWMOutputState(PWM_BASE, (PWM_OUT_2_BIT | PWM_OUT_3_BIT), true); /* Enable PWM2 and PWM3 output*/

PWMGenEnable(PWM_BASE, PWM_GEN_1); /* Enable PWM generator 1, */

GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE,LED);

GPIOPinWrite(GPIO_PORTC_BASE,LED,0XFF);

/* Start generating PWM square wave*/

// PWMGenIntTrigEnable(PWM_BASE,PWM_GEN_1,PWM_INT_CNT_ZERO);

// PWMIntEnable(PWM_BASE,PWM_INT_GEN_1);

// IntEnable(INT_PWM1);

// IntMasterEnable();

While(1)

{

Q_J();

H_T();

}

}

Void PWM_Generator_1_ISR (void)

{

Const unsigned long ulTab[10] = {156000,148000,140000};

Static unsigned long n = 0;

PWMGenIntClear(PWM_BASE,

PWM_GEN_1,

PWM_INT_CNT_ZERO);

PWMPulseWidthSet(PWM_BASE, PWM_OUT_2, ulTab[n]); /* Set the period of PWM2 output*/

PWMPulseWidthSet(PWM_BASE, PWM_OUT_3, ulTab[2-n]); /* Sets the period of PWM3 output*/

GPIOPinWrite(GPIO_PORTC_BASE,LED,0);

n++;

If (n ≥ 3) {

n = 0;

}

}

Void Q_J()

{

Unsigned char i=1,j=1;

PWMPulseWidthSet(PWM_BASE, PWM_OUT_2, jiaodu[i++]); /* Sets the period of PWM2 output*/

//PWMPulseWidthSet(PWM_BASE, PWM_OUT_3, jiaodu); /* Sets the period of PWM3 output*/

GPIOPinWrite(GPIO_PORTC_BASE,LED,0);

Delay_ms(220);

PWMPulseWidthSet(PWM_BASE,PWM_OUT_3,jiaodu1[j++]);

GPIOPinWrite(GPIO_PORTC_BASE,LED,0XFF);

Delay_ms(220);

PWMPulseWidthSet(PWM_BASE,PWM_OUT_2,jiaodu);

Delay_ms(230);

}

Void H_T()

{

Unsigned char i=1,j=2;

PWMPulseWidthSet(PWM_BASE, PWM_OUT_2, jiaodu[i++]); /* Sets the period of PWM2 output*/

//PWMPulseWidthSet(PWM_BASE, PWM_OUT_3, jiaodu); /* Sets the period of PWM3 output*/

GPIOPinWrite(GPIO_PORTC_BASE,LED,0);

Delay_ms(220);

PWMPulseWidthSet(PWM_BASE,PWM_OUT_3,jiaodu1[j++]);

GPIOPinWrite(GPIO_PORTC_BASE,LED,0XFF);

Delay_ms(220);

PWMPulseWidthSet(PWM_BASE,PWM_OUT_2,jiaodu);

Delay_ms(230);

}

}

Motor Wiring Harness

The motor wire also apply to automotive, bus, bike, truck. Yacenter have 19 years experience in wire harness industry, cooperate with Nisson, BMW, GM, HONDA, Mitsubishi

Yacenter has experienced QC to check the products in each process, from developing samples to bulk, to make sure the best quality of goods. Timely communication with customers is so important during our cooperation.

If you can't find the exact product you need in the pictures,please don't go away.Just contact me freely or send your sample and drawing to us.We will reply you as soon as possible. Please tell us what kind of model you need (including the drawings, specification, or samples) , then the price will be sent to you soon.

Motor Wiring Harness,Motors Radio Wiring Harness,General Motors Wiring Harness,Motor Power Wiring Harness

Dongguan YAC Electric Co,. LTD. , https://www.yacentercns.com