Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help: 3-phase sine generation lookup-table microcontroller

Status
Not open for further replies.
Hi,

It's been a long long time since i worked with three phase synth sine wave converters, but it seems that if we designed a half bridge that puts out a synth sine with a fictitious ground at 1/2 Vcc, we'd have one phase done. The next phase would be the same exact thing except the pattern offset by 120 degrees, and the next phase by another 120 degrees. But then the peaks would be limited to 1/2 Vcc rather than Vcc which we get with a single phase H bridge. So maybe we'd want to think about creating the pattern distinct from the single phase approach, unless maybe we're using an output transformer.
Not sure how you guys are approaching this here though. Maybe you can enlighten me.
 
True, MrAl. At one point I was saying that you need to design and spec the overall system first (before writing code). There are many ways to drive the half bridges. I also linked an article that show the waveforms of each phase if you want to get the most out of the system.
But, at the end I went along with the "straightforward" way.
 
That is a good way to optimize if you need to, but I think it is better to keep sine values symmetrical around zero. That is the "natural way" to represent sine signal. It is a matter of "style" more than functionality. Both ways work.
I would change the name of the table to something else if the offset was added to the table values. It would not be a proper sine anymore. I know it sounds nitpicking, but in the long run it makes a difference. Certainly separates pros from hobbyists.

I guess I'm too used to using an assembler as opposed to a compiler... too much thinking like a micro...
 
Hello misterT :)

I have connected these drives to my IGBTs through a driver card .
IGBTs are not loaded. I applied an external DC voltage (+50V) to the bridge and checked cold firing, and i am happy that there is no cross over conduction and everything seems to work fine.
Currently am applying a delta bridge of 100w lamps to the outputs to check functionality on loaded conditions.
Should work okay ;)

EDIT : Yes it does !!!!!:D
 
Last edited:
Hello

Glad to post that i tested this on a 3PH Induction motor and everything runs okay :)
Thanks for helping me out :)
 
Hello again

I made a final board and tested it last Saturday on a drill machine 3-phase Ind Motor.
I tried applying some extra torque to the shaft by lightly holding it with my hand.One of the IGBT's blew in this experiment.
I replaced it and monitored the waveform with the inverter in loaded condition.
I see some lines out of place of the main waveform cap(s) .I presume this is the back-emf.Since they are absent when inverter is not loaded with motor load.
I have 2us dead-band in vertical limb.(i will try capturing some waveforms.)
Can someone point out what this is?
 
Hi
I am attaching 2 waveforms
Both across R-Y phases with a 3-phase loaded motor.
I see back-emf pulse where there should not be any pulses

I changed the PWM freq to 8KHz (from 16KHz) , still the problem persists.
How to mitigate this issue? can anyone help? misterT?
 

Attachments

  • 2013-11-12 14.07.36.jpg
    2013-11-12 14.07.36.jpg
    403.2 KB · Views: 391
  • 2013-11-12 12.34.14.jpg
    2013-11-12 12.34.14.jpg
    443.1 KB · Views: 420
Here is a better waveform.
It sure is BEMF as i understand, or am i wrong?

Can someone please help me on this?
 

Attachments

  • BEMF-wf.jpg
    BEMF-wf.jpg
    74.2 KB · Views: 383
Looks ugly doesn't it!

My first thoughts are that something is oscillating at a high frequency, a bit difficult to be sure without having hands on the scope.

My first thoughts would be to try some low(ish) value capacitors to kill the oscillation.

JimB
 
Hello JimB

Thanks for replying.
I have 0.22uf x 3 capacitors across the bridge (across each limb) along with a 10000uf 600v electrolytic capacitor.
What is the standard procedure or values of capacitors to be put across the bridge?

Do you think this waveform is harmful?
 
I wrote a minimal project template for a DDS explained in the video lecture.
C:
 #include io.h> #include delay.h> #include  #include  #define F_CPU 16000000 // 16Mhz system clock // Sine lookup-table. One full cycle. volatile int8_t sineTable[256]; // Accumulator (signal phase) for Direct Digital Synthesis (DDS) volatile uint16_t accumulator; // Increment value for DDS. This defines the signal frequency volatile uint16_t increment; void main(void) { // Initialize the sine table for (int i=0; i256.0)); } // TODO 1 /* Setup 8bit PWM. Rest of the code assumes that duty cycle is defined by OCR register. Values [0, 255] */ // .. initialization omitted // TODO 2 /* Setup interrupt for duty cycle update. ISR must execute at constant frequency Fs */ // .. initialization omitted /* Calculate increment for constant sine frequency */ // increment = (Frequency*(2^16)) / Fs; /* Infinite loop */ for(;;) { } } /******************************************************************************/ /* Interrupt service routine executes at constant frequency. (sine wave sample frequency). Do not confuse this with pwm frequency. */ ISR() { accumulator += increment; // Increment accumulator OCR = 128 + sineTable[accumulator>>8]; // Update PWM duty cycle } /******************************************************************************/
If you want to output 3 sine waves with 120 phase shift, then the ISR becomes something like: (You will have to setup 3-channel PWM, of course)
C:
 /* Interrupt service routine executes at constant frequency. (sine wave sample frequency). Do not confuse this with pwm frequency. */ ISR() { accumulator += increment; // Increment accumulator // PWM Channel A 0-phase OCRA = 128 + sineTable[accumulator>>8]; // Update PWM duty cycle // PWM Channel B 120-phase OCRB = 128 + sineTable[(accumulator+21845)>>8]; // Update PWM duty cycle // PWM Channel C 240-phase OCRC = 128 + sineTable[(accumulator+43691)>>8]; // Update PWM duty cycle } /******************************************************************************/
 
MisterT could you please help me out with varying the duty cycle of the three pulses that are 120 degrees out of phase?.. i know how to generate them but i don't know how to change the OCRx value to vary the duty cycle.. your help will really mean a lot! Thank you
 
Hello

Glad to post that i tested this on a 3PH Induction motor and everything runs okay :)
Thanks for helping me out :)
Abicash can you please help me out. I am working on the same project but it is not working out properly.. i want to control the speed of the 3PH induction motor too but i am failing to do it! Thank you in advance..
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top