This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430FR4133: Control a SG90 servo motor with msp430fr4133

Part Number: MSP430FR4133

Tool/software: Code Composer Studio

Hello,

I want to use a SG90 servo motor with MSP430FR4133 and I dont know why don't turn on when I create a PWM at P1.6. I connect SG90 at 3V Vcc.

Need to use an external source for this?

#include "driverlib.h"

int main(void) {

WDTCTL = WDTPW + WDTHOLD;

P1DIR |= BIT7;
P1SEL0 |= BIT7;

P1DIR |= BIT6;
P1SEL0 |= BIT6;


PM5CTL0 &= ~LOCKLPM5;

TA0CCR0 = 20;
TA0CCTL1 = OUTMOD_7;
TA0CCR1 = 1;
TA0CTL = TASSEL_2 + MC_3;


__bis_SR_register(LPM0_bits);
}
  • Hi Marcel,

    After a quick web search for the SG90 servo motors, I found that they require a supply voltage from 4.8V to 6.5V, but typically it's 5V. I suspect this is one of the reasons it won't turn. You'll also want to check if the PWM voltage level should be the same as the supply voltage, but I suspect it is. Since the MSP430FR4133 operates up to 3.6V, you may need a voltage translator to convert the voltage between the 3.6V and 5V domains. An alternative could be to use a logic-level N-channel MOSFET (pulled down to ground connected to a pull-up resistor to 5V) that you can toggle with the PWM. Keep in mind that it would be inverted but you could fix that in software.

    Servo Motor SG-90

    SG90 Servo Motor Datasheet

    Guidance for MOSFET circuit to increase PWM voltage level

    Regards,

    James

**Attention** This is a public forum