Author Topic: pwm  (Read 4615 times)

0 Members and 1 Guest are viewing this topic.

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
pwm
« on: February 18, 2008, 07:36:42 PM »
hi all,

i am using motion control kit tms320f2812.

is there anyone know how to setting pwm? for example, i want to make my motor run at 50 rpm(is that to fast?).
i already have escap BLDC motor attached to my board. i dont know anything about pwm. so please somebody brief me a little. i have read much about pwm and event manager(EV) in the internet but understand none.

« Last Edit: February 18, 2008, 07:39:06 PM by orchid »

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: pwm
« Reply #1 on: February 18, 2008, 07:42:02 PM »
you would need the data sheet of the motor


PWM makes analog output , so the less analog voltage out , the slower the motor
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #2 on: February 18, 2008, 08:03:52 PM »
here the data sheet i got from the manual book.

Phase Resistance    7.5  ohm

Phase inductance    480 mH

Back-EMF constant  2.1  V/1000rpm

Torque constant     20  mNm/A

Rated V   10V

Max V   36V

No-Load current 60 mA

Max Cont Current 850 mA

Max cont torque(up to 10000rpm)  17 mNm

Max recommended speed  15000 rpm

Peak current 3A

Peak Torque 60 mNm

rotor intersia 4.7 kgm2.10-7

Mech Time constant 8.6 ms

Thermal resistance rotor body 3 oC/W

Thermal Res body ambient 15 oC/W

Offline Kohanbash

  • Supreme Robot
  • *****
  • Posts: 430
  • Helpful? 1
Re: pwm
« Reply #3 on: February 18, 2008, 08:21:09 PM »
You want 50 rpm - The motor is rated to 15000rpm so in "motor world" you are going slow. In the "real world" your speed (ie how fast the robot will move) will depend on if you put any gears on the end of the motor, and on the size of your wheel.

PWM-
If your motor is rated for 10V providing a continues 10V will result in your motor going full speed (15000rpm).
Now if you want the motor to travel at half the speed (7500rpm) than you can pulse the 10V so ON OFF ON OFF ON OFF ...
So the less you pulse the 10V the slower the motor will spin since the average voltage reaching the motor is less than 10V per interval
Robots for Roboticists Blog - http://robotsforroboticists.com/

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #4 on: February 18, 2008, 08:25:44 PM »
i applying the motor to the wheelchair so i not need high speed. if the speed so fast, the person will blown away. :) ;D.  how can i spin the motor? i know by changing the voltage and current but dont know how it can be done using the board.

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: pwm
« Reply #5 on: February 18, 2008, 08:39:19 PM »
you will need a h bridge or an esc. at the top of the page there should be a link for tutorials. search for the PWM tut.

but a straight motor wont have enough torque at 50 rpm to move anything. you'll need a gearbox to reduce speed and increase torque
« Last Edit: February 18, 2008, 08:40:27 PM by ed1380 »
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #6 on: February 18, 2008, 08:46:58 PM »
the problem is about controlling the variable of speed by reduce or increase the [email protected] i dont even know how fast or slow 50 rpm is. sorry. i just making an example. thats all. i just trying to understand how 3 phase motor work and how to control it. And how the PM50 board control the output voltage. is it the hall sensor or is it on each phase that i have to control? hope somebody understand the situation. Thanks

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: pwm
« Reply #7 on: February 18, 2008, 09:22:18 PM »
lol i saw how a 3 phase motor works in the lab at a local technical college. i was at open house  ;D

you do a sine wave offset 120 degrees. but i believe it was AC not DC
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: pwm
« Reply #8 on: February 18, 2008, 10:03:22 PM »
wait you are talking about a wheelchair motor only, because usually there is a gearbox attached to the wheelchair motors
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #9 on: February 18, 2008, 10:20:49 PM »
now i am using the motor that provided with the board, not applying with the wheelchair yet. i want to write a source code to control the motor first because i have not choose any motor that suit to the wheelchair. thats all.
 thanks....

Offline Kohanbash

  • Supreme Robot
  • *****
  • Posts: 430
  • Helpful? 1
Re: pwm
« Reply #10 on: February 19, 2008, 08:21:30 PM »
3 phase motors are a bit more difficult to control.
See http://www.jrkerr.com/boards.html for a cheap brushless controller.

The high level approach to controlling them is that you have three hall effect sensors, one on each phase of the motor. You use those sensors to detect the position of the rotor and based from that you send a PWM to that phase.
The primary way of spinning the motor is trapezoidal or sinusoidal commutation (you can google those for more details).
If you design your own controller the trick is to match the signal to the position of the rotor. If its not matched properly the motor will be very inefficient (primarily you will have a very low torque).
Robots for Roboticists Blog - http://robotsforroboticists.com/

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #11 on: February 20, 2008, 02:12:12 AM »
i'm using space vector on the evaluation software and the motor spin as expected but other prob came up, the motor become hot but that prob i already ask in the electronics categories.

thanks.  ;D

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #12 on: February 21, 2008, 01:27:27 AM »
i have another question.
how to see the output pwm  signal goes from pin T1PWM / T1CMP using oscilloscope?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,702
  • Helpful? 173
    • Society of Robots
Re: pwm
« Reply #13 on: February 23, 2008, 02:48:30 PM »
are you asking how to use an oscope? ;)

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #14 on: February 24, 2008, 07:38:41 PM »
my J3-extension bus 3 where the T1/PWM pin is connected to J3-extension bus 3 on PM50 V3.1 board. so, how i gonna connect the oscope?can i just clip it at the solder part of the pin?do u understand what i am trying to say?
 ;D 

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,702
  • Helpful? 173
    • Society of Robots
Re: pwm
« Reply #15 on: February 27, 2008, 08:26:59 PM »
You just put one connection on ground, and the other on the signal pin.

If you are implying that pin is really tiny . . . get a sharp lead like that on a multimeter and touch it on that way. Or if its on a PCB, trace the pin wiring and see if there is a via (a little hole in the PCB made of metal) that is connected to it. Then just connect to that via.

Offline orchidTopic starter

  • Full Member
  • ***
  • Posts: 54
  • Helpful? 0
Re: pwm
« Reply #16 on: March 04, 2008, 08:21:46 PM »
Hi everyone....

I got this source code to control the pwm. i have tried it but the motor rotate but not 360 degree. here i post the source code for ur reference.  i dont understand about the ACTR. is it the value fix?and i dont know how it works.how to make the motor rotate 360 continuously? ???
thanks.

Code: [Select]
void F281X_EV1_BLDC_PWM_Update(PWMGEN *p)
{       

int32 Tmp;
int16 Period, GPR0_BLDC_PWM;

// State s1: current flows to motor windings from phase A->B, de-energized phase = C
if (p->CmtnPointer==0)
         EvaRegs.ACTRA.all = 0x00C2;

// State s2: current flows to motor windings from phase A->C, de-energized phase = B
    else if (p->CmtnPointer==1) 
         EvaRegs.ACTRA.all = 0x0C02;

// State s3: current flows to motor windings from phase B->C, de-energized phase = A
    else if (p->CmtnPointer==2) 
         EvaRegs.ACTRA.all = 0x0C20;
   
// State s4: current flows to motor windings from phase B->A, de-energized phase = C
    else if (p->CmtnPointer==3) 
         EvaRegs.ACTRA.all = 0x002C;

// State s5: current flows to motor windings from phase C->A, de-energized phase = B
    else if (p->CmtnPointer==4) 
         EvaRegs.ACTRA.all = 0x020C;

// State s6: current flows to motor windings from phase C->B, de-energized phase = A
    else if (p->CmtnPointer==5) 
         EvaRegs.ACTRA.all = 0x02C0;

 


Get Your Ad Here