5V POWER SOURCE shared by Motor & Arduino

5V from the bench power supply (upto 3A current) to both arduino Vin and 5V dc motor.

The arduino will also control motor via pwm.

Is there anything wrong with this? Will connect a diode across terminals to block back emf and a 0.1microfarrad capacitor for noise (read from herehttp://www.pololu.com/docs/0J15/9)

Please don't be confused, the motor is NOT powered via the 5V power pin from the arduino

5V (power supply) =======|-----> 5V to Arduino Vin ------>---|
| |
|-----> 5V to DC MOTOR <-PWM---|

Please don't post duplicates or cross-post...

You cannot directly power a motor from an Arduino pin without risking destroying the microcontroller.

You cannot get away with feeding 5V to Vin.

You got confused.
Duplicate post I could not delete myself.

5V from bench powersupply goes to arduino Vin as well as dc motor.

IT DOES NOT GO FROM BENCH TO ARDUINO TO MOTOR NO!!!

IT DOES NOT GO FROM BENCH TO ARDUINO TO MOTOR NO!!!

But the PWM does.... not sure how you expect that to work.

If you want to switch the motor with PWM then the PWM side should be through a transistor as shown here.

Look at attached image, that is how I wanted to connect arduino and motor to 5V supply.

This is what I was thinking instead of having a separate power source for the motor, I would use the same 5V power source the arduino is using. Then with the arduino PWM I would control the motor.

Will the PWM cause problems for the arduino power as the motor and arduino will share a 5V line.

The Uno page says this:

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable.

Looks like you need to put 6 or 7 in, not 5, but I'm not sure if that's true for going in via Vin or not. Apart from that afaik that's a legitimate way of providing the power to the board and the motor.

You picture isn't what you explained in the first post, which showed the PWM going direct to the low side of the motor and I didn't see that working. The transistor approach, a la my link, is good.

I have mistaken Vin for the 5V power pin.

I though Vin was to provide a regulated 5V to the arduino, but really it is 7-12V that goes through a voltage regulator turning it into 5V or 3.3V.

So my diagram is false as if 5V goes to Vin arduino might not operate as expected (requires 7-12V on Vin)

Ok in theory If I was using 7V power supply that goes to Vin as well as motor instead of 5V.
Will the PWM cause changes to the 7V power supply affecting the arduino. (pulse high and low) (duty cycle)

You can put 5v into the usb though... that's what I do. I have a hacked ATX PC power supply. I bought a USB A-B cable, chopped the flat (PC) end off, and wired that end into one of the 5v wires of the supply. Other end has the "square" USB plug for Arduino (but obviously just power, no data....)