Occasionally the need arises to produce a 60 Hz sine wave, asynchronous to the mains voltage (and without using a xformer). The attached simple circuit does just that and provides 1.8V p-p @ 100 mA (although, the 50 Ohm output load is not shown on the schematic) output (Vcc) without using op-amps, crystals, xistors, or logic devices . By substituting the LM317T for the LM317L, ~ 1.5 A out could be obtained without modification to the circuit, other than perhaps a heat sink for the regulator.
Measured frequency is 59.17 Hz, so a little off, but good for many applications. The circuit uses the PWMOut command, at 20 KHz and a modified memory map of the sine function. Further tweaking could bring the frequency in even tighter, but at the expense of significant toil. The attached picture shows the output voltage, ac coupled into a 'scope. The 08M actually runs at ~5Vp and the output has a DC component near 3.75V.
This circuit uses the 08M running at 8 MHz. The 20 KHz PWM component can be ameliorated (i.e. smoothing or filtering of the output waveform) by introducing a 100 or so uH inductor between the PWM output pin and R3.
A more interesting project would be to use a 20X2 running much faster, and produce three sine-waves, 120 degrees out from each other. That may come sometime down the pike (if I ever get my 20X2s!).
If anybody wants the code (i.e. memory map), you can email me at chafalote@earthlink.net.
Odessa.
Measured frequency is 59.17 Hz, so a little off, but good for many applications. The circuit uses the PWMOut command, at 20 KHz and a modified memory map of the sine function. Further tweaking could bring the frequency in even tighter, but at the expense of significant toil. The attached picture shows the output voltage, ac coupled into a 'scope. The 08M actually runs at ~5Vp and the output has a DC component near 3.75V.
This circuit uses the 08M running at 8 MHz. The 20 KHz PWM component can be ameliorated (i.e. smoothing or filtering of the output waveform) by introducing a 100 or so uH inductor between the PWM output pin and R3.
A more interesting project would be to use a 20X2 running much faster, and produce three sine-waves, 120 degrees out from each other. That may come sometime down the pike (if I ever get my 20X2s!).
If anybody wants the code (i.e. memory map), you can email me at chafalote@earthlink.net.
Odessa.
Attachments
-
545.8 KB Views: 94
-
115.6 KB Views: 157
Last edited: