Jump to content

Search the Community

Showing results for tags 'motor'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 5 results

  1. I'm trying to read two encoders to know the angular position using interrupts but something is wrong, the code compiles but in serial just prints "0", what can i change? volatile long Left_Encoder_Ticks = 0; volatile bool LeftEncoderBSet; #define Right_Encoder_PinA PC_5 #define Right_Encoder_PinB PC_6 volatile long Right_Encoder_Ticks = 0; volatile bool RightEncoderBSet; void setup() { Serial.begin(9600); SetupEncoders(); } void SetupEncoders() { pinMode(Left_Encoder_PinA, INPUT_PULLUP); pinMode(Left_Encoder_PinB, INPUT_PULLUP); attachInterrupt(Left_Encoder_PinA, do_Left_Encoder, RISING); pinMode(Right_Encoder_PinA, INPUT_PULLUP); pinMode(Right_Encoder_PinB, INPUT_PULLUP); attachInterrupt(Right_Encoder_PinA, do_Right_Encoder, RISING); } void loop() { Update_Encoders(); } void Update_Encoders() { Serial.print(Left_Encoder_Ticks); Serial.print("\t"); Serial.print(Right_Encoder_Ticks); Serial.print("\n"); } void do_Left_Encoder() { LeftEncoderBSet = digitalRead(Left_Encoder_PinB); Left_Encoder_Ticks -= LeftEncoderBSet ? -1 : +1; } void do_Right_Encoder() { RightEncoderBSet = digitalRead(Right_Encoder_PinB); Right_Encoder_Ticks += RightEncoderBSet ? -1 : +1; }
  2. Hi there, my current project is to build a controller for a sensorless BLDC motor using a MSP430G2553. I want to realize trapezoidal control with Back-EMF/zero-crossing detection. I plan to detect zero-crossing with the Comparator(CA2/3/4 vs. CA1) and generate PWM using Timer1. Timer0 will be used for things like 30 BLMC_.zip
  3. I just got the msp430G2 launchpad with the MSP430G2553 mcu. For stepper motor driver im using the boost-drv8711 boosterpack. I was able to get it running with the tutorial that it came with. However i cant run it with Energia. It might be because of the enable bit (0x0) but i dont know how to set it 1 on energia. Do any of you have any experiance of this setup ? The motor im running is bipolar sanyo denki 103h5208-5240. My code so far is like this (i used the arduino example, board pin layouts in attachment): #include <Stepper.h> const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution // for your motor // These are the pins for the driver STEP/AIN1 , DIR/AIN2, BIN1,BIN2 Stepper myStepper(stepsPerRevolution, 9, 10, 12, 13); void setup() { pinMode(9, OUTPUT); // same as above pinMode(10, OUTPUT); pinMode(12, OUTPUT); pinMode(13, OUTPUT); pinMode(6, OUTPUT); // pin for the nSleep which wakes up the board digitalWrite(6, HIGH); // set the speed at 60 rpm: myStepper.setSpeed(60); // initialize the serial port: Serial.begin(9600); } void loop() { // step one revolution in one direction: Serial.println("clockwise"); myStepper.step(stepsPerRevolution); delay(100); // step one revolution in the other direction: Serial.println("counterclockwise"); myStepper.step(-stepsPerRevolution); delay(100); }
  4. Hey everyone! Here is a Stepper Motor BoosterPack I have been working on that utilizes the DRV8825. I just ordered the boards today and will be working on some code samples while I wait on them. The DRV8825 can drive one bipolar stepper motor or two DC motors. It has a 8.2-V to 45-V supply range with 2.5-A peak at 24-V. I tried to design for the full operating range of the chip while maintaining the BoosterPack size guidelines. http://www.ti.com/product/drv8825 Let me know what you think! I am working on a BLDC Motor BoosterPack as well that I will post later. Motor_Driver_DRV8825_BoosterPack.pdf BOM_DRV8825_BoosterPack.txt
  5. When programming recently, I found that I had some trouble controlling a motor at the same time as several servo. The servos would go all crazy, and the motor wouldn't work. I guessed that this was because the timers were interfering, or not enough timers, or similar. Digging into the servo library, and the analogWrite function, I found that they're both trying to use Timer A. Thus, I modified the analogWrite function. In file energia/hardware/msp430/cores/msp430/wiring_analog.c , I commented out lines 110 to 123 (inclusive). Below is the code commented out. case T0A1: // TimerA0 / CCR1 TA0CCR0 = PWM_PERIOD; // PWM Period TA0CCTL1 = OUTMOD_7; // reset/set TA0CCR1 = PWM_DUTY(val); // PWM duty cycle TA0CTL = TASSEL_2 + MC_1 + analog_div; // SMCLK, up mode break; #if defined(__MSP430_HAS_TA3__) || defined(__MSP430_HAS_T0A3__) case T0A2: // TimerA0 / CCR2 TA0CCR0 = PWM_PERIOD; // PWM Period TA0CCTL2 = OUTMOD_7; // reset/set TA0CCR2 = PWM_DUTY(val); // PWM duty cycle TA0CTL = TASSEL_2 + MC_1+ analog_div; // SMCLK, up mode break; #endif This may only work using the G2553, but if you're stuck with a G2231 from a rev 1.4 board, just sample a new chip
×
×
  • Create New...