Go Down

Topic: Switch interference displaying as strange signs on lcd display (Read 705 times) previous topic - next topic



I need some help with a small project that uses an arduino and an lcd display.
It is an arduino UNO and an 16x4 lcd.
I will shortly explain what happens, maybe someone can help me solve this issue.
I am using the arduino combined with a 12V small relay , that is suposed to switch on and off a contactor
I don't have any 5V relay for the arduino to power directly that's why i use a HIGH output from the arduino connected to the base of a transitor that switches the 12V relay.I have to mention that the ground from the arduino and the ground from the 12V power supply of the relay are both connected to the emitor of the transistor.
The contact side of the relay is connected to the coil of the contactor that is powered from the mains (230V/ 50Hz through a separation transformer).
I use a contact of the contactor to input a HIGH(+5V from the Arduino Vcc) signal in one of the arduino's digital pins configured as input.
I connected also a pull down resistor of 10k to the input so i don't get false readings.

I created a code that does following:

1- activate the 12V relay for 50 ms(contactor switches, closing contact side)
2- stop the 12V relay(contactor stays closed, only if i apply the next impulse it opens again)
3- read the input of the Arduino which should be high since the contactor is closed
4- display the result on the lcd

With this i want to see, from a number of operations, how many times the contactor stays closed because sometimes it doesn't.

The problem is that when switching the contactor, the display on the lcd is not displaying correctly.
Sometimes it displays the number of good/bad operations and sometimes only strange signs.

The code works as it should,  if i switch off the mains from the contactor side, the lcd displays only faulty operations(the 12V relay still operates but the contactor does not close any more, meaning a bad operation).

I suspect that there is some interference when switching  the contactor that affects the display.

How could I solve this problem so that i can display the reading in real time?

My improvised solution was to do a pre-set number of switchings and  count the  number of good and bad switchings, displaying the result on the lcd only at the end.

Thank you in advance for your help and sorry for the long explanation!
I know using a schematic of the setup would help more but i have no access right now to a schematic drawing software.


Hello again,

I got some extra information ,I measured voltage spikes of up to 8V on the digital  input pin of the Arduino when switching the contactor.


From http://forum.arduino.cc/index.php?topic=303713.msg2117754#msg2117754 posted yesterday:

There have been lots of posts about similar topics.  Look for posts with LCD and either garbled characters, weird characters, strange characters or something similar in the heading.

Generally speaking the solution typically involves a capacitor or capacitors across pins 1 and 2 of the LCD module.


Go Up