Dear All,
I had worked out with your suggestions on this topic but the problem still
persists. I think the problem is in the code section. Some stack issue or like that.
Please suggest ASAP as I don’t have much time to submit my project.
The points that I covered are as below…..
1) Why not feed Vdd from the same 5 volt (regulated?)
2) Like is to control the R/W line of the LCD so it is only write as long as it needs to be (a very short time).
3) If you need to turn off the backlight when Vdd is removed, I suggest that you switch the backlight using a simple transistor or MOSFET switch. If the backlight pins are floating, you could use a NPN or N-channel switch inserted between cathode and ground. The base (or gate) would be switched by the Vdd line.
4) The 100uF bulk capacitor, currently connected across the relay coil, would be better connected between the top of the relay coil and ground. This will then absorb the return current surge when the commutating diode across the relay coil conducts, and will reduce the sluggishness of the relay turn-off due to the capacitor. With the current arrangement there will also be an unnecessary current surge through the transistor switch during turn-on
5) Another likely issue with the relay driver is that you currently provide only about 0.4 mA of base drive current to the BD139. In the worst case this may provide a maximum collector current in the vicinity of 10mA, which maybe insufficient for the relay. In this instance, I might consider a resistor value of 2k2, or maybe even lower. The port pin should use the high current drive setting.