Hi, if i plug in a dc adapter 10v 2a to the arduino, should i use the vin pin as the power source or use the 5v pin as usual
The 5V pin is for 5V only. The Vin pin is for 7-12V. Which do you think will work best for 10V?
Use the Vin pin or better the power plug. The power plug has a diode in series before the regulator to prevent a reversed connected power supply from damaging the regulator. Plugging 10V into the 5V pin will guarantee that you kill the Arduino, instantly.
Ok ,what i mean is, currently i have multiple MQ sensors and each of the sensor requires 150mah to work, so i decides to use a power plug with 10v and 2A. So, after i plug in the power plug , which pin should i use to power up the sensor. Each sensor is work under 5V. Should i use VIN PIN or 5V PIN on the board?
You should use a separate 10V to 5V regulator to power the sensors. The voltage at the Vin pin is about 9.3V (10V - 0.7V diode drop) so way to high for the sensors. Powering the sensors from the Arduino 5V regulator won't work either. If you are providing 10V (9.3V from the plug) the regulator must drop 5V (4.3V). To keep under the 1Watt max power dissipation of the regulator, you can draw no more than 200mA (240mA). The 2 sensors draw 300mA (150 each) and the Arduino, probably, another 40mA so the regulator will be overtaxed and will likely shut down.
so is this the only reason why some Arduino projects require external power supply? I am lighting 50 pcs of WS2812 LED's, powered by a 5V/3A adapter. The adapter is hooked up to a breadboard. From there I also supply my Arduino Uno with the same adapter. The code I am using is not demanding, it lites a single LED every now and then. Pretending to snow. So DO I really need two adapters, one for my Uno and one for the LED's (and connect the grounds) or will the above be fine in this case??
The difference is where the power is coming from and how the power is distributed. You have the LEDs and the Arduino connected to the 5V power supply. You are not powering a high current load (LEDs) with the Arduino 5V regulator so you don't need another power supply. The OP has a 10V source that they are plugging in to either Vin or the power plug. The source of all of the current to 5V devices would have to be supplied by the regulator, but the current (with the sensors at 150mA each) is too much for the on board regulator so an external 5V source that can supply the required current is required. It is all about how much current that the on board regulator can supply without overheating.
Thanks, Fungus! That was what I thought -and saw. Good to be sure.
Good luck Lukason!