Hey all,
So I am pretty new to this whole arduino electronics business but so far I've managed to make a few things to work and not blow anything up! So that's a plus.
Anyways, I am working on a project that requires me to change the frequency of an AC signal. Obviously everyone here is likely to know the standard 60Hz and 50Hz mains frequencies. I'm trying to control by variable frequency a relatively small pump motor that plugs directly into mains and runs at a standard 60Hz. I've built the electronics to convert the mains down to DC at whatever voltage. It's smooth clean power too! - Right now I've been using 12V but I can change that to anything. I've also built the switching electronics which right now is basically 2 N Chanel Fets with their Drains connected to a one leg of a 24v center tapped transformer, their gates coupled to some optoisolators/optocouplers and their source running to my DC -. With the center tap of my transformer running to my DC +. I have acquired and Arduino Mini Pro as my micro controller and have already begun experimenting!
So far I have been able to turn on my motor using square wave and a bastardization of modified sine. However, it is very loud and jumpy and just doesn't run well. Especially when using the square wave. I've been doing plenty of reading around the internet that tells me square wave is just a terrible option and that modified sine is only marginally better. So that leaves pure sine I suppose.
My question is how do I create a pure sine wave? Or at least close to a pure sine wave? I am assuming I will need to do some sort of modulated PWM signaling that controls the duty cycle of my Fets. And I would assume the ripples or harmonics created would likely be filtered out by my transformer since inducters tend to do those sorts of things. Right?
I did find a relevant PDF (Listed Below) that explain this concept and what is actually going on, but the code is way above me and I don't think I can easily modify it to work with my electronics.
http://www.csulb.edu/~hill/ee470/Lab%202d%20-%20Sine_Wave_Generator.pdf
Most of the information I find is all very similar to the examples listed in the PDF. Several forms say to do it this way because of the speed. Only thing is I need a max of like 240Hz. Nothing close to the KHz range they are shooting for. I did find a post on this form actually that I though was close to what I needed (Listed Below). I have played with it but still cant get it to function for my means.
http://forum.arduino.cc/index.php?topic=8563.0
My basic understanding here is that I need to generate 2 half cycles of these pwm sine waves on two output pins of my arduino. First the first half cycle, or the rise/fall of the sine in the V+ direction would trigger Fet 1 and then once complete the second half cycle, or the rise/fall of the sine in the V- direction would trigger Fet 2. So on and so forth.
I figure I would need 2 pins and 2 Fets because the generation of the modulated PWM is all offset in DC+.
Am I thinking correctly?
So could anyone offer some help? Links to deeper explanations of the PWM functions, tutorials, or anything really. I want to learn but I am very new at this so please bear with me. If you have any comments or suggestions I would love to hear them as well! Thanks in advance.
-Andrew.