Powering up the Arduino

Hi guys

I wanted to know if it is possible to power up the Arduino Mega 2560 using an external power supply of 12v, 1.5A and at the same time connected to the PC via USB. I dont want the arduino to switch to usb power when I connect the USb cable. I badly want the external supply because the sensors draw more current from the board and the board disconnects from the computer. And is the 12v 1.5A power supply ok to use?

Thank you

Yes you can.

BUT what do the sensors draw? If supplied with 12V the Mega has to drop it down to 5V and it can't do that for much more then the Mega itself and a couple of leds.

I am basically trying to control the speed of a DC motor and I am doing the control operation on matlab simulink where I have designed my own controller. The arduino is interfaced to matlab via usb and it is the one commanding it. I am sensing the speed using an IR sensor. At high speeds the motor tends to draw more current and matlab loses connection with the board (i am not using any motor driver).

shamanth_u:
(i am not using any motor driver).

So how IS it connected? The Arduino can't control it directly.

And a motor != sensor :wink: The USB port should have enough power to power some IR sensors.