This is just a follow-up. I could not try those other solutions because I only have one power supply available and everything was already fully wired up. However, I got a new relay board, the one that is on your picture, and it works perfectly well. So it's all good now!
Thank you for your detailed response. It looks like I will have to replace my relay board with one with optical isolation. I hoped I could avoid that because it is already built into a custom box. Ah, well...
I have this Ywrobot Relay board. I've built a remotely controlled power outlet with it. It works perfectly well when nothing is plugged into the outlets. However, when I plug a lamp or anything into the outlet and switch the relay, Arduino frequently locks up. I guess this board doesn't do a great job of de-coupling the power supply. Any idea how I could improve it? Adding a capacitor or an inductor to the board perhaps?
I bought Futurlec BLUE128X64LCD LCD (type B pinout), but I cannot make it work with my Arduino. The backlight is lit up, but there is nothing on the screen. I also cannot adjust the contrast. I've noticed on the Wiki page that the the third leg of the contrast potmeter is connected to the ground. According to the datasheet of Lumex LCM-S12864GSF (another LCD with type B pinout), it should be connected to 5V. Well, I tried in both way (which I probably shouldn't have) but it didn't work anyway. How much voltage should actually be present at pin 18 (Vee)?