I was looking at controlling a 12v device using an atmega32 microcontroller. I understand that connecting the device to the mcu will burn out the pin because of the low resistance and the enormous current that will go through.
I looked at a 2N7000 mosfet to do the job but I can't seem to get my head around it. If I connect the source to the 12V negative and the drain to the 12 volt positive we have a circuit controlled by the gate. If you connect the mcu out pin to the gate, where is it grounded? I read that the mosfet and mcu out pin share a common ground but they are different circuits. I also read that the voltage closes the gate when you set the output on the pin to +5v. In a different article they say to connect the out pin to a 100ohm resistor then to gate but doesn't this change the voltage to the gate?
Can anyone offer any insight as to how this works?
I looked at a 2N7000 mosfet to do the job but I can't seem to get my head around it. If I connect the source to the 12V negative and the drain to the 12 volt positive we have a circuit controlled by the gate. If you connect the mcu out pin to the gate, where is it grounded? I read that the mosfet and mcu out pin share a common ground but they are different circuits. I also read that the voltage closes the gate when you set the output on the pin to +5v. In a different article they say to connect the out pin to a 100ohm resistor then to gate but doesn't this change the voltage to the gate?
Can anyone offer any insight as to how this works?