EDAboard.com | EDAboard.de | EDAboard.co.uk | WTWH Media

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 Previous  1, 2, 3


Guest

Fri Jan 11, 2019 5:45 am   



On Friday, 11 January 2019 04:01:21 UTC, Robert Martin wrote:
Quote:
On 11/1/19 9:44 am, Phil Hobbs wrote:

The OP seems to be making very heavy weather of a simple job.  "Too
small to produce a workable result" is a typical example.

An ordinary op amp running with a closed loop gain of 100 dB will
produce a lot of low frequency noise, and give some lowpass filtering as
a bonus.  (The amp would need at least 120 dB of open-loop gain, but
there are lots of those around.)

Assuming its 0.1-10 Hz p-p noise is 5 uV, the amplitude would be around
500 mV, not counting resistor noise.

If he uses a chopamp, the noise would even be reasonably close to white,
but it would probably need two stages to get enough gain.  An OPA378 has
very flat noise of about 20 nV/sqrt(Hz), so in a 10-Hz bandwidth with a
gain of 100000, that would be about 6 mV.  A second stage could make
that anything he likes.

All you'll end up making with that setup is a thermal gradient/
microphonics detector that outputs a bunch of off scale DC level jumps
that take minutes to settle back down.

If your layout is sufficiently horrible and you pick the wrong parts.  A
chopamp and a couple of SMT resistors isn't going to give any problems
in a sane layout.


How about if I use junction white noise, add a 1KHz LPF and bias the
input of an op amp so it only sees the highest amplitude spikes.

I have no idea what the rep rate of those spikes might be, but I may be
able to adjust so it is primarily within the sub audio range.

These could used as is, or to trigger a square wave which in turn could
be filtered to approximate a sine.

Robert Martin


You could use agc to set the trigger level.


NT

Phil Hobbs
Guest

Fri Jan 11, 2019 6:45 am   



On 1/10/19 11:01 PM, Robert Martin wrote:
Quote:
On 11/1/19 9:44 am, Phil Hobbs wrote:

The OP seems to be making very heavy weather of a simple job.  "Too
small to produce a workable result" is a typical example.

An ordinary op amp running with a closed loop gain of 100 dB will
produce a lot of low frequency noise, and give some lowpass
filtering as
a bonus.  (The amp would need at least 120 dB of open-loop gain, but
there are lots of those around.)

Assuming its 0.1-10 Hz p-p noise is 5 uV, the amplitude would be around
500 mV, not counting resistor noise.

If he uses a chopamp, the noise would even be reasonably close to
white,
but it would probably need two stages to get enough gain.  An OPA378
has
very flat noise of about 20 nV/sqrt(Hz), so in a 10-Hz bandwidth with a
gain of 100000, that would be about 6 mV.  A second stage could make
that anything he likes.

All you'll end up making with that setup is a thermal gradient/
microphonics detector that outputs a bunch of off scale DC level
jumps that take minutes to settle back down.

If your layout is sufficiently horrible and you pick the wrong parts.
A chopamp and a couple of SMT resistors isn't going to give any
problems in a sane layout.


How about if I use junction white noise, add a 1KHz LPF and bias the
input of an op amp so it only sees the highest amplitude spikes.

I have no idea what the rep rate of those spikes might be, but I may be
able to adjust so it is primarily within the sub audio range.

These could used as is, or to trigger a square wave which in turn could
be filtered to approximate a sine.


"I have no idea" apparently equals "I don't want to spend the time to
actually design a real solution." Or, maybe, "I don't know how to do
this but I don't want to use somebody else's idea."

You've had a lot of smart people giving you advice. That's a wonderful
thing, except that you keep adding conditions such as "minimal parts
count" and "too small to produce a workable result". Those are
irrelevant for a hobby project.

I'm far from dissing hobby projects--I've learned a lot from them
myself--but parts count is hardly relevant. "I have no idea" ought to
mean "I'm eager to learn", but that doesn't seem to be the case.

If you're too lazy to wire up one op amp and two resistors, none of us
can help that.

Cheers

Phil Hobbs



--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC / Hobbs ElectroOptics
Optics, Electro-optics, Photonics, Analog Electronics
Briarcliff Manor NY 10510

http://electrooptical.net
http://hobbs-eo.com

Robert Martin
Guest

Fri Jan 11, 2019 2:45 pm   



On 11/1/19 4:21 pm, Phil Hobbs wrote:
Quote:
On 1/10/19 11:01 PM, Robert Martin wrote:
On 11/1/19 9:44 am, Phil Hobbs wrote:

The OP seems to be making very heavy weather of a simple job.  "Too
small to produce a workable result" is a typical example.

An ordinary op amp running with a closed loop gain of 100 dB will
produce a lot of low frequency noise, and give some lowpass
filtering as
a bonus.  (The amp would need at least 120 dB of open-loop gain, but
there are lots of those around.)

Assuming its 0.1-10 Hz p-p noise is 5 uV, the amplitude would be
around
500 mV, not counting resistor noise.

If he uses a chopamp, the noise would even be reasonably close to
white,
but it would probably need two stages to get enough gain.  An
OPA378 has
very flat noise of about 20 nV/sqrt(Hz), so in a 10-Hz bandwidth
with a
gain of 100000, that would be about 6 mV.  A second stage could make
that anything he likes.

All you'll end up making with that setup is a thermal gradient/
microphonics detector that outputs a bunch of off scale DC level
jumps that take minutes to settle back down.

If your layout is sufficiently horrible and you pick the wrong parts.
A chopamp and a couple of SMT resistors isn't going to give any
problems in a sane layout.


How about if I use junction white noise, add a 1KHz LPF and bias the
input of an op amp so it only sees the highest amplitude spikes.

I have no idea what the rep rate of those spikes might be, but I may
be able to adjust so it is primarily within the sub audio range.

These could used as is, or to trigger a square wave which in turn
could be filtered to approximate a sine.


"I have no idea" apparently equals "I don't want to spend the time to
actually design a real solution."  Or, maybe, "I don't know how to do
this but I don't want to use somebody else's idea."

You've had a lot of smart people giving you advice.  That's a wonderful
thing, except that you keep adding conditions such as "minimal parts
count" and "too small to produce a workable result". Those are
irrelevant for a hobby project.

I'm far from dissing hobby projects--I've learned a lot from them
myself--but parts count is hardly relevant.  "I have no idea" ought to
mean "I'm eager to learn", but  that doesn't seem to be the case.

If you're too lazy to wire up one op amp and two resistors, none of us
can help that.

Cheers

Phil Hobbs


Frankly, I've had it with the pointless sniping and nitpicking on this
group. I do have my limit. You have no idea what my personal
circumstances are.

Apparently some here think it is intolerable to canvas ideas before
starting a project, and then cannot even agree among themselves.

It's obviously all my fault for asking the question. I have
unsubscribed. Sorry to have bothered you.

Robert Martin

George Herold
Guest

Fri Jan 11, 2019 3:45 pm   



On Friday, January 11, 2019 at 8:19:16 AM UTC-5, Robert Martin wrote:
Quote:
On 11/1/19 4:21 pm, Phil Hobbs wrote:
On 1/10/19 11:01 PM, Robert Martin wrote:
On 11/1/19 9:44 am, Phil Hobbs wrote:

The OP seems to be making very heavy weather of a simple job.  "Too
small to produce a workable result" is a typical example.

An ordinary op amp running with a closed loop gain of 100 dB will
produce a lot of low frequency noise, and give some lowpass
filtering as
a bonus.  (The amp would need at least 120 dB of open-loop gain, but
there are lots of those around.)

Assuming its 0.1-10 Hz p-p noise is 5 uV, the amplitude would be
around
500 mV, not counting resistor noise.

If he uses a chopamp, the noise would even be reasonably close to
white,
but it would probably need two stages to get enough gain.  An
OPA378 has
very flat noise of about 20 nV/sqrt(Hz), so in a 10-Hz bandwidth
with a
gain of 100000, that would be about 6 mV.  A second stage could make
that anything he likes.

All you'll end up making with that setup is a thermal gradient/
microphonics detector that outputs a bunch of off scale DC level
jumps that take minutes to settle back down.

If your layout is sufficiently horrible and you pick the wrong parts.
A chopamp and a couple of SMT resistors isn't going to give any
problems in a sane layout.


How about if I use junction white noise, add a 1KHz LPF and bias the
input of an op amp so it only sees the highest amplitude spikes.

I have no idea what the rep rate of those spikes might be, but I may
be able to adjust so it is primarily within the sub audio range.

These could used as is, or to trigger a square wave which in turn
could be filtered to approximate a sine.


"I have no idea" apparently equals "I don't want to spend the time to
actually design a real solution."  Or, maybe, "I don't know how to do
this but I don't want to use somebody else's idea."

You've had a lot of smart people giving you advice.  That's a wonderful
thing, except that you keep adding conditions such as "minimal parts
count" and "too small to produce a workable result". Those are
irrelevant for a hobby project.

I'm far from dissing hobby projects--I've learned a lot from them
myself--but parts count is hardly relevant.  "I have no idea" ought to
mean "I'm eager to learn", but  that doesn't seem to be the case.

If you're too lazy to wire up one op amp and two resistors, none of us
can help that.

Cheers

Phil Hobbs


Frankly, I've had it with the pointless sniping and nitpicking on this
group. I do have my limit. You have no idea what my personal
circumstances are.

Apparently some here think it is intolerable to canvas ideas before
starting a project, and then cannot even agree among themselves.

It's obviously all my fault for asking the question. I have
unsubscribed. Sorry to have bothered you.


Huh, OK bye Robert. I thought your thread was tame compared to some.
This is a nice place to fling ideas around, but you do need a thick skin
when you first start interacting and don't know who all the people are.

Think on this, Phil H. is a private consultant. (I'm not sure what he calls
himself) He probably charges customers ~$100/hr for his time. And here
you can get his thoughts for free. More so if you are nice and offer him
some of your wisdom.

George H.
Quote:

Robert Martin


Jeroen Belleman
Guest

Fri Jan 11, 2019 3:45 pm   



Robert Martin wrote:

Quote:

Frankly, I've had it with the pointless sniping and nitpicking on this
group. I do have my limit. You have no idea what my personal
circumstances are.

Apparently some here think it is intolerable to canvas ideas before
starting a project, and then cannot even agree among themselves.

It's obviously all my fault for asking the question. I have
unsubscribed. Sorry to have bothered you.


You have to have a thick skin when you decide to ask for help
here. There are quite a few very knowledgeable people here,
but they tend to be short of patience. Especially so with
people who are obviously no experts, and yet refuse to listen
to advice and suggestions.

There are lots of trolls, too. Just ignore the trolls.

As for me, I haven't even understood what you are trying to
do. You never really described your purpose, but only what
you believe are solutions.

Jeroen Belleman

Phil Hobbs
Guest

Fri Jan 11, 2019 4:45 pm   



On 1/11/19 8:19 AM, Robert Martin wrote:
Quote:
On 11/1/19 4:21 pm, Phil Hobbs wrote:
On 1/10/19 11:01 PM, Robert Martin wrote:
On 11/1/19 9:44 am, Phil Hobbs wrote:

The OP seems to be making very heavy weather of a simple
job. "Too small to produce a workable result" is a typical
example.

An ordinary op amp running with a closed loop gain of 100
dB will produce a lot of low frequency noise, and give some
lowpass filtering as a bonus. (The amp would need at least
120 dB of open-loop gain, but there are lots of those
around.)

Assuming its 0.1-10 Hz p-p noise is 5 uV, the amplitude
would be around 500 mV, not counting resistor noise.

If he uses a chopamp, the noise would even be reasonably
close to white, but it would probably need two stages to
get enough gain. An OPA378 has very flat noise of about 20
nV/sqrt(Hz), so in a 10-Hz bandwidth with a gain of 100000,
that would be about 6 mV. A second stage could make that
anything he likes.

All you'll end up making with that setup is a thermal
gradient/ microphonics detector that outputs a bunch of off
scale DC level jumps that take minutes to settle back down.

If your layout is sufficiently horrible and you pick the wrong
parts. A chopamp and a couple of SMT resistors isn't going to
give any problems in a sane layout.


How about if I use junction white noise, add a 1KHz LPF and bias
the input of an op amp so it only sees the highest amplitude
spikes.

I have no idea what the rep rate of those spikes might be, but I
may be able to adjust so it is primarily within the sub audio
range.

These could used as is, or to trigger a square wave which in turn
could be filtered to approximate a sine.


"I have no idea" apparently equals "I don't want to spend the time
to actually design a real solution." Or, maybe, "I don't know how
to do this but I don't want to use somebody else's idea."

You've had a lot of smart people giving you advice. That's a
wonderful thing, except that you keep adding conditions such as
"minimal parts count" and "too small to produce a workable result".
Those are irrelevant for a hobby project.

I'm far from dissing hobby projects--I've learned a lot from them
myself--but parts count is hardly relevant. "I have no idea" ought
to mean "I'm eager to learn", but that doesn't seem to be the
case.

If you're too lazy to wire up one op amp and two resistors, none of
us can help that.

Cheers

Phil Hobbs


Frankly, I've had it with the pointless sniping and nitpicking on
this group. I do have my limit. You have no idea what my personal
circumstances are.


Not in any detail, of course, but then that's not highly relevant to the
point at hand.

There are quite a few folks that show up here asking questions who don't
actually want a solution, and you appear to be one of them. This is a
discussion group, so discussion is great, as long as it leads somewhere.
(I'm not the owner of the group, I just have an opinion, and that's
what it is.) We like to be helpful round here.

Quote:
Apparently some here think it is intolerable to canvas ideas before
starting a project, and then cannot even agree among themselves.


Your two threads on this project spanning more than two months (starting
on Hallowe'en) have racked up about 70 posts, apparently with zero
progress. The gizmo looks like getting built sometime in the
twenty-third century.

> It's obviously all my fault for asking the question.

Questions are fine. It's being super boring about it that's the issue. ;)

> I have unsubscribed. Sorry to have bothered you.

I sort of doubt that, but it's nice of you to apologize.

Cheers

Phil Hobbs

Tim Williams
Guest

Sat Jan 12, 2019 12:45 am   



"Phil Hobbs" <pcdhSpamMeSenseless_at_electrooptical.net> wrote in message
news:uKadneOhtb_WL6XBnZ2dnUU7-QHNnZ2d_at_supernews.com...
Quote:
There are quite a few folks that show up here asking questions who don't
actually want a solution,


What is it with people like that, anyway?

Not referring to the present example in particular, but more generally. It
seems to fit a pattern.

A current one that comes to mind (on another forum), is asking about
"contra-wound" inductors and their applications to microwave antennas.
Just... where do they get these ideas from? Rubbing together two contrary
ideas and expecting something to come out?

They seem to usually be conversant, but show absolutely no ability to
reason, or even acknowledge that an argument might be made about a given
topic.

Our own resident Skybuck seems to fit such a categorization; probably
several of the other trollier users too.

I recently watched a sort of biography of a schizophrenic who became
obscurely-internet-famous for his, to put it roughly, ravings. Definitely a
smart person, but sadly hampered by his condition, and the general lack of
mental health care in this country. The highlight of his effort, he created
an operating system (of sorts) from scratch, TempleOS. (The name, and
content, look to be manifestations of his delusions.) Since the late 90s,
he showed up in many places on the internet, from newsgroups to forums to
Reddit and beyond (of course, being moderated out of existence in most
places). The last few years, his condition continued to spiral downwards;
he died last year... struck by a train.

I suppose many conditions may provoke such behaviors, the persistent
ideation, delusions, trolling, incapability of reason... I wonder if it's
better that those sorts of people have an outlet (whether their voices are
heard or not -- not that most people want to hear them, either). I would
suppose we shouldn't entertain their ideas. Trolling them back obviously
isn't going to help. But actually getting them useful help? Who knows...

Tim

--
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Design
Website: https://www.seventransistorlabs.com/


Guest

Sat Jan 12, 2019 12:45 am   



On Wednesday, January 9, 2019 at 5:24:32 PM UTC-5, bitrex wrote:
Quote:
On 01/09/2019 09:08 AM, bill.sloman_at_ieee.org wrote:
On Wednesday, January 9, 2019 at 3:13:48 PM UTC+11, Robert Martin wrote:
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.

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

Do I understand correctly that the output would be a 4Hz PWM signal at
about 2Vpp?

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


Couldn't you low pass filter the bit stream and feed an on chip DAC and drive an analog output directly? His actual goal is to produce random waves, right?

Rick C.

- Get 6 months of free supercharging
- Tesla referral code - https://ts.la/richard11209


Guest

Sat Jan 12, 2019 12:45 am   



On Wednesday, January 9, 2019 at 9:33:17 PM UTC-5, Robert Martin wrote:
Quote:
On 10/1/19 9:33 am, bitrex wrote:
On 01/09/2019 05:24 PM, bitrex wrote:

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
about 2Vpp?

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 :)


Thank you for the tempting offer, but I am determined to nut this out
using common IC's, not a micro.

If anyone here is able to design such a circuit that provides a random
PWM output at around 4Hz with low parts count, do let me know. Here
please, not by PM. We can work something out.

Robert Martin


Somehow I feel this should be doable with a 555 timer chip... but no idea how really. Can every problem be solved with a 555 timer chip or two?

Two 555 timer functions (is that a 556 chip?) with slightly different periods exclusive ored together, then low pass filtered.

Rick C.

+ Get 6 months of free supercharging
+ Tesla referral code - https://ts.la/richard11209


Guest

Sat Jan 12, 2019 12:45 am   



On Friday, January 11, 2019 at 9:24:36 AM UTC-5, Jeroen Belleman wrote:
Quote:
Robert Martin wrote:


Frankly, I've had it with the pointless sniping and nitpicking on this
group. I do have my limit. You have no idea what my personal
circumstances are.

Apparently some here think it is intolerable to canvas ideas before
starting a project, and then cannot even agree among themselves.

It's obviously all my fault for asking the question. I have
unsubscribed. Sorry to have bothered you.


You have to have a thick skin when you decide to ask for help
here. There are quite a few very knowledgeable people here,
but they tend to be short of patience. Especially so with
people who are obviously no experts, and yet refuse to listen
to advice and suggestions.

There are lots of trolls, too. Just ignore the trolls.

As for me, I haven't even understood what you are trying to
do. You never really described your purpose, but only what
you believe are solutions.


"Very knowledgeable" and "useful advice" are often incompatible.

Advice is just that. If someone rejects your advice it often means you either didn't understand the problem or the person. Silly to get an attitude about it. Either people can offer solutions and enjoy the responses or be jerks about it. Whatever.

Rick C.

-- Get 6 months of free supercharging
-- Tesla referral code - https://ts.la/richard11209

bitrex
Guest

Sat Jan 12, 2019 2:45 am   



On 01/11/2019 05:51 PM, gnuarm.deletethisbit_at_gmail.com wrote:
Quote:
On Wednesday, January 9, 2019 at 5:24:32 PM UTC-5, bitrex wrote:
On 01/09/2019 09:08 AM, bill.sloman_at_ieee.org wrote:
On Wednesday, January 9, 2019 at 3:13:48 PM UTC+11, Robert Martin wrote:
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.

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

Do I understand correctly that the output would be a 4Hz PWM signal at
about 2Vpp?

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

Couldn't you low pass filter the bit stream and feed an on chip DAC and drive an analog output directly? His actual goal is to produce random waves, right?

Rick C.

- Get 6 months of free supercharging
- Tesla referral code - https://ts.la/richard11209


Sure, the ATTiny series doesn't have an onboard DAC but it has hardware
PWM channels which top out at around 32kHz base frequency for an 8MHz
internal oscillator clock, 8 bit for the PWM. For a max frequency output
say 1/10 lower a two pole Bessel should work fine to filter that, maybe
even just a buffered RC.

The internal pseudorandom modulation source for the PWM output could be
1-dimensional Perlin noise: <https://en.wikipedia.org/wiki/Perlin_noise>

bitrex
Guest

Sat Jan 12, 2019 4:45 am   



On 01/11/2019 06:41 PM, Tim Williams wrote:
Quote:
"Phil Hobbs" <pcdhSpamMeSenseless_at_electrooptical.net> wrote in message
news:uKadneOhtb_WL6XBnZ2dnUU7-QHNnZ2d_at_supernews.com...
There are quite a few folks that show up here asking questions who don't
actually want a solution,

What is it with people like that, anyway?

Not referring to the present example in particular, but more generally.
It seems to fit a pattern.


they have a constraint they don't wanna mention because if they
mentioned it, whatever it is, it would be clear what they were doing
which is probably trying to get work done for free, the type of work
most people want 2 get paid to do. It's a fishing expedition, fishing
for brains! Heh!

bitrex
Guest

Sat Jan 12, 2019 4:45 am   



On 01/11/2019 05:51 PM, gnuarm.deletethisbit_at_gmail.com wrote:
Quote:
On Wednesday, January 9, 2019 at 5:24:32 PM UTC-5, bitrex wrote:
On 01/09/2019 09:08 AM, bill.sloman_at_ieee.org wrote:
On Wednesday, January 9, 2019 at 3:13:48 PM UTC+11, Robert Martin wrote:
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.

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

Do I understand correctly that the output would be a 4Hz PWM signal at
about 2Vpp?

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

Couldn't you low pass filter the bit stream and feed an on chip DAC and drive an analog output directly? His actual goal is to produce random waves, right?

Rick C.

- Get 6 months of free supercharging
- Tesla referral code - https://ts.la/richard11209


10 minute proof of concept, this is a couple octaves summation of 1D
Perlin noise/pseudorandom coherent noise modulating the PWM duty cycle
and driving a yellow LED from the PWM output of an AVR. Looks a lot like
one of those flicker-flame candle LEDs. A bit late for the holidays oh
well...

<https://www.dropbox.com/s/yuxvb3a4qwu12n3/VID_20190111_220348599.mp4?dl=0>


Guest

Sat Jan 12, 2019 2:45 pm   



On Saturday, 12 January 2019 03:38:20 UTC, bitrex wrote:
Quote:
On 01/11/2019 06:41 PM, Tim Williams wrote:
"Phil Hobbs" <pcdhSpamMeSenseless_at_electrooptical.net> wrote in message
news:uKadneOhtb_WL6XBnZ2dnUU7-QHNnZ2d_at_supernews.com...

There are quite a few folks that show up here asking questions who don't
actually want a solution,

What is it with people like that, anyway?

Not referring to the present example in particular, but more generally.
It seems to fit a pattern.

they have a constraint they don't wanna mention because if they


often yes

Quote:
mentioned it, whatever it is, it would be clear what they were doing
which is probably trying to get work done for free, the type of work
most people want 2 get paid to do.


I'm sure there's a variety of explanations in differing cases. Some likely candidates spring to mind:
1. they can't talk about what they're making
2. they just don't want to talk about what they're making
3. they've made their mind up on aspects of the design that more or less none of us would agree with, and they aren't interested in re-questioning those decisions
4. they have invented something, or think they have, so don't want to talk about some aspects of the thing such as what they're trying to achieve
5. sometimes I think they just don't see how the questions we ask are relevant
6. sometimes their communication skills are simply inadequate
7. they're looking for something very specific & most/all responses don't get them what they're looking for. Often they can't/won't say what that specific thing is.
8. they only want to use what's in their rather limited parts box

There are probably other possibles too.


NT

Goto page Previous  1, 2, 3

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

Ask a question - edaboard.com

Arabic version Bulgarian version Catalan version Czech version Danish version German version Greek version English version Spanish version Finnish version French version Hindi version Croatian version Indonesian version Italian version Hebrew version Japanese version Korean version Lithuanian version Latvian version Dutch version Norwegian version Polish version Portuguese version Romanian version Russian version Slovak version Slovenian version Serbian version Swedish version Tagalog version Ukrainian version Vietnamese version Chinese version Turkish version
EDAboard.com map