I've started working on a PCB design for this project, but with few tweaks. First, I plan to use the STM32G071 CPU, which is fast and pretty low power.
Also, I propose to build a 3-level bit DAC using two synchronized PWM. Since this is geared towards 10V, we can do better if we PWM between 5V and 10V instead of between 0V and 10V. For the 5V output, I will flip-flop between switches (use one for the "low" branch and use the other one for the "low" branch the next cycle). In my current implementation, I've also implemented random frequency variation which greatly spreads out the frequency response, but it may be bad due to offsets caused by unequal rise and fall times of the switch (though this does eventually average out).
I've drawn up an "analog" schematic and I've appreciate feedback.
Hello,
Fine to see a different approach with different ideas. How much current is drawn by your CPU?
I have to admit that I do not understand how your PWM works. (also not familiar with the STM CPU).
Do you have something like a timing diagram?
When combining 2 different PWMs I would have expected a e.g. 100:1 ratio (coarse/fine) between the mixing resistors.
How many bits are used from the PWM?
I´m trying different PWM frequencies at the moment.
The frequency has (as expected) a influence on the output voltage in the mV range.
Interestingly the frequency also has a influence on the T.C. of the whole cirquit.
The sweet spot (at least for my sample of ADG419 seems to be between 9.6 and 19.2 kHz (more near the upper frequency)).
Of course this may also depend on if you use 3.3V or 5V input levels.
Things in particular to decide before layout:
- ADG419, ADG1419, or ADG5419. I'm leaning towards ADG1419 due to lower on resistance, but it has larger parasitic capacitances though much lower charge injection
- Switch to LTC2058 (at least for prototyping) since it is cheaper (per op-amp), nearly as good?
- Use ceramic X7R 0.1uF caps for decoupling?
- Add ferrite at switch output (next to R1) Perhaps need to build the circuit and try with/without?
- SMD resistors have fewer parasitics, but perhaps we want the series inductance of THT resistors?
- Looking back into the thread, I screwed up the positioning of the 10V node and 100 ohm R4. Fixing that, will upload 20190212b soon.
- Switch to Sallen-Key LPF on the output?
- I want to use the STM32G0 because it's low power, but it seems that the 64-pin package is the best choice. Ugh.
For the switch: we started with an existing design (ION) so no idea which is really the best. (we need more experience so perhaps it would be good to use a different one).
LTC2058 is the dual version of LTC2057. So should give no differences. But usually single OPs make the PCB layout easier.
I see no problem with ceramic CAPs on low impedant power supply lines. In the analog path I would use Film capacitors in the final layout.
for the ferrite: as R1 is rather high impedant 150K in parallel with 0.x pF a ferrite at this point will not have too much effect.
I also had the idea of using a ferrite/inductor but more from SA input of the switch to the C16 (VRef10V) side.
But LTSPICE simulation had up to now not the effect that I have expected. I guess I still have a problem with my Switch model.
What we did not up to now is a series resistor between digital PWM output and switch for dampening digital noise.
but of course this may give additional influences on rise/fall time symmetry.
I would not rely on the inductive behaviour of resistors. As this may vary from batch to batch.
I use through hole only if I need long term stability.
To the schematics:
C11 C12 could be larger in value to reduce ripple on the output. Also C16 plays a large role for the remaining ripple.
I would place C10 between PIN6 and PIN2 of the OP-Amp to allow capacitive loads on the output.
If you actually place a series resistor between the voltage regulator and heater of the LM399 you might need a additional electrolytic capacitor for the LM399 heater (see LM399 data sheet).
with best regards
Andreas