Persistant noise from solenoid valve

Thread Starter

KG0403

Joined Oct 5, 2018
33
Hi all,

I have a 12V solenoid valve (brand U.S. solid, part number USS-PSV00036) that is controlled via a pn2222a transistor with the base connected to Raspberry Pi, as in the circuit below (sol = L1 & R2). The solenoid is a chocolate milk delivery system for a rat. It is connected to some IV tubing on the outlet, squirting milk into a little acrylic feeder, and a syringe with chocolate milk reservoir at the inlet. Concurrently I am measuring small voltages from a rat's brain nearby.

upload_2019-7-2_13-27-53.png

The brain signals are passed through a pre-amp with +/- 5V supply. The supply I am using is a GW Instek gpc-3020 such as the one below. I have it in series configuration with the common tied to earth ground. Left common, left earth ground, and the two commons are not explicitly tied together, if that makes a difference. Current knobs are turned all the way up.


The problem is that I get noise like the image below in my signal when the solenoid operates.

upload_2019-7-2_14-11-27.png

I have tried several configurations of solenoid driver circuitry and grounding connections, including a star ground system, and have not been able to solve my problem. I have also tried several iterations of driver circuitry, swapping the BJT for a mosfet, adding a parallel cap and resistor in between the collector/drain and the solenoid terminal, adding a small resistor between ground and emitter/source.... The noise level is variable, and many times seems worse at the end of a recording session than the beginning. The curious thing is, the only this that seems to reliably get rid of the artifact is to remove the IV tubing from the box where the rat is feeding. In this case, even though the solenoid is still operating and the driver circuitry is the same, and the milk still flows, the artifact disappears. I've tried grounding (to earth and to the Pi ground) the mount of the solenoid and the milk itself, and each time I get voltage transients so bad that my pre-amp saturates and my signal goes poof.

I'm at a loss, any insight that a veteran might have that could begin to point me in the right direction would be much appreciated.

Thank you!
 

Attachments

MaxHeadRoom

Joined Jul 18, 2013
28,619
Have you fed it from pure 12vdc?
If so, and the relay is normal and is silent, then the problem is most likely not in the solenoid!
Max.
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
It's one of those 2-prong wall power supplies like so:
upload_2019-7-2_14-41-11.png

By "silent", do you mean acoustically inaudible or something else? I can hear the valve open and close.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
Open and close is normal, I meant audible noise or are you referring to electrically noisy?
Try from a DC battery source.
Max.
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
I will try this, but I have to wait for tomorrow morning, as the rats only tolerate one recording per day and are just finished. The problem doesn't seem to exist in my "faux" rat (a well with saline). Is there an easy way to explain your thought process? Do you have a guess at what the issue could be?
 
A couple of things:

a) Twisting removes EMI (Electromagnetic Interference)
b) Shielding removes RFI (Radio Frequency Interference)
c) the shield should be attached at one end only (preferably the source of the signal)


The solenoid is a coil which can radiate.

Some things to try:

Put that diode as close to the solenoid as possible.
Put the solenoid in a grounded metal box.
Put a metal braid around the I-V tubing, grounded at one end.
Use twisted pair/shielded cables to drive the solenoid
Use differential techniques to measure the brain activity.
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
A couple of things:

a) Twisting removes EMI (Electromagnetic Interference)
b) Shielding removes RFI (Radio Frequency Interference)
c) the shield should be attached at one end only (preferably the source of the signal)


The solenoid is a coil which can radiate.

Some things to try:

Put that diode as close to the solenoid as possible.
Put the solenoid in a grounded metal box.
Put a metal braid around the I-V tubing, grounded at one end.
Use twisted pair/shielded cables to drive the solenoid
Use differential techniques to measure the brain activity.

All good suggestions, thank you. I have tried some of these things:
- the diode right at the ends of those wires coming out of the solenoid, no effect
- wrapping the solenoid in a grounded copper mesh, no effect
- metal braid around IV tubing, no effect

I will try the twisted pair/shielded cables to drive the solenoid.
Unfortunately my acquisition hardware doesn't allow differential recording for the number of channels I need to record from... but I can sacrifice some for proof of concept and try that.
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
Are you using screened cable for signal interconnects?
Just jumper cables for the Pi/solenoid circuit. As for the recording cable attached to the rat, it has a protective metal casing around it to prevent chewing, but I don't know the material and whether it would effectively block EM radiation.

I should also note that the solenoid and the Pi are on the outside of an aluminum mesh Faraday cage, which is grounded to the Pre-amp ground. The rat and the pre-amp are inside the cage. The IV tubing passes through an expanded hole in the wire mesh.
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
Re Post#4, is it audible noise or electrical (inaudible)?
Max.
Audible noise. I hear a click when the valve opens and a click when it closes.

When I press a wire to the metal mount of the solenoid and view the continuous voltage in labview, I get a 60 Hz wave at 0.5-1V amplitude. When the valve opens, there is a sharp downward deflection in voltage, followed by a flat line, then a sharp upward deflection when the valve closes. Then we return to that 60-cycle. It just seems that whenever I try to ground that mount it gets worse, be it Pi ground, power supply ground, 12V ground, or earth ground from a wall outlet.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
I am not sure what your problem is? What detrimental effect are you seeing?
A click of the solenoid when picking up and dropping out is normal.
If the inaudible electrical noise is not evident, what is the effect?
Max.
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
I am not sure what your problem is? What detrimental effect are you seeing?
A click of the solenoid when picking up and dropping out is normal.
If the inaudible electrical noise is not evident, what is the effect?
Max.

Ah, the problem is the sharp deflections I see in the neural signal (third image in the orignial post), the signal coming out of the pre-amp.
This is a *very* rough sketch of the setup. The problem is at the light blue part, coming out of the purple pre-amp.

upload_2019-7-2_15-39-58.png
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
I believe I understand, I did not read the initial posting sufficiently!:(
For starters, I would tend Not to use a SMPS such the wall wart supply for this.
I would use a linear supply, for the solenoid supply, you do not really need a regulated supply, a linear supply would consist of a transformer with a 8vac or 9vac secondary, a small bridge rectifier and a 100uf capacitor.
Normally you would not need the cap for a solenoid and a 12v transformer, but in your case I would go with the cap smoothed supply.
Places like Home depot have small transformers that should be capable.
Max.
 

Berzerker

Joined Jul 29, 2018
621
Ok I gotta ask! WTF am I reading in this post? Chocolate milk ground? a rat in the drawing? and I was told post a schematic.
I thought a solenoid was either off or on? there was no in between.
Brzrkr
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
Woul
I believe I understand, I did not read the initial posting sufficiently!:(
For starters, I would tend Not to use a SMPS such the wall wart supply for this.
I would use a linear supply, for the solenoid supply, you do not really need a regulated supply, a linear supply would consist of a transformer with a 8vac or 9vac secondary, a small bridge rectifier and a 100uf capacitor.
Normally you would not need the cap for a solenoid and a 12v transformer, but in your case I would go with the cap smoothed supply.
Places like Home depot have small transformers that should be capable.
Max.

Good advice! So both the 12V wall adapter I am using, and the +/- 5V supply that I'm using (2nd picture in original post) are switched mode, right? Would you recommend replacing both of them with a linear power supply, or just the 12V?
And you've already contributed a lot of advice, but can you explain why SMPS is not good for this application?
Thanks!
 

Thread Starter

KG0403

Joined Oct 5, 2018
33
Ok I gotta ask! WTF am I reading in this post? Chocolate milk ground? a rat in the drawing? and I was told post a schematic.
I thought a solenoid was either off or on? there was no in between.
Brzrkr

I'm so sorry, I know this is an incredibly specialized electronics application... I just didn't know where else to look for advice, and I've been troubleshooting for some time. I tried to be as clear as possible with the first post, but yeah, this is weird.
 
Top