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,
This system is intended to do few jobs:
- LCD shows the date, time, temperature and humidity
- 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
- IR remote is there to control the led strip and relays
- 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.
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,
- DHT11 output
- 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.