Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A different way to produce low-frequency noise?

Status
Not open for further replies.

carbonzit

Active Member
In my last thread I asked about using op amps and low-pass filters to produce subsonic noise from a noise generator. Now I'm thinking about a different way to attack this problem.

Maybe it's time to go into the digital domain. My thought is this: use my same simple noise source (reverse-biased transistor junction), but immediately digitize the noise, probably with a simple squaring circuit (infinite-gain op amp stage).

Then, what if I just "stretch" the signal, by simply copying it over a longer time base? The diagram below should explain this:

**broken link removed**

First question is how to do this? Obviously, this would most easily be done by a microprocessor in software. This would allow one to easily change the "stretch factor" and thus the frequency spectrum. I know how to do that. I'm curious about doing this in hardware, though: can you think of a simple, elegant way to do this with a few gates? I can't at the moment, but haven't really thought it out (which I will do).

Of course, this will result in a fairly degraded form of the noise signal, since all amplitude information is lost. (It would at least preserve the randomness of the zero crossing spacings.) It's a quick-and-dirty, brute-force way of getting a usable LF signal. Much better would be to use an A/D converter (or does anyone have any other ideas how this could be done to preserve at least some of the original waveform?).

As always, thanks in advance.
 
Why not use a pseudo-random noise generator program to generate the noise with a D/A or PWM output from the microprocessor.
 
The digital "square-waves" produce many harmonics at frequencies much higher than you want.
 
Aaarrrrgh.

Major oversight on my part. This whole scheme is impossible unless you can record the datastream, then play it back asynchronously.

Never mind. Back to the drawing board.
 
Last edited:
I like the analog approach, at least at the front end. I know it would be trivially easy to generate pseudo-random noise; I want things more random.
Any particular reason that you want it more random then pseudo-random? It's generally not possible to tell the difference unless you do careful statistical analysis of the waveform.
 
I have been thinking about prefiltering the noise, converting it to digital with a comparator with hysteresis, and running it through a ripple carry counter of arbitrary length. Each stage would effectively lower the spectral content (after filtering) by a factor of 2 (or not?) You would then need a post filter to get back to analog. I have no idea whether this would work or not. Just a wild hair.

It is a take-off on an idea that I had years ago when I was trying to generate truly random numbers. I figured that, with squared-up analog noise, any offset voltage or even harmonic distortion would result in more 1's than 0's or vice-versa. I figured that running it through a toggle flip-flop (divide by 2) would give me, in the long term, an equal number of 1's and 0's, except for asymmetry in the flip-flop's timing characteristics (edge delays, rise and fall times, setup times, etc.) I never did figure out if I was right or wrong.
 
Last edited:
it would totally help to know what is the application. sound>? what flavour?

BUT. whatever you decide, a decent low-pass filter will probably be your best asset.

i think that pseudo-random gets a bad rep from bad implementations (itunes for example? i don't care how random they THINK it is, it's just not random when it's the exactly SAME random time after time)

ah-hem.

if you want super hardcore random analogue then go for either an ELF lightning detecting radio receiver (not too great in the city (powerlines interfere))... OR
a themionic-valve (tube) with a magnet attached to it. a relatively easy to find gas-discharge tube for example.
i've seen the random-firing transistor thing, but if that's not going to be the right flavour on its own, you might be able to modulate some kind of LF 'carrier tone' to satisfy your needs.
 
I would try a different system. Keep generating the noise using your current hardware, then filter in software to reduce the range of frequencies generated in real time.

This is just the first algorithm that popped into my head;

1. output bit HI
2. wait until at least 10 HI input bits have been received from hardware
3. output bit LO
4. wait until at least 10 HI input bits have been received from hardware
5. (repeat)

(note; only testing the HI input bit fixes any input HI/LO bias issues).

This will generate an output frequency roughly 20 times lower than the input frequency but still retain much of the random data. Once you start using a count significantly higher than 10 it will eventually start to output something like a square wave, so there is a limit to the base algorithm on how much you can drop the frequency. Even /20 as shown may be pushing it, but from randon bit data I've seen I think 10 would be ok.

But you could also "shake it up" by using some input variations to reset or modify the count, which would transfer more of the input entropy to the output while allowing an even lower output frequency division. For instance, you could use 20 input HI bits as the trigger, (technically /40) but also subtract 2 from the count whenever a pattern of 110 is received which will happen 1/8th of the time or approx every 4 input HI bits on average.

4 HI input + 1 shake = score of 4 - 2, ie score = 2

So that halves the frequency again and transfers entropy so the average output will be;
input freq /80

but with a much higher entropy than if you just used the base algorithm.
 
I would try a different system. Keep generating the noise using your current hardware, then filter in software to reduce the range of frequencies generated in real time.

This is just the first algorithm that popped into my head;

1. output bit HI
2. wait until at least 10 HI input bits have been received from hardware
3. output bit LO
4. wait until at least 10 HI input bits have been received from hardware
5. (repeat)

pink noise?
 
You don't need to "stretch" the digital noise signal to get lower frequency signal. Just sample it at lower frequency. I.e. if you want a 5 Hz output just update the output at 10 Hz.
 
You don't need to "stretch" the digital noise signal to get lower frequency signal. Just sample it at lower frequency. I.e. if you want a 5 Hz output just update the output at 10 Hz.

That sounds doable. (After I posted my original scheme, it occurred to me that the only way it could work would be if you could also implement some kind of system that would slow time itself down!)

So do you have any ideas about how this could be done simply in hardware? I know this would be best handled by a microprocessor and software, but I'm curious to see if some simple and elegant hardware solution could be cooked up.

Also, while we're at it, let me add something else to my wish list: the problem with your suggestion is that it would result in an extremely narrow band of frequencies (in fact, only one frequency). Let's say I wanted to allow a band of frequencies through, like 0.1 - 2 Hz; how would I sample for this? I guess you could run several parallel sampling operations at different frequencies, but wouldn't that result in a very "spiky" result? Ideally, I'd like a fairly "smooth" response plot within whatever passband I select.
 
Last edited:
That sounds doable. (After I posted my original scheme, it occurred to me that the only way it could work would be if you could also implement some kind of system that would slow time itself down!)

So do you have any ideas about how this could be done simply in hardware? I know this would be best handled by a microprocessor and software, but I'm curious to see if some simple and elegant hardware solution could be cooked up.

Also, while we're at it, let me add something else to my wish list: the problem with your suggestion is that it would result in an extremely narrow band of frequencies (in fact, only one frequency). Let's say I wanted to allow a band of frequencies through, like 0.1 - 2 Hz; how would I sample for this? I guess you could run several parallel sampling operations at different frequencies, but wouldn't that result in a very "spiky" result? Ideally, I'd like a fairly "smooth" response plot within whatever passband I select.

Sample-and-hold circuit triggered by 555 timer at constant rate should work.

If you discard the comparator (the "one bit ADC") and use sample-and-hold circuit which updates at 4 Hz, you should have a signal with all frequencies below 2 Hz. The higher frequencies will be aliased to lower ones, but since the signal is noise anyway it shouldn't be a problem. Of course you will have some harmonics from the zero-order-hold.. use low pass filter to filter those out if you want.

Here is a simple simulation:

**broken link removed**

If you use a 555 triggered sample and hold, you can adjust the frequency band very easily.
 
Last edited:
Sample-and-hold circuit triggered by 555 timer at constant rate should work.

If you discard the comparator (the "one bit ADC") and use sample-and-hold circuit which updates at 4 Hz, you should have a signal with all frequencies below 2 Hz. The higher frequencies will be aliased to lower ones, but since the signal is noise anyway it shouldn't be a problem. Of course you will have some harmonics from the zero-order-hold.. use low pass filter to filter those out if you want.

I like it! Thanks.

Of course, I don't really know what a "zero-order hold" is, but hey, it's all about learning, right? I do know what a sample and hold is, could probably even cobble one together.

I'll look into this. One other question: your diagram is a bit confusing to me, as it shows the "original noise" being derived from "bandwidth limited white noise". Is the latter my noise run through a low-pass filter, or just the original (unfiltered) noise from the transistor?

Warning; Tangent [zero-order hold]

Found **broken link removed** of zero-order holds out there (unfortunately, written from the POV of Matlab, a tool which I neither have nor know how to use). I also found this definition:

A device which converts a sampled output into an output which is held constant between samples at the last sampled value.

Is that definition correct? Because that seems fairly easy to implement.

Sorry for my ignorance, but hey, you gotta learn somehow, right?
 
Last edited:
In my diagram "Band-Limited white noise" and "Original noise" are the same signal, that is, the original noise signal from the transistor amplified with op-amp.
The "Sample and hold 4 Hz" is the output signal of the simulated sample-and-hold. Your definition of zero-order hold is correct.. fancy name for a simple thing.
 
You don't need to "stretch" the digital noise signal to get lower frequency signal. Just sample it at lower frequency. I.e. if you want a 5 Hz output just update the output at 10 Hz.

I didn't propose that system because it's quite poor. What you get is a FIXED single output frequency of events where each event is randomly either HI or LO.

The system I proposed is only slightly more complex but has no fixed output period, and transfers much greater entropy, where the output is roughly divided by X but is still heavily affected by the original source entropy.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top