Hi -- I am sensing the state of a button and using it to turn on a fan with an SSR. Works great (thanks to this helpful forum.) The fan speed is controlled with a PWM module.
The issue is that if I don't connect the ground of the fan PSU to the arduino ground, the PWM function does not work. (See the dotted line trace in the schematic.)
When I do connect the ground of the fan system to the arduino ground, the PWM control works fine, but when it gets to about 80 or 90% of its full speed, I get false triggers on the button GPIO pin, presumably from noise in the system from the fan.
Review basic electrical circuit theory to understand why this is expected. A circuit is a closed loop, with a ground reference and current or signal return path.
I get false triggers on the button GPIO pin, presumably from noise in the system from the fan.
Good assumption. The power supply is not properly decoupled and the signal lines are not shielded. I'll guess that this is a bread board setup, with long wires looping around.
Since your drawing is incomplete, anything else would be more guessing.
Thanks for the reply -- I'm afraid I'm still a bit confused, though... isn't the PWM controller circuit complete through the fan back to the controller/PSU ground? Which circuit is being completed with the dashed line trace? If I disconnect the control side of the SSR and trigger it with a battery, the PWM control works (without the 12V PSU ground connected to the arduino GND), which implied to me that the circuits are all complete, functional, etc. So I intended to run the system with the fan stuff isolated from the arduino stuff to avoid the interference, but the PWM stops working when I connect the control side of the SSR to the arduino, and is only restored when I connect the arduino and fan grounds.
Is it required that the SSR control side and load side have the same ground reference?
And yeah, it's not a bread board setup, but definitely many wires laying around and over each other, etc.
Re: incomplete drawing -- anything else I can I add to clarify? I thought I had included all the pertinent info...
I can't run the fan from the controller, unfortunately, because it exceeds the 3A rating of the controller. My (quite possibly confused) understanding was that high current fans can be wired as I did; the Amazon listing for the controller describes this setup (in broken English, so maybe I misunderstood). (Link in first post.)
Tomorrow I will go over all the connections again. Again, if I just disconnect the control side of the SSR everything works as expected.
I would post pics but it's a bit of an inscrutable rat's nest and i promise it will not be helpful in terms of details. Maybe tomorrow i can get a separate setup going that is cleaner to see and take some pics of that. Might be smart anyway, in case there's a bad component or something.
One other detail, in case it's a clue: with no joined ground to the Arduino, the PWM control doesn't work, as i mentioned, but turning the speed knob does change things slightly in unpredictable ways... Very slight changes in speed, etc. Crazy shot in the dark - connecting the control side from the Arduino somehow enables some EMI due to all my lazy wire routing which then overwhelms the PWM controller, causing the symptom described, but the EMI clears up if the PWM is grounded through the Arduino? IIRC if i power the Arduino via laptop USB everything worked ok, which feels like additional evidence of EMI mayhem... Maybe I'll try being more careful with routing and shielding and see how I get on?
Thanks Paul... I'll consider it. The Arduino is definitely needed... Doing lots of other things (not at the same time.) And I like the idea of keeping the fan circuit separate from the Arduino circuit via the SSR, but I'll remember that i could go the integrated route.
I was referencing the modified schematic that Tom made which has the fan powered from the PWM controller module, which itself is powered via the SSR, if I'm reading correctly.
That shouldn't make any difference, when you turn the SSR ON you are connecting the fan directly to the controller.
The SSR will not limit the current.
Are you PWM pulsing the SSR as well, or just using it to switch on and off the fan?
How would you connect the 12V PSU the PWM controller without the SSR?
Can you please post some images of your project so we can see your component layout.
Ok, i must be misunderstanding something about your post. The schematic you showed had the fan connected directly to the PWM controller, right? The PWM controller is only rated for 3A but the fan can draw 6. The PWM controller listing says "Fan current :3A this current is limited by switches and connectors, and the capacity can be expanded by taking the power line separately. For fans ,over 3A, connect a large current fan method: the positive and negative poles of the power supply of the fan can be connected to the power supply, the positive and negative poles of the fan are connected to the power supply separately, and the negative pole of the fan is connected to the negative pole of the board; speed measurement and control are connected to the board." - so that's what I (think I) did. And it works great as long as the SSR isn't connected to the Arduino.
Yeah the SSR is plenty over-rated for this, it's the PWM controller that has a 3A limit. I'm not pulsing the SSR - the GPIO turns the SSR on, that turns power to the fan on. The fan receives the PWM signal from the module.
It's hopefully clear from the first schematic: it's just connected in parallel with the 12V supply that powers the SSR.
I'll take some pictures and post them soon. I'll also try to put together a more useful demo to take pictures of. Thanks again.
In the other thread, I learned that the Zero (AFAIK) is limited to just 2mA on its GPIO pins unless you add some workaround code, which increases it to 7mA.
It appears that even in the "high power" 7mA mode it still can't quite drive the SSR -- it's enough to make it activate, and it managed to turn on the fan in my project and seemed to work fine, but the voltage coming out of the SSR turned out to be only ~8V instead of 12. This aligns with what @JCA34F said in their comment in the other thread: "I've always used a transistor to switch SSR inputs with 3.3V I/O for the reason you just described (weak input current)."
So I added back in the transistor/resistor (1.8k to base), this time powering the transistor from the arduino 5V, as @JCA34F showed in their schematic, the PWM controller powered off the 12V as before, and it all works fine, no false button triggers, etc.
So while it's a bummer to have to add some complexity, it seems like we have an explanation: the fan was undervolted due to weak driving of the SSR, so even though the PWM signal was OK the fan just couldn't function properly. As to why it suddenly worked when the grounds were joined, I'm all ears, but I know that when things are undervolted it's probably not worth wondering too hard because they become unpredictable.
If you still want me to post pictures, let me know, but I think this is solved unless anyone sees any more dumb mistakes afoot.
Here is your problem, if you followed the links you provided. The SSR link says the device has a thyristor for control. Google says a thyristor is: " The most common type of thyristor is the silicon-controlled rectifier (SCR). When the cathode is negatively charged relative to the anode, no current flows until a pulse is applied to the gate. Then, the SCR conducts current until the voltage between the cathode and anode is reversed or reduced below a certain threshold or holding value. Using this type of thyristor, large amounts of power can be switched or controlled using a small triggering current or voltage.".
Therefor what you are using is an AC SSR, NOT a DC SSR! And your project just proved the information in the link is wrong!
Thanks, Paul -- I'm in over my head here, but based on your comment I googled a bit... sounds like SCRs can't normally switch DC loads, so I think I see your point.
But given that my project is working fine now (see post #14), and that the product itself is labeled for DC load switching, is it possible that this is just a case of a copy/paste mistake from their other listings? The same supplier provides a variety of relays including AC-load relays, so maybe they were just lazy and used bad info from the other listings? Or are you saying that the particular issues I encountered are indicative of using an SCR relay in a DC application?
SCRs can be used in DC circuits but, you need to provide a way to turn them off! One way is to switch off the current flowing through them or another is to shunt the current around them, either by a switch in series or a (shorting) switch across.
Yes, some one, somewhere, not being able to read English mixed up the labels and later on someone bought a bunch of SSR and the whole thing went to Hell.
If in fact my SSR is an SCR in disguise, does the fact that everything is working now mean that I can just not worry about it, or is there some reason it will bite me later on?