Electronics-Related.com
Forums

Circuit for Randomized Pulse Width Modulation

Started by Robert Martin January 8, 2019
On Friday, 11 January 2019 04:01:21 UTC, 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. > > Robert Martin
You could use agc to set the trigger level. NT
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 -- 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
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. Robert Martin
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. Jeroen Belleman
On Friday, January 11, 2019 at 8:19:16 AM UTC-5, Robert Martin wrote:
> 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.
> > Robert Martin
On 1/11/19 8:19 AM, Robert Martin wrote:
> 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.
> 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
On Wednesday, January 9, 2019 at 5:24:32 PM UTC-5, bitrex wrote:
> On 01/09/2019 09:08 AM, bill.sloman@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@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
On Wednesday, January 9, 2019 at 9:33:17 PM UTC-5, Robert Martin wrote:
> 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
On Friday, January 11, 2019 at 9:24:36 AM UTC-5, Jeroen Belleman wrote:
> 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
"Phil Hobbs" <pcdhSpamMeSenseless@electrooptical.net> wrote in message 
news:uKadneOhtb_WL6XBnZ2dnUU7-QHNnZ2d@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. 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/