Author Topic: An experimental PWM circuit with 74HCU04  (Read 6952 times)

0 Members and 1 Guest are viewing this topic.

Offline arveeTopic starter

  • Contributor
  • Posts: 13
  • Country: nl
An experimental PWM circuit with 74HCU04
« on: December 29, 2021, 08:45:58 pm »
This is my first post on this forum.
Here is another PWM circuit.

The switching is done by the 74HCU04 hex unbuffered inverter.
The PMOS and NMOS transistors of this inverter have low on-resistance (25 ohms).
Logic inverters are normaly optimized for speed.
The good news is that here the on-resistance of the transistors is well matched.
With six parallel inverters the measured resistances are: PMOS 4.07 ohm, NMOS 3.79 ohm.
The difference in only 0.28 ohm.

The reference voltage is made with an LM399, the nominal voltage is 7 volt, and 1 ppm is 7 uV.

The low-pass filter has resistor 50k ohm and capacitor 1 uF.
The error is parabolic and the maximum INL is 0.28 ohm / 50k ohm / 4 = 1.4 ppm.

The Arduino clock frequency is 16 MHz.
The PWM frequency is 300 Hz (divide by 53333).
The length of the sigma-delta modulation is 300.
With an integration time of the DMM of one second the resolution is 24 bit.

Everything is as simple as possible. There is no output buffer or extra filtering.
The load of 10M ohm decreases the output voltage but has little effect on the linearity.
The first-order filter has limited attenuation at 300 Hz, but the normal mode rejection of the meter of 60 dB helps.
With an integration time of 1 or 2 seconds there is sigma-delta ripple is averaged out.

The output voltage is measured with an HP34401A.
 
The following users thanked this post: ramon

Offline DeltaSigmaD

  • Contributor
  • Posts: 33
  • Country: de
Re: An experimental PWM circuit with 74HCU04
« Reply #1 on: December 30, 2021, 10:21:18 pm »
Thanks for showing the circuit. Certain improvements are possible with minor modifications.

-  The PWM frequency of 300Hz is very low, so that very long time for averaging is required. With a 16MHz uC, a PWM frequency above 200kHz is possible, including DS update with this rate. A PWM frequency >20 kHz should be no problem with suitable software.

-  A lowpass of order >=3 and a buffer amplifier are necessary to use the circuit as controllable reference e.g. for calibration. 

-  The reference buffer must have very good dynamic characteristics for high DAC linearity. Your buffer amplifier circuit shows deviations of 1.9 mVpp with a 1mA load step and an output impedance of 1 Ohm. With a small modification (please see below), the deviation can be reduced to <0.3 mVpp, and the output impedance is <0.17 Ohm always, a further improvement is easy.


 
The following users thanked this post: chickenHeadKnob

Offline arveeTopic starter

  • Contributor
  • Posts: 13
  • Country: nl
Re: An experimental PWM circuit with 74HCU04
« Reply #2 on: January 05, 2022, 10:19:39 pm »
I forgot to mention that the SN74HCU04 is from Texas instruments. Mine has date code October 2019.

The measured results are not so bad. The plots are a full sweep from 0 to approximately 7 volt.

Parabolic error is 2.02 ppm. It should have been 1.4 pmm, but there is a wire with resistance  0.1 ohm between buffer and inverter.

The error from duty cycle error is 0.7 pmm. That is 2.3 ns of the period of 3300 us. This error is visible at the beginning and end of the sweep.

After the numeric correction it becomes boring with mostly the noise of the meter.
 
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3541
  • Country: de
Re: An experimental PWM circuit with 74HCU04
« Reply #3 on: January 06, 2022, 08:08:50 am »
-  The PWM frequency of 300Hz is very low, so that very long time for averaging is required. With a 16MHz uC, a PWM frequency above 200kHz is possible, including DS update with this rate. A PWM frequency >20 kHz should be no problem with suitable software.
My experiences are different: the higher the switching frequency the more bad are the temperature dependant  and unsymmetrically rise and fall times.
300 Hz is a optimized frequency which will be filtered out together with mains frequency suppression (above 1 NPLC 50 or 60 Hz).


Parabolic error is 2.02 ppm. It should have been 1.4 pmm, but there is a wire with resistance  0.1 ohm between buffer and inverter.

That is really a good result.
with a single analog switch (74HCT4053) I had around 0.5-0.6 mV / 5V so around 100-120 ppm parabolic error.
But you know that the 7V is at the maximum rating for the poor HCU04?

with best regards

Andreas



 
The following users thanked this post: chickenHeadKnob

Offline arveeTopic starter

  • Contributor
  • Posts: 13
  • Country: nl
Re: An experimental PWM circuit with 74HCU04
« Reply #4 on: January 06, 2022, 09:33:15 pm »
The decoupling capacitor of the inverter is 10 µF. It has 1 ohm in series because that is the ESR of the tantalum capacitor.

The buffer sees current pulses from the switching of the output inverter.
The charge of one pulse can be estimated from the "power dissipation capacitance" CPD = 10 pF.
Or you can measure the average current with 10kHz switching frequency.

There are six inverters. The charge of one transition is Q = CPD*VDD = 10pF*7V*6/2 = 210 pC.
For example a pulse with height 21 mA and width 10 ns.

Over the 1 ohm ESR resistor of the decoupling capacitor this makes a voltage pulse of 21 mV, with area 210 pVs.
The clock frequency is 16 MHz and the minimum width is 62.5 ns, and with 7 volt the area is 437.5 nVs.
The effect of current spikes is very small and it is not needed to remove them with a faster buffer.

There is a low pass filter in the feedback to be sure that voltage spike reduce at the input of the bipolar differential pair.

The buffer can be made with op amps. The amplifier which drives the output must be fast with 10 MHz unity-gain bandwidth. I think the circuit can still be improved, but this is what I have.

The maximum rating of 7 volt should not be a big issue. Perhaps there is long time degradation. The alternative is to use a 5V voltage reference.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 8232
  • Country: ro
Re: An experimental PWM circuit with 74HCU04
« Reply #5 on: January 06, 2022, 10:38:15 pm »
Nice results!   :-+

If 300Hz is not enough, then using PDM (Pulse Density Modulation) might worth considering.

A software PDM is very easy to implement, can be easily extended to more than 16 bits, and the pulses are narrower than those coming from a PWM, so the analog filter might give better results for PDM than for PWM.

I did a small demo once, the PDM itself needs only 5 lines:
https://hackaday.io/project/6356-delta-sigma-versus-pwm
https://github.com/RoGeorge/Delta-Sigma_versus_PWM

Offline MegaVolt

  • Frequent Contributor
  • **
  • Posts: 933
  • Country: by
Re: An experimental PWM circuit with 74HCU04
« Reply #6 on: January 18, 2022, 10:01:59 am »
A software PDM is very easy to implement, can be easily extended to more than 16 bits, and the pulses are narrower than those coming from a PWM, so the analog filter might give better results for PDM than for PWM.
It looks like DDS.
 

Offline arveeTopic starter

  • Contributor
  • Posts: 13
  • Country: nl
Re: An experimental PWM circuit with 74HCU04
« Reply #7 on: July 25, 2025, 01:21:39 pm »
Hi,

Here an update on the PWM circuit.
The changes are:
    Output buffer with voltage gain 12/7.
    A pair of Coto relays to switch the output polarity.
    The resolution is increased to 27 bit (8 seconds integration time).
The output range is +/- 12 volt and the step size is 0.1 uV.
The steps are tested on my DMM6500 in the 100 mV range.
One sweep is 50 mV to 50.025 mV with 1 uV steps.
The sweeps are repeated 20 times, and averaged later.

The rounding error is 0.1 uV peak-peak.
The measurement shows 0.16 uV pp. The units in the graph are 10uV/10V.

Rob

The modulation is PWM, with the pulse width varied by one clock cycle.

Code: [Select]
timercount = 53333; // Length of the counter, the frequency is 16 MHz/53333 = 300 Hz;
modcount = 300; // For one second modulation time;

count = timercount * modcount * vset / vref;

integerpart = count / modcount;
fractionalpart = count % modcount;
integerpart_minus_1 = integerpart - 1; // Actual pulse width is 1 longer than the register value;

interrupt_routine () {
  state += fractionalpart;
  if (state < modcount){
    pulsewidth = integerpart_minus_1;
  }
  else {
    pulsewidth = integerpart;
    state -= modcount;
  }
}
« Last Edit: July 25, 2025, 01:47:06 pm by arvee »
 
The following users thanked this post: guenthert, PCB.Wiz, eplpwr

Offline NNNI

  • Regular Contributor
  • *
  • Posts: 75
  • Country: de
    • YouTube channel
Re: An experimental PWM circuit with 74HCU04
« Reply #8 on: July 26, 2025, 09:55:47 am »
Hello,

Thanks for sharing your interesting project! I worked on something similar a few months ago, where I used MASH modulation to modulate the PWM duty cycle. I have documented the code I used and a few other details here: https://nnnilabs.net/videos/2025/05/15/PWM-DAC-2.html

The MASH code itself was adapted from this excellent website, which also has a theoretical description of MASH modulation: http://www.aholme.co.uk/Frac2/Mash.htm

There is, however, one subtlety to modulating on top of PWM - using regular 'fast' PWM can cause some of the higher frequency components to fold down to in-band (i.e., within the passband of the PWM filter) causing ripple. I've found that using 'phase-accurate' PWM can mitigate this. The author of the website has also written about this problem and proposed a solution: http://www.aholme.co.uk/Frac2/Reducing_PWM_distortion_phase_noise_in_fractional-N_synthesizers.pdf

Good luck with this project and I'm looking forward to further updates!
 
The following users thanked this post: oPossum

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6728
  • Country: pw
Re: An experimental PWM circuit with 74HCU04
« Reply #9 on: July 26, 2025, 11:03:25 am »
Years back the guys here elaborated similar PWM based divider (I think in the LM399 thread) generating similar stuff with an atmel 8pin MCU (plus some ADG switches, low-pass filters, two opamps, etc). How is the MASH method related/compared to that?
PS: randomly picked a post about it (..it is 6+ys back already, OMG):
https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg2082496/#msg2082496
« Last Edit: July 26, 2025, 11:23:05 am by iMo »
Readers discretion is advised..
 

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 840
  • Country: de
Re: An experimental PWM circuit with 74HCU04
« Reply #10 on: July 26, 2025, 02:04:07 pm »
Years back the guys here elaborated similar PWM based divider (I think in the LM399 thread) generating similar stuff with an atmel 8pin MCU (plus some ADG switches, low-pass filters, two opamps, etc). How is the MASH method related/compared to that?
PS: randomly picked a post about it (..it is 6+ys back already, OMG):
https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg2082496/#msg2082496

   Uhm, the MCU controlled PWM was used there to correct time and temperature related drift of the resistor based voltage divider.  The range is there pretty small (in the order of 100ppm would be sufficient, methinks), there is no particular need for good linearity and a setting time measured in minutes would be acceptable.  But otherwise it's similar :)

   But thanks for the link to the other interesting use of PWM.  It's otherwise easily buried in that loooong thread.
« Last Edit: July 26, 2025, 02:08:27 pm by guenthert »
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: us
Re: An experimental PWM circuit with 74HCU04
« Reply #11 on: July 26, 2025, 03:44:02 pm »
A software PDM is very easy to implement, can be easily extended to more than 16 bits, and the pulses are narrower than those coming from a PWM, so the analog filter might give better results for PDM than for PWM.
It looks like DDS.
It looks more like the Bresenham fractional divider.  Depending on the application the fractional divider (arbitrary integer) can give you ratios you can only get close to using simple DDS or standard PWM.  Fractional or DDS give you a much higher-frequency distribution pattern (10101010 vs 11110000) which makes filtering easier.  I've used Bresenham in IC design and software, and this is available in many PLL and clock-synthesizer chips.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline NNNI

  • Regular Contributor
  • *
  • Posts: 75
  • Country: de
    • YouTube channel
Re: An experimental PWM circuit with 74HCU04
« Reply #12 on: July 26, 2025, 06:32:48 pm »
Years back the guys here elaborated similar PWM based divider (I think in the LM399 thread) generating similar stuff with an atmel 8pin MCU (plus some ADG switches, low-pass filters, two opamps, etc). How is the MASH method related/compared to that?
PS: randomly picked a post about it (..it is 6+ys back already, OMG):
https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg2082496/#msg2082496

I did a little digging and found the project's original Google Drive folder link in the thread: https://drive.google.com/drive/folders/1GnfWAyInh_M2gaa59xyV-j0-_jiwc0C1

Surprisingly, the MASH modulation implemented in the source code seems to be very similar to Andrew Holme's, and the paper I linked above is also present in a sub-folder.

Code: [Select]
ISR (TIM0_OVF_vect)
{
    // Carry flip-flops
    c[1][1] = c[1][0];  c[2][2] = c[2][1]; c[2][1] = c[2][0];
    // Adders
    d[0] = (q[0]+ValFrac) % DIVISOR;
    d[1] = (q[1]+d[0]) % DIVISOR;
    d[2] = (q[2]+d[1]) % DIVISOR;
    // Carries
    c[0][0] = (q[0]+ValFrac) >> BASIS;
    c[1][0] = (q[1]+d[0]) >> BASIS;
    c[2][0] = (q[2]+d[1]) >> BASIS;
    // Latch
    for (int i=0; i<3; i++) q[i] = d[i];
    OCR0A = ValInt - 1
            + c[0][0]
            + c[1][0] -   c[1][1]
            + c[2][0] - 2*c[2][1] +   c[2][2];
}
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: us
Re: An experimental PWM circuit with 74HCU04
« Reply #13 on: July 26, 2025, 06:50:18 pm »
Here is something I posted on my ham blog, discussing various types of dividers.  I show a Bresenham example done in Verilog:
http://wb6cxc.com/?p=158
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline NNNI

  • Regular Contributor
  • *
  • Posts: 75
  • Country: de
    • YouTube channel
Re: An experimental PWM circuit with 74HCU04
« Reply #14 on: July 26, 2025, 07:05:30 pm »
Thanks for the link! I'm afraid I haven't looked into Bresenham in any depth (apart from watching a YouTube video about it), but what does it look like spectrally? I'd assume it's the same as a first-order MASH modulator (noise rises at 20dB per decade). MASH has the advantage of being cascadable to get a higher-order response, but the modulation depth (I don't know if that is the correct term) increases, which might negatively affect ripple in the context of a PWM DAC.

The numerically controlled oscillator seems to be a basic building block in any noise-shaping architecture.
 

Offline branadic

  • Super Contributor
  • ***
  • Posts: 2592
  • Country: de
  • www.qoool-sensing.org
Re: An experimental PWM circuit with 74HCU04
« Reply #15 on: July 26, 2025, 07:40:13 pm »
Years back the guys here elaborated similar PWM based divider (I think in the LM399 thread) generating similar stuff with an atmel 8pin MCU (plus some ADG switches, low-pass filters, two opamps, etc). How is the MASH method related/compared to that?
PS: randomly picked a post about it (..it is 6+ys back already, OMG):
https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg2082496/#msg2082496

   Uhm, the MCU controlled PWM was used there to correct time and temperature related drift of the resistor based voltage divider.  The range is there pretty small (in the order of 100ppm would be sufficient, methinks), there is no particular need for good linearity and a setting time measured in minutes would be acceptable.  But otherwise it's similar :)

   But thanks for the link to the other interesting use of PWM.  It's otherwise easily buried in that loooong thread.

Populating the resistors is optional, I have them not installed, but operate the PWM purely as a non-drifting voltage divider.

-branadic-
Measuring is like guessing, but more advanced.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 8232
  • Country: ro
Re: An experimental PWM circuit with 74HCU04
« Reply #16 on: July 26, 2025, 09:51:36 pm »
Here is something I posted on my ham blog, discussing various types of dividers.  I show a Bresenham example done in Verilog:
http://wb6cxc.com/?p=158

That method seems the same with this one, implemented with a microcontroller in order to produce PDM (Pulse Density Modulation) for fading LEDs:  https://hackaday.io/project/6356-delta-sigma-versus-pwm

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: us
Re: An experimental PWM circuit with 74HCU04
« Reply #17 on: July 26, 2025, 11:34:18 pm »
Here is something I posted on my ham blog, discussing various types of dividers.  I show a Bresenham example done in Verilog:
http://wb6cxc.com/?p=158

That method seems the same with this one, implemented with a microcontroller in order to produce PDM (Pulse Density Modulation) for fading LEDs:  https://hackaday.io/project/6356-delta-sigma-versus-pwm

Yeah, I glanced at the code and saw the different addends and subtrahends so figured that it was a Bresenham-type fractional process.  I've done the Bresenham in C on a little uC when I need exact fractional timing relationships with minimum jitter.

Thanks for the link! I'm afraid I haven't looked into Bresenham in any depth (apart from watching a YouTube video about it), but what does it look like spectrally? I'd assume it's the same as a first-order MASH modulator (noise rises at 20dB per decade). MASH has the advantage of being cascadable to get a higher-order response, but the modulation depth (I don't know if that is the correct term) increases, which might negatively affect ripple in the context of a PWM DAC.

The numerically controlled oscillator seems to be a basic building block in any noise-shaping architecture.
I don't have the math chops to do any precise comparisons, but when I looked at MASH I recall it effectively being a binary noise generator (white? pink?).  The Bresenham has a very periodic output pattern which can be useful or problematic depending on what you are trying to accomplish.  It would be interesting to run the Bresenham output through a randomizer stage (which maintained the 1/0 ratio) -- this would reduce the periodic content and spread out that spectrum, but would increase the overall jitter magnitude.  But if you follow that with an analog filter (as you often do) this might be useful.

Of course for many applications these details are completely irrelevant!

And for many cases and for many reasons the DDS is generally the go-to technique.  I've got a couple of patents on methods to get non-power of 2 division from a DDS, so that certainly isn't an insurmountable problem. But if you want fast arbitrary fractional division then the Bresenham is usually simpler and faster. (DDS is probably simpler in software though.)

We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: NNNI

Offline guenthert

  • Frequent Contributor
  • **
  • Posts: 840
  • Country: de
Re: An experimental PWM circuit with 74HCU04
« Reply #18 on: July 27, 2025, 09:47:53 am »
Years back the guys here elaborated similar PWM based divider (I think in the LM399 thread) generating similar stuff with an atmel 8pin MCU (plus some ADG switches, low-pass filters, two opamps, etc). How is the MASH method related/compared to that?
PS: randomly picked a post about it (..it is 6+ys back already, OMG):
https://www.eevblog.com/forum/metrology/lm399-based-10-v-reference/msg2082496/#msg2082496

   Uhm, the MCU controlled PWM was used there to correct time and temperature related drift of the resistor based voltage divider.  The range is there pretty small (in the order of 100ppm would be sufficient, methinks), there is no particular need for good linearity and a setting time measured in minutes would be acceptable.  But otherwise it's similar :)

   But thanks for the link to the other interesting use of PWM.  It's otherwise easily buried in that loooong thread.

Populating the resistors is optional, I have them not installed, but operate the PWM purely as a non-drifting voltage divider.

-branadic-
    Ha, ha, yeah, that changes everything of course.  I just read up a few pages of that thread.  Seems at the time the schematic was posted, the software was already meant to implement a high-resolution PWM.  Now I'm curious, whether a more modest resolution PWM (using a much smaller amplitude and consequently smaller ripple) had been tried to correct for the temperature and time related drift of a resistor based voltage divider? And if, why it was deemed inadequate.
« Last Edit: July 27, 2025, 09:51:20 am by guenthert »
 

Offline mawyatt

  • Super Contributor
  • ***
  • Posts: 5794
  • Country: us
Re: An experimental PWM circuit with 74HCU04
« Reply #19 on: July 27, 2025, 03:12:31 pm »
Our common use of MASH was for in chip frequency synthesis where 4th Order MASH was employed to "spread out and noise push" the fractional spurs in the synthesizer signal output spectrum. By "dithering" the synthesizer feedback divider ratio, this proved very effective in reducing and pushing fractional spurs to noise levels within the on-chip systems we were developing. Very powerful technique!!

Best 
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: oPossum

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: us
Re: An experimental PWM circuit with 74HCU04
« Reply #20 on: July 27, 2025, 04:00:56 pm »
Our common use of MASH was for in chip frequency synthesis where 4th Order MASH was employed to "spread out and noise push" the fractional spurs in the synthesizer signal output spectrum. By "dithering" the synthesizer feedback divider ratio, this proved very effective in reducing and pushing fractional spurs to noise levels within the on-chip systems we were developing. Very powerful technique!!

Best

I've not used MASH specifically, but have designed in various types of dithering into digital and mixed PLLs for frequency synthesis and clock-domain synchronization. A good number of clock-generator chips these days include different types of dithering.

Yes, very powerful, and sometimes dithering can be done with very simple methods.  One telecom system I was architecting/managing included a Stratum-1 synchronization block.  I had sketched out the digital PLL architecture (FPGA and later ASIC) and reminded the design engineer to *not* use a clock related to the external 1.544 MHz reference.  But he did, using our 19.44 MHz clock (that ratio is 2623 / 193 -- these are all standard telecom frequencies) and was struggling with digital phase-detector dead-zones when testing his design.  Rather than make him start over, I had him re-clock the reference input with an available 10 MHz clock using a two-stage sampler.  Problem solved and no other changes needed!  There obviously were spectral spurs created by the 10 MHz sampling process, but these were far removed and well-filtered by the already-designed digital filtering.
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6728
  • Country: pw
Re: An experimental PWM circuit with 74HCU04
« Reply #21 on: July 29, 2025, 07:38:28 am »
Once I was thinking about the branadic's (et al.) wiring (I collected the parts) with a different 8pin mcu (I have some modern pics here), I don't know whether they made the final sw in asm or in C. The usage of C may help with trying the other methods and chips while experimenting..
The Vref might be the ADR1001 set to 5V output such we may get 1..10V out of it, for example.
« Last Edit: July 29, 2025, 10:57:42 am by iMo »
Readers discretion is advised..
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3541
  • Country: de
Re: An experimental PWM circuit with 74HCU04
« Reply #22 on: July 29, 2025, 09:28:15 am »
Hello,

for the delta sigma method much less ressources are used when using (inline) assembler for the carry bit handling.
Pure C does not help in this case. (see LM399 thread).

with best regards

Andreas

Edit:
and since you need an external XTAL for stability I would start witn minimum 14 pins to have options for temperature compensation etc.
« Last Edit: July 29, 2025, 09:31:56 am by Andreas »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6728
  • Country: pw
Re: An experimental PWM circuit with 74HCU04
« Reply #23 on: July 29, 2025, 02:54:58 pm »
Once I was thinking about the branadic's (et al.) wiring (I collected the parts) with a different 8pin mcu (I have some modern pics here), I don't know whether they made the final sw in asm or in C. The usage of C may help with trying the other methods and chips while experimenting..
The Vref might be the ADR1001 set to 5V output such we may get 1..10V out of it, for example.

We cannot get it working from 1V in that branadic (et al.) wiring - as the PWM divider is in the feedback of the first non-inverting amp, thus the gain is always bigger than 1. So the output will be from aprox 5V up..
Readers discretion is advised..
 

Offline Electrole

  • Regular Contributor
  • *
  • Posts: 51
  • Country: dk
Re: An experimental PWM circuit with 74HCU04
« Reply #24 on: July 29, 2025, 03:34:45 pm »
I started developing a MASH-based PWM voltage calibrator a couple of years back, and got fine results. This technique ensures high resolution and very good linearity at the same time, using just one PWM string. One has to make sure to use a proper lowpass filter to filter out not just the PWM but also the rumble that occurs from the MASH-process. I made a DC-accurate lowpass filter and added linearization of the switching stage, and tested the calibrator's linearity against a HP 3458A. The result from 16 voltage sweeps from 1 V to 9 V (201 steps of 40 mV) is shown the the enclosed graph. The graph shows the deviation from a linear fit. The GUI and the MASH driver for the switches was originally made in LabVIEW, for reasons of flexilibity, but I'm moving the design to a controller in order to have a stand-alone solution. Presently, the voltage setting has a resolution of 32 bits, and it's being MASHed into 16 bits of PWM. There are still improvements to be done, but the results so far are promising. MASH with PWM is definitely a thing if you are looking at resolution and linearity, and multi-string PWMs will probably never be able to reach the same levels of linearity without very elaborate trimming.

 
The following users thanked this post: Mickle T., razvan784, iMo, mawyatt, NNNI


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf