Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
PWM start at negative edge
2016 年 03 月 25 日
23:42:28
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline
21

Principial wiring schematic.

http://s24.postimg.org/nop85oqv5/86_DUINO.jpg

2016 年 03 月 26 日
00:16:31
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline

garpastym said

Principial wiring schematic.

http://s24.postimg.org/nop85oqv5/86_DUINO.jpg

I mean IGBT module schematic.
Did you use 6 IGBT?
It looks like you try to use sinusoidal 3 phase motor code with PWM (which are digital, not analog).

So, is the deadband I describe before fine with you?

2016 年 03 月 26 日
00:40:34
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline

"It is possible to insert deadband of 3us. But inserting deadband will make rising edge of you yellow signal shift to the right by 3us which you want. However, rising edge of blue signal will also shifted to the right by 3us, not shifting falling edge to the left as you want.
If this is fine with you, I will tell you how to do it."

As i have understood correct both lines will shift in one direction. No that wouldn't help. I only need to shift or yellow front forward or blue front backward so that yellow front would come earlier by 3 microseconds ahead of blue or blue would be slower by 3 microseconds. That's all i need..

EDIT

I am terribly sorry did i understand correct you? Is this what you proposed.

http://s10.postimg.org/rm399y2hx/3ns.jpg

2016 年 03 月 26 日
00:48:30
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline
24

garpastym said

"It is possible to insert deadband of 3us. But inserting deadband will make rising edge of you yellow signal shift to the right by 3us which you want. However, rising edge of blue signal will also shifted to the right by 3us, not shifting falling edge to the left as you want.
If this is fine with you, I will tell you how to do it."

As i have understood correct both lines will shift in one direction. No that wouldn't help. I only need to shift or yellow front forward or blue front backward so that yellow front would come earlier by 3 microseconds ahead of blue or blue would be slower by 3 microseconds. That's all i need..

We are having language problem here. So I decide to show this picture (from MCM datasheet)

This is what I mean deadband

http://i275.photobucket.com/albums/jj291/zerozaber2/deadband_zpsdxr4d69z.png

2016 年 03 月 26 日
00:53:37
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline
25

Yes thar is correct. Defenenly that is correct. That is perfectly what i need

2016 年 03 月 26 日
01:07:40
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline

garpastym said

Yes thar is correct. Defenenly that is correct. That is perfectly what i need

Wow, we really having language problem.

Because I don't have the board and osciloscope right now, I am going to give you a code I haven't test, but it should works with no dangers.
Because I am too lazy to write specific code, I am going to make you use same deadband with every PWM

in TimerOne.cpp
inside static void pwmInit
there is a line
mcpwm_SetDeadband(mcn, mdn, 0L);
change 0L into XL when X is deadband clock

if you need 3us, it is 300 clock, so change into
mcpwm_SetDeadband(mcn, mdn, 300L);

This will make every PWM pin has 3us deadband, if you don't use it anymore, change back to 0L so that your other project won't effected by this.

2016 年 03 月 26 日
01:26:22
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline
27

Super! that is great i have falling edge of blue line earlier than rising edge of the yellow line. Now I need to make the same thing on the rising edge of blue line proportionally. It means that it has to be symmetrical to the yellow but narrower.
Like this.

http://s13.postimg.org/b92alfx7n/3ns.jpg

P.S. Sorry about all the confusion. I am only a programmer and near me sits the electritian who tels me what should be.

2016 年 03 月 26 日
01:59:21
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline

garpastym said

Super! that is great i have falling edge of blue line earlier than rising edge of the yellow line. Now I need to make the same thing on the rising edge of blue line proportionally. It means that it has to be symmetrical to the yellow but narrower.
Like this.

http://s13.postimg.org/b92alfx7n/3ns.jpg

P.S. Sorry about all the confusion. I am only a programmer and near me sits the electritian who tels me what should be.

Deadband only inserted when signal going from inactive to active.
There is no way to insert deadband from active to inactive.

If you really want this, you have two ways.
1. use module1 as module0 compliment. To do this, you may need to understand TimerOne library and rewrite your own library.
2. use center-aligned.

I will instruct only center-aligned method.

Center-aligned method. Still use deadband modifier above (300L clock)

1.in TimerOne.cpp->> pwmInit function
change mcpwm_SetWaveform(mcn, mdn, MCPWM_EDGE_A0I1); into mcpwm_SetWaveform(mcn, mdn, MCPWM_CENTER_I0A1);

2. half you PWM period, if you use Timer1.initialize(40); change into Timer1.initialize(20);

NOW, you have to change your pwm duty formula to match this new behaviour, good luck.

2016 年 03 月 26 日
02:11:09
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline

Ah sorry, method above works but you have to switch A+ and A-

another method which I am not sure

1. change mcpwm_SetWaveform(mcn, mdn, MCPWM_EDGE_A0I1); into mcpwm_SetWaveform(mcn, mdn, MCPWM_CENTER_A0I1);
and change mcpwm_SetOutPolarity(mcn, mdn, MCPWM_HPOL_NORMAL + MCPWM_LPOL_NORMAL); to mcpwm_SetOutPolarity(mcn, mdn, MCPWM_HPOL_INVERSE + MCPWM_LPOL_INVERSE);

2. half PWM period.

Also, you need to adjust your formula

This is my last post for today, if there is more problem, wait tomorrow.

2016 年 03 月 28 日
14:46:31
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline

Good morning! After making the last changes in the code the result is perfectly suited for the task to rotate a parker 3 phase servo drive by variation of the PWM signal. That is super possibility of 86 duino!
Thank you very much for the work done zerozaber.

I have another question general like. Does 86duinos vortex86 MCM uses vector control of the motors of magnetic field or by rotation data received from resolver?

EDIT. Sorry, I have lloked through the presentation of Vortex86 MCM and I have found out that there exist both the SPWM & SWPWM. Now I wonder how could i get access to the possibilities of that MCM functionss to control motors. Or i need to wait for the response from the support from email soc@dmp.com.tw

How could this process be speeded up because i have sent email to all available addresses on 86duino site and still no response?

2016 年 03 月 28 日
21:04:30
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline
31

For the moment update. I have finally received datasheet of the Motion Control Module.Now i wonder about structuring the programming itself. In general I have understood that the module has all the possibilities to controlling various motors types. But due to the fact that this library is structured not as a class with inherited functions like other cpp libraries do, it simply shares its functions with other libraries which use timers, encoder interfaces etc. In this case I have a question do i have to change the library settings for a specific motor to compile the progect or it is possible to write ones own library to include these functions to divercificate the functions of motor controlling?

Or other question/reposition to 86duino team, whouldn't it becooler to write a simplifide user-friendly library to simply make like all libraries behave - make an inherited object MCM mymcm; and then get the list of provided functions like mymcm.PWM.start(); for instance. So it would exist in the form of some functions inhereted from the parent class object which could provide direct access to the library funtions of MCM itself?

2016 年 03 月 29 日
23:06:05
zerozaber
Moderator
Forum Posts: 52
Member Since:
2015 年 02 月 11 日
Offline

garpastym said

For the moment update. I have finally received datasheet of the Motion Control Module.Now i wonder about structuring the programming itself. In general I have understood that the module has all the possibilities to controlling various motors types. But due to the fact that this library is structured not as a class with inherited functions like other cpp libraries do, it simply shares its functions with other libraries which use timers, encoder interfaces etc. In this case I have a question do i have to change the library settings for a specific motor to compile the progect or it is possible to write ones own library to include these functions to divercificate the functions of motor controlling?

Or other question/reposition to 86duino team, whouldn't it becooler to write a simplifide user-friendly library to simply make like all libraries behave - make an inherited object MCM mymcm; and then get the list of provided functions like mymcm.PWM.start(); for instance. So it would exist in the form of some functions inhereted from the parent class object which could provide direct access to the library funtions of MCM itself?

Now you are on the same ground as me.

TimerOne and Encoder are libraries that were written up using available arduino's equivalent API. There are TimerOne and Encoder library for arduino.
Fortunately, both library were written up easily for reverse engineering. Just read every function to the root (stop at mc_outp) and you will know order of register called.

I also would like 86duino team to write up MCM library that utilize many function of MCM that arduino don't have, including pulse generator. I think that MCM is one of the biggest advantage point for comparing with arduino and other board (like rasberry pi).

For a while, I suggest writing your own library for your motor, as I already wrote mine (receive 6 channel of encoders and 6 PWM outputs) The motor I uses is PMDC motor with encoder feedback, manually closed-loop control into position

2016 年 03 月 30 日
17:50:51
garpastym
Moderator
Forum Posts: 20
Member Since:
2016 年 02 月 12 日
Offline
33

Finally I am uploading a video of a Parker three(3) phase servo motor driven through IGBT module with 86duino with PWM.

http://sendvid.com/dd4utlra

Forum Timezone: Asia/Taipei

Most Users Ever Online: 66

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

lukeross: 8

tomka: 8

smeezekitty: 8

hippy: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1531

Moderators: 14

Admins: 5

Forum Stats:

Groups: 2

Forums: 10

Topics: 239

Posts: 1082

Newest Members: JesusMycle, Georgerek, wholesalewholes, involy, Anthonyprity, BruceTum, jack23912, areplicatiffany, zrmikezolive, PBDeveloper

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 211, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 20, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 0