0-30 Hz White noise stimulation device (College project)

Thread Starter

Kellin

Joined Feb 17, 2019
20
The White Noise CL circuit you found will not work. It was poorly copied.
I found a copy of it that is correct.
Since it has only one battery then its output always has a DC voltage on it. If you do not need the output frequency to produce random 0V then it can have its DC output capacitive coupled to an amplifier IC and the lowpass filter circuit that can also be powered from the 15VDC and also have an output coupling capacitor..
Thank you, that makes sense. I will build this circuit and analyse its output. From there I may include a lowpass filter as you said powered by the 15V DC and have its output capacitive coupled. Thanks for your help, I will update you on the build result
 

wayneh

Joined Sep 9, 2010
16,398
I would like to control the output current manually to adjust it between 0 and ~700 uA. The amplitude of the noise does not necessarily have to control the amplitude of the output signal as long as I can get any amplitude of 0-30 Hz white noise and then try to amplify it or decrease it to my 0-700 uA range. By this I mean if I could build the signal generator to provide me with any amplitude of 0-30 Hz white noise then part 1 will be complete. I will then pass this signal into an amplifier or constant current stimulator to amplify the current of the 0-30 Hz white-noise signal to my desired range of 0-700 uA. This will render part 2 complete. Then I will attach the electrodes to the circuit, prove that 0-30 Hz of white noise is being generated with an adjustable amplitude of between 0 and 700 uA and the project will be complete at that point.
So let's be clear. Correct me if I'm wrong.

The input noise will be digitized to a digital high/low signal. The high frequency components will be removed, so no output pulse will be shorter than 16ms (half of a 33ms cycle, ie. 30Hz). A digital high signal will cause a constant current pulse from electrode A to electrode B, manually preset to some value between 0 and 700µA. A digital low signal will reverse polarity and cause a constant current pulse from electrode B to electrode A, again manually preset to some value between 0 and -700µA.

Sound right?
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
Your new PicA also will not work because its 9V battery voltage is much too low.
This new 9V circuit with one output is on the assumption that I bias the ground points to 1/2 the supply voltage (as the original circuit was 18V), which another member has informed me could be done with two 1K resistors in series across the supply with a 470uF capacitor across each resistor.

So let's be clear. Correct me if I'm wrong.

The input noise will be digitized to a digital high/low signal. The high frequency components will be removed, so no output pulse will be shorter than 16ms (half of a 33ms cycle, ie. 30Hz). A digital high signal will cause a constant current pulse from electrode A to electrode B, manually preset to some value between 0 and 700µA. A digital low signal will reverse polarity and cause a constant current pulse from electrode B to electrode A, again manually preset to some value between 0 and -700µA.

Sound right?
Yes sir, exactly. I want to emphasise however that making a prototype is my priority. If these requirements are too complex, I can simplify some of the requirements. For example, I could simplify the current adjustment between 0 and 700 uA to a constant 400 uA, un-adjustable. I could also simplify the bipolar flow between the electrodes to be unidirectional, flowing from electrode A to electrode B without any capability of a reverse polarity. My main requirements are to create the white-noise signal, filter it to 0-30 Hz and provide a stimulus with it, either constant ~400 uA or manually adjustable between 0 and 700 uA.
 

wayneh

Joined Sep 9, 2010
16,398
Yes sir, exactly. I want to emphasise however that making a prototype is my priority. If these requirements are too complex, I can simplify some of the requirements. For example, I could simplify the current adjustment between 0 and 700 uA to a constant 400 uA, un-adjustable. I could also simplify the bipolar flow between the electrodes to be unidirectional, flowing from electrode A to electrode B without any capability of a reverse polarity. My main requirements are to create the white-noise signal, filter it to 0-30 Hz and provide a stimulus with it, either constant ~400 uA or manually adjustable between 0 and 700 uA.
Excellent, that means that, in the schematic in my project that I linked, you can eliminate the two 555 timers and the 4017, and instead feed your noise signal to the two op-amps that make a sort of H-bridge. They're configured to provide a constant current, in either polarity, into the load, which is guesstimated to be 1500Ω or something like that.
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
I built and tested one of the white-noise generator circuits from this thread, the schematic is attached as '2N3904WNG' and I've also attached photos of the oscilloscope during testing. I was giving the circuit 15V and roughly 0-0.3 A and it was producing some noise. I'm not sure if it was white noise or if the noise was flat within my desired range. Does anyone know how I would verify if the circuit is producing white noise?

Here is where I found this circuit: https://www.experimentalistsanonymous.com/ve3wwg/doku.php?id=noise_generator

Excellent, that means that, in the schematic in my project that I linked, you can eliminate the two 555 timers and the 4017, and instead feed your noise signal to the two op-amps that make a sort of H-bridge. They're configured to provide a constant current, in either polarity, into the load, which is guesstimated to be 1500Ω or something like that.
That is great news, thank you for that help. If I eliminate the two 555 timer and the CD4017B, would the circuit then look like the picture I attached as 'Sketch1'? The configuration to provide a constant current in either polarity into a load of roughly 1500 Ohms is exactly what I need. If this sketch is correct, could I simply attach the output from my white noise generator circuit to the two op amps on the left of the 'Sketch1' circuit to amplify it before it is passed to the electrodes?
 

Attachments

Audioguru

Joined Dec 20, 2007
11,249
The simple noise circuit is much better than you think and has perfect white noise up to radio frequencies. The pc measuring it must be cutting the high audio frequencies. Since you are using very low frequencies then it should be powered from a voltage regulator IC.

The circuit with the opamps will not work because your (+) opamp inputs are connected directly to the positive supply voltage and the output of the 2nd opamp is shorted to the positive supply voltage.
Why do you need the first opamp and why is the 2nd opamp inverting with a fairly low input resistance? Instead, the first opamp that has the lowpass filter as its input should be non-inverting with a high resistance input volume control and all the gain you need, then the 2nd opamp can be inverting with a gain of 1. Then you will have two push-pull outputs.

What will you use for a lowpass filter?
 

wayneh

Joined Sep 9, 2010
16,398
That is great news, thank you for that help. If I eliminate the two 555 timer and the CD4017B, would the circuit then look like the picture I attached as 'Sketch1'? The configuration to provide a constant current in either polarity into a load of roughly 1500 Ohms is exactly what I need. If this sketch is correct, could I simply attach the output from my white noise generator circuit to the two op amps on the left of the 'Sketch1' circuit to amplify it before it is passed to the electrodes?
Like this. U4 and U5, two op-amps in a single package, separately drive the voltages of one side of the load. If the two electrodes are at different voltages, the op-amps will drive a constant current from one to the other. R1 and R6, and their relationship to the voltage dividers R3/R10 and R4/R11, determine the constant current level.

V2 and V3 represent your input signal(s). For this simulation I've set them to be square waves opposite each other. This causes the load to see an alternating square wave, current one way and then switching to the opposite polarity. If instead you allow the inputs to be both high or both low at the same time, the load will see periods of zero current. Let me know if you want the simulation file to use in LTspice.

Screen Shot 2019-02-23 at 6.25.22 PM.png
 
Last edited:

Audioguru

Joined Dec 20, 2007
11,249
Wayne, Kellin wants to use the transistor analog noise source, not your digital one.
Since your opamps are not biased at half the supply voltage, then they rectify the signal severely distorting it. Your digital circuit worked because the opamps had an additional negative supply, with their inputs at half the supply voltage that is 0V.
Also, your resistors T3 to R10 and R34 to R11 attenuate the signals to 1/22th.

I explained how the opamps should be connected in my previous post.
 

wayneh

Joined Sep 9, 2010
16,398
Wayne, Kellin wants to use the transistor analog noise source, not your digital one.
I haven't addressed the noise circuit at all, this is just the constant current drivers. The (digitized) noise signal has to be supplied from somewhere else.
Since your opamps are not biased at half the supply voltage, then they rectify the signal severely distorting it.
The assumption is that the noise has already been digitized and filtered to <30Hz.

Kellin has verified these assumptions but there's plenty of room for confusion.
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
The simple noise circuit is much better than you think and has perfect white noise up to radio frequencies. The pc measuring it must be cutting the high audio frequencies. Since you are using very low frequencies then it should be powered from a voltage regulator IC.
I have the simple noise circuit built and will be testing it early this coming week. I will also look into integrating a voltage regulator IC into both circuit, thanks for the advice.

What will you use for a lowpass filter?
I hope to use an RC low pass filter with a cutoff frequency at 30 Hz. The formula I used for this filter is f=1/2piRC, where R is resistance and C is capacitance. Letting f = 30 Hz it tells me I can make the filter with a resistor value of 530 Ohms and a 10 uF capacitor. If I cant get a 530 Ohm resistor the closest thing will do. This is shown graphically in the attached photo 'Compare' and I will also test it this week. R3 and C2 are the filter components. Please let me know if you see a fault. If the 'simple noise circuit' also works for me I will apply the same low-pass filter and post the result here.

With regards to the constant current driver, my main concern at the moment is ensuring I get the white-noise generator working and filtered to 0-30 Hz. I'm not sure if I will digitize the signal before putting it into the amplifier/ constant current stimulator as I dont know the advantages/ disadvantages, keeping in mind my main objective is to get a prototype built and working, even if that means simplifying some of my requirements. I dont know enough about those circuits yet to make a judgement. I really appreciate everyones help so far.

Before I move on to passing the signal to the amplifier/ constant current driver, could you recommend a way to verify if my white-noise generator circuit is working properly/ giving me white-noise within my 0-30 Hz range so that I could filter all beyond that point? Can this be done with the oscilloscope or do I need to download the data to excel etc? Thanks again.
 

Attachments

Audioguru

Joined Dec 20, 2007
11,249
Your lowpass filter has a very gradual cutoff slope of its 1st order, -20dB per decade of frequencies. Its output will be down only -20DB (1/10th the level) at 300Hz. Why is its resistor value so low and its capacitance so high that it cuts the noise levels and reduces its 30Hz cutoff frequency? If you add another filter to this filter then the response will not be a sharp multi-order filter, so design or use a multi-order filter instead.
 

wayneh

Joined Sep 9, 2010
16,398
I've been playing with the simulation of my circuit in #28 and realized that the inputs do not need to be digitized. The input voltage is scaled to an output current. An input of 9V will give the max current, about 900µA with the resistor values shown in the model. An input of:
9V gives 900µA
7V gives 632µA
5V gives 365µA
3V gives 100µA.​

I've gone ahead and attached the model.
 

Attachments

Thread Starter

Kellin

Joined Feb 17, 2019
20
Sorry for the delay in replying, I have time over the next few weeks to finish this project now.

Your lowpass filter has a very gradual cutoff slope of its 1st order, -20dB per decade of frequencies. Its output will be down only -20DB (1/10th the level) at 300Hz. Why is its resistor value so low and its capacitance so high that it cuts the noise levels and reduces its 30Hz cutoff frequency? If you add another filter to this filter then the response will not be a sharp multi-order filter, so design or use a multi-order filter instead.
That makes sense. I have built a second order filter and added it to the circuit attached as 'WNG1' and it seems to be working. I'm going to create a third and possibly fourth order buttersworth too and test them on the circuit.

I've been playing with the simulation of my circuit in #28 and realized that the inputs do not need to be digitized. The input voltage is scaled to an output current. An input of 9V will give the max current, about 900µA with the resistor values shown in the model. An input of:
9V gives 900µA
7V gives 632µA
5V gives 365µA
3V gives 100µA.​

I've gone ahead and attached the model.
This sounds great, thank you. The input for the white-noise generator that I have working is 15 V, from a prototype point of view this is fine as I just need a functioning prototype, however it would be ideal to have an input voltage much lower so that it can be powered by a battery. Is this 15 V a problem with regards to your circuit in #28? From my understanding, if I go lower than 12 V for the white-noise generator that I have working (circuit attached below), it will no longer produce white-noise. Does this mean I cannot reach the 9V to provide 900uA, 7V to provide 632 uA etc as you've explained in #33? Or is there a way I can input 15 V into the white-noise generator to create the signal and have an adjustable 9 V or 7 V or 5 V etc input into the constant current stimulator circuit you have in #28 (Eg. A potentiometer just before the output? Or will this destroy the white-noise signal?)

May I also ask, how does the 'WNG1' circuit attached produce the white-noise signal? Why is a resistor required immediately after the battery in the circuit and a capacitor after Q2?

Thanks again guys, your help is very much appreciated
 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
16,398
Is this 15 V a problem with regards to your circuit in #28?
No, it's no problem at all. The values of the resistors may need adjustment, but no big deal.
From my understanding, if I go lower than 12 V for the white-noise generator that I have working (circuit attached below), it will no longer produce white-noise. Does this mean I cannot reach the 9V to provide 900uA, 7V to provide 632 uA etc as you've explained in #33? Or is there a way I can input 15 V into the white-noise generator to create the signal and have an adjustable 9 V or 7 V or 5 V etc input into the constant current stimulator circuit you have in #28 (Eg. A potentiometer just before the output? Or will this destroy the white-noise signal?)
I can't say anything about the noise generator. I can only tell you that the constant-current circuit can tolerate any input voltage that, when divided down by the resistors, is between the power rails of the op-amps. That's the only hard requirement.

The data I gave in #33 shows that the current drops to zero at some voltage above zero. If the input voltage is "too low", no current flows. There is an intercept, or dead zone. This gap could probably be narrowed but I never had a reason to.
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
No, it's no problem at all. The values of the resistors may need adjustment, but no big deal.
I can't say anything about the noise generator. I can only tell you that the constant-current circuit can tolerate any input voltage that, when divided down by the resistors, is between the power rails of the op-amps. That's the only hard requirement.

The data I gave in #33 shows that the current drops to zero at some voltage above zero. If the input voltage is "too low", no current flows. There is an intercept, or dead zone. This gap could probably be narrowed but I never had a reason to.
With regards to your circuit in #28, the only thing that is confusing me at the moment is that there is two input signals, V2 and V3. My white noise generator has just one output pin, how do I work around this? Is it possible to just have two wires coming from the single signal output of my signal circuit and attach them to V2 and V3?
 

wayneh

Joined Sep 9, 2010
16,398
With regards to your circuit in #28, the only thing that is confusing me at the moment is that there is two input signals, V2 and V3. My white noise generator has just one output pin, how do I work around this? Is it possible to just have two wires coming from the single signal output of my signal circuit and attach them to V2 and V3?
There are lots of possibilities. I think I'd set up an inverting signal, so that when the noise signal on one input goes high, the other pole goes low by the same amount, and vice versa. You'll need to establish a reference voltage to discriminate "high" from "low". If the noise is AC centered around zero, then your reference is probably ground.
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
There are lots of possibilities. I think I'd set up an inverting signal, so that when the noise signal on one input goes high, the other pole goes low by the same amount, and vice versa. You'll need to establish a reference voltage to discriminate "high" from "low". If the noise is AC centered around zero, then your reference is probably ground.
I'm not sure I understand correctly. By setting up an inverting op amp circuit whose input is the 0-30 Hz signal, does this not still provide just one signal? When you say the noise signal on one input goes high, the other pole goes low, where is the other signal coming from if I have just one output of 0-30 Hz noise?

Thanks for your help
 

wayneh

Joined Sep 9, 2010
16,398
I'm not sure I understand correctly. By setting up an inverting op amp circuit whose input is the 0-30 Hz signal, does this not still provide just one signal? When you say the noise signal on one input goes high, the other pole goes low, where is the other signal coming from if I have just one output of 0-30 Hz noise?
What I meant was to generate an inverted signal to contrast with the original, so for instance if the original goes to +5V, the inverted signal goes to -5V.

But here's the basic problem you need to work out in your head: How do you want to map the input signal to the output? You need to think about every possible voltage level of the input noise signal and define what that should cause the output to do. You need to think about this in the time domain as well. I think your filter is removing any component that is >30Hz.

The circuit I've offered has a limitation and cannot produce a controlled current if the input voltage is in between ±2V or so. So you might want to amplify your noise signal to be well above that level most of the time.
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
What I meant was to generate an inverted signal to contrast with the original, so for instance if the original goes to +5V, the inverted signal goes to -5V.

But here's the basic problem you need to work out in your head: How do you want to map the input signal to the output? You need to think about every possible voltage level of the input noise signal and define what that should cause the output to do. You need to think about this in the time domain as well. I think your filter is removing any component that is >30Hz.

The circuit I've offered has a limitation and cannot produce a controlled current if the input voltage is in between ±2V or so. So you might want to amplify your noise signal to be well above that level most of the time.
Im not sure I understand how to do this so I think I may need to simplify my requirements further. At the moment I have 0-30 Hz of white-noise signal. I think the next step would be to amplify it to a single value, say 1000 uA. Then, add the switching polarity feature and output it through two electrodes. I am currently looking into amplifying the noise signal to ~1000 uA. Thanks for your help
 
Top