Electric Brewing Supply 30A BCS Giveaway!


Home Brew Forums > Home Brewing Beer > Automated Brewing Forum > Arduino and Pump Issues
Reply
 
LinkBack Thread Tools
Old 07-26-2013, 04:13 PM   #1
ryan_george
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2009
Location: Fergus, Ontario
Posts: 223
Liked 21 Times on 15 Posts
Likes Given: 6

Default Arduino and Pump Issues

Hey all,

I have this very frustrating issue with my Arduino controlled electric brew system. I use a PC with a C# interface to communicate over serial with the arduino to send commands such as desired temperatures and to enabled/disable elements, contactors, etc.

Well, there are actually 2 problems but I assume they are related....

Issue 1: The power to my March pump is fed through the main control panel (so it is GFCI protected) where the arduino and all low-voltage components are also mounted. When I manually turn the pump on (with a physical switch located by the pump), 90% of the time the arduino loses connection with the PC and I get serial write errors. This is very frustrating as I have to then unplug the USB connection to arduino, restart my C# program, and start over again....
I assume this is due to some sort of electromagnetic interference or something similar....I have tried to keep the low voltage micro-controlled components separate from the high voltage/current lines (see pic below).

Control panel pic (this pic is not in the final state). You can see the arduino and relays mounted in the upper right, where my USB connection to the PC also is. On the far left you see the un-terminated terminal blocks where my pump gets power from, which are sent out through those conduit fittings. Main power feed (from separate 50A Spa panel) is on the lower left at those large terminals, which also enters from that side through conduit.



Issue #2: Very similar to issue #1. I have a "main power" button on my program that sends a signal to a relay to energize the two contactors that feed my elements. The relay is opto-isolated so I assume there is no interaction between the high voltage side and low voltage side of this relay. About 50% of the time when I energize/de-energize the contactors, I get the same communication fault between the arduino and PC.

This same problem existed on my previous control panel, which was an entirely different built with a rats nest of wires. I had assumed the problem was due to the messy wiring... But apparently not.

The arduino is powered from a separate 12 V power supply so it does not rely on the power from the USB connection.

I've tried searching all over for this issue but I have come up empty handed. Has anyone dealt with something like this?

__________________
ryan_george is offline
 
Reply With Quote Quick reply to this message
Old 07-26-2013, 06:19 PM   #2
audger
Feedback Score: 0 reviews
Recipes 
 
Join Date: Apr 2011
Location: ., Connecticut
Posts: 1,497
Liked 40 Times on 40 Posts
Likes Given: 1

Default

Quote:
The arduino is powered from a separate 12 V power supply so it does not rely on the power from the USB connection.
but what is THAT 12v supply powered by? probably the same power line as the pumps are on, right? what gauge and length of wire feeds your whole system, and what is your total system draw?


i had a similar issue on my arduino controlled kegerator. what fixed it was to beef up the incoming supply line to eliminate the voltage sag caused by the compressor and pump kicking on, and to further separate high and low voltages.

I was running it from a somewhat flimsy extension cord, which should have been adequate to power everything, but was causing the voltage to drop enough that the arduino reset (as best i could figure with just a multimeter, i dont have an o-scope here). i upgraded the cord from 14 or 16 gauge to a nice 12 gauge.

also the arduino was run off some random unregulated 9v 1A wall-wort style power supply i found, and i put a few large capacitors between the power supply output and the arduino input to pickup any power sags. has been working fine ever since.
__________________
audger is offline
 
Reply With Quote Quick reply to this message
Old 07-27-2013, 02:29 PM   #3
crane
Feedback Score: 0 reviews
Recipes 
 
Join Date: Sep 2011
Location: San Diego, CA
Posts: 294
Liked 31 Times on 25 Posts
Likes Given: 1

Default

Quote:
Originally Posted by audger
also the arduino was run off some random unregulated 9v 1A wall-wort style power supply i found, and i put a few large capacitors between the power supply output and the arduino input to pickup any power sags. has been working fine ever since.
Adding capacitors is easy and cheap and what I would try first. To be more specific you want to connect one side of the cap to the arduino ground and the other to the 12V input power. If you use an electrolytic or tantalum cap make sure your polarity is correct. You may have to play around with different amounts of capacitance. Too little and your problem will still exist. Too much and the 12V power supply may go unstable.
__________________
crane is offline
 
Reply With Quote Quick reply to this message
Old 07-28-2013, 07:48 PM   #4
ryan_george
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2009
Location: Fergus, Ontario
Posts: 223
Liked 21 Times on 15 Posts
Likes Given: 6

Default

Quote:
Originally Posted by audger View Post
but what is THAT 12v supply powered by? probably the same power line as the pumps are on, right? what gauge and length of wire feeds your whole system, and what is your total system draw?


i had a similar issue on my arduino controlled kegerator. what fixed it was to beef up the incoming supply line to eliminate the voltage sag caused by the compressor and pump kicking on, and to further separate high and low voltages.

I was running it from a somewhat flimsy extension cord, which should have been adequate to power everything, but was causing the voltage to drop enough that the arduino reset (as best i could figure with just a multimeter, i dont have an o-scope here). i upgraded the cord from 14 or 16 gauge to a nice 12 gauge.

also the arduino was run off some random unregulated 9v 1A wall-wort style power supply i found, and i put a few large capacitors between the power supply output and the arduino input to pickup any power sags. has been working fine ever since.
Yes, the 12 V supply is also powered from the same main circuit. I have 6 gauge wire running from the breaker panel to the Spa/control panel (about 50' or so). After the power reaches my control panel it is immediately split into two 240 V 30 A circuits on 10 gauge wire, and two 120 V 15 A circuits on 14 gauge wire. Total system draw will vary, but it likely peaks around 48 A or so when everything is running full tilt. Note that this communication breakdown will happen when all elements are off or on, it doesn't make a difference.

I believe the arduino is powered with 22 or 24 gauge wire. Should I upsize this?

I hadn't thought that it would be a voltage spike/drop that would cause this problem. I'll look into adding a capacitor to it and see if that helps at all. What value of capacitor would you suggest as a starting point?
__________________
ryan_george is offline
 
Reply With Quote Quick reply to this message
Old 07-29-2013, 01:33 PM   #5
crane
Feedback Score: 0 reviews
Recipes 
 
Join Date: Sep 2011
Location: San Diego, CA
Posts: 294
Liked 31 Times on 25 Posts
Likes Given: 1

Default

I would start by adding 100-200uF and go up from that in 100uF increments until it no longer resets the arduino.

__________________
crane is offline
 
Reply With Quote Quick reply to this message
Old 07-29-2013, 02:06 PM   #6
ryan_george
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2009
Location: Fergus, Ontario
Posts: 223
Liked 21 Times on 15 Posts
Likes Given: 6

Default

Quote:
Originally Posted by crane View Post
I would start by adding 100-200uF and go up from that in 100uF increments until it no longer resets the arduino.
Ok great. Hopefully this week I can give this a shot.
__________________
ryan_george is offline
 
Reply With Quote Quick reply to this message
Old 08-01-2013, 04:58 AM   #7
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

I'm not doubting the diagnosis, but would like more explanation as this confuses me. Turning the pump on causes enough voltage drop on his main line to cause the 12v power supply to drop enough to reset the Arduino?
Shouldn't the Arduino run fine down to around 7v, since it's regulated down to 5v or 3.3v at that point anyways? If the 300 watt pump motor is enough to cause a voltage drop, why aren't the 5000 watt elements causing the same problem every second?

OP is "ahead" of me on his build, I'd like to not experience this problem when I get to this point.

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 08-01-2013, 12:26 PM   #8
ryan_george
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2009
Location: Fergus, Ontario
Posts: 223
Liked 21 Times on 15 Posts
Likes Given: 6

Default

I am also unsure if the voltage drop is actually the problem. Like you mention, I'd assume there would be a similar problem each time the elements fired. This is why my original thoughts were some sort of EMI.

But, I've still got to add the capacitor to rule that out.

__________________
ryan_george is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2013, 05:50 AM   #9
tob77
Feedback Score: 0 reviews
Recipes 
 
Join Date: Sep 2012
Location: Napa, CA
Posts: 62
Liked 6 Times on 4 Posts
Likes Given: 23

Default

Beautiful panel, nice work!
I recommend trying to isolate where the problem area is located. Try and determine if the Arduino is being reset/crashed or if it's only the usb/serial communications that are being interrupted. Maybe you could program an output to flash on and off and see if it continues after you loose communications. Low current signal lines are very susceptible to interference if not properly shielded. Are there any resets signal lines going into your Arduino that could be falsely triggered by interference?

__________________
tob77 is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2013, 12:25 PM   #10
ryan_george
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2009
Location: Fergus, Ontario
Posts: 223
Liked 21 Times on 15 Posts
Likes Given: 6

Default

I have fairly good confidence that the arduino is not resetting. The very first time this happened I had the PC program crash (due to the communication fault) but my elements were still firing away! I had to write some code in the arduino to turn off all outputs if it has not heard back from the PC for a given amount of time, for safety purposes. I do not have any external wires which control a manual reset. Only the button on the board itself.

In terms of interference.... Could ANY I/O wire on the arduino potentially pick up some EMI and mess up other aspects of the board? For instance, would my signal wire controlling the contactor relay have the ability to pick up interference and screw up the serial connection? I do not have the knowledge of micro-controllers on this level....

In the control panel pic, on the upper right is where the arduino is and the blue coiled wire is a USB line connected to a keystone jack. I connect my PC to the other side of this jack with a USB. There are no high voltage wires in that area.

Could a shield simply be a piece of grounded sheet aluminum or steel that "boxes" in all of the low voltage components? Would this be sufficient?

__________________
ryan_george is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with lautering with a pump phoenixs4r All Grain & Partial Mash Brewing 11 12-02-2012 05:48 PM
Chugger pump issues phoenixs4r Equipment/Sanitation 5 05-22-2012 07:00 PM
Pump Issues... Coohang All Grain & Partial Mash Brewing 3 03-01-2012 09:23 PM
Well pump issues Ashz General Chit Chat 6 12-23-2010 04:29 PM
Pump/Air Issues japhroaig All Grain & Partial Mash Brewing 4 06-29-2010 11:51 PM