Author Topic: my home made inverter circuit  (Read 65714 times)

0 Members and 2 Guests are viewing this topic.

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #175 on: April 21, 2013, 02:06:31 am »
can someone helP me build a 15kilowatt inverter   :-//

15kW?? No. No amount of tinkering will get you 15kW, though it might get you dead. It's going to take a ton of experience, knowledge, and probably dangerous failures before anyone has a successful 15kW inverter. Buy one.

how so you mean as in to be regulated?  ??? ??? ???

With a controller circuit to drive it so that it gives precisely a certain voltage output, instead of the voltage depending on the input voltage and load conditions. Currently I'm using my old standby MC34063 controller with an unnecessarily big output transistor (all I had   ;D).

hmm..... but how do i make it in true sine wave on my inverter instead of being square wave?
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #176 on: April 21, 2013, 02:10:31 am »
With extreme difficulty, expensive equipment, and piles of expensive, custom magnetics.

Well OK, maybe not piles, that depends on the desired output power. Usually what is done is to first convert the voltage to the peak DC voltage with a DC-DC converter, make a PWM'd sine wave out of that, and run it through filters. Not easy to do and not safe to design without proper equipment.
« Last Edit: April 21, 2013, 02:17:14 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #177 on: April 21, 2013, 02:12:34 am »
A modified sine wave inverter is much easier, and actually something that I would recommend using a microcontroller for - the timing will be very easy that way.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #178 on: April 21, 2013, 03:08:09 am »
A modified sine wave inverter is much easier, and actually something that I would recommend using a microcontroller for - the timing will be very easy that way.

but with an Arduino.... will it be the same as well?... ok here is the coding for it to work... i think..

Quote
void modifiedSineWave(float dutyCycle)
 {
  if (dutyCycle > 0.5) dutyCycle = 0.5;
  else if (dutyCycle < 0) dutyCycle = 0;
   
  cli();
  TCCR1B = _BV(WGM13) | _BV(CS11) | _BV(CS10) | _BV(ICNC1);
  //f0 = fclk / (2 * N * Top)
  long topv = (long) (F_CPU /(60.0 * 2.0 * 64.0));
  ICR1 = topv;
   
  OCR1A = (int) ((float) topv * dutyCycle);
  OCR1B = (int) ((float) topv * (1 - dutyCycle));
  DDRB |= _BV(PORTB1) | _BV(PORTB2);
  TCCR1A = _BV(COM1A1) | _BV(COM1B1);
  sei();   
 }
 
 int pin1 =  7;
int pin2 =  8;
int pin3 =  9;
int pin4 =  10;

void setup()   {               
  pinMode(pin1, OUTPUT);     
  pinMode(pin2, OUTPUT);
  pinMode(pin3, OUTPUT);
  pinMode(pin4, OUTPUT);
}

void loop()                     
{
  digitalWrite(pin1, HIGH);   
  digitalWrite(pin2, LOW); 
  digitalWrite(pin3, HIGH); 
  digitalWrite(pin4, LOW); 
  delay(8);   
  digitalWrite(pin1, LOW);   
  digitalWrite(pin2, HIGH); 
  digitalWrite(pin3, LOW); 
  digitalWrite(pin4, HIGH); 
  delay(8);
}



 darn site keeps making the smily faces on here... and its not too

 but will this work? i hope
« Last Edit: April 21, 2013, 03:10:56 am by Nickk2057 »
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #179 on: April 21, 2013, 03:11:42 am »
A modified sine wave inverter is much easier, and actually something that I would recommend using a microcontroller for - the timing will be very easy that way.

but with an Arduino.... will it be the same as well?... ok here is the coding for it to work... i think..

You know that chip on the Arduino is a microcontroller, right?


Quote
darn site keeps making the smily faces on here... and its not too

Use [ code ].

Code: [Select]
:)  :o  |O

See - it doesn't do it there.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #180 on: April 21, 2013, 03:14:00 am »
Code: [Select]
void modifiedSineWave(float dutyCycle)
 {
  if (dutyCycle > 0.5) dutyCycle = 0.5;
  else if (dutyCycle < 0) dutyCycle = 0;
   
  cli();
  TCCR1B = _BV(WGM13) | _BV(CS11) | _BV(CS10) | _BV(ICNC1);
  //f0 = fclk / (2 * N * Top)
  long topv = (long) (F_CPU /(60.0 * 2.0 * 64.0));
  ICR1 = topv;
   
  OCR1A = (int) ((float) topv * dutyCycle);
  OCR1B = (int) ((float) topv * (1 - dutyCycle));
  DDRB |= _BV(PORTB1) | _BV(PORTB2);
  TCCR1A = _BV(COM1A1) | _BV(COM1B1);
  sei();   
 }
 
 int pin1 =  7;
int pin2 =  8;
int pin3 =  9;
int pin4 =  10;

void setup()   {               
  pinMode(pin1, OUTPUT);     
  pinMode(pin2, OUTPUT);
  pinMode(pin3, OUTPUT);
  pinMode(pin4, OUTPUT);
}

void loop()                     
{
  digitalWrite(pin1, HIGH);   
  digitalWrite(pin2, LOW); 
  digitalWrite(pin3, HIGH); 
  digitalWrite(pin4, LOW); 
  delay(8);   
  digitalWrite(pin1, LOW);   
  digitalWrite(pin2, HIGH); 
  digitalWrite(pin3, LOW); 
  digitalWrite(pin4, HIGH); 
  delay(8);
}
« Last Edit: April 21, 2013, 03:16:13 am by Nickk2057 »
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #181 on: April 21, 2013, 03:14:18 am »
I don't know which pin is which, but that code looks a bit problematic.

One easy point - ditch float. Do everything with integers and your code will be significantly faster and smaller. The ATmega (as well as every1 other microcontroller) has no hardware for floating point arithmetic, so it has to be done in software.

1I'm sure there's one bizarre example to prove me wrong.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #182 on: April 21, 2013, 03:18:05 am »
you mean like this?

Code: [Select]
int pin1 =  7;
int pin2 =  8;
int pin3 =  9;
int pin4 =  10;

void setup()   {               
  pinMode(pin1, OUTPUT);     
  pinMode(pin2, OUTPUT);
  pinMode(pin3, OUTPUT);
  pinMode(pin4, OUTPUT);
}

void loop()                     
{
  digitalWrite(pin1, HIGH);   
  digitalWrite(pin2, LOW); 
  digitalWrite(pin3, HIGH); 
  digitalWrite(pin4, LOW); 
  delay(8);   
  digitalWrite(pin1, LOW);   
  digitalWrite(pin2, HIGH); 
  digitalWrite(pin3, LOW); 
  digitalWrite(pin4, HIGH); 
  delay(8);
}
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #183 on: April 21, 2013, 03:19:18 am »
and also i am using the Arduino UNO on my circuit... which has the ATMEGA328 on it
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #184 on: April 21, 2013, 03:20:20 am »
tho i DO have two versions of it.... one i baught from TigerDirect... and one from radioshack
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #185 on: April 21, 2013, 03:21:07 am »
Again, I don't know what your pins are, but I'll take a stab at it. That does not look capable of a modified sine. Looks like a plain square to me. Modified sine is a square wave with dead time to more approximate the shape of a sine wave. Looks like this.. After you turn off one FET, pause before turning on the next. Make sure you properly calculate the delay time vs. the on time - do some Googling.

And if you had a problem with high voltage spikes when turning off your FETs, it's going to be worse now. Protect the Arduino with gate resistors and prepare to lose FETs. I suggest you take a look at my snubber circuit I gave earlier.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #186 on: April 21, 2013, 03:22:06 am »
i am using 7, 8, 9, and 10 for the pins... with the high side coming on on 10 and 8 for a moment and then turn off and then turning on low side on it for a moment...... same with the 7 and 9 pins... but the are oppisite
« Last Edit: April 21, 2013, 03:24:34 am by Nickk2057 »
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #187 on: April 21, 2013, 03:25:48 am »
i am using 7, 8, 9, and 10 for the pins...

Yeah, I see that.  :-\

What are they connected to? If you're using the same circuit as before, I don't see why there are four. You've only got two gates.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #188 on: April 21, 2013, 03:27:10 am »
i am using 7, 8, 9, and 10 for the pins...

Yeah, I see that.  :-\

What are they connected to? If you're using the same circuit as before, I don't see why there are four. You've only got two gates.

yea but i am now using four... but two on each on there
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #189 on: April 21, 2013, 03:31:30 am »
By the way - If you choose four pins that are on the same port (all PDx, PBx or PCx - yes, you can use the analog pins as digital pins as well, they leave that out a lot in the Arduino stuff, but the analog inputs are just peripheral functions attached to normal pins), you can set them simultaneously in a single line of code. Read through this AVR GPIO tutorial. Might help with timing. It's also much faster than a call to digitalWrite, so if you need to speed up your code a bit, try that.

yea but i am now using four... but two on each on there

You are putting multiple FETs in parallel? You can just parallel the gates as well and share a pin.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #190 on: April 21, 2013, 03:35:48 am »
yea but its more easier to me for that... meaning that with those extra pins (as well as extra resistors on there) it works better... meaning that the voltage and ma on the pins will be the same.....and be seperated apart...
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #191 on: April 21, 2013, 01:59:08 pm »
plus from what i remember is that each of the pins is 50ma....
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #192 on: April 21, 2013, 02:08:05 pm »
The gates should take no current except in the transitions. The transitions will exceed that, but only briefly, and at that frequency I wouldn't worry about it.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #193 on: April 21, 2013, 02:48:32 pm »
and from what i remember is that of a delay of 8 on there it gives close to 60Hz..... if not closer that is...... and when i had it at a delay of 7 it gave close to 70Hz...which did not help at all with the circuit i am using
« Last Edit: April 21, 2013, 02:51:48 pm by Nickk2057 »
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #194 on: April 21, 2013, 02:55:10 pm »
Try DelayMicroseconds for closer timing. You'll need it for modified sine.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #195 on: April 21, 2013, 02:58:58 pm »
Try DelayMicroseconds for closer timing. You'll need it for modified sine.

and how do i do that?... you can copy mine and make modifications to it if you like and post it back....
« Last Edit: April 21, 2013, 03:01:35 pm by Nickk2057 »
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline Nickk2057Topic starter

  • Regular Contributor
  • *
  • Posts: 235
  • Country: us
Re: my home made inverter circuit
« Reply #196 on: April 21, 2013, 03:28:06 pm »
if you want you can PM me what you did if you like....
just keep believing in yourself.. you can do some remarkable things in your life when you break through the ice and make things happen with the stuff you make
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #197 on: April 21, 2013, 03:31:47 pm »
What I did? You mean squinted at your posts groggily through the steam rising from my morning coffee? I don't have any code...
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline 4to20Milliamps

  • Regular Contributor
  • *
  • Posts: 248
  • Country: us
Re: my home made inverter circuit
« Reply #198 on: April 21, 2013, 04:09:25 pm »
are you familiar with magic sinewaves?

http://www.tinaja.com/magsn01.shtml

If I were to try and build an inverter I would use magic sinewaves then a IGBT driver and IGBT's
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: my home made inverter circuit
« Reply #199 on: April 21, 2013, 04:16:42 pm »
WTF is a "magic sine wave"? Is that BS-speak for PWM, or am I missing something?
No longer active here - try the IRC channel if you just can't be without me :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf