0
\$\begingroup\$

I am working on a project for couple of months and eventually it gets completed and worked perfectly on the test bench. But the issues arise when I installed the system. Let me show you some pictures of my project,

The controller part The controller part

The LCD and sensors The LCD and sensors

The full system The full system

This system is intended to do few jobs:

  1. LCD shows the date, time, temperature and humidity
  2. There is a mobile app (self made) which is used to set the color of the led strip and control the relays and couple of other things
  3. IR remote is there to control the led strip and relays
  4. Couple of other things like alarm

To make it more clear let me give a brief about the system architecture. Microcontroller reads the clock data (like date, time) form DS3231 RTC chip and reads the temperature and humidity from dht11 sensor and shows it to lcd. Here pcf8574 I/O extender used to control lcd, this chip works on I2C protocol. Bluetooh kit does the serial communication with Microcontroller . IR receiver tsop1738 take the IR remote date and send it to microcontroller. Microcontroller is programed to do certain tasks as per the serial or IR data.

If I set alarm then the time signature will be stored on the ROM and during first power on(boot) time it will be read. ROM is used to ensure the reliability even power failure. Buzzer is the alarm output.

Shift registers (74hc595) are used to control a number of relays only for the cost of two I/O pins of the Microcontroller. Here cascading input used between the Shift registers.

LED strip controller board has 3 high current transistors(NPN) in order to power up the strip. PWM pins of the Microcontroller are used here on transistors' base.

The connection between LCD box and the controller board is done by a CAT6(Cable used for the internet connection) or LAN cable.

LAN cable

This cable consists of 8 wires in 4 pairs and each pairs consist two wires which are twisted with one another. Now here 6 wires are required to make the communication between LCD box and the controller board,

  1. 5v
  2. SCL
  3. SDA
  4. DHT11 output
  5. IR reciver output

SCL, SDA, IR reciver and their respective pairing wires are connected with GND. I do it to reduce the electromagnetic interference. I don't know whether I do it right or wrong. A 1000mf and a 470mf capacitor used in the LCD box.

These relays are used to control the electrical devices like bulb, Fan.

The whole system is powered by 12v 4amp transforma. The -ve or GND pin is connected with the earthing connection.

Now the issue is, when any of the switch from the switchboard (The AC switches to on/off fan, light etc) is pressed(either on or off) some unexpected things are done as for examples LCD shows some unexpected characters, relays get turn on or off (means abnormality on shift registers). Even some times, system stop responding to makes it responsive again needs a reset. I failed to understand the issues. Height difference between lcd box and microcontroller is about 7ft. I power up the system with UPS (independent form the main line) but issues remain same.

I will be thankful to you for your useful suggestions.

\$\endgroup\$
  • 1
    \$\begingroup\$ Suggestions? hm... shorter wires, filtering caps, twisted pairs.. \$\endgroup\$ – Eugene Sh. Nov 7 '16 at 17:02
  • 1
    \$\begingroup\$ Filtering caps. Can you give me some link where I can study about it? \$\endgroup\$ – Siddhartha Sadhukhan Nov 7 '16 at 17:08
  • \$\begingroup\$ The question is too long to read, but you ask about interference, then show a messy ratsnest of unshielded wires with kludgy connections. What did you think you were going to get!? \$\endgroup\$ – Olin Lathrop Nov 7 '16 at 17:13
  • \$\begingroup\$ I can cover the controller board with a metal case with a ground body. But what will be the shild for connection between lcd box and controller. \$\endgroup\$ – Siddhartha Sadhukhan Nov 7 '16 at 17:19
  • \$\begingroup\$ You have a lot of long unshieled cables next to magnetic coils that produce large EM fields when switched. Nasty things will happen. Cover the board and cables with a grounded box, shorten all the cables and I assume you have flyback diodes on the relay coils? That will be a start. \$\endgroup\$ – Andrew Nov 7 '16 at 17:19
2
\$\begingroup\$

This is a situation that demands a clear understanding of pulse spectrum from V=LdI/dt and Ic=CdV/dt where 1st fourier spectrum is continuous up to f=0.35 Trise time with a null then repeat with diminished harmonics to 2f, 3f and so on.

So it is effectively a broadband noise generator.

And you have a smorgasborg of noise and antenna and inductive/capacitive coupling factors on cables. * Like an all you can eat diner for EMI.*

The general EMC categories of solutions are :

  • Isolate the noise radiators from the sensitive inputs by reducing paired loop area. and separation and right angles of cable routing.
  • Balance the paired wires of both radiators and receivers by twisted and/or shielded pairs
  • reduce common mode leakage out and in by improved Balance for frequencies above 1Mhz or spikes << 1us rise time by careful selection of CM chokes, balun or toroidal choke over pairs, (just like ethernet PHY)
  • apply LPF , low pass filtering methods to data lines with RF caps, feedthru caps such that data rate is not loaded but with impedance ratio of series CM choke and shunt RF cap you achieve greater differential attenuation. Thus can also include surge limiting switched capacitive loads, soft start to motors, commutation snubber filters
  • improved grounding so that ground shifts from switched loads do not affect data ground or analog grounds, with low L. braided wire or Litz wire in high current apps flat straps or heavier gauge wire (albeit still inductive.)
  • add transient snubber directly across inductive load such as RC for AC loads and reverse diode shunt for DC inductive coils relays etc.
  • include ESD protection in your solutions
\$\endgroup\$
  • \$\begingroup\$ thank you. most the things are unknown to me, I have study, but atleast got a direction. If you give me some link on low pass filtering then it will be easy for me to study. I found several high frequency circuit like shift register uses LPF but I don't get the point. I know this filters with AC circuits. \$\endgroup\$ – Siddhartha Sadhukhan Nov 7 '16 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.