hello, I'm trying to implement some simple PWM motor generator control and was wondering if the BOOSTXL-DRV8301 booster pack will work with the TM4C1294XL launchpad. Do i need the C2000 or will this work?
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.
hello, I'm trying to implement some simple PWM motor generator control and was wondering if the BOOSTXL-DRV8301 booster pack will work with the TM4C1294XL launchpad. Do i need the C2000 or will this work?
Amit Ashara said:It is fun till you hit the "mega" road block...
Also "fun" is the fact that many (most) C2000 family MCUs include key/critical motor code w/in ROM - effectively blocking (at minimum, retarding) your migration to non-C2000 family MCUs.
so in other words, i should abandon my attempts to use the ek-tm4c1294 for motor/generator function and buy a c2000 launchpad?
Yours appears not to be the fastest & easiest of projects - might that suggest that more time/effort devoted to your investigation - makes great sense?
This vendor has a very detailed, "Motor Control forum" (likely under a more "market-driven" name) - I'd bet that would prove immensely useful.
Only you know how long, hard & work-focused you'll be.
Surely "Safety" should be included - your motor should be properly clamped so that it cannot, "Launch" (i.e. a REAL launch - we've seen cases where an unclamped motor "flew" off a test bench - carrying its motor controller - and embedded itself into the drywall!) [thus creating embedded²]
ok, so i understand now that there are better choices for the application that i want. but for the sake of further familiarizing myself with these devices I'm going to press on a little with this launchpad...
I now have three PWM signals coming from the board but am helpless getting them to be 120 degrees out of phase with each other. i see that it can be done in the manual; 15.3.2.6 Sample Phase Control... however i can't seem to get it working... any chance someone could throw me a proverbial bone here (i.e. some basic sample code to implement phase shifting..) I would be most appreciative.
ps. I'm using the tm4c1294xl launchpad with CCS 6.1
thanks much
Is not 120° phase separation equal to 1/3 of the signal's period? If so - you'd start the 2nd PWM output when that (1/3 period) has elapsed - and similarly start the 3rd PWM output when the 2nd (1/3 period) has elapsed. (thus 0° - 120° -240° - and endless repeat.)
Your scope - some code experimentation - quickly become your friend...
We should note that - in many, many cases - the hall-effect sensors w/in the motor provide that 120° signal spacing - and that those timing signals provide key/critical "Commutation Input" advice to the controlling MCU. As you read on you'll learn that the "Commutation" is of very great importance - may even trump the PWM. You should note that (most likely) it is the commutation which will change each/every 120° - not so much the PWM signal...
Pardon but, "Cannot seem to get it to work" fails badly at providing necessary detail! And - if your "monitoring system" is Led (only) - I don't know how you'll measure phase...
Let's assume that you have access to a scope - and that "doesn't work" means that PWM output appears - yet the separation between different PWM outputs does not match your desired phase angle. Can we agree upon that?
Now looking at your code reveals that you chose the "quick/dirty" - yet imprecise, "SysCtlDelay()" to generate your phase angles. (and call that "imprecise delay" twice - compounding its weakness!) You may "read up" (here) as to the "what/when/why" "SysCtlDelay() is flawed - I've no interest in debate. Instead - use of one of the ARM's many timers yields a far higher accuracy (& repeatable) timing signal - one with a great chance to meet your phase requirements. (provided you give the timer "best odds" by setting it to a high service priority)
In general your code looks correct - I'll accept that PF0-PF3 serve as numerically aligned, PWM Outputs (which generally proves not the case - have you "really" checked?)
A scope trace of all 3 outputs would surely assist - along w/description beyond (famed) "does not work"... (indeed you're frustrated - yet rushed, largely vacant, issue description is unlikely to change that status...while passing that frustration to (blameless) others...)
yes your assumptions are correct. I do have an o-scope and have been monitoring PF1 and PF2 primarily trying to get them to separate (unsuccessfully). indeed the pins for the booster pack, (which unfortunately seem like a waste of space now because the booster pack for motor control isn't plug and play...) are in a line, PF1-PF3 and are convenient to test. (PF0 is just set up as a guide for the others and isn't really being used for anything)
i understand that the sysctldelay() is bad coding, but is it in the right place? If i were to put a timer there instead should that theoretically create my desired phase change?
Sorry for my previously glib description =D.
The link you posted for reading doesn't seem to be working, do you think you could repost?
i guess i don't really have a strong understanding of setting up and using timers for this board. ideally i would be using the hall effect sensors as you have suggested, is there also some documentation available that could shed some light on implementing that?
thanks much once again for your patience and wisdom
as you can see, both signals are directly overlapping.
Bryce Smith said:The link you posted for reading doesn't seem to be working
I've posted no such link!
Confusion continues - now expands. You previously stated that you "sought to generate" 3 phase related signals - at 120° phase spacings. I wrote that such signals usually emanate from hall sensors w/in a BLDC motor - thus there's no requirement for you to generate these signals. Instead - you employ the arrival of these hall sensor signals to properly "commutate" your motor. Again - there is no requirement for you to generate these 120° phase spaced signals - they are output from your motor.
For simplicity - and to boost understanding - you may consider simply mechanically, "spinning" your BLDC motor. (the motor's phase leads are unconnected - but you "pull-up"each of the hall signals and properly power the hall sensors. You can capture the hall signals while the motor is spinning. (a drill chuck attached should enable you to hand-spin).
Your (real) objective has been unclear or I've simply "missed" it - perhaps you can "A,B,C" to clarify... (realize you've asked further - yet those answers may be unnecessary)