Jump to content

Jessters

Members
  • Content Count

    13
  • Joined

  • Last visited

About Jessters

  • Rank
    Member
  • Birthday 09/17/1980

Profile Information

  • Location
    Saratogo Springs, Utah
  1. Have had the same problem off and on. I have needed to design a few H bridge implementations for several different projects, and while not all ran off the LaunchPad, all were MSP430 projects... so the same 3.3V issue. I have ended up using a buffer and inverter as standard practice to; A) separate the MCU from the rest of the circuit, and rectify the VCC issue, and cut pin count per motor down to 2 pins. The attached circuit doesn't even require a reference ground to the MCU. The final product in regards to that schematic has a pair of 24v 8Amp DC motors running off PWM output from a G2231 MCU.
  2. I recently finished what I guess you would call a "shield" of sorts for the MSP430 F2619 MCU and similar variants(see my latest post in the projects forum). However, it was the launchpad that got me hooked on working with the MSP430 line in general. Previously I had been a BASIC Stamp guy lol. I would see this idea as something the community in general could work, and with very good results. A current project I am working on utilizes a G2231 to intercept the outbound signal from a Honeywell thermostat and adjust outside intake fans accordingly based on an external temperature sensor. That being said, I think the ValueLine processors have a lot of potential for both hobby and real world industrial applications. A more robust development platform doesn't seem like a far fetched idea at all. While I agree the Launchpad may never reach the "ease of use" you get with the Arduino or Stamps, I think the cost of the Launchpad alone more than makes up for it. From the perspective of someone who designs industrial automation products, cost is a HUGE issue in regards to prototyping. 2 dollars per chip versus 80....
  3. Haven't been on the forum for a few months, been busy with a few projects for work(which I probably could have gotten some help with here had I bothered to log on... heh). Good to see the forum is growing. And experienced guys, get ready for a possible bag full of questions as I get started on a new project here shortly. On another note, here is a recent MSP430 based project I just wrapped up. Previously we had needed to purchase 7 separate TS430PM64 target boards to be added to projects on a permanent basis. As the target boards directly from TI can run 75+ USD my business partner and I decided to make our own. Essentially, I designed one main board that can be added to any project on a permanent basis, and runs less than 10 dollars to make. Since we work on industrial projects, this board is usually on the inside of aluminum frame and housing. Hence the need of a "permanent" addition, while still allowing for debugging and programming. A second board, which consists of a MSP430 of just about any 64PM variation, a 3.3v reg, and a crystal can then be plugged in to the main board. The reason we did it this way is that the main board itself can support various different MCU variants, but the Yamaichi clam shell socket for those MCU's runs around 90 dollars. Adding one of those completely defeat the purpose of the project due to cost. Simply making the secondary board and adding various MCU's as needed was MUCH more cost effective. In the end it came out as a set up similar to the old BASIC Stamp break out boards. But works seamlessly for what we needed.
  4. Good find, will be interesting to watch the development of this project.
  5. I have fallen back to the Launchpad for the time being to work on individual pieces of the code I'll need. Was a good idea doing so actually, lol. After a bit of trial and error I was able to get the MSP430G2231 am developing on to interpret the PPM signal being sent out from the Spektrum AR7000 Receiver I am using. #include "msp430g2231.h" volatile unsigned int sample1 = 0; volatile unsigned int sample2 = 0; volatile unsigned int ppm1 = 0; volatile unsigned int count1 = 0; volatile unsigned int totalCount1 = 0; volatile unsigned int totalPulse1 = 0; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1MHz DCOCTL = CALDCO_1MHZ; P1DIR |= (BIT0) + (BIT6); // Configure LEDS P1OUT &= ~BIT0; // SET P1.0 TO LOW P1SEL |= (BIT1) + (BIT2); // P1.1 AND P1.2 TO TA0.0/0.1 P1DIR &= ~(BIT1) + ~(BIT2); // P1.1 AND P1.2 TO INPUT TACTL = TASSEL_2 + MC_2 + ID_3; // SMCLK, contmode TACCTL0 = CM_3+CCIS_0+SCS+CAP+CCIE; // Capture on Both Edge + CCIxA + // Synchronous Capture + Capture + Interrupt Enabled _BIS_SR(LPM0_bits + GIE); // ENTER LPMO W/ INTERRUPTS while(1); } #pragma vector=TIMERA0_VECTOR __interrupt void Timer_A (void) { count1++; totalCount1++; totalPulse1 = (totalCount1 / 2); if (count1 == 1){ // Store sample 1 P1OUT ^= BIT0; // Toggle LED on P1.0 sample1 = TACCR0; TACCR0 = 0; } if (count1 == 2){ // Store sample 2 P1OUT ^= BIT0; // Toggle LED on P1.0 sample2 = TACCR0; ppm1 = (sample2 - sample1); // PPM pulse width count1 = 0; TACCR0 = 0; } } In this code, the variable ppm1 comes out between 110 and 210 depending on the location of the control stick on the DX7 Radio. It shouldn't be hard at all to use those numbers to set the Duty Cycle for outbound PWM's to the H bridge. One question I do have though is this: Is it possible to use the same timer to measure pulse width on a second I/O Pin? I will be needing to watch two different signals when it is all said and done. If I am understanding things correctly I am at this point only using a single CCRx? If so cant he second one be used in capture mode to analyze the second PPM signal?
  6. Well.... in regards to focusing on the LaunchPad for the time being, you are probably right. In regards to the bot, everything other than the motor control will be handled via an on board laptop. (sensors etc) As for the motor controller, I need to drive 2 12v Brushed DC motors off a powered wheelchair. Yes there are plenty of off the shelf options for this, but it's the design and implementation of home brewed components that peak my interest. Anyway, a bit of background, I am actually working on 2 separate projects, one being the bot, the other being a "hopefully" soon to be available automation machine for the restaurant industry. I have completely functional and viable control systems already developed for both, including the motor controller. But they rely on the BasicATOM from Basic Micro. In the interest of production cost on the commercial project (1 dollar per TI MCU versus 70+ for the Atom) my business partner and I made the decision to switch. The motor controller for the bot is basically my version of "Getting my feet wet" before trying to tackle the other project, which has 17 motors for repeating actuation of various belts, control arms, etc. In addition to various optical and proximity sensors. My problem has been this: I'm a PHP developer and electronics hobbyist, the embedded world is a whole new ball game for me. I chose the Atom initially due to it's ease of use, and very minor learning curve. The Basic Micro Studio IDE and Basic programming language made throwing control routines together a snap. The MSP Value Line however has proven to be a completely different monster. Let alone the F series chips. As such I am starting with a basic motor controller prior to even getting started on the "machine". At this juncture I have decided to break the motor controller project in to individual segments. Starting with decoding the PPM signal from the receiver. Now if you have managed to last through that whole diatribe, here's where I am at, and hopefully some of you may be able to help. The incoming signal from the receiver is PPM and has a pulse width of approx 1-2ms based on the location of the control stick. All I need the MCU to do is measure the length of the pulse width, then set the outbound PWM Duty Cycle accordingly. The PWM I have down, it's the measuring of the pulse width that has me stuck. On the Atom, there was a predefined Basic command to do this for you, but that's not the case with the MSP430's. I understand I can use Timer_A in continuous mode and the CCRx registers to do it, but as of yet have not been able to implement it. Nor have I been able to find anything in the TI Example Code database that can help. Any input or a point in the right direction would be great.
  7. Hehe, oh how I love to miss the obvious. Anyway, thanks for the feedback on the bloated code. However.... I am actually in the process of rewriting the whole thing. After doing some more research regarding PWM on the MSP430G2231 series, I decided to step away from the LaunchPad all together, and jump up to the MSP430F417 and/or F2619. Though I have a couple of both MCU's I am leaning towards the F417 as it is quite a bit cheaper than the F2619. Anyway, one I get this recoded and working on the new chip I'll post an update.
  8. LOL, thanks for the info. They are actually one of those things that I like to have around for spur of the moment ideas. May actually end up on the robot project I'm toying with atm.
  9. Well, after some researching and input from a couple people I have actually gotten off to a fairly good start on a basic motor controller using the MSP430G2231 which came with the Launchpad. Currently the controller takes input from three buttons, one for direction, the other two for increasing and decreasing the speed. Simple yes, but I am actually fairly happy with it so far, as this is my first time using anything other than the BasicATOM or BasicStamp MCU's. As such I had a bit of a learning curve transitioning from Basic to C. The end goal of the project is to have the controller accept inputs from a RC radio/reciever and do the calculations necessary for a Proportional Steering system for a robot my business partner and I are working on. So still a long ways off. Also, being a newbie at this, my code may be bloated... frankly I'm just glad it works, but any input would be fantastic. #include //variables #define BUTTON BIT1 // Button on P1.1 #define BUTTON2 BIT3 // Button on P1.3 #define BUTTON3 BIT5 // Button on P1.5 unsigned int PWM = 100; unsigned int Freq = 0; void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= (BIT0) + (BIT4) + (BIT2) + (BIT6); // Set P1.0 P1.2 P1.4 AND P1.6 as Output Pins; P1SEL |= (BIT2); // Tie TA0.1 to P1.2 //Set Up Button P1.1 P1DIR &= ~BUTTON; P1OUT |= BUTTON; P1REN |= BUTTON; P1IES |= BUTTON; P1IFG &= ~BUTTON; P1IE |= BUTTON; //Set Up Button P1.4 P1DIR &= ~BUTTON2; P1OUT |= BUTTON2; P1REN |= BUTTON2; P1IES |= BUTTON2; P1IFG &= ~BUTTON2; P1IE |= BUTTON2; //Set Up Button P1.5 P1DIR &= ~BUTTON3; P1OUT |= BUTTON3; P1REN |= BUTTON3; P1IES |= BUTTON3; P1IFG &= ~BUTTON3; P1IE |= BUTTON3; //PWM Generation on P1.2 CCR0 = 1000-1; // PWM Period CCTL1 = OUTMOD_7; // CCR1 reset/set TACTL = TASSEL_2 + MC_1; _BIS_SR(LPM0_bits + GIE); } #pragma vector=PORT1_VECTOR __interrupt void Port1_ISR(void){ //Direction switch(P1IFG & BUTTON) { case BUTTON: P1OUT ^= BIT4; P1IFG = 0; } //Increase Speed switch(P1IFG & BUTTON2) { case BUTTON2: if (Freq < 11) { Freq++; CCR1 = PWM*Freq; P1OUT &= ~BIT0; P1OUT |= BIT6; P1IFG = 0; } else { P1OUT |= BIT0; P1OUT &= ~BIT6; P1IFG = 0; } } //Decrease speed switch(P1IFG & BUTTON3) { case BUTTON3: if (Freq > 0) { Freq--; CCR1 = PWM*Freq; P1OUT &= ~BIT0; P1OUT |= BIT6; P1IFG = 0; } else { P1OUT |= BIT0; P1OUT &= ~BIT6; P1IFG = 0; } } } Feel free to comment away, use the code, etc. I do have some questions though, which may seem apparent, but I just can't seem to figure out. 1. I will actually need a total of 2 PWM signals, one per motor. Is this possible with this chip? I don't want to get to far in to it only to find out I need to switch MCU's. 2. I am at an absolute loss as to how to program the MCU to decode the RC signals. Basically, I need the MCU to measure the length of the pulses being sent by the receiver. (ie: 1.6ms = forward/10% Duty Cycle, 1.5ms = full stop, 1.4ms = Revers/10% Duty Cycle.) ANY input on this would be greatly appreciated. Anyway, this forum has been awesome, probably the best source I have found along with NJC's blog. I just hope to be an additive part of it to some extent. EDIT: On a side note, I also purchased a MSP-FET430U64 Target Board and Programmer, which this project will most likely fall back on if the Launchpad and Value Line MCU's aren't up to the task. So again, if you much more experienced people don't think this this platform will work, please let me know.
  10. It is for a brushed DC motor. Basically I need variable speed, and direction. This will kind of be my starter project moving in to the MSP430 line. If I can get this down my hope is to get a functional Proportional motor controller working in the near future. I guess the biggest obstacle for me at this point is transitioning from programming in Basic on the Atom to C for the TI devices. I have looked around but have yet to find any code examples or design projects using the MSP430 in a DC motor controller.
  11. One of my first orders of business with the recently arrived launchpad is a simple variable speed DC motor controller which will be controlled from an RC airplane radio transceiver/reciever. My question is, has anyone tried this with the Value Line MCU's and the LaunchPad?
  12. Hello all, My business partner and I have just migrated from the Atom to the MSP430 line of MCU's. Basically we have gone from a hobbyist environment to actually working on industrial/commercial products. As such, i have been scouring the web looking for knowledge bases for the MSP430 MCU's. So I am more or less a noob when it comes to these new microcontrollers. lol. So look forward to many a questions from me. Currently we are working on two projects. One will utilize the MSP430F412IPM the other more basic project will be built around the MSP430 Value line, and the LaunchPad. To be honest I am really excited to be moving in to the TI line
×
×
  • Create New...