Forum

Controlling 24V bal...
 
Notifications
Clear all

Controlling 24V ball valve via relays and temp reading problems

28 Posts
2 Users
1 Likes
11.4 K Views
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

Hi everybody,

I've got a strange problem with an install I've done for a microbrewery here in Brisbane. Everything seems fine in my system, but I am controlling 240V AC fridges.

As soon as I wire everything into his 24V ball valve system, I start getting strange problems when the relay is triggered. Temperatures being read from PT100 probes start tracking all over the place. Relay is turned off, and temperatures return to normal.

I am using a DuinoTech 5V relay module, and I have wired up the relay as described in their very brief specification document. I am wondering whether I need to isolate the relay somehow.

The other really strange thing is that when the relay for a fermentor opens, it's temp reading starts tracking all over the place. But then the temperatures on the other 2 fermentors controlled by BruControl start tracking all over the place as well. Sounds like an isolation issue, to do with the relay being powered on.

Let me know what further information would help you to help me.

Thanks,
Angus


   
Quote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

It is likely a ground and/or noise isolation issue. Can you post up a schematic of how this is all wired?


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

At it's basic.

RTD probe wired up to pin 52, 50, and 51 as per schematic
CS to pin 14
I have now taken 5V and GND from Arduino V2 ethernet card instead of arduino, which seems to be stable on my setup.
Just waiting on confirmation from my customer, but that doesn't really make any sense to me as a solution.

Relay linked above wired to 5V, GND, and S to pin 15
It seems that the relay switching on is causing the problems.
Relay never activated and temps are fine
Relay activates and temps start going haywire

I have tried taking 5V and GND from different arduino to isolate the power and GND supplies, but the relay never activates.


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

Also the schematic for the relay is very sparse, so I can't give you much info on that. It is a pre-built board using the standard relay module for Arduinos though.


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

After a bunch of reading, and noting the lack of a tickbox stating this relay is not isolated on a very small table of features on the Jaycar website, I think the problem is that this relay is not isolated.

I've ordered some new 5V relays which are opto-isolated, and I should receive them later this week. Fingers crossed that solves my problems.


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

I don't think a opto-isolation is the problem. Without a schematic (and/or pictures) of how you have it wired, I really can't give you accurate direction, but you certainly have a power problem. You cannot power the relay from the Arduino's 5V output - the relay alone draws too much current. You need a separate 5V supply. Also, some of these boards have separate power inputs for the switching circuitry and the relay. I can't tell if this one does that (there is usually a jumper on board). We provided some info here: https://brucontrol.com/wp-content/uploads/2017/04/BruControl-Relay-Board-Schematic.pdf


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

My current relay does not have the ability to provide separate power. There is a signal, +ve, and -ve. I would guess it is a "high trigger" relay as I cannot provide the 5V from an external power supply.

I'm a bit frustrated at the fairly short jaycar specification document. I should have thought to look up the specs for the relay module.

I have sent an email to my components provider asking them to recommend a relay based on the info from your link. Hopefully they will be able to provide something fairly quickly.


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

Sounds like it does. The ve are power, the signal is likely Active Low... meaning ground. Specifically, that would mean -ve to ground, +ve to +5V (not from the MEGA), and sig to the desired pin from the MEGA (my guess is this needs a ground signal aka active low to switch the relay).

The 5V power supply and the power supply powering the MEGA should have their grounds tied together.

Please understand this is all conjecture. [Broken_record] Need documents/schematics/pictures to provide higher confidence. [/Broken_record]


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

So we think we have ruled out the relay as being the problem in the circuit. We removed it completely and still experienced the same problem of the PT100 probe returning -246, and then slowly raising back to normal temperature when the 24V circuit carried current.

We ended up with the Arduino powered by a separate 240V 9V wall plug.

The 24V was supplied by a 240V to 24V transformer.

As far as we can tell the 2 power circuits are completely independent: no shared earths, no contact between the positives, etc.

Sometimes (e.g: not always) when the 24V carried current, the temperature probe would shoot to -246 and then slowly ramp back up to current temp.

The intermittent problem occurs when the 24V was fired by relay from arduino, or manually fired by switch. A very strange problem.

The problem did not seem to occur when we used a very short PT100 probe (like 30cms), but anything longer than that would experience the problem at some point.

Any tips?


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

I am using 1.1.0.14 control software and v44 device firmware on Arduino Mega R3's.

It has been working well for me controlling 240V AC fridges. But the 24V DC seems to experience these problems. 


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

Again, its really difficult to diagnose without a schematic and/or pictures. EMI is tricky to resolve... and there is no real way we can offer up much without understanding the circuitry and devices used.

Are the valves 24 V DC or AC? If DC, the power supplies should all share a ground. If AC, the DC ground and AC ground should be tied too, as that can reduce noise. Have you tried separating the wiring? Even shielding it may help (you can use aluminum foil even as a test, grounding it back at the chassis).

Also, make sure all DC power supplies are switching style, not linear. If you are using a wall plug, and it is heavy, then it is likely not a switching model.


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

Still working on diagrams as the circuit changed a fair bit from our initial design.

I am just wondering about SPI on the Arduino mega. The PT100 uses pins 50, 52, and 51 as per your diagrams. For some reason (I can't remember why), I worked out that the LCD would have to run off the SDA and SCL pins (pins 20 and 21)

I'm assuming all these diagrams are still accurate for the v44 firmware?
And accurate for the 1.1 beta control software?


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

Yes, the software is the same. PT100 amps use SPI communications and the LCD uses I2C - these have different pins.

I'm fairly confident this isn't a software problem.


   
ReplyQuote
(@angus_grant)
Trusted Member
Joined: 5 years ago
Posts: 52
Topic starter  

So we have 240V AC power coming in to a 24V DC transformer (for ball valves) and also 12V DC transformer (for arduino).

One question I found a lot of conflicting answers for: how do I create a common ground?
One article mentioned tying the negative return of the DC circuit to the incoming 240V earth?

Do both of our DC return lines (24V and 12V) get tied back to the earth wire of the incoming 240V AC supply?

I've never required a common ground as all my work has been AC.


   
ReplyQuote
(@pbruno3)
Reputable Member Admin
Joined: 7 years ago
Posts: 343
 

Yes, all the DC negatives (grounds) should be tied. Optionally tie that to AC ground as well to possibly further reduce noise.

Note that 'transformer' may be taken literally, as in converting AC to AC. Better to use 'DC power supply' if describing such.


   
ReplyQuote
Page 1 / 2
Share: