FAQ
TL;DR: For Arduino Nano LED control, power source choice doesn't change 5 V PWM; "does not matter for PWM." Logic‑level MOSFETs can fully turn on near 2 V. Use USB 5 V for efficiency; VIN adds heat from the regulator. [Elektroda, kaczakat, post #17923685]
Why it matters: This helps DIY aquarium‑lamp builders avoid dimming and overheating while wiring Nano power and PWM drivers.
Quick Facts
- VIN recommended input is typically 7–12 V; the onboard linear regulator drops everything to 5 V. [*Arduino Nano Tech Specs*]
- PWM outputs remain 5 V logic whether you power via USB or VIN; PWM is not 12 V. [Elektroda, snow, post #17923629]
- Per‑pin current: 20 mA recommended, 40 mA absolute max; excess load sags voltage and risks damage. [*ArduinoPinCurrentLimitations*]
- Measured in thread: 4.77 V at PWM 255 on USB vs 4.98 V on VIN; lamp still ~98 W. [Elektroda, pdzran, post #17924132]
- “There are logic level mosfets … that open fully already at 2V”; pick logic‑level parts. [Elektroda, kaczakat, post #17923685]
Can I power an Arduino Nano via mini USB or VIN for PWM LED control?
Yes. PWM output stays 5 V logic regardless of USB 5 V or VIN input. Use USB 5 V when possible to reduce regulator heat. Using VIN is fine within spec, but it will not boost PWM amplitude. Select the input based on thermal budget and wiring convenience. [Elektroda, kaczakat, post #17923685]
Will 12 V on VIN make PWM 12 V or brighten my LEDs?
No. VIN at 12 V does not change PWM to 12 V; PWM remains a 5 V logic signal. Drive high‑current LEDs with a transistor or MOSFET, not directly from the pin. “Devices that draw large currents are best controlled by a transistor.” [Elektroda, snow, post #17923629]
What VIN voltage is safe, and when should I prefer USB 5 V?
Typical VIN is 7–12 V. The linear regulator drops VIN to 5 V, creating heat. Prefer USB 5 V when the board and sensors draw noticeable current. Use VIN when only higher‑voltage power is available, and ensure ventilation for the regulator. [Arduino Nano Tech Specs]
How much current can an Arduino pin safely drive for LEDs?
Use 20 mA per pin as a design limit; 40 mA is absolute maximum. Exceeding those limits causes voltage droop and can damage the MCU. Aggregate current across ports also matters, so switch LED loads with transistors or MOSFETs. [ArduinoPinCurrentLimitations]
My LEDs get brighter when I unplug PWM. What does that indicate?
Your PWM path is current‑limited. The MCU pin or driver cannot supply the required current at full duty. Use a proper transistor or MOSFET stage to switch the LED current, and keep PWM as a logic‑level control only. [Elektroda, snow, post #17923725]
I saw 4.77 V at PWM 255 on USB and ~4.98 V on VIN. Why?
Your 5 V source quality differs. The USB supply likely sagged under load or regulation. Switching to VIN used the Nano’s regulator, which held the logic rail nearer 5 V. Note the lamp power stayed ~98 W in that test. [Elektroda, pdzran, post #17924132]
How do I verify PWM is really 5 V at 100% duty with a multimeter?
Try this simple check: 1. Temporarily set the PWM pin with digitalWrite(pin, HIGH). 2. Measure between the pin and GND with a DMM. 3. Expect near 5.0 V; if low, reduce load or add a driver stage. [Elektroda, kaczakat, post #17923701]
Which transistor or MOSFET should I use to switch 3 W LED channels?
Use logic‑level MOSFETs with low Rds(on) at 4–5 V gate drive. Avoid MOSFETs that need 10 V gate to fully enhance, or they will run hot and dim LEDs. “Logic level mosfets … open fully already at 2V.” [Elektroda, kaczakat, post #17923685]
Is a 500 mA phone charger enough to power a Nano for PWM control?
Yes. A 500 mA USB charger is sufficient for the Nano and light logic loads. Do not power LED currents from the pins; switch them with transistors and supply LEDs from a suitable driver. Keep grounds common. [Elektroda, kaczakat, post #17923605]
Do I need a common ground between the Nano and the LED power/driver?
Yes. Tie Nano GND to the LED driver or power supply ground so the PWM reference matches. Connect PWM to the driver input and keep load current off the MCU pins. [Elektroda, kaczakat, post #17923605]
What is the Nano’s PWM frequency, and does it affect LED drivers?
On ATmega328P boards, PWM is typically ~490 Hz on most pins and ~980 Hz on pins 5 and 6. Some LED drivers prefer particular frequencies; if needed, adjust timers or choose pins accordingly. [Secrets of Arduino PWM]
How do I troubleshoot dim output at PWM 255 with a large supply?
Confirm 5 V at the PWM pin at 100% duty. Add a logic‑level MOSFET to offload current. Ensure your LED driver can deliver the rated current. If LEDs brighten without PWM, your PWM drive path is limiting current. [Elektroda, snow, post #17923725]
Is it safe to power other modules from the Nano’s 5 V pin?
Keep external loads modest. The USB port and on‑board regulator have limits, and the MCU pins cannot supply high currents. Do not exceed a few hundred milliamps on 5 V, and never source significant current from I/O pins. [Elektroda, kaczakat, post #17923605]
Why didn’t my wattmeter rise when PWM rose from 4.77 V to ~4.98 V?
Your LED power is set by the LED driver and load, not tiny PWM amplitude differences. In the thread, power stayed near 98 W despite higher PWM pin voltage. Correct switching and drivers matter more than small logic‑level changes. [Elektroda, pdzran, post #17924132]