So after a long night with my project I have this bug ad don't know where it comes from... My 16x2 LCd is working great for a couple of minutes and then out of the bloom it goes blank¿? I know te arduino UNO is still working because my PWM outputs are working and the relays also, the only thing is the LCD... Could it be im demanding too much current from the UNO?
Outputs are: LCD, 3PWM to transistors, 4 relay modules..
As u said I'm missing info... The code is working good since it has been working for weeks, the relays were added yesterday before this it was all good. As don said I do have the backlight led on but with no limiting resistor could it e that with the added relays it causes this? What stranges me is that if I reset it, it works fine for 5m aprox. Then goes blank with the back led always on, jut blank characters. If I reset this will happen again...
Everything is soldered on the display and wired to the arduino so cables are fine... I'll try to put a limiting resistor or just plain cut the back led
What kind of power supply are you using and are the relays supplied from a different supply?. Do the relay coils have back emf suppression (a diode on each coil). Finally when you added the relays did you include extra bypassing for them?, it is usually required if for no other reason except the added current drain.
I'm using a 12v @1A power supply for the arduino, th really module uses optocouples for every relay, I figure this would enough protection and didn't add diodes or anything, the module itself includes them. I don't know If it's in appropriate but here is the link from here I purchased the relay, the sexing picture has a schematic, where you can see all the components.
it wouldnt let me post the code in one single post sorry
At the bottom of the reply box is an arrow that says additional options. Click that and include your code file. Delete the other posts with part code in them. Then people can see the whole of your code.
The back light stays on so that means you still have power.
My 16x2 LCd is working great for a couple of minutes and then out of the bloom it goes blank¿?
If it still doesn't work after dealing with the backlight current then you should investigate what else may be happening to cause the LCD to go blank.
I have a feeling that this behavior is related to something other than time, most likely the activation or deactivation of a relay. Mike has already pointed out that you need to make sure that you have diodes across each relay coil and he has given you a link to his information concerning decoupling.
Yes Im using IDE 1.0.1 to compile.. You seem to be having trouble with the Wire library to communicate via I2C with the RTC ds1307, do you have the library in the arduinos libraries directory?
I added a 0.1uF ceramic capacitor across the +/- to eliminate noise from the PS and resitance to the LCD backlight LED as you indicated mike, but still no luck
Don, the relay modules already integrate protective diodes and are also activated via optocouplers which makes me think another diode would be unnecessary, did u see the schematic of the module? If so should I still add another diode?
I'll add another cap tomorrow since I don't have any at home right now...
What is strange is that everything works fine, relays activate and deactivate as the should, PWM outputs work and LCD..: but then it just goes blank and everything else keeps working like a charm, I can't seem to find the source¿?
The other thing that springs to mind is an intermittent connection to the power or ground to the LCD.
Have you tried waggling them and seeing if you can provoke the fault?
I added a 100ohm resistor in series, I only had that or a 50K...
From reply #2
I posted the code but dont have a schematic I posted pin connections, if you have any questions I'll be glad to tell you how about the wiring...
Tonight I'll try the hello world test and see if it stays o blanks out, maybe I can locate the problem that way!