Tetrikus
Posts: 18
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: 133
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: 18
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: 133
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: 18
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: 133
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: 3347
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.

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

Who is online

Users browsing this forum: Tetrikus and 8 guests