High voltage drop on Nano outputs caused by sketch

Here's the signal I see on pin D2 with your original code.

Frequency is around 16KHz, duty cycle around 70%, peak voltage 4.6V, average voltage 4.2~4.3V

Here's signal from D9. Frequency is around 16KHz, duty cycle around 10%, peak voltage 4.6V, average voltage 1.6~1.7V

That's about what I see also.



Thanks again.

You may think the description is enough, but a FULL schematic (EVERY part and how its connected to the "nano" may show factors that havent been considered. Such as supply decoupling or circuit losses.
Are your LEDs all the same type and color? How (physically) are the grounds connected.

what is supplying your 5V?

Hi, @machambers

When everyone can see it.

Tom.... :smiley: :+1: :coffee: :australia:

1 Like

For bench testing it is supplied by the computer USB connection.
In actual use it will be supplied by the DSP processor, a Rane RPM 2m.

If you measure those voltages with a meter you will be reading the average voltage and as your program is generating PWM signals they arent immediately meaningful.
To test the hardware I'd suggest you run a VERY simple sketch just to turn each on in turn with a useful delay, or read in a number and turn on only that LED.
Different LEDs have different forward voltages, so it would be better to measure the voltage levels at the NANO outputs.

When you reference particular equipment its useful to post a link

I have just spent about a week debugging a similar issue using (I think) the same Arduino Nano board as you. Something I came across which did help is the analogReference() function. Check what the default voltage is for your board, it might not be the 5V you expect it to be - it wasn't for me!

There's more info in the arduino documentation about the options for different boards.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.