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.

ac to dc pwm controller(calculate AC in freq and duty cycle issue)

Other Parts Discussed in Thread: CC2630

hi all,

we have a project which need control AC to DC with PWM. (@CC2630 and TI-RTOS)

Can you get me a Suggest .

the PWM freq and duty Synchronize the AC_IN signal(the AC _IN(50~70 Hz,duty 50% +- 1%) will be disappear when Switch ON)

In my idea, i do calculate it when SW OFF(in this state ,AC_IN) then use it reference  AC(we can't see it When SW ON at In my system)

In my test ,

A. use ADC and FIFO to calculate issue.

   Q. it will  lose some ADC sample sometime.

    so ,it control failed(  SW OFF,NO AC ,that will shift PWM with AC long time)

B.use gptimer Edge time issue.

   capture and store time when input edge occured, and to convert the AC_IN freq and duty.

   Q.i don't find how to transform gptimer time value mapping to AC freq ?(find the AC_IN proper freq @ 50 ~70 Hz)

   In gptimer edge timer function that only use 16bit to counter. so when we get the timing need transform.

  (see follow example,60 Hz ,50 % duty cycle), between info value with 800000 (1/60 s ,48Mhz system clock)

 
#000010 [ 2.871 ] INFO: (main.c:266) gptimer 11261
#000011 [ 2.971 ] INFO: (main.c:266) gptimer 24829
#000012 [ 3.071 ] INFO: (main.c:266) gptimer 38397
#000013 [ 3.171 ] INFO: (main.c:266) gptimer 51965
#000014 [ 3.271 ] INFO: (main.c:266) gptimer 65533

hope you will be able to provide the information.