Pages: [1]   Go Down
Author Topic: Switching a load scrambles LCD  (Read 624 times)
0 Members and 1 Guest are viewing this topic.
Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 6
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This seems like a decoupling issue. I have standalone 328 controlling two relays which switch a 120 volt 5va load. I have .1 uF ceramics between VCC and ground, AVCC and ground, and another one directly on the LCD display (1602) itself. I also have a 470 uF electrolytic on the 5V rail next to the 328 and 100 uF electrolytic on the LCD. I am using a 4001 diode across each relay coils. Without a load connected to the relays, it ran overnight without issue (+10 Hours). With a load, the LCD scrambles within a few switching cycles, but the sketch continues to run normally. What is at play here that I am missing?
Logged

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 6
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Still having this issue, any suggestions? I wonder if using an I2c backpack might help...
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4260
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Still having this issue, any suggestions? I wonder if using an I2c backpack might help...
You haven't described the placement of your LCD with respect to your standalone processor but if the wires are picking up interference, and it sounds as if they are, then a serial interface will probably help.

Also, you have described how you tried to deal with transients caused by the relay, but what about those possibly generated by the load itself?


Don
« Last Edit: February 12, 2013, 02:12:54 pm by floresta » Logged

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 6
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
placement of your LCD with respect to your standalone processor
yea this probably part of the problem. Everything(12v power supply, mcu, lcd, outlets) is carefully stuffed into a two gang electrical box. In hindsight , probably not ideal.
Quote
what about those possibly generated by the load itself?
great point, but  am unsure of how I would go about doing this. I just assumed that my 12v power supply was built well enough that it could handle reasonable fluctuations on its supply. On the other hand, it cost $2.50 off of ebay: http://www.ebay.com/itm/260990909977?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649. What techniques or approaches should I consider on this end.


* 0125131540a.jpg (446.17 KB, 1280x960 - viewed 22 times.)
Logged

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 6
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

shortening the leads between the LCD and mcu as well as wrapping them in foil and braided cable seems to have done the trick. two days and no problems
Logged

Pages: [1]   Go Up
Jump to: