Tetrikus
Posts: 28
Joined: Tue Apr 05, 2016 5:42 am

Issues with I2C AC Dimmers and DHT-Sensors

Sat Aug 11, 2018 5:41 am

Hello everyone
I'm currently building a Terrarium. I've placed a couple of lights, a few DHT22-Sensors and an AC Light Dimmer which communicates via I2C with the Raspberry. Now, I notice, that some of the devices seem to interfere with each other. If I only run the program, the sensors do measure the temperature and the humidity very reliable. But when I start to switch lights on/off and dimm them, some of the sensors stop working after some time. The only way to make them work again is to completely power down the whole thing and start again.

Would there be a explanation, how an I2C Device like the dimmer could have a negative impact on the measurements of my DHT-Sensors? That's still just a guess, but it looks to me that this is somehow related. Is there anything I could try to solve these issues? Any ideas?

Thanks in advance!

Brandon92
Posts: 472
Joined: Wed Jul 25, 2018 9:29 pm
Location: Netherlands

Re: Issues with I2C AC Dimmers and DHT-Sensors

Sat Aug 11, 2018 11:18 am

You problem is properly the "AC Light Dimmer". I don't know what for kind of dimmer you are using. But it will probably generate a lot of noise. And those transients will interfere with the rest of you circuit.

Tetrikus
Posts: 28
Joined: Tue Apr 05, 2016 5:42 am

Re: Issues with I2C AC Dimmers and DHT-Sensors

Mon Aug 13, 2018 7:45 pm

Thanks for your reply. Yes that makes sense. I worried it could be the Dimmer. Is there anything I could do to reduce, eliminate or filter this noise? Do we talk about noise which goes back the copper wires or is it noise 'in the air'? Could it help to relocate the dimmer away from the other electronical components or is there an electronic part which could help?

Thanks in advance for any help.

Brandon92
Posts: 472
Joined: Wed Jul 25, 2018 9:29 pm
Location: Netherlands

Re: Issues with I2C AC Dimmers and DHT-Sensors

Mon Aug 13, 2018 8:08 pm

I think before I give any suggestion, can you give my a little bit more information about you setup. And maybe even a picture would be appreciated.
There a a couple ways to get rid of the "noise". But the best way is to eliminate at the source. If you want to know more about this: Noise Suppression Products/EMI Suppression Filters
Tetrikus wrote: Do we talk about noise which goes back the copper wires or is it noise 'in the air'?
Or maybe both :( But like I said, I can't say something if I don't know the hole story :)

Tetrikus
Posts: 28
Joined: Tue Apr 05, 2016 5:42 am

Re: Issues with I2C AC Dimmers and DHT-Sensors

Tue Aug 14, 2018 11:11 am

Thanks @brandon92 for your reply and your link. It's very interesting, but a bit overwhelming for an electronics newbie. :)

First off: A few pictures about my current setup, it's kind of a prototype, but actually I expected to have a bit more success with it.
http://content.tetrikus.com/foren/IMG_2939.jpg
http://content.tetrikus.com/foren/IMG_2940.jpg
http://content.tetrikus.com/foren/IMG_2941.jpg
http://content.tetrikus.com/foren/IMG_2942.jpg

Left: 5V Power Supply
Left-Middle: Connectors for 230V load and some of the sensors
Middle Top: Raspberry Pi, 230V relais (currently running from GPIO directly)
Middle Bottom: Level Shifter (bi-directional), MCP23017 Expander, non-used relais
Right: I2C AC Dimmer module
Most right: Connectors and Resistors for DHT- / SHT-Sensors

Maybe important information: The 230V wires go to the backside of the wood. I hoped to reduce interference that way. The wires for the sensors are running through the AC-dimmer, which I now guess is far away from optimal. :) There is also a Neopixel strip attached which is running via PWM. It's placed on the far left side and not visible on the pictures. Same for three hardware buttons and some water-level sensors.

In the worst case, I could remove the AC-dimmer and go with simple on/off relais, but I would love to be able to use the dimmer instead to reduce the power of the connected lights if needed.

Is that information helping? I'm currently thinking about replacing the simple relais with an I2C Relais board and try to put the two I2C devices (relais and dimmer) into a shielded case or something.

Brandon92
Posts: 472
Joined: Wed Jul 25, 2018 9:29 pm
Location: Netherlands

Re: Issues with I2C AC Dimmers and DHT-Sensors

Tue Aug 14, 2018 11:42 am

Thanks for the information.
By the looks you are using a AC dimmer that is "smart" and you purchase is as a module/kit. And that's using the correct method to dim you AC? Do you have for example a link. And that the AC is fully isolated from you the rest of you circuit. This is a imported part.

You could add EMI/EMC to the input of your ac dimmer. For example this one**. And for the output you could use this**.

PS: I would like to see "something" around the AC dimmer, that you / or some else can't touch it by accident and kill you. Also the other wires (white one in IMG_2939.jpg) need to be cleared from you high voltage part. For example, is you wire is damaged, it's possible that your means voltage is connected to you low voltage part. (what you thinks it's save to "touch")

**NOTE: first one I could fine (also for the picture).

edit
Its also smart to give every output a fuse, if you haven't this already.

hippy
Posts: 3776
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Issues with I2C AC Dimmers and DHT-Sensors

Tue Aug 14, 2018 3:32 pm

Tetrikus wrote:
Sat Aug 11, 2018 5:41 am
If I only run the program, the sensors do measure the temperature and the humidity very reliable. But when I start to switch lights on/off and dimm them, some of the sensors stop working after some time. The only way to make them work again is to completely power down the whole thing and start again.
Not the best solution but you could perhaps power the sensors through a relay or similar. When they fail you could power cycle them, reinitialise them, get them working again.

Tetrikus
Posts: 28
Joined: Tue Apr 05, 2016 5:42 am

Re: Issues with I2C AC Dimmers and DHT-Sensors

Thu Aug 16, 2018 9:14 am

Brandon92 wrote:
Tue Aug 14, 2018 11:42 am
By the looks you are using a AC dimmer that is "smart" and you purchase is as a module/kit. And that's using the correct method to dim you AC? Do you have for example a link. And that the AC is fully isolated from you the rest of you circuit. This is a imported part.
I do not completely understand what you want to say/ask, sorry. Well, I can say, that I'm using this dimmer:
http://www.inmojo.com/store/krida-elect ... r-arduino/

The AC side of the dimmer is isolated from the rest of the circuit - it's not connected to anything else. But the wires do run through the same locations, so they are not far away from the electronics parts.
Brandon92 wrote:
Tue Aug 14, 2018 11:42 am
You could add EMI/EMC to the input of your ac dimmer. For example this one**. And for the output you could use this**.
Will try that. But actually, I'd like to know, where exactly the problems occour. I think it's quite realistic, that these issues come from the dimmer, but is there any way to be really sure, without the need to buy an expensive oscillator?
Brandon92 wrote:
Tue Aug 14, 2018 11:42 am
PS: I would like to see "something" around the AC dimmer, that you / or some else can't touch it by accident and kill you. Also the other wires (white one in IMG_2939.jpg) need to be cleared from you high voltage part. For example, is you wire is damaged, it's possible that your means voltage is connected to you low voltage part. (what you thinks it's save to "touch")
Sure, this will be done, as soon as all the devices are placed accordingly and everything is working. For the moment, an earth leakage circuit breaker has to be enough. :)
hippy wrote:
Tue Aug 14, 2018 3:32 pm
Not the best solution but you could perhaps power the sensors through a relay or similar. When they fail you could power cycle them, reinitialise them, get them working again.
Maybe that's a good idea, but actually I'd like to solve the reasons for these issues instead finding a way around. Thanks anyway, I'll keep that in mind. :)

Brandon92
Posts: 472
Joined: Wed Jul 25, 2018 9:29 pm
Location: Netherlands

Re: Issues with I2C AC Dimmers and DHT-Sensors

Thu Aug 16, 2018 9:49 am

Tetrikus wrote:
Thu Aug 16, 2018 9:14 am
Brandon92 wrote:
Tue Aug 14, 2018 11:42 am
You could add EMI/EMC to the input of your ac dimmer. For example this one**. And for the output you could use this**.
Will try that. But actually, I'd like to know, where exactly the problems occour. I think it's quite realistic, that these issues come from the dimmer, but is there any way to be really sure, without the need to buy an expensive oscillator?
This is a "simple" question. However the answer is not quite simple. But, I will try to give you some information about this.

Because your AC dimmer is "cheap" it doesn't contain the right filters to get rit of cictain noise. That can course some issues elsewhere. For example, if you want to bring this product onto the marked with the prober certification. It will not past the test. ;)

The follow image is form here. Also interesting btw.

Image

As you perhaps will see that there are some spikes when the triac is "enabled". This kind of spikes are very fast and contains therefore "a lot of energy" (not 100% correct, but you get the point :) ) Because there are fast, there are high frequentie and can course problems elsewhere, as you notes before. And by using a correct filter, the spikes are "limited" and/or "damped". If the spike is not filtered out, this will be transmitted by the wires that are connected to it.
To give you a idea about the filter, here is a "similar" schematic with a filter at the input.
Depending on the frequentie, you could try a fm radio near this board, if you are "lucky" the fm signal is gone if you enable the dimmer.
I do not completely understand what you want to say/ask, sorry. Well, I can say, that I'm using this dimmer:
The dimmer that are using is, by the looks of it, a dimmer that contains the algorithm to correctly enable / disable the traic's. And if that's was not the cause, you could blow up the dimmer.

Tetrikus
Posts: 28
Joined: Tue Apr 05, 2016 5:42 am

Re: Issues with I2C AC Dimmers and DHT-Sensors

Fri Aug 24, 2018 7:38 am

I've got some updates on this. I have completely reengineered all my technical stuff and have also relocated the AC-Components. Now, when the sensor cables are not placed near the dimmer anymore, it seems to work fine, so far. I didn't place any filters yet, but I will add an EMI-Filter and some ferrit clamps where needed to make it even more reliable.

Thanks for your help anyone!

Brandon92
Posts: 472
Joined: Wed Jul 25, 2018 9:29 pm
Location: Netherlands

Re: Issues with I2C AC Dimmers and DHT-Sensors

Fri Aug 24, 2018 2:14 pm

Okay, nice to hear that you could fix this issue.

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: No registered users and 8 guests