#electronics #diytestgear #siggen
The optical shaft encoder was not without problems.
It turns out that the bearings are so good that an inbalance in the knob is enough to cause the knob to turn slightly when released in certain positions. The heavy side was opposite the pointer so it tried to turn the pointer upmost
Gluing a nut under the pointer side balanced the knob. Problem solved.
To fix the DC offset change when changing the level of the pot, I lifted the PB0 pin of the digital pot and connected it to a point that I set to around 344mV. This was also bypassed with an 820u cap so it was a low impedance down to a few hz.
Now there is no DC offset when the level is changed.
The mods fro this are in red in the schematic a couple of posts back.
A better solution than the resistive divider and bypass cap would be a resistive divider into a unity gain opamp feeding PB0,
Next DDS/digital pot board issue -
The AD9833 data sheet proudly claims that it is 'capable of producing sine, triangular, and square wave outputs.'
This is True, but....
The sine and tri outputs swing between 38mV and 650mV on the output pin. The square wave is a digital output on the same pin which swings from basically Gnd to Vdd. There is no way the following op amp won't clip this , which sort of doesn't matter as it clips it to a square wave. cont ...
However the p-p output of the opamp will be 3.7V for a sin and 5V for a square which annoys me a bit. Because the digital pot is in the middle I used that to drop the level of the square wave so its comparable.
This works out to setting the pot at 24/255th for square waves
I can only ever see myself using a square wave with the straight sig gen function, not pulse, ramps etc, so losing most of the range of the pot to bring the level down isnt a problem
If you set the AD9833 to tri wave(bypasses sin rom) and frequency to zero, writing to one of the phase registers will allow you to use the AD9833 as a (not so simple) DAC. If you write a pseudo random sequence, you can get white noise!
uint32_t x =0x02;
…
for(i=0;i<32000;i++){
/* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */
x ^= x << 13;
x ^= x >> 17;
x ^= x << 5;
AD.writePhaseRegister(0, x&0x0fff) ;
}
So the Soanar 5VA transformer I bought has a magnetizing current (no load) of 45.7mA on 240V - that's about 11 Watts ~ Admittedly some is out of phase due to the primary inductance, but a good bit must be transformer losses as it gets quite hot doing nothing.
The Stadium 2155 15VA transformer has a magnetizing current (no load) of 11.9mA --2.86 Watts.
Seems a waste to use the bigger transformer, but it will keep things much cooler inside the box.
#electronics #diytestgear #siggen
So I eventually entered the underworld (Under the house where the crate of transformers is ) and found another transformer, 12.6V CT 3.76VA Which doesn't get hot doing nothing, Using a voltage doubler cct it generates +/- 17V and +6.5V prior to the regulators.
6.5V seems a bit low for a 7805 , but it keeps regulating even with when I drop the mains input a bit. If its an issue I can replace the 1n4007 diode with a schottky which will give me an extra .4V
So the ad9833/MCP41010 siggen has actually been finished for a while. Its a bit of a tangled mess inside, but it works!
I measured the distortion at 0.15% or -56dB which is good enough for an agile sig gen on the bench( New side project - continue modifying the AWA G50 siggen I started on 30 years ago!)
Photos show the siggen in pulse mode testing attack/release of dbx163.
I bet it will spend 99.9% of time generating a simple sine wave!
@vk3kri Ah, but if you...
Rue, its the same circuit...