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

Thread Starter

Kellin

Joined Feb 17, 2019
20
Hello everyone,

As my college project, I have to design and build a prototype of an electrical stimulation device. I have total freedom in design, components etc. The stimulation will be provided via two electrodes, the stimulus going from one electrode through a solution who's impedance is less than 1 kOhm to the second electrode. They will be about 6 inches apart. The signal must be 0-30 Hz generated using a white noise generator and filtered using a low-pass filter with a cut-off at 30 Hz. The signal must then have an adjustable amplitude between 0 and 700 uA.

If possible, I would like to use a 10th order low-pass Buttersworth filter with a cutoff at 30 Hz as we learned about these in class, but if a different filter would acquire 0-30 Hz stochastic white noise signal easier then I am open to that. I am also unsure of how to scale the stimulus levels between 0 and 700 uA, if possible I would like to scale them linearly from 0, +-100 uA, +-200 uA, +-300 uA all the way to +-700uA.

I have been looking into the circuitry for each step, a white noise generator circuit, Buttersworth filter circuit etc and I think I will take the project in steps like that. I am unsure how to combine them though.
Any help at all on the steps I should take, circuit design etc is truly appreciated. Thanks!
 

panic mode

Joined Oct 10, 2011
1,837
wrong forum section. this is where you should reveal how you competed project, not ask for help with something. this belongs to Homework section and you need to do your work yourself or show your best attempt.
 

OBW0549

Joined Mar 2, 2015
3,447
If possible, I would like to use a 10th order low-pass Buttersworth filter with a cutoff at 30 Hz as we learned about these in class...
A 10th-order Butterworth low-pass filter might sound like a great idea in class, but did your professor give you a clue about just how horrendously difficult it would be to actually build such a beast? Probably not.

The higher the order of a filter you're trying to implement, the more stringent the demands on component tolerances.

1st- and 2nd-order: trivial
3rd- and 4th-order: easy, with just a little care and some tight-tolerance resistors and capacitors
5th- through 7th-order: progressively more difficult, requiring high-precision (i.e., $$$$) components
8th-order and up: truly the stuff of nightmares

I suggest you take a careful, HARD look at just how aggressive a filter you need for this task, and build ONLY what you actually need. Otherwise, you'll be in for a world of hurt.
 

danadak

Joined Mar 10, 2018
4,057
A tenth order filter would best be done as a digital filter.

upload_2019-2-18_6-31-53.png

This is done in PSOC 5LP

upload_2019-2-18_6-33-43.png


But implied 140 db performance probably not realizable due to arithmetic truncation effects,
limited D/A resolution transforming back into analog domain. You would have to evaluate this.
You can do this as cascaded BiQuad or FIR..

Note filter tool graphs are output of idealized filter, at digital output. Also shown
was a VDAC, part can also do IDAC. Your gain issue possible to do with reconfiguring
gain thru filter, that will take some programming to force filter to point to a new set
of pole/zero values. Or just take filter output, via DMA, and scale it. A number of
possibilities. But none of this is trivial if you are not a C coder. And willing to do a
deep dive into an architecture. Or use VDAC, pass thru onchip PGA, then convert
back to current.

Another possibility is ground up coding of the DFB block using the DFB assembler
for this part. Again, not a 1 week effort, more like month(s).

The noise generator could be done with onboard PRISM block, potentially. Or
use UDB blocks and roll your own verilog solution. or do it with the drag and drop
logic/schematic capture editor and just create a SR with fdbk.

This is a one chip solution.....


Regards, Dana.
 
Last edited:

Thread Starter

Kellin

Joined Feb 17, 2019
20
Thanks for the replies guys. Taking your advice on board I will not use a 10th order Buttersworth filter when the time comes to filter my noise. Taking the first step, that is building a white noise generator, I've found the attached circuit and would like to build it as my generator. I was wondering if it would be possible to swap out the SMB connection for electrodes, or even just simple wires to test what kind of signal I'm generating with the circuit when I choose values for the resistors and capacitors for the circuit? Once I get that working I will look into applying a low pass filter to produce the desired range of frequencies (0-30 Hz).

So my question is: Can I swap the SMB connection out for electrode wires/ wires?
 

Attachments

Thread Starter

Kellin

Joined Feb 17, 2019
20
The output level of the thermal noise from a resistor is tiny.
Please define in words what is a "SMB".
Thanks for your reply. Is there another component or circuit type that I should look into that will provide a higher output level for my application? (Applying the 0-30Hz 0-700 uA signal across the solution whos impedance is <1000 Ohms) I have been looking into these white noise generator circuits for a few days but I cannot determine if any of them will do or if it has to be a specific type ie. Not an audio white noise circuit but a constant current stimulator type circuit, forgive my naivety.
 

Thread Starter

Kellin

Joined Feb 17, 2019
20
Do you really need to go down to 0Hz (DC)?
A close as possible would be ideal but if it is not possible or extremely difficult, even 1 Hz - 30 Hz would be fine.

Another question I have is once I get the white noise generation circuit working, do I pass that signal into a constant current stimulator circuit before I push it to the electrodes?
 

crutschow

Joined Mar 14, 2008
25,117
A close as possible would be ideal but if it is not possible or extremely difficult, even 1 Hz - 30 Hz would be fine.
Good.
0Hz means you would need a DC coupled amp which can have offset problems at high gain.
once I get the white noise generation circuit working, do I pass that signal into a constant current stimulator circuit before I push it to the electrodes?
Depends upon how accurate and stable you want the current, and how much the load resistance may change.
 

crutschow

Joined Mar 14, 2008
25,117
You might consider a Zener as a noise source, such as here, as they tend to generate a lot of white noise, so you don't need so much amplification.
 
Last edited:

wayneh

Joined Sep 9, 2010
16,398
Last edited:

Thread Starter

Kellin

Joined Feb 17, 2019
20
Good.
0Hz means you would need a DC coupled amp which can have offset problems at high gain.
Depends upon how accurate and stable you want the current, and how much the load resistance may change.
As accurate and stable as possible for a prototype, the load resistance will not change from 1 kOhm.

You might consider a Zener as a noise source, such as here, as they tend to generate a lot of white noise, so you don't need so much amplification.
This frequency range looks perfect, however the circuit looks rather complex compared to other white noise generators I've been looking at. I need just one output, and depending on the current of that output I may need to put the outputting white-noise signal into a constant current stimulator to increase the amplitude of the stimulus before pushing it to the electrodes. However, if the white-noise coming off the circuit is already in the ~700 uA range I may not need to do that. Is it possible to determine the current at the output of that circuit? And is it possible to remove the second output, keeping just whats in the red box in the first 'WhiteNoiseGen' picture attached? If so, would the second 9V battery still be necessary?

I've also come across the second circuit attached which looks rather simple ('WhiteNoiseCL') and putting it through circuit lab yields a ~786 uA output current with the white noise it produces. This is ideal as my desired range is 0-700 uA so am I correct in saying I could use resistors to acquire that 0-700 uA range? Please let me know if you see anything wrong with that circuit ie. Would I need to amplify any signal or change any component values keeping my requirements in mind, 0-30 Hz white noise with an eventual adjustable stimulation amplitude of between 0 and 700 uA. But I will worry about the adjustable amplitude once I get the 0-30Hz white noise generator working first. I found the circuit here: http://www.experimentalistsanonymous.com/ve3wwg/doku.php?id=noise_generator

A lot of what you’re describing reminds me of a TCS device for trans cranial stimulation. I built one and it’s in the Completed Projects forum.
https://forum.allaboutcircuits.com/threads/micro-current-electrical-stimulation-device.126578/
Mine started with a timer signal and varied it “randomly” and this wouldn’t be anywhere nearly as random as what you’ve described. Other than that, the similarities are striking.
Your design is beautiful, thank you. Your stimulation current is also in my desired range ~700 uA. Is there a simple way to get this design to output white-noise and filter it to 0-30 Hz whilst keeping the constant current you have frm 0-600 uA?

Very appreciative of your help guys, thanks.
 

Attachments

crutschow

Joined Mar 14, 2008
25,117
Is it possible to determine the current at the output of that circuit?
It's simply the output voltage divided by the load resistance.
is it possible to remove the second output, keeping just whats in the red box in the first 'WhiteNoiseGen' picture attached?
Certainly.
That second stage is just if you need a higher output voltage.
would the second 9V battery still be necessary?
No.
But you would need to bias the ground points a 1/2 the the supply voltage, since the output is AC that has plus and minus voltage excursions.
This could be done with two 1kΩ resistors in series connected across the supply with a 470uF cap across each resistor.
The junction is your new pseudo-ground which goes to all the shown ground connections.
 

wayneh

Joined Sep 9, 2010
16,398
Your design is beautiful, thank you. Your stimulation current is also in my desired range ~700 uA. Is there a simple way to get this design to output white-noise and filter it to 0-30 Hz whilst keeping the constant current you have frm 0-600 uA?
Yes, it would be trivial to replace my 555 clock with some other signal.

But I'm not sure how you go from white noise to a digital signal clipped at <30Hz. Noise varies both frequency and amplitude. Converting it to a digital signal with say, a comparator, loses the amplitude information. Is this your intent? How do you want to control the output current, manually? If you want the amplitude of the noise to also control the amplitude of the output signal, then it's much more complicated.
 

Audioguru

Joined Dec 20, 2007
11,249
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..
 

Attachments

Thread Starter

Kellin

Joined Feb 17, 2019
20
No.
But you would need to bias the ground points a 1/2 the the supply voltage, since the output is AC that has plus and minus voltage excursions.
This could be done with two 1kΩ resistors in series connected across the supply with a 470uF cap across each resistor.
The junction is your new pseudo-ground which goes to all the shown ground connections.
Forgive my ignorance, but do you mean (A) or (B) of the attached photo 'PicA'? Or am I incorrect in both cases? (Note that I've purposely not included half the circuit, just the half were talking about).
With regards to biasing the ground points at 1/2 the supply voltage, does this mean I need to half the values of the components that are connect to ground ie. the 1 MOhm resistor, 1.1k resistor and 1uF capacitor? Or half all the component values on the circuit?

Yes, it would be trivial to replace my 555 clock with some other signal.

But I'm not sure how you go from white noise to a digital signal clipped at <30Hz. Noise varies both frequency and amplitude. Converting it to a digital signal with say, a comparator, loses the amplitude information. Is this your intent? How do you want to control the output current, manually? If you want the amplitude of the noise to also control the amplitude of the output signal, then it's much more complicated.
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.

This looks interesting, however I dont understand the circuit layout on the website. Adding the PRBS generator to the white noise circuit seems like a much larger circuit than I am currently investigating in the above comments. If those smaller circuits can generate the white noise I am looking for I will stick with them, but I will look further into your link. Thank you

I am going to get the parts for some of these circuits and build them to see what kind of signal I am getting off them. I will update this thread with how that goes. Thanks for all the help
 

Attachments

Top