Make an High Voltage digital switch with Arduino

I have an electric motor that works on 12V and 3A and I want to control it with my arduino,
obviously, as soon as I will connect to the barrel jack connector a power supply that can provide 36 Watts it will instantly fry the arduino.
So is there any other option that I will be able to control the motor(on and off) with the arduino without burning it?
I thought about connecting the negative wire of the motor to the negative side of the power supply
and then connect the positive wire to a component that can work both with 5v and 12v and when a certain arduino pin turns from LOW to HIGH it'll provide a flow of electricity through that component and by that, I would be able to control the motor with an arduino without destroying it.
So does somebody can advice me what should I do and if there's such a component that can solve my problem?
I really appreciate any and all support.

The component you need is called a MOSFET. See bildr High-Power Control: Arduino + N-Channel MOSFET - bildr or just google “Arduino MOSFET motor”.

Steve

slipstick:
The component you need is called a MOSFET. See High-Power Control: Arduino + N-Channel MOSFET – bildr or just google "Arduino MOSFET motor".

Steve

Thank you Steve that really helped me.
By the way, do you know what is the maximum amount of wattage/voltage you can apply to those MOSFET chips?

By the way, do you know what is the maximum amount of wattage/voltage you can apply to those MOSFET chips?

You'll have to check the datasheet for the particular device. 12V is virtually never a problem and it's not hard to find one that can switch 3 Amps. (Give yourself some safety margin on the current rating.)

But, do make sure it's a "logic level" MOSFET that can be switched/controlled by 5V. Many (most?) MOSFETs require a higher gate voltage to turn-on fully.

have an electric motor that works on 12V and 3A and I want to control it with my arduino,
obviously...

If you try to drive the motor directly from the Arduino (which puts-out 5V) the motor won't run and you might burn-out your Arduino. You'd actually get less than 5V and far-far less than 3A, but you'd get more than current than you can safely draw from an Arduino output pin (rated for 40mA maximum).

...as soon as I will connect to the barrel jack connector a power supply that can provide 36 Watts it will instantly fry the arduino.

Actually no... You can connect it to a car battery (capable of hundreds of amps) and it will work fine. [u]Ohm's Law[/u] says Current = Voltage/Resistance. So although we don't know the "resistance" of the Arduino, and it will change depending on how many things are connected and if LEDs are on & off etc., we do know that current depends on resistance.

Ohm's Law is a law of nature and it's always true, so if the resistance is too low and the "calculated" current is more than the power supply can deliver, something will "give". The voltage might drop, the power supply might burn-up, etc.

DVDdoug:
You’ll have to check the datasheet for the particular device. 12V is virtually never a problem and it’s not hard to find one that can switch 3 Amps. (Give yourself some safety margin on the current rating.)

But, do make sure it’s a “logic level” MOSFET that can be switched/controlled by 5V. Many (most?) MOSFETs require a higher gate voltage to turn-on fully.
If you try to drive the motor directly from the Arduino (which puts-out 5V) the motor won’t run and you might burn-out your Arduino. You’d actually get less than 5V and far-far less than 3A, but you’d get more than current than you can safely draw from an Arduino output pin (rated for 40mA maximum).
Actually no… You can connect it to a car battery (capable of hundreds of amps) and it will work fine. [u]Ohm’s Law[/u] says Current = Voltage/Resistance. So although we don’t know the “resistance” of the Arduino, and it will change depending on how many things are connected and if LEDs are on & off etc., we do know that current depends on resistance.

Ohm’s Law is a law of nature and it’s always true, so if the resistance is too low and the “calculated” current is more than the power supply can deliver, something will “give”. The voltage might drop, the power supply might burn-up, etc.

Alright, thank you that helped me to understand better the concept behind the MOSFET.
So what do you advise me to do about the MOSFET and this whole solution,
should I connect to the barrel jack connector my 12V-3A power supply?

DVDdoug:
Ohm's Law says Current = Voltage/Resistance.

Not quite, that's just the definition of resistance. Ohm's law states that for certain materials resistance
is a constant at fixed temperature and pressure (ie current is directly proportional to voltage for these
materials). In other words Ohm's law is that R is constant in V=IR (for conductors).

Ohm's Law is a law of nature and it's always true

I keep hearing this every so often - someone's been a very poor physics teacher somewhere I suspect!

Ohm's law is not a general law of nature. Ohm's law is an observation on the behaviour of certain materials,
namely metals and some others, in the presence of an electric field. It doesn't hold for air, it doesn't
hold for a vacuum, it doesn't hold for a diode. It is only approximately true for conductors too, at
ultra-high current densities it breaks down. It's explained by the scattering of electrons flowing in a
conductor, causing the normal acceleration of charges in a field to flatten out to a constant 'drift' velocity.