Circuit for Randomized Pulse Width Modulation

Ask a question - edaboard.com

elektroda.net NewsGroups Forum Index - Electronics Design - Circuit for Randomized Pulse Width Modulation

Goto page 1, 2, 3  Next

Robert Martin
Guest

Wed Jan 09, 2019 1:45 am

I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

Guest

Wed Jan 09, 2019 1:45 am

On Wednesday, January 9, 2019 at 10:48:46 AM UTC+11, Robert Martin wrote:
Quote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

https://en.wikipedia.org/wiki/Pseudorandom_binary_sequence

You can make a pseudorandnom binary sequence in a single-chip processor - it can also be done with long shift registers, and some parts seem to have been designed for the job, but the single-chip microprocessor or a programmable logic chip are the minimum part solution.

--
Bill Sloman, Sydney

Robert Martin
Guest

Wed Jan 09, 2019 5:45 am

On 9/1/19 11:04 am, bill.sloman_at_ieee.org wrote:
Quote:
On Wednesday, January 9, 2019 at 10:48:46 AM UTC+11, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

https://en.wikipedia.org/wiki/Pseudorandom_binary_sequence

You can make a pseudorandnom binary sequence in a single-chip processor - it can also be done with long shift registers, and some parts seem to have been designed for the job, but the single-chip microprocessor or a programmable logic chip are the minimum part solution.

I would prefer not to use a micro. This circuit uses only two IC's.
http://www.seekic.com/circuit_diagram/Signal_Processing/PSEUDO_RANDOM_BIT_SEQUENCE_GENERATOR.html

Any comments? Would clocking it at 4Hz present any problems?

Do I understand correctly that the output would be a 4Hz PWM signal at

Robert Martin

bitrex
Guest

Wed Jan 09, 2019 7:45 am

On 01/08/2019 06:48 PM, Robert Martin wrote:
Quote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

Another idea, if pseudo-random is okay and you want to be quick and
cheap and not muck with analog noise sources is get yourself one of
those "flicker flame" LED candles that have a pseudorandom sequence
generator built into the chip in the LED to make the LED "flicker."

Drive the LED with a current source and buffer/filter/gain scale the
voltage output across the LED with an op-amp as you like, and then into
one input of a comparator and the square wave into the other as before.

bitrex
Guest

Wed Jan 09, 2019 7:45 am

On 01/08/2019 06:48 PM, Robert Martin wrote:
Quote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

I think the simplest way to do it without a uP would to build an analog
white noise source a la:

<http://www.electro-music.com/forum/phpbb-files/2tran_wn_203.gif>

and then aggressively low-pass filter it. then feed your square wave
into one input of a comparator and the appropriately-scaled low-passed
noise into the other.

bitrex
Guest

Wed Jan 09, 2019 7:45 am

On 01/09/2019 01:31 AM, bitrex wrote:
Quote:
On 01/08/2019 06:48 PM, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50%
duty cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

Another idea, if pseudo-random is okay and you want to be quick and
cheap and not muck with analog noise sources is get yourself one of
those "flicker flame" LED candles that have a pseudorandom sequence
generator built into the chip in the LED to make the LED "flicker."

Drive the LED with a current source and buffer/filter/gain scale the
voltage output across the LED with an op-amp as you like, and then into
one input of a comparator and the square wave into the other as before.

bitrex
Guest

Wed Jan 09, 2019 7:45 am

On 01/08/2019 11:13 PM, Robert Martin wrote:
Quote:
On 9/1/19 11:04 am, bill.sloman_at_ieee.org wrote:
On Wednesday, January 9, 2019 at 10:48:46 AM UTC+11, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

https://en.wikipedia.org/wiki/Pseudorandom_binary_sequence

You can make a pseudorandnom binary sequence in a single-chip
processor - it can also be done with long shift registers, and some
parts seem to have been designed for the job, but the single-chip
microprocessor or a programmable logic chip are the minimum part
solution.

I would prefer not to use a micro. This circuit uses only two IC's.
http://www.seekic.com/circuit_diagram/Signal_Processing/PSEUDO_RANDOM_BIT_SEQUENCE_GENERATOR.html

Any comments? Would clocking it at 4Hz present any problems?

Do I understand correctly that the output would be a 4Hz PWM signal at

Robert Martin

The only other question I have is why you need to filter a PWM waveform
to get your desired output to begin with, can't you just filter a noise
generator directly? Filtered noise is surely a "constantly-changing
wave-like arbitrary waveform" yes?

Robert Martin
Guest

Wed Jan 09, 2019 2:45 pm

On 9/1/19 5:26 pm, bitrex wrote:
Quote:
On 01/08/2019 06:48 PM, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50%
duty cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

I think the simplest way to do it without a uP would to build an analog
white noise source a la:

http://www.electro-music.com/forum/phpbb-files/2tran_wn_203.gif

and then aggressively low-pass filter it. then feed your square wave
into one input of a comparator and the appropriately-scaled low-passed
noise into the other.

I tried using noise, as recommended earlier on this group and elsewhere.
The filtered amplitude below 10Hz was too low to produce a workable result,

Your idea about using a candlelight flickering LED is interesting, but
looking at the video the switching appears to be a bit sharp.

In any case, I would prefer a circuit over which I have a degree of
design control as I may need to tinker to get the chaotic wave-like
effect with smooth transitions that I am looking for.

Robert Martin

Martin Brown
Guest

Wed Jan 09, 2019 2:45 pm

On 08/01/2019 23:48, Robert Martin wrote:
Quote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

XOR it with another free running oscillator of about the same frequency
but with a bit of frequency modulation dither added.

Quote:
How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

It would be so much easier to do in a PIC or with a shift register.

https://en.wikipedia.org/wiki/Linear-feedback_shift_register
Quote:

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

--
Regards,
Martin Brown

George Herold
Guest

Wed Jan 09, 2019 3:45 pm

On Wednesday, January 9, 2019 at 8:16:36 AM UTC-5, Robert Martin wrote:
Quote:
On 9/1/19 5:26 pm, bitrex wrote:
On 01/08/2019 06:48 PM, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50%
duty cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

I think the simplest way to do it without a uP would to build an analog
white noise source a la:

http://www.electro-music.com/forum/phpbb-files/2tran_wn_203.gif

and then aggressively low-pass filter it. then feed your square wave
into one input of a comparator and the appropriately-scaled low-passed
noise into the other.

I tried using noise, as recommended earlier on this group and elsewhere.
The filtered amplitude below 10Hz was too low to produce a workable result,

That makes sense (loss of signal) how about filter it at ~10-100 kHz
and then send it into a counter/ divider to get to lower frequency.

George H.
Quote:

Your idea about using a candlelight flickering LED is interesting, but
looking at the video the switching appears to be a bit sharp.

In any case, I would prefer a circuit over which I have a degree of
design control as I may need to tinker to get the chaotic wave-like
effect with smooth transitions that I am looking for.

Robert Martin

Guest

Wed Jan 09, 2019 3:45 pm

On Wednesday, January 9, 2019 at 3:13:48 PM UTC+11, Robert Martin wrote:
Quote:
On 9/1/19 11:04 am, bill.sloman_at_ieee.org wrote:
On Wednesday, January 9, 2019 at 10:48:46 AM UTC+11, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50% duty
cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

https://en.wikipedia.org/wiki/Pseudorandom_binary_sequence

You can make a pseudorandnom binary sequence in a single-chip processor - it can also be done with long shift registers, and some parts seem to have been designed for the job, but the single-chip microprocessor or a programmable logic chip are the minimum part solution.

I would prefer not to use a micro.

Of course. You'd have to learn more than the bare minimum required to get the job done.

Quote:
This circuit uses only two IC's.
http://www.seekic.com/circuit_diagram/Signal_Processing/PSEUDO_RANDOM_BIT_SEQUENCE_GENERATOR.html

Any comments? Would clocking it at 4Hz present any problems?

The circuit uses three integrated circuits - two 5-stage shift register and the exclusive-OR gate package.

It is singularly un-impressive, clearly designed by somebody who couldn't be bother finding out what parts are available.

You can get much longer shift registers - designed for the job - that only provide external output from the stages you need to feed into the exclusive-OR gate, and you can program a programmable-logic device to do all the same jobs in one chip.

Clocking it at 4Hz wouldn't present any problems

Quote:
Do I understand correctly that the output would be a 4Hz PWM signal at

If you built it with TTL-logic powered from 5V and didn't put a pull-up on the output you'd see about 2V peak to peak.

Most people would use CMOS these days, which would give you rail to rail swing - which could be up to 15V with old 4000-series CMOS. More modern parts are mostly only rated for lower supply voltages - 5V or lower.

--
Bill Sloman, Sydney

Robert Martin
Guest

Wed Jan 09, 2019 9:45 pm

On 10/1/19 12:47 am, George Herold wrote:
Quote:
On Wednesday, January 9, 2019 at 8:16:36 AM UTC-5, Robert Martin wrote:
On 9/1/19 5:26 pm, bitrex wrote:
On 01/08/2019 06:48 PM, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50%
duty cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

I think the simplest way to do it without a uP would to build an analog
white noise source a la:

http://www.electro-music.com/forum/phpbb-files/2tran_wn_203.gif

and then aggressively low-pass filter it. then feed your square wave
into one input of a comparator and the appropriately-scaled low-passed
noise into the other.

I tried using noise, as recommended earlier on this group and elsewhere.
The filtered amplitude below 10Hz was too low to produce a workable result,

That makes sense (loss of signal) how about filter it at ~10-100 kHz
and then send it into a counter/ divider to get to lower frequency.

George H.

Good suggestion. I'll first apply a 1KHz LPF and clip its output to
simulate a logic signal into a divide by 100 counter.

Robert Martin

Robert Martin
Guest

Wed Jan 09, 2019 9:45 pm

On 10/1/19 12:31 am, Martin Brown wrote:
Quote:
On 08/01/2019 23:48, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50%
duty cycle.

XOR it with another free running oscillator of about the same frequency
but with a bit of frequency modulation dither added.

Yes, but the essence of my original question is how to create "dither"
or a degree of randomness at ELF.

Robert Martin

Quote:
How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

It would be so much easier to do in a PIC or with a shift register.

https://en.wikipedia.org/wiki/Linear-feedback_shift_register

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

George Herold
Guest

Wed Jan 09, 2019 10:45 pm

On Wednesday, January 9, 2019 at 3:39:10 PM UTC-5, Robert Martin wrote:
Quote:
On 10/1/19 12:47 am, George Herold wrote:
On Wednesday, January 9, 2019 at 8:16:36 AM UTC-5, Robert Martin wrote:
On 9/1/19 5:26 pm, bitrex wrote:
On 01/08/2019 06:48 PM, Robert Martin wrote:
I have a CD4060 outputting a 5Vpp 4Hz (4 hertz) square wave at 50%
duty cycle.

How can I randomly pulse width modulate this so that when a low pass
filter is added a constantly changing, "wave-like" arbitrary waveform
will be produced?

I would prefer analog or CMOS IC's, not a microprocessor, and minimum
parts count.

The "randomness" does not need to be true but only a reasonable
approximation.

Thank you for any ideas or available circuit diagrams.

Robert Martin

I think the simplest way to do it without a uP would to build an analog
white noise source a la:

http://www.electro-music.com/forum/phpbb-files/2tran_wn_203.gif

and then aggressively low-pass filter it. then feed your square wave
into one input of a comparator and the appropriately-scaled low-passed
noise into the other.

I tried using noise, as recommended earlier on this group and elsewhere.
The filtered amplitude below 10Hz was too low to produce a workable result,

That makes sense (loss of signal) how about filter it at ~10-100 kHz
and then send it into a counter/ divider to get to lower frequency.

George H.

Good suggestion. I'll first apply a 1KHz LPF and clip its output to
simulate a logic signal into a divide by 100 counter.

Robert Martin

Robert, now that I think about it, I'm not sure that is going to work... or be that useful. If you've got random pulses coming at some rate...
then counting to some number is giving you a running average of the counts
And I don't think you'll see a lot of variation.
One of the pseudo-random shift register things may be better...
you can clock at the rate you like. There are not many low frequency
noise sources... maybe 1/f noise in the old carbon comp resistors?
Geiger counter with weakish source, some chaotic pendulum...

George H.

bitrex
Guest

Wed Jan 09, 2019 11:45 pm

On 01/09/2019 05:24 PM, bitrex wrote:

Quote:
Any comments? Would clocking it at 4Hz present any problems?

The circuit uses three integrated circuits - two 5-stage shift
register and the exclusive-OR gate package.

It is singularly un-impressive, clearly designed by somebody who
couldn't be bother finding out what parts are available.

You can get much longer shift registers - designed for the job - that
only provide external output from the stages you need to feed into the
exclusive-OR gate, and you can program a programmable-logic device to
do all the same jobs in  one chip.

Clocking it at 4Hz wouldn't present any problems

Do I understand correctly that the output would be a 4Hz PWM signal at

If you built it with TTL-logic powered from 5V and didn't put a
pull-up on the output you'd see about 2V peak to peak.

Most people would use CMOS these days, which would give you rail to
rail swing - which could be up to 15V with old 4000-series CMOS. More
modern parts are mostly  only rated for lower supply voltages - 5V or
lower.

I could whip up a code sketch and have an ATTiny 8 pin uP on a board
outputting the required wave form with pseudo-random duty cycle
modulation in literally ten minutes

If Robert Martin needs this function in small quantity I could easily do
a thousand of them in a DIP package with the programmer array I have at
home, let's make a deal bro

Goto page 1, 2, 3  Next

elektroda.net NewsGroups Forum Index - Electronics Design - Circuit for Randomized Pulse Width Modulation