| Author |
Message |
CHIO KA WA (1976922) Member Username: 1976922
Post Number: 1 Registered: 4-2010
|
| Posted on Monday, April 5, 2010 - 10:12 am: |
 |
when i use the MD22 via i2c mode to reach motor control, it will receive data from the controller and generate PWM to control the motor. what is the relationship between the data input to the MD22 and the PWM output? |
Admin (Admin) Board Administrator Username: Admin
Post Number: 1231 Registered: 10-2004
|
| Posted on Tuesday, April 6, 2010 - 4:26 pm: |
 |
Please refer to the datasheet http://www.technobots.co.uk/Data Sheets/1502-001.pdf which can also be downloaded from our website. The relationship depends on the mode register 0 value. |
CHIO KA WA (1976922) Member Username: 1976922
Post Number: 2 Registered: 4-2010
|
| Posted on Wednesday, April 7, 2010 - 7:50 am: |
 |
I knew that it is depended upon the mode register 0. I have set that in zero. It means that 0 (Full Reverse), 128 (Stop), 255 (Full Forward). Is that when I input the value is 14, the duty cycle of PWM output is 14% ? However, when I observed the output PWM via oscilloscope, it is not 14%. |
Admin (Admin) Board Administrator Username: Admin
Post Number: 1232 Registered: 10-2004
|
| Posted on Wednesday, April 7, 2010 - 3:31 pm: |
 |
What PWM did you measure? 14 should give about 89% but there may also be a dead band around the 128 neutral point that needs to be taken into account. |
CHIO KA WA (1976922) Member Username: 1976922
Post Number: 3 Registered: 4-2010
|
| Posted on Wednesday, April 7, 2010 - 4:37 pm: |
 |
I had measured the port of M1. Why 14 is give about 89%, is that any numeral relation between the input value and the PWM duty cycle? |
Admin (Admin) Board Administrator Username: Admin
Post Number: 1233 Registered: 10-2004
|
| Posted on Wednesday, April 7, 2010 - 5:36 pm: |
 |
If input 128 is 0% and input 0 is 100% (as is 255) then input 14 is nearly full output (reverse?) i.e. ((128-input)/128)x 100%. This is the way I would have expected it to work but not actually tried it. What value were you getting out at input 14? |
CHIO KA WA (1976922) Member Username: 1976922
Post Number: 4 Registered: 4-2010
|
| Posted on Thursday, April 8, 2010 - 7:47 am: |
 |
No, the motor will stop during the PWM is 50%. Hence, input 128 is 50% and input 0 or 255 is full recerse/forward is 0% or 100%. For the input 14, PWM output is about 80%. |
Admin (Admin) Board Administrator Username: Admin
Post Number: 1234 Registered: 10-2004
|
| Posted on Thursday, April 8, 2010 - 11:48 am: |
 |
What is the last 4 digits of your order / invoice number? Your reply is confusing to us. The motor should stop for an input of 128 (0% pwm). Your PWM of 80% for an input of 14 is pretty close. |
CHIO KA WA (1976922) Member Username: 1976922
Post Number: 5 Registered: 4-2010
|
| Posted on Thursday, April 8, 2010 - 2:47 pm: |
 |
Perhaps I made a mistake. However, I had be aware the motor will stop for input PWM is 50% during the survery. For the practise is MD22, the motor will stop when input value is 128. |