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---|
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 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 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....)