i’m an amateur in electronics and i hope i’ll be clear enough so that you’ll be able to understand my problem. Please let me know if you need more information.
I’m using an arduino mega 2560 to turn on and off a 220vac device (pump, light) connected via an opto-relay.
(here is the relay board : http://www.ebay.fr/itm/8CH-5V-Module-de-relais-pour-Arduino-Shield-Conseil-PIC-AVR-MCU-DSP-ARM-Bleu-/151186014451?hash=item23336380f3)
I’ve attached a basic schematic of my setup and the code i’m using (basic liquidcrystal example “hello world” and the on/off command).
After few cycles, the lcd starts to become crazy and writes symbols only.
i’ve tried :
-use separated psu and different combinations
-powering the relay board with the same +5V than the arduino
-powering it up with a different psu
-use capacitors and diodes at different points on the circuit to protect each device
-replace every cable i had at the beginning
-put the electronic parts in a metal box
The thing is, every other tasks, codes, works fine.
The arduino, relay board, and serial monitor seems to continue his work after the LCD goes insane.
If I want to do the same thing with DC devices (motors for example), everything is fine.
I’ve applied most of the solutions i could find on various forums. Nothing solved it.
So… Please help… :’(
code.txt (651 Bytes)