I says in the document on arduino website that the regulated +5V pin could get power from external battery source like +9V battery. If I have +9V battery source connected with power plug on arduino board, and I want to use the source as external power for DC motor through VIN pin, how will the power be distributed with motor and +5V regulated pins on board?
An engine is a noise source. It is best not to feed it from the source that powers the electronic Although it is possible to use the internal regulator to the arduino, it is preferable to use an external regulator such as a 7805, case like TO220. See the datasheet (www.google.fr: "7805 datasheet") for usage tips.
Heatsink or not heatsink ? I = current use by the motor DV = voltage across the regulator Rth_jamb = Thermal resistor between junction and the ambiant temperature -> for value see datasheet Tjmax = maximimal junction température -> for value see datasheet
DT = calculated difference of temperature between junction and ambiant temperature DT = Rth*P , DT is in °C , P = I *DV, P is in Watt
Exemple : I= 0.5 A U=9V Tj_max = 170°C Rth = 20degrees/watt
P = 0.5*(9-5)= 2 W DT = 20 * 2 = 40°C
The max ambiant operating temperature is = Tj_max- DT = 170-40 =130 °C If Rth will be 80 degrees/watt Dt will be 160°C and the max ambiant temperature will be 170-160 = +10°C
In this case you have to add an heatsink and the Rth is now : Rth_junction/case + Rth_heatsink.
There are some considerations apparent beyond calculating heat rise/watt of energy consumed, most are smoewhat serious. As a battery (Primary Cell or one that derives it's energy from a non-reversible chemical reaction) is discharged it's internal resistance increases (one of the Major reasons for 'by-passing a battery with a high value electrolytic capacitor) This change in cell characteristics, the internal or individual cell resistance is the equivalent of a series resistance added to the battery, controlled by the amount of discharge or total remaining energy, while the 'average" (non pulsed load) current is not large enough to create an appreciable drop across the cell resistance, the pulsed load can exceed the maximum available current which as I described is a function of remaining charge level. Two things happen here... The obvious is that there will not be enough current available for the pulsed current load (the Motor) and the second and far more restrictive one is that the battery voltage will drop for the duration and amplitude of the pulse and take a predictable time to recover and this condition will cause the average voltage to fall for a time governed by the type of primary cell and the amount of energy remaining. This condition will cause intermittent and/or unpredictable operation of the device. The real issue in all the big words above is that the battery voltage for a short time might not be high enough for normal operation of the battery operated device. The typical method of failure is to trigger voltage regulator dropouts causing processor resets or if the battery is being monitored for low battery conditions this monitor will shut down and either place a warning (LED or Text warning) as a possibly to likely cause shutdown of the device or at best to restrict it's operation to those tasks that deplete the available energy in the battery charge the least. If there are no allowances built in to the device for low battery operation then the device will likely be unpredictable or unstable in operation as it's useful battery life is used up... IMO and direct experience...
itmth19: If I have +9V battery source connected with power plug on arduino board, and I want to use the source as external power for DC motor through VIN pin, how will the power be distributed with motor and +5V regulated pins on board?
If you mean one of the small 9V batteries that you put in smoke alarms, it won't be powerful enough to drive more than the tiniest motor, however you connect it up.