cattledog:
I think I understand that you are trying to manage/control/synchonize the stop and start of a grid tied inverter.Turning the unit on when the grid is running seems straightforward. Detect zero crossings, and start the pwm.
I think the hard part is knowing when to turn the invertor off if the grid is down, as I think the zero cross detector will detect the ac output from the inverter.
Grid tied inverters are common commercial products, so I am sure there is a known solution. It is a safety issue to have local power sources adding power to a grid which is supposed to be off .
Exactly! That's the point. ![]()
arduarn:
So let me see if I have understood:
- you have an AC supply (which you have been calling ACgrid)
- you are using an opto-coupler as a zero detector to detect that the ACgrid supply is active
- you only want to know if the ACgrid is active or not
- the ACgrid waveform and the required PWM output waveform bear no relationship
- there is no precise timing requirement for when the PWM starts and when it stops
I could be wrong. Looking at your circuit diagram I don't even see how the -ve voltage could occur...
Yes. ![]()
I could be wrong too. It wouldn't hurt to recheck the circuitry though.
So I'll test the circuitry tomorrow because I'll spend the night studying the arduino code to generate that pwm
cattledog:
Take the output from the h11aa1(with the 5v pull up) and bring it to an arduino external interrupt pin(pin D2 or D3 on a uno).You should be able to use this code to see if you are reading the grid frequency. In your actual program you will turn the pwm on from the ISR. You should see zero count if the grid is not active. Grid frequency count if active.
Turn off is a different issue.
For the inverter to stop switching when the grid is down, I can utilize the 'SD' pin (shut down) on IR2110 FET driver, connect it to somewhere that would enable the shutdown pin when the grid is shutdown too. (right now, the shutdown pin is connected to ground to disable the function)
but we can ignore this for the time being, as the project is using grid-tie principle but won't be connecting to grid. The load is a non centertapped 25vac to 220vac 3A transformer with a 5watt light bulb.
Thank you, cattledog! I'll take a moment to study the code you posted. ![]()
