Power supply interference causing glitches?

For the discussion of Arduino related topics.

Moderator: phalanx

Post Reply
jsnow2
Posts: 3
Joined: Fri Jan 31, 2014 9:58 pm

Power supply interference causing glitches?

Post by jsnow2 » Fri Jan 31, 2014 10:34 pm

I have an Arduino UNO automating a greenhouse. It takes data from sensors and adjusts the environment accordingly.

The problem is that ONLY when the lights are on, the sensor values go haywire.

Both the lights and the AC adapter for the UNO are run off the same extension chord, but when i connected the adapter to a different chord and a different outlet the problem persists.

But here's the kicker... when i connect a battery supply instead everything works fine, even with the lights on.

The lights are x6 35W florescent with two ballasts controlled by a 5v relay connected directly to the UNO.
The relay is rated for 10A
The adapter and battery voltages are both 9V.

I don't have an amp-meter or oscilloscope so i can't troubleshoot much unfortunately. Any idea what's going on here?

jremington
Support Volunteer
Posts: 2339
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: Power supply interference causing glitches?

Post by jremington » Sat Feb 01, 2014 9:27 am

If the sensors are on long cables, they may be picking up electrical interference. A ground connection via the AC line will make the problem worse. Shielded cable might help, but may not be possible with some sensors. What are the sensors?

Mee_n_Mac
Support Volunteer
Posts: 5628
Joined: Thu Apr 28, 2011 4:10 pm

Re: Power supply interference causing glitches?

Post by Mee_n_Mac » Sat Feb 01, 2014 10:03 am

And I would add ... How are they (sensors) connected to the Arduino ?

jsnow2
Posts: 3
Joined: Fri Jan 31, 2014 9:58 pm

Re: Power supply interference causing glitches?

Post by jsnow2 » Sat Feb 01, 2014 1:32 pm

As of now there is only a Temperature/Humidity probe. It's connected to 5v, GND, and Inputs 2&3. I've tried another sensor with much shorter cables but the problem still persists.

That could be the case, but why would everything work fine with a battery supply instead?

I've done some further research and it seems people get interference on TVs from having florescent lighting running on the same breaker circuit, so this could be a similar problem. Do you think an EMI filter would help?

MichaelN
Support Volunteer
Posts: 1191
Joined: Fri May 08, 2009 6:14 pm
Location: Australia

Re: Power supply interference causing glitches?

Post by MichaelN » Sat Feb 01, 2014 4:35 pm

We really need to know more about the sensors, and see a wiring diagram / schematic showing how everything is connected. These things can be subtle. Voltage spikes / dips on the power input may be causing problems, or it could be that adding the power connection allows noise to enter on the sensor inputs.

Does the sensor use I2C for communication? If so, have you included pull-up resistors on the SCL and SDA lines? The value of these will determine how noise-sensitive the circuit is.

I've never been a big fan of Arduinos, as they provide no protection on the I/O pins, and (IIRC) no protection against spikes on the power inputs.

W

jsnow2
Posts: 3
Joined: Fri Jan 31, 2014 9:58 pm

Re: Power supply interference causing glitches?

Post by jsnow2 » Mon Feb 03, 2014 4:51 pm

The sensor is a Digital Temperature and Humidity sensor (SEN0148).
http://www.dfrobot.com/wiki/index.php/D ... SEN0148%29
It's wired like it shows on the wiki page, except without the resistor. The instructions I originally followed didn't include it.
It uses a modified I2C communication.

I've disconnected the relays so the problem is isolated between the lights, the UNO, and the sensor.

Thanks for the help so far!

EDIT: To clarify, the lights are now directly plugged into the wall outlet and do not pass through the UNO.

MichaelN
Support Volunteer
Posts: 1191
Joined: Fri May 08, 2009 6:14 pm
Location: Australia

Re: Power supply interference causing glitches?

Post by MichaelN » Tue Feb 04, 2014 6:23 am

jsnow2 wrote:The sensor is a Digital Temperature and Humidity sensor (SEN0148).
http://www.dfrobot.com/wiki/index.php/D ... SEN0148%29
It's wired like it shows on the wiki page, except without the resistor.
Try adding the resistor - pullup resistors can be critical for these types of interfaces. The weak pullup in the Arduino (if it is even enabled) may be too high a value to prevent noise from being injected.

Post Reply