[image] jimmyjr2023: For examples: a 5v led and a travel servo A LED doesn't care about PWM frequency, but your vision could. If you get below a certain frequency, you get flicker. But that happens below 30Hz. 500Hz or 1kHz won't make a diffference. Servos use a special 50Hz PWM signal tha…

Answer from Wawa on forum.arduino.cc
🌐
Arduino Forum
forum.arduino.cc › community › website and forum
Arduino Nano and PWM pins - Website and Forum - Arduino Forum
November 22, 2011 - I have some confusion about PWM pins given the information from your page: http://arduino.cc/en/Main/ArduinoBoardNano There, in the Input and Output section it says, "PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function." However, pin 3 is Reset.
🌐
Arduino
support.arduino.cc › hc › en-us › articles › 9350537961500-Use-PWM-output-with-Arduino
Use PWM output with Arduino – Arduino Help Center
October 31, 2024 - While some boards have additional ... pins noted above, the MKR, Nano 33 IoT, and Zero boards have true analog output when using analogWrite() on the DAC0 (A0) pin....
Discussions

The Different of Generating PWM Frequency in Arduino Board

🌐 forum.arduino.cc
1
August 29, 2023
"The pin parameter is the pin number which must be capable of generating PWM signal. For Arduino Nano or Arduino UNO the PWM pins are 3,5,6,9,10 and 11. The pins 3, 9, 10 and 11 generates PWM frequency of 490Hz and pins 5 and 6 generates PWM frequency of 980Hz. More on forum.arduino.cc

Fast PWM for the Arduino Nano Every

🌐 forum.digikey.com
March 28, 2024
Which Arduino Nano Every I/O pins may be used for PWM outputs? The Arduino Nano Every is designed for five PWM outputs using pins D3, D5, D6, D9, and D10. The PWM signals are developed using the analogWrite( ) function. … More on forum.digikey.com

arduino nano pwm

🌐 forum.arduino.cc
January 18, 2016
Hi all I want use nano generate pwm to uno but I start in electronic and arduino.Please guide me for circuit and program. Thank you. More on forum.arduino.cc

How to control the PWM output of the Nano

🌐 forum.arduino.cc
May 14, 2023
I'm trying to control the speed of a PWM fan (4 wire, DC brushless motor with a PWM wire). The PWM pin of the Arduino will connect to the PWM wire of the fan, and the 2 power wire would connect to the battery. There is another tacho wire that won't be used. My question is, how do I actually ... More on forum.arduino.cc
🌐
Wikifactory
wikifactory.com › @shahbaz75sb › arduino-nano-pins
Arduino Nano pins | Overview
Experience the power of our cloud PDM and collaborative CAD viewer, integrated with on-demand manufacturing. Built for engineers, designed for everyone.
🌐
Arduino Forum
forum.arduino.cc › other hardware › motors, mechanics, power and cnc
The Different of Generating PWM Frequency in Arduino Board - Motors, Mechanics, Power and CNC - Arduino Forum

[image] jimmyjr2023: For examples: a 5v led and a travel servo A LED doesn't care about PWM frequency, but your vision could. If you get below a certain frequency, you get flicker. But that happens below 30Hz. 500Hz or 1kHz won't make a diffference. Servos use a special 50Hz PWM signal tha…

Answer from Wawa on forum.arduino.cc
🌐
DigiKey
forum.digikey.com › maker, diy › arduino
Fast PWM for the Arduino Nano Every - Arduino - DigiKey TechForum - An Electronic Component and Engineering Solution Forum
March 28, 2024 - Which Arduino Nano Every I/O pins may be used for PWM outputs? The Arduino Nano Every is designed for five PWM outputs using pins D3, D5, D6, D9, and D10. The PWM signals are developed using the analogWrite( ) function. …
🌐
Arduino Forum
forum.arduino.cc › other hardware › 3rd party boards
arduino nano pwm - 3rd Party Boards - Arduino Forum
January 18, 2016 - Hi all I want use nano generate pwm to uno but I start in electronic and arduino.Please guide me for circuit and program. Thank you.
🌐
Arduino Forum
forum.arduino.cc › projects › general guidance
How to control the PWM output of the Nano - General Guidance - Arduino Forum
May 14, 2023 - I'm trying to control the speed of a PWM fan (4 wire, DC brushless motor with a PWM wire). The PWM pin of the Arduino will connect to the PWM wire of the fan, and the 2 power wire would connect to the battery. There is a…
Find elsewhere
🌐
Arduino Forum
forum.arduino.cc › projects › general guidance
7th PWM pin arduino nano? - General Guidance - Arduino Forum
June 3, 2022 - Good morning everyone, I'm using my arduino nano for a project featuring all 6 pwm pins to control independently led lines (unfortunately yes, i cannot work with integrated led panels with a separated controller for each led color PWM regulation, i have to control them independently from the ...
🌐
Arduino
store.arduino.cc › collections › all but arduino alvik › arduino nano
Arduino Nano – Compact ATmega328P Board with 14 Digital & 8 Analog Pins
Arduino Nano
The Arduino Nano is a small, complete, and breadboard-friendly board based on the ATmega328 (Arduino Nano 3.x). It has more or less the same functionality of the Arduino Duemilanove, but in a different package. It lacks only a DC power jack, and works with a Mini-B USB cable instead of a standard one. Related Boards If you are looking for a Nano board with similar functionality but also provide additional features, check:  Arduino Nano 33 BLE Arduino Nano 33 BLE SENSE Arduino 33 IoT Arduino Micro Getting Started Find inspiration for your projects with the Nano board from our tutor
Price: €27.10
🌐
Kevin's Blog
emalliab.wordpress.com › 2022 › 01 › 23 › arduino-nano-every-timers-and-pwm
Arduino Nano Every Timers and PWM – Kevin's Blog
November 8, 2022 - These map onto the three output pins for the port as specified by TCBROUTEA – which is PORTB by default for the Nano Every. There is also a “split mode” operation which turns the timer into two 8-bit timers, each with their own three CMPn registers and each able to drive three output ...
🌐
Reddit
reddit.com › r › arduino › comments › 1juvge9 › does_the_arduino_nano_and_arduino_uno_have_the
Does the Arduino Nano and Arduino Uno have the same ...
If the Arduino Uno have the mapping of 3,5,6,9,10 and 11, The pins 3, 9, 10 and 11 generates PWM frequency of 490Hz and pins 5 and 6 generates PWM frequency of 980Hz... how about the Arduino Nano? some forum says that D3, D5, D6, D9, D10, D11 but the D3 pin are used for the reset button?
🌐
Arduino Forum
forum.arduino.cc › projects › general guidance
What can cause PWM pins 9,10 not to work on an Arduino nano? - General Guidance - Arduino Forum
July 27, 2016 - I'm using cheap nanos, but they seem consistently not to do PWM on pins 9 and 10. Pins 3 and 6 work fine. The spec says: PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function. I've trie…
🌐
Quora
quora.com › Does-Arduino-Nano-have-PWM
Does Arduino Nano have PWM? - Quora
Answer (1 of 2): Indeed, although the board is smaller, it uses a SMD version of the same processor used on the Uno. From the Arduino reference:
🌐
Arduino
arduino.cc › en › Tutorial › SecretsOfArduinoPWM
Secrets of Arduino PWM | Arduino
Open-source electronic prototyping platform enabling users to create interactive electronic objects.
🌐
Best Microcontroller Projects
best-microcontroller-projects.com › home › arduino hardware › arduino nano pwm pins
Arduino Nano PWM pins
Arduino Nano PWM pins: Eight things you must know about PWM pins including how they affect timers.
🌐
Stack Exchange
arduino.stackexchange.com › questions › 8321 › issue-with-pwm-output-pin
analogwrite - Issue with PWM output pin - Arduino Stack Exchange

Added at top:

Your code runs correctly on a $US3 Arduino Nano :-)

It seems extremely likely that you have a hardware problem of some sort.

If you have a voltmeter you can try these easy checks.
I carried these out to be sure that I got what was expected and the results are as you would expect them to me. Use a meter set to DC Volts - typical common meter circuitry averages the PWM well.

  1. Remove LED etc connection to pin 9.
    Measure the voltage from the 5V pin to ground. If powered from USB this will usually be slightly below 5V.

  2. Run your code with the analogWrite set to 128 ie

    analogWrite(pinNine, 128);

  3. Measure the voltage on pin 9 relative to ground. It should be close tohalf the voltage on the 5V pin in 1. above. This is because the analogWrite value is controlled by PWM with values from 0 to 255. 128/255 ~= 50% so output is 50% of Vref = 5V by default. in a 5V system.

  4. Set analogWrite to

     analogWrite(pinNine, 25); 
    
  5. The voltage on pin9 should be about 10% of the voltage on the 5V pin.

IF you get approximately the voltages shown in 3. and 5. your code is working OK and your hardware is OK. If not then 'summat aglae'.

Try another analog pin.

Check that the red wire to the LED goes to UNO ground.

The voltmeter is a surer way of checking that the LED is as you can see actual numeric values that result.


OLDER:

It always helps greatly if you show PIN IDs on photos so people can be confident re what you have done.

If you view the whole UNO-R2-R3 connector with numbering it is obvious that the important pinouts are the same. If however you view part of the connector with no numbering/ pin names shown, then on the R3 there are additional pins on the ARef end of the connector which make comparisons'more difficult).

You APPEAR to have an Arduino UNO R3
It would help if you gave actual model and weblink in future "just in case it matters". .

You appear to have connected to pin 9 (as you intended to) Pin 9 has PWM capability, as required. It seems that your code should work.

Thusly

IF the red wire connects to ground the circuit seems electrically correct.
Does it?

Code LOOKS OK.

Try digital write on / off on pin 9 to see if LED changes and that the port behaves as expected. A bad port pin is possible.

What pin is serial on?

Try another pin with PWM capability to see if it changes.


ARDUINO UNO R3 from UNO home page

The connector pinouts vary widely between models of UNO.

Answer from Russell McMahon on arduino.stackexchange.com
🌐
Stack Exchange
arduino.stackexchange.com › questions › 37105 › arduino-nano-pwm-pin-not-functioning
Arduino Nano PWM pin not functioning - Arduino Stack Exchange

Try to replace #define E1 3 with #define E1 PD3 and see if that helps.

The PBx, PCx and PDx designations are unambiguous, so using those are pretty much a safe bet.

Answer from Dampmaskin on arduino.stackexchange.com
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Read PWM duty from a pin and write PWM to a pin - Programming - Arduino Forum
November 26, 2021 - Hello I've been messing with a Arduino nano to get analogWrite(); command right to work. Arduino nano reads PWM input on a pin 3. Then through the forumulas it calculates the input duty cycle. Then with the duty cycle I want to control the output pin PWM duty cycle.
🌐
Reddit
reddit.com › r/arduino › arduino nano esp32 pwm pins
Arduino Nano ESP32 pwm pins : r/arduino
October 12, 2023 - 715K subscribers in the arduino community. An unofficial place for all things Arduino! We all learned this stuff from some kind stranger on the internet. Bring us your Arduino questions or help answer something you might know! 😉