# Simple 12 volt output

Hello
I have an Arduino UNO here and I want to do a simple simple task. I simply want to control an electromagnet to ON or OFF. I can control it fine through the Arduino IDE by changing the voltage to HIGH or LOW. The problem is that the electromagnet is only taking 5 volts from my Arduino while I would like the electromagnet to take 12 volts (6kg of force, that’s what it recommends) of electriciy. I bought this computer charger like adapter with 12 volts output and how do I use it so that I can get 12 volts of power.

What I was thinking was to

1. Cut the chord of the computer charger to get two wires.
2. Hook the negative charge to the electromagent while leavng the positive open.
3. Connect one end of the positive side of the electromagnet to the arduino and connect the other positive end of the computer charger to the arduino (another port)
4. And connect a wire between port A and portB
5. Control the voltage HIGH and LOW from one of the connected ports.

I am not sure if this would work so could someone please assist me? Would this burn up my Arduino?

Anything's possible.. What you need is a MOSFET to switch the magnet. Since, the Arduino doesn't like 12V running through it, you can use the Arduino to switch the MOSFET on and off to control the 12V magnet.

Now, we need to know how much current the electromagnet needs to get to 6kg of force. Maybe post a link to it?
Next, we need the specs of the"computer charger like adapter." Post a link if you have to.

You certainly don't want to apply any voltage greater than 5V to a pin. Any device that needs a large amount of current (more than about 20mA) or high voltage needs to be isolated from the Arduino board. This can be done most commonly with transistors or relays depending upon the situation.

maxwelltsai1987:
What I was thinking was to

1. Cut the chord of the computer charger to get two wires.
2. Hook the negative charge to the electromagent while leavng the positive open.
3. Connect one end of the positive side of the electromagnet to the arduino and connect the other positive end of the computer charger to the arduino (another port)
4. And connect a wire between port A and portB
5. Control the voltage HIGH and LOW from one of the connected ports.

I am not sure if this would work so could someone please assist me? Would this burn up my Arduino?

Yes, it would kill your Arduino.

You need to google "arduino mosfet switch".

Ok for the Electromagnet
Volage: 12 VDC
Pressure: 6 KG

Then the computer charger:
INPUT : 100-240V ~ 1.6A 50/60Hz
OUTPT: 12V-4A

Those are the specs.
I purchased a mostef this morning and is it possible if I can see a diagram on how I should use it on this project? Thanks~

maxwelltsai1987:
Ok for the Electromagnet
Volage: 12 VDC
Pressure: 6 KG

Need to know the current requirements for the electromagnet, or the wattage, or it's resistance...

If you don't know, then break out your multimeter and measure the resistance of the solenoid (or put the meter in-line, set it to measure amperage, and hook 12 volts up to it); we need to know what the current draw will be at 12 volts so a properly sized MOSFET can be recommended...

maxwelltsai1987:
I purchased a mostef this morning and is it possible if I can see a diagram on how I should use it on this project? Thanks~

Might not be that simple - the MOSFET needs to be logic level, n-channel and be able to handle the current requirements
of the electromagnet (hopefully without a heatsink). Which MOSFET and have you found out the current requirement
yet? You'll need a diode as well to connect across the coil - the diode's peak current rating has to be large enough.