Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

synchronise two PWM signal between two MCU with différent ground level

Status
Not open for further replies.

yassin.kraouch

Advanced Member level 2
Advanced Member level 2
Joined
Jul 5, 2009
Messages
631
Helped
40
Reputation
80
Reaction score
40
Trophy points
1,308
Activity points
5,094
i like to synchronise two PWM signal between two MCU https://focus.ti.com/lit/ds/symlink/msp430f2101.pdf , this mcu are located in two different place and supplied with two battery cell, so i used to output the clock of mcu1 and this will be the clock for timer_A, but this clock is 32 KHZ i am worried about the delay time, have you please an idea about this ?
 

An optoisolator is suitable to couple output/input signals refered to different grounds.
However, the target application is not clear.

If main control information you intend to send is Duty-cicle ( i.e. to charge a battery ) transmission line delay don´t matter, due its affect both rising and falling edge. But, if the phase of those PWM signals is relevant, it must be compensated by insertion of few NOPs into firmware.

+++
 

An optoisolator is suitable to couple output/input signals refered to different grounds.
However, the target application is not clear.

If main control information you intend to send is Duty-cicle ( i.e. to charge a battery ) transmission line delay don´t matter, due its affect both rising and falling edge. But, if the phase of those PWM signals is relevant, it must be compensated by insertion of few NOPs into firmware.

+++
Yes but the two PWM that i provided should start at the same time between the two MCU, i am worried that a delay appear when transmitting the clock to the second MCU
 

An output pin from Master uC, can generate an interruption at Slave uC.
It guarantees that can syncronize both PWM operations, because Slave uC can treat it immediatelly and starts PWM operation.

However, due to particular behaviour of transmission way, a fine empirical adjustements at uC Master side may be required by NOP microinstructions, in order to generate some compensative delay.

+++
 

ah ok what do you mean by this ??? can you please explain more ?
 

An output pin from Master uC, can generate an interruption at Slave uC.
It guarantees that can syncronize both PWM operations, because Slave uC can treat it immediatelly and starts PWM operation.

However, due to particular behaviour of transmission way, a fine empirical adjustements at uC Master side may be required by NOP microinstructions, in order to generate some compensative delay.

+++

this method will give me a perfect synchronization ????? please help, specially that the two MCU are not located in the same board, and there is difference in ground potentiel
 

If both mcu have the same program and the same clock rate wouldn't they be synchronized?
There may be a small difference because of different clock (the ckocks will not be 100% equal rate) but this can only be solved with one external clock feeding both mcu.

Also any signal between the two mcu can be transfered using an optocoupler

Alex
 

If both mcu have the same program and the same clock rate wouldn't they be synchronized?
There may be a small difference because of different clock (the ckocks will not be 100% equal rate) but this can only be solved with one external clock feeding both mcu.

Also any signal between the two mcu can be transfered using an optocoupler

Alex

Yes but the problem is that the two mcu are located in different reference, and also the optocoupler will provide some delay, and also the internal clock DCO vari with temperature etcc
 

None of the clocks will be stable so this isn't just a one time sync, the have to be resynchronized all the time.
Why can't you do it with one mcu that has two PWM?

Alex
 

no i need that the MCU will be separated, did you know a mechanism of correction ?
 

I don't have a solution and I have never done anything similar.
You want each mcu to control one mosfet at 32KHz PWM and also both mcu accurately synchronized so that they can provide the deadtime?
I think you can only do that with an external clock that goes to both mcu, maybe with two optocouplers.

Alex
 

Yes i will use a cristal clock for each mcu and a synchro signal from the mmaster, because correct only for the first time the delay best then correct the clock that has been delayed by the optocoupler, i will use this opto ( high speed ) https://www.farnell.com/datasheets/13113.pdf
 

yassin,


If you provide more details about the project and application, maybe we´ll provide a better help to you, even evaluating if you are concerning to proper approach to the solution. Like I said before, it is not clear to me if you really need to syncronize the phase of both signals.

+++
 

as i said i have two mcu https://focus.ti.com/lit/ds/symlink/msp430f2101.pdf, this mcu are situated in differeent circuit, different supply and different ground, and this two MCU have to output two PWM signal that should have a perfect synchronization, beceause each PWM will drive a MOSFET, so for this reason they should be synchronised,
 

yassin.kraouch said:
two MCU have to output two PWM signal that should have a perfect synchronization, beceause each PWM will drive a MOSFET, so for this reason they should be synchronised

If this is the case, then why don't you drive the PWM signal from MCU1 directly to both MOSFETs and you need a second PWM from MCU2? This application is already running and you cannot do something about it, or it is under construction? If so, then maybe you should reconsider your design. Please give us a little more information about your application. What is it all about?

Regards,
Alexis
 

I reviewed the discussion, besides mentioning the frequency of 32 kHz, no exact specification of the required synchronization accuracy has been given yet. Staying general, I would say, synchronization is feasible, for a detailed discussion, please tell the specification.
 

as i said the two two PWM signal should drive tw MOSFET, that foonction as a switch,
@FvM what is the information that you need ??
 

You previously mentioned, that both pwm signals are intended to start simultaneously, and that the frequency is 32Hz. I guess, that both pulse widths are different. How much timing difference will be tolerated for the pulse start?
 

the perfect result would be zero difference at start because you know if we have 1ns difference at start after a certain period the difference will increase
 

the perfect result would be zero difference at start because you know if we have 1ns difference at start after a certain period the difference will increase

I think, I've been asking for the acceptable timing difference rather than the clock period difference.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top