# Two sine waves, 90 degrees out of phase, with frequency adjust?? I

#### clone477

Joined Oct 3, 2008
28
I'm interested in pursuing a project dealing with rotating magnetic fields, same type used in AC motors. But I want to build a circuit that I can adjust the frequency of the circuit, from 60hz- to at least 12khz. I also want it to be able to deliever around 10amps, 12v. The thing is I need to build this circuit to create two sine waves, 90 degree out of phase, for my rotating magnetic field.

Ive been searching like mad for a DIY circuit I could build, but no luck, Im hoping someone could shed some light on this for me. My electronic skills are almost at the intermediate level, followed a circuit diagram to build a pulsed square wave generator with PW and frequenct adjust. Thanks in advanced for any help. Fern

Guys please keep in mind that Im fairly new to building electronics, so please if you could try to speak in terms I can understand. Thanks

#### eblc1388

Joined Nov 28, 2008
1,542
You'll need to search for "quadrature oscillator" in Google. This will give you many hits.

However, all these design will output signal level sine/cosine signal of less than a few volts with no amps.

You then have to use two amplifiers or output booster to achieve your target of 12V 10A output requirement.

#### cpmohan

Joined Jan 2, 2009
1
take a parallel branch from ur sine wave output. keep one untouched. pass the other through a RC circuit to obtain ur desired phase shift.... this is one of the simple ways....

#### clone477

Joined Oct 3, 2008
28
Thanks for the responses guys,

I posted in another forum and recieved this reply....

I came across this simple µC solution from Electronics Design magazine. The two outputs from the PIC can be amplified with a 120 watt (min) stereo amplifier to meet your power output requirements.

A quadrature generator can be useful in a number of applications, such as motion control and signal processing. The idea presented here describes a very simple and inexpensive implementation of a quadrature generator using a single 8-pin IC, the Microchip PIC12C508 (See the figure).​
Electronic Design Welcome

A few NCO or DDS chips (see Harris or Analog Device, for example) can generate the variable frequency quadrature signals, also. The chips are available with internal D/A converters to generate decent quality sinusoids directly

Would this work good for my application and would anyone be willing to put together a schematic with frequency control?? Id be willing to paypal cash to someone that would help.

#### mikeska

Joined Feb 18, 2009
7
Do you have any part numbers? I think that you should make a little design or block diagram, and then improve/correct/implement it. If you find something on Analog.com, and it has samples available, then order some. Most of the stuff I found were relatively high frequency, while you need access down to 60 hz.

The PIC oscillator sounds ok, but you may want to check out www.parallax.com
Look at their BASIC stamp kits.. These little controllers are quite useful for quick project making. You could probably make an oscillator with those, but i don't know how capable they are to generate high frequencies.

There are some oscillator examples for the SX microcontroller ( parallax.com ). It runs pretty fast (50mhz), so it might be able to oscillate some high frequencies.. I haven't done any oscillators with it yet though, so i have no idea of what its capable of in that department. I think it's easier to get started with the PIC microcontroller, because it's relatively easy to build your own programmer for it, while for SX you have to buy some sort of USB/Serial tool.
Another alternative would be to build two Voltage Controlled oscillator that run out of phase by 90 degrees, and then put a buffer on each line so you can drive some coils.
But anyway, what are you going to drive with the signals ?
Oh, and make sure you look at Parallax, it's really good, and no, i'm not getting paid for saying that

~mikeska

#### SgtWookie

Joined Jul 17, 2007
22,221
Parallax uC's aren't a bad product; they're very useful for beginners and particularly for fledgling robotics designers, and the documentation is quite good. But they're terrifically expensive when compared to alternatives, and the majority of the product lineup is programmed in a tokenized Basic language - there is an on-chip ROM decoder. Basically (sic) the uC is hobbled by the speed of the decoder; even though the clock speed is 50MHz, you can't get serious performance out of it.

A BS2sx runs around $60. A PIC12F675 runs around$0.65.
A programming board for a BS2sx runs around $70 or so. You can get a programmer for a PIC12F675 for around$35, or a more capable version is around \$50, or you can build your own using designs available on the Internet for a few bucks, depending on your abilities.

Last edited:

#### mikeska

Joined Feb 18, 2009
7
I know, The STAMPs are horribly slow due to the interpreter. I used the Javelin Stamp for a project because of the OOP capabilities, but I ended up having to split up the workload with some SX's. The SX is pretty powerful, but I wish there was a good, free C compiler for it. Supposedly, ByteCraft Limited makes a good one, but I'm afraid of the price tag.

But there are SX programs written in assembly on the parallax website. I think there's an oscillator on there too. It uses a lookup table, but i don't know how high the frequency can get. It can most likely do something around 60hz.

The documentation sucks, and it's expensive to get started, so you're probably better off using the PIC. The only reason i suggested the SX is that it is very fast.

~mikeska

#### onlyvinod56

Joined Oct 14, 2008
363
take a parallel branch from ur sine wave output. keep one untouched. pass the other through a RC circuit to obtain ur desired phase shift.... this is one of the simple ways....
hi
iam also working over a similar project.
i need three sinusoidal waves with 120 degrees phase displacement. Iam using xr2206 which is a function generator. I can control the frequency by varying the voltage at certain pin. (see the datasheet for frequency sweep).

Can i use that RC technique here? i.e., three parallel branches with different time constants.
how much accurate it'll be?

#### SgtWookie

Joined Jul 17, 2007
22,221
Onlyvinod56,
Take a look at the attached PDF, starting page 4.
It describes a simple three-phase ring oscillator that you can build from a 74HCU04 unbuffered inverter and a few associated components.

#### Attachments

• 192.3 KB Views: 68

#### clone477

Joined Oct 3, 2008
28
I wanted to thank everyone thus far for there help. After all the appreciated suggestions, I decided on using signal generating software. It will produce sine, square and trianle and has adjustable frequency and phase between left and right channel. Exactly what I need. I need to feed this out of my soundcard to an amplifier. I have tried a audio amplifier, but it did not work properly. What can you guys suggest to use for ths, either built or purchased. I also realized that I dont need those high power ratings as I once though, so Im pretty open with that aspect. But I also realized I need atleaset 100KHZ, which my software can produce, but I dont think my aplifier can reproduce. So I need help amplifying this signal to continue. I hopping someone could suggest an amplifier that would be able to output tose high frequencies. Thank for any help guys. Fern