Hi, I've run into a bit of an issue with the circuit i' working on and since I don't have much experience with electronics I would appreciate some help diagnosing this problem:
The gist of this project is using an Arduino Mega to operate a thermal box. I have included a picture of my setup, but basically I have a couple of temperature sensors (Platinum RTD Sensor - PT100 - 3 Wire 1 meter long : ID 3290 : $11.95 : Adafruit Industries, Unique & fun DIY electronics and kits) and a 12V ceramic heating element which is powered by an external 12V power supply through this MOSFET module (IRF520 MOSFET Driver Module). I also have a 3.4 TFT touchscreen (3.5 TFT 320x480 + Touchscreen Breakout Board w/MicroSD Socket [HXD8357D] : ID 2050 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits) and an LCD for a GUI. The idea is that when the start button is pressed, the program goes through a PID loop and powers the heating element to reach a predetermined set point. All that is working fine, but I have found that when the heating process starts, both my LCD and touchscreen start behaving erratically and displaying random characters, weird colors, and flickering on and off (I included some photos). When I switched the touchscreen over to being powered by the 12V supply via a buck converter it improved slightly but I am still getting weird behavior. The display still registers and responds to touch but will not display normally unless the arduino is reset. Everything works when I am powering something else (like an LED) instead of the heating element so i was wondering if the element was causing some sort of power problem? Any help on this matter would be much appreciated! 
wiring_setup.pdf (395 KB)
touchscreen.pdf (667 KB)
LCD.pdf (223 KB)
where are the specs for the heating element. If enabling that causes this issue you need to look at it. Also do I see 3 different power supplies in this?
USB, 12v and a switching supply?
Need the specs for the heating element and the 12v supply. My guess is a current issue.
From what I could find on the heater it’s 12V 40W, and ice found it’s been drawing around 1A when powered. The mosfet and heater are powered from the 12V 5A switching supply and the arduino is powered from the USB (mainly just for the purpose of uploading code, eventually the goal is to have one power source).
I ended up stripping the electronics and code down to just the display, mosfet, and heater to try to pinpoint it and was still getting the issue. BUT when I swapped the mosfet out for a relay (which gets rid of the PWM in the process) it successfully powered the heater without interfering with the display, though the heater still draws the same current
Oh the code would help. Why do you use PWM to switch the MOSFET? Most the guys here don’t like the IRF520 for switching with the Arduino. Due to the fact that it barely starts to conduct at logic levels. You should try to find a logic level FET. BTW 12 @ 40 watts is 3.4 A. It’s significant and switching that on and off with PWM could produce ripples in your power supply which I know nothing about.
wolframore:
Oh the code would help.
I added the code i'm using attached to this! screenTest is the stripped down version of the main code, behaviorBox (which I will admit has gotten a bit bloated, as I am not the most experienced at creating streamlined code)
wolframore:
Why do you use PWM to switch the MOSFET?
I wanted to be able to control the heating element using a PID loop to reach a set temp and respond to changes without over/undershooting, and to me an analog signal seemed like the best way to do that.
wolframore:
Most the guys here don’t like the IRF520 for switching with the Arduino. Due to the fact that it barely starts to conduct at logic levels. You should try to find a logic level FET. BTW 12 @ 40 watts is 3.4 A. It’s significant and switching that on and off with PWM could produce ripples in your power supply which I know nothing about.
Ah, interesting, I will definitely investigate that! Thanks for the tip!
behaviorBoxMaster5_1.30.19.ino (45.6 KB)
screenTest.ino (4.41 KB)

the IRF520 will pass about 2 amps at 5v. (... hmm and you need 3.4)
The IRF series MOSFETS were designed to go into full saturation with 10V (Vgs) at gate. IRF520 is basically choked at 5Vgs.
I'm sorry I missed the PID comments, Actually I would like to start on a similar project for SMD reflow.
I suggest learning to use a circuit drawing program to draw out your schematics. It's not easy to follow a picture once you get over 3 or 4 different components.
Your relay may be helping to stabilize the power supply to make current demand constant and also allow full current to flow.
I suggest a test: Try to turn it on without PWM with the MOSFET. If the issues are no longer there then you may need filtering to smooth the power.
In any case I would be looking for a logic level MOSFET That can pass 5-10 AMP with 5v at Vgs.
Shoot, yeah that would totally make sense based on the behavior i've been seeing. I'll have to test that out some more tomorrow/next week and look into different logic-level MOSFET options. You're right, at this point drawing out the circuit diagram would probably be a good idea; i'll probably have to document all this by the end anyways 
Finally got my parts in and switched over to the IRL mosfet and everything is working great! Thanks for all the help!