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.

Analog--> digital noise: downsampling

Status
Not open for further replies.

carbonzit

Active Member
Continuing my inquiries into noise processing, and taking ideas given in another thread to process noise in the digital domain, here's my idea of how to do that.

Suggestion was to digitize the noise signal, then sample it and use the samples to output a lower-frequency signal. Here's what I came up with:

**broken link removed**

The op amp operates as a simple squarer. The counter divides the oscillator down to the desired sampling frequency.

The part I'm not sure about is what I've labeled the "latch/flip-flop thingy". I think a flip-flop will work here (can you even buy a single flip-flop anymore?): the idea is that when the clock pulse to it goes high, it is enabled, whereupon it samples the input and latches its output to that value (low or high).

1. Will this work?
2. What device do I actually want here?
3. Are there better ways to do this?
 
You might be better served to quit starting a new thread for what is basically the same topic. This is the third thread that I know of. Continuity is helpful for all readers and contributors.
If your final goal is low frequency analog noise, you should do an analog sample and hold (zero order hold) as suggested by (if this was a continuance of the old thread, I could find his name), followed by a lowpass filter.
 
Last edited:
You might be better served to quit starting a new thread for what is basically the same topic. This is the third thread that I know of. Continuity is helpful for all readers and contributors.

Yeah, you're right. I started this since it was kind of tangential to the previous thread, but I can see your point. Thread proliferation and all that.

If your final goal is low frequency analog noise, you should do an analog sample and hold (zero order hold) as suggested by (if this was a continuance of the old thread, I could find his name), followed by a lowpass filter.

This was my attempt at a (digital) zero-order hold. How would this be done with the analog signal? That would actually be preferable.

Would the (analog) zero-order hold keep the signal at its value when sampled, and not just high or low as here? Clearly better than the scheme I proposed.

So I've been reading up on sample-and-hold circuits. Would something like this:

**broken link removed**

work here? A little primtive, maybe. But if I drove the control gate with a clock pulse, wouldn't this do what others have suggested: give a held output equal to the noise voltage at the instant of sampling?

So what's the difference betwixt a simple sample-and-hold and a zero-order hold?
 
Last edited:
Anyone have anything to say about this? Interested to hear more about sample-and-holds ...

[retroactive to post below] Will do, Roff.
 
Last edited:
I was working on a circuit for you, but I got distracted. What you posted could work, but the devil is in the details, as always. Hang loose.
 
OK, here's a circuit that should work.
I have no idea what the amplitude of your noise source is. You might need more or less gain. You can still add gain in your first stage, since bandwidth should not be an issue. You could also add it before the filter, but be aware that the signal there is centered around the Veb breakdown voltage of the noise transistor, so adding gain after down sampling recreates the low frequency cutoff issue. I avoided that in the first amplifier (note C2, the 100nF cap). I was able to do this because the down sampling takes the higher frequency noise which is passed by U1a and folds it down below the sample rate. After the Sample and hold, any gain added has to have a very low frequency cutoff, probably in the milliHertz range, depending on your requirements.
In any case, the filter output as designed also has a big DC component, so you will probably have to cap-couple the output to get rid of the DC. When you do, be aware of the low frequency cutoff which cap coupling causes.

It might be better to use dual supplies, and remove the DC component before the gain stage. Then all the low frequency cutoff issues are moot.
What is your application?
Do you have the capability of using dual supplies?
 

Attachments

  • Noise generator subaudible.PNG
    Noise generator subaudible.PNG
    45.2 KB · Views: 301
Last edited:
OK, here's a circuit that should work.

Without even really looking at this, I have to say that you are a gentleman and a scholar.

In other words, thanks. I'm going to go over this later. It looks like just what I'm needing.

I think I need to back off this project for a moment and get the right stuff. I've been using just what junk I had lying around, which is part of the problem.

The other part of the problem, to answer one of your questions, is that I was attempting to run the whole project from a single-ended supply, using a LM324. I think it's time to break down and get (meaning build) a proper dual supply, and not have to worry about DC offsets and other nonsense. Plus get some new parts. Time to put an order in to DigiKey, or perhaps Jameco ...

To answer another question, my purpose is not clear at this point. One really dumb use is to simulate a flickering light, such as would be produced by an arc welder. But I have other random-noise-related things in mind as well. We'll see ...
 
Last edited:
I don't mean to trivialise Roff's work, but as I mentioned in your other thread the problem with this solution is that you get a fixed output frequency of "events" and each event can be a 1 or a 0. If your input data is good you can get long sustained periods of 1 or 0 at the output. This is not as random as the other system I suggested and is not as good for a "flickering candle" etc.

If you need a hardware solution, you can try putting the random input data directly into a simple 8bit binary counter IC, then taking the output from one of the counter pins. This will give a much better "flickering" effect and you also have options to connect more than 1 counter outputs through resistors to your LED, giving some analogue flickering effects.
 
Last edited:
Mr RB,

This "sample and hold" solution doesn't output only ones and zeros. The comparator has been removed (replaced with amplifier) and after that comes sample-and-hold + low-pass filter.
 
Here is the schematic that I actually simulated, the resulting waves, and a few other supporting files, in case anyone else want to run the sim.
 

Attachments

  • Noise generator subaudible waves.PNG
    Noise generator subaudible waves.PNG
    42.5 KB · Views: 239
  • noise sampler.zip
    845.3 KB · Views: 141
  • Noise generator subaudible sim.PNG
    Noise generator subaudible sim.PNG
    35.6 KB · Views: 207
Thanks MisterT, and sorry for my confusion there! The OP's first diagram shows a 1bit (squarer) system, similar to what he said in the other thread I responded to.

I missed the fact that Roff's schematic was an analogue sample and hold as I was responding to the OP and didn't spend any time looking at Roff's schematic other than to see it was quite complex.

But I still think using a binary divider IC with a few resistors on it's output will be simpler and give a "flickering candle effect" just as good. :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top