วันจันทร์ที่ 13 กุมภาพันธ์ พ.ศ. 2560

Small Inverter Thailand



A small inverter to drive 3-phase motors - DIY project

You can download project resources from here (73kB):
  • DipTrace schematic
  • DipTrace PCB layout
  • Inverter demo application software (AVR Studio)
I wanted to make a simple inverter to drive small induction motors and also some scavenged servo motors (PMM). My motivation was to ‘play’ with the sacary 300V electronics: it gives shocks; to connect the oscilloscope you must took care about galvanic isolation; instead of slow burn it explodes.
To help myself I obtained a large 230/230V transformer for galvanic isolation. I also found a large-enough (200VA) adjustable autotransformer so I was able to adjust the AC voltage from 0 to 230V. This was very helpful.
At minimum I wanted to drive 100W induction motors, but I hoped that with some luck it could go higher. Because the power supply is limited to 230VAC, a common induction motor should be used in delta configuration... I opted for simplest V-F control and, for simplicity, I didn’t even design any current measurement capabilities. The inverter works ‘blindly’ and if you overload it, something will just burn after some time (proper fuses are important to prevent wider damage).

Power supply

The power supply circuit is far from perfect. The high-voltage power supply (Vdd) only consists of a diode bridge and some high-voltage capacitors. You can see that capacitors have small capacity (300uF combined) limiting the motor current to less than 1A RMS (say 180W motor). Higher capacity is needed to drive stronger motors, but I only had so much space on my PCB… Resistors R2 and R2B slowly discharge capacitors after power off.
The low-voltage part is powered by transformer T1. As you can see, I only had 6VAC transformer and this, in my opinion, was not enough to generate some 12VDC needed to drive MOSFET gates. I was forced to make a voltage-doubler circuit (D9 and C13) and use large capacitance 2x1500uF to smoothen the voltage… Much better would be to use 9VAC transformer without the voltage-doubler.
In my circuit, the +12V power supply is not regulated and this created serious problem that I will explain later. So, if you have a 12V (or even 15V) voltage regulator, it will be beneficial to use it… Btw, the +5V supply should be regulated anyway because it supplies the microcontroller.
The microcontroller can use transistors Q7 (>150mA) and Q8 to enable/disable +12V and thus enable/disable MOSFET bridges (when disabled, bridges are put into high-impedance state). For reasons that will become evident later, it is utterly important that +5V is always present when +12V is enabled. If +5V drops down, but +12V is still present, then MOSFET bridges will short-circuit! This is a serious risk.
At power-up there is no problem, because the microcontroller will power +12V only after +5V is already there. At power-down, the +12V will already decrease to about 6.5V before +5V line starts dropping and this hopefully provides sufficient protection. If 7805 fails, I hope that C12 can slow-down the fall of the +5V line, because once the +5V (and thus also ‘enable’ signal) falls below 3.5V the transistor Q7 will close causing also +12V line to start falling – hopefully faster than +5V line… If, however, something short-circuits the +5V line then I am afraid there will be smoke and fire.
One more thing can be noted on the above circuit – there are two GNDs: the GND and the GND_L. There is a 13-pin jumper (not shown on the above part of schematics) where you can connect GND and GND_L together or disconnect them to make galvanic isolation. In fact, the +12V, as it will be seen later, also goes through the same jumper so that you can completely isolate the low-voltage part of the circuit from the high-voltage part of the circuit.

Improved low-voltage power supply

The picture below shows suggested improvements to the low-voltage power supply. I didn’t try it but I hope it can work. Here, the 9VAC transformer (about 3VA should be enough) and 7812 voltage regulator are used.
The Q7 and Q8 are again used to enable +12V when ‘enable’ signal is above 4.5V. The optional Q9 is used to discharge +12V line as quickly as possible when the ‘enable’ signal falls below some 4V. (Q7, Q8 and Q9 should have gain of at least 100.) This decreases fear of the +5V line loss, but still I think that a clean short-circuit on +5V line will probably cause MOSFET destruction if it happens while +12V is enabled.

MOSFET bridges

To generate 3-phase PWM voltage, one needs three half-bridges. The schematics of one half-bridge is depicted below (all three half-bridges are largely identical). Here, the +L12V supply is the same thing as +12V supply from the power-supply schematics except that, as mentioned, there is the jumper for galvanic isolation between them.
I used IRF840 MOSFETs. (Although I suspect IRF830 could be a better choice for currents below 2A because it has lower gate capacitance thus enabling faster switching time.) Both, IRF840 and IRF830, have usable internal anti-parallel diode so there is no need to add one externally.
Both MOSFETs in the half-bridge are driven by optocouplers - I used 6N139 optocouplers. Because they have high current transfer ratio I was able to drive them directly by microcontroller without amplifying transistors. The 6N139 is also a bit faster than, say, PC817 optocoupler (but more expensive).
The upper MOSFET gate is powered by a bootstrap capacitor C2. The diode D1 will charge the bootstrap capacitor while the lower MOSFET is switched on.
As you can see, both MOSFET gates are driven actively low (by optocouplers) and passively high (by resistors R5 / R19). I intentionally used this scary layout because I wanted that MOSFETs are faster to switch off than to switch on. The major drawback is that if an optocoupler burns out (disconnects), or +5V voltage is lost at optocoupler input, then MOSFETs will automatically turn on and this will probably lead to massive short-circuit (shot-through). It is therefore important to have considerable safety margin regarding optocoupler maximum ratings in order to make them last ‘forever’. 6N139 are voltage limited and you should not put over 15V on them.
The circuit is calculated so that if the PWM_R signal is ‘disconnected’, both optocouplers are switched on (the optocoupler LED current is about 4 mA, allowing at least 20mA current on optocoupler output) and thus both MOSFETs are switched off. When PWM_R signal is low (0V), the lower MOSFET is turned on. When PWM_R signal is high (5V), the upper MOSFET is turned on.
To make a controlled delay between the moment one MOSFET switches off, and the other MOSFET switches on, there is RC combination consisting resistor R1 and capacitor C1. You can finely tune the delay by changing the C1 capacitance – there are two capacitors C1 and C1B in parallel so that various combinations are possible… The perfect delay is only as long that no unwanted spike is generated during transitions of the PWM_R signal. Longer-than-needed delays will decrease available motor current. Very long delays (high C1 capacitance) might, I guess, even increase transistor heating because MOSFET transition from on-to-off or off-to-on will not be sharp enough due to limited optocoupler ‘gain’.

Problems with the non-regulated +12V supply

As already mentioned, the non-regulated +12V supply for MOSFET gates generated problems. Depending on the actually achieved voltage (which depends on the transformer - in my case it goes up to +15V) the MOSFET gate timing will differ significantly. Higher the actual +12V voltage, the MOSFETs will turn on faster… I burned few MOSFETs because I didn’t realize this on time.
The problem is that when you work on the circuit, you generally test it on lower-than-nominal voltage. Once you put it on the nominal voltage, the non-regulated +12V supply line will also rise and MOSFETs will turn on faster – possibly too fast.
If the actual +12V line voltage goes higher than 12V, you might need to increase resistors R5 and R19. By increasing their resistance, you slow down the turn-on time of corresponding MOSFET. (For fine tuning you can then use C1 and C1B capacitors). Because +12V line is not regulated, I had to set higher delay than optimal to include a larger safety margin.

Alternative solutions

ไม่มีความคิดเห็น:

แสดงความคิดเห็น