Go Down

Topic: Trouble with 1-channel relay and lcd (Read 284 times) previous topic - next topic


I am using this basic code to test the working of relay and lcd.

Code: [Select]
#include <LiquidCrystal.h>
#define relay 8

LiquidCrystal lcd (9, 2, 4, 5, 6, 7);

void setup() {
  pinMode(relay,OUTPUT);// put your setup code here, to run once:

void loop() {


During the switching of relay , the lcd shows garbage value and the delay also does not work . I am not using a relay with a built in opto-isolation circuit.The relay and lcd works fine when the motor is not connected to the relay.All the problems of halting,garbage values and delay occurs when i connect the motor to the relay.

Please Help.


Jun 28, 2018, 09:42 pm Last Edit: Jun 28, 2018, 09:46 pm by JitenSinha
i am using the connection similar to this :-
Instead of bulb , i am using a 6v motor.

Another thing, when i am only using the relay and the motor and switching them via arduino , no problems seem to occur.

My relay does not have opto isolation build in.

Go Up