Author Topic: Very slow quadrature generator  (Read 3737 times)

0 Members and 1 Guest are viewing this topic.

Offline DidgitalpunkTopic starter

  • Contributor
  • Posts: 24
  • Country: fr
Re: Very slow quadrature generator
« Reply #25 on: January 18, 2019, 03:51:07 pm »
A PPI display isn't much use unless you have something to plot on it, and most worthwhile data sources on the internet (e.g. weather radar) have already been converted to a rasterised format.  Building a rotary scan radar or sonar system from scratch, is almost certainly well outside your capabilities, or you wouldn't be here asking about generating low Hz frequency quadrature sinewaves

OTOH if you take a fast enough MCU board with three reasonably fast DACs (min 8 bits for X, Y and 6 for intensity) you could build a very nice vector graphics terminal.

Another scope CRT based project that's well worth building is a semiconductor curve tracer.   Depending on the tube persistence, you may be able to display more than the usual eight curves for the stepped parameter.

Indeed, the entire radar setup is WAAAAAY out of my reach. For now it's more of a project to learn to work with high voltages (~10kV for the crt acceleration) and have a "cool looking" thing in my room. The curve tracer is a good idea, I'm gonna be building what amounts to a basic scope anyways to drive the CRT, so I would only have to make the actual curve tracer after that.
 

Offline Wolfgang

  • Super Contributor
  • ***
  • Posts: 1775
  • Country: de
  • Its great if it finally works !
    • Electronic Projects for Fun
Re: Very slow quadrature generator
« Reply #26 on: January 18, 2019, 04:32:30 pm »
Have you seen the curve tracers from ChangPuak ?

https://www.changpuak.ch/electronics/Curve_Tracer_advanced.php
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7733
  • Country: ca
Re: Very slow quadrature generator
« Reply #27 on: January 18, 2019, 05:27:59 pm »
I would use a cheap voltage output audio I2S stereo 24 bit DAC with a small 16bit or 32bit DSPic, using the PICs ADC if you want to sync to an external source reference sine wave.  Search on this forum, we have already discussed making a true perfect sine and cosine waveform using only integer math available in any microcontroller with a 16 bit adder and 16 bit multiplier with access to the top additional 16 bits.  Using a 24 bit stereo audio DAC running at 96Khz, you have no excuse about synthesizing a waveform which should roast anything under the sun well in-between 1Hz and 3KHz with only 2 ICs, 3.3v supply, for less than 4$ in parts.  The circuit should perform well up to 20KHz.

However, you need to be able to program for microcontrollers in 'C'.

Perfect sine generator example using all integer math: (It will need adjustments for 3Hz and 24 bit amplitude)
https://www.eevblog.com/forum/microcontrollers/code-used-for-sine-table/msg1108123/#msg1108123
You wont need to store this table, just generate it on the fly...
Just 1 note, is you only need 3Hz, just use the simple floating point Sin() and Cos(), the MCUs are plenty fast today if you are only generating 2 sines with a minimum 32khz sample rate.

As for the Audio DACs, a stereo thru 8 channels I2S DAC from TI is only around 4$ today, and it internally up-samples as low as 32k source audio samples to 384k meaning less MCU processing clock cycles and no output filters.

With 24 bits, you plenty room to run a 10 to 16 bit sine with another 8-14 bits for digitally controlled deflection position alignment and amplitude.  With this depth, you can also add a look-up table to correct linearity in your display/electronics.

Though, with some larger MCUs which can drive 1080p panels / or HDMI, add a 24bit ADC and you can make an all digital display curve tracer with on screen display.
« Last Edit: January 18, 2019, 05:31:02 pm by BrianHG »
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 6911
  • Country: ca
Re: Very slow quadrature generator
« Reply #28 on: January 18, 2019, 05:53:55 pm »
 Digital phase splitter
https://goo.gl/images/8fNnRY
Followed by a 4Hz LPF on each shoulder to remove the harmonics
Facebook-free life and Rigol-free shack.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14471
  • Country: fr
Re: Very slow quadrature generator
« Reply #29 on: January 18, 2019, 06:25:08 pm »
An Arduino can easily do this - use two PWM channels and change the PWM duty cycle to slowly create the sine waves in the two channels.
Put a simple RC filter on each channel to smooth out the PWM to a nice, clean, slowly changing voltage to drive the scope.

Good point, I don't know what kind of specs the op requires though in terms of distortion.
I suggested an op-amp-based quadrature oscillator as a simple solution (and that gives an opportunity to learn for those that didn't know this topology), but if the requirements are not too stringent and the OP is familiar with MCUs, PWM would indeed be a very decent solution and pretty low-cost too. For signals up to a few Hz, you could use PWM at a few tens of kHz while still keeping a good resolution and requiring only simple RC filtering. Would be a lot more flexible than the above analog solution as well.

Note: If you're feeling adventurous and would like lower distortion than what you'd get with simple PWM, you may also implement a sigma-delta modulator. For signals up to a few Hz, even a modest MCU can do this if this is its only task.
« Last Edit: January 18, 2019, 06:45:07 pm by SiliconWizard »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3358
  • Country: nl
Re: Very slow quadrature generator
« Reply #30 on: January 20, 2019, 03:40:48 am »
I didn't read all posts, but I'm with Dave, the "super conductor" in one of the first handfull of posts.
Use a uC.
"Arduino" folks could probably luse PWM and filtering on such low frequencies but a uC with 2 hardware DAC's or with an external DAC is much more convenient for a few bucks / peseta's / pegels / whatever.

Something like the combined channels of a MCP4922 can reach 20 bit or so and would be plenty for smooth curves, but using the 2 channels of a single MCP4922 for X and Y is very probably good enough.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3483
  • Country: us
Re: Very slow quadrature generator
« Reply #31 on: January 20, 2019, 02:33:02 pm »
The quadrature part is easy.  That's just a precision analog integrator which is a stock data sheet circuit.

The sine wave is harder to do with an analog circuit.  I don't know if you could get a Wein Bridge oscillator to go that low.  You should read "Max Wein, Mr. Hewlett and a Rainy Sunday Afternoon" by Jim Williams if you want to use an analog circuit.

But any number of digital approaches are quite simple to implement.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Very slow quadrature generator
« Reply #32 on: January 20, 2019, 03:58:17 pm »
The sine wave is harder to do with an analog circuit.  I don't know if you could get a Wein Bridge oscillator to go that low.  You should read "Max Wein, Mr. Hewlett and a Rainy Sunday Afternoon" by Jim Williams if you want to use an analog circuit.
See chapter 7 of “Analog Circuit Design” by Jim Williams.
 
The following users thanked this post: SiliconWizard

Offline EmmanuelFaure

  • Regular Contributor
  • *
  • Posts: 154
  • Country: 00
Re: Very slow quadrature generator
« Reply #33 on: January 21, 2019, 06:37:31 pm »
Another way without a DAC, using a delta-sigma technique. Requires only a µC with a digital output, a analog input, and a cheap RC circuit acting as an integrator.

Pseudo code :
while(1) {
if(voltage < sin(2.pi.3Hz)) {
output = 1;
}
else {
output = 0
}
delay(); <- Not mandatory. The sin() computing delay should be enough to delay the loop (On an arduino ~100µs).
}

In attached file : A simulation of the output signal done with excel.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf