Controlling a heating element using Arduino Nano

I am controlling a heating element using Arduino Nano. It worked fine until I changed the pinMode(PIN#,OUTPUT) command in the code to turn the digital IO at which it resulted in fumes coming from the microcontroller. I wonder if my following circuit has caused this? The resistance of the heating element is very low, 15.8ohm, is this ok to attach the element in the following manner?

lUpQg.png|550x600

Your post is nearly invisible on my computer.

I am controlling a heating element using Arduino Nano. It worked fine until I changed the pinMode(PIN#,OUTPUT) command in the code to turn the digital IO at which it resulted in fumes coming from the microcontroller. I wonder if my following circuit has caused this? The resistance of the heating element is very low, 15.8ohm, is this ok to attach the element in the following manner?

Vin is not for supplying power. I misread the schematic, sorry. Bedtime.

Your circuit looks reasonable, I can't see anything that would cause smoke.

My guess is that you have not wired it correctly, please provide clear photos of how you have wired it up.

Please edit your original post to change whatever formatting you put on the text so as to make it black, at the moment it's nearly invisible.

Hi, Welcome to the forum.

Can you please post your code and show what line you changed?

What are you using as a 12V power supply? What is the relay you are using?

Thanks.. Tom... :)

Is there a question somewhere in this post ?

raschemmel: Is there a question somewhere in this post ?

How about:

at which it resulted in fumes coming from the micro-controller. I wonder if my following circuit has caused this?

Looks like a pretty clear question to me.

Looks like a pretty clear question to me.

Sorry, I only looked at the OP.

I agree with Perry about a wiring error.

However it may be possible the wiring is schematically correct but the location of the connections relative to the nano and relay or heater is causing issues.

BTW, Your schematic looks well drawn, however it helps us old guy if the power supply + is above the -

If you moved the supply to the left of the nano it makes it easy for us to "see" the circuit with just a glance.

Of course, the heating element, whatever that is, could be open. Paul

Of course, the heating element, whatever that is, could be open.

Can't see how that would fry the MCU.

How are your ground wires routed? The Nano has several GND terminals (one on each side of the PCB), so something like this wouldn't be good ...

|500x476

I suggest using a separate ground wire for each connection, all terminating at a common point (-ve supply terminal). That way you won't have ground loops, or load current passing through the PCB.