Hello!
I have a Genuino UNO.
I am having trouble with unstable voltage output when using pin 9.
This is my program
void setup() {
pinMode (9,OUTPUT);
}
void loop() {
analogWrite(9,255);
}
When I am measuring between pin 9 and GND, I am getting 4,85vDC or 5,15vDC, just depends on what time on the day I am measuring... It's not unstable when I'm measuring it, so either 4,85 or 5,15vDC.
I am using my USB cable from my computer, which I'm measuring a stable 5,22vDC.
I've done some tests now, and when I am connecting pin 9 and GND to my 0-10v PWM converter, I am getting even lower voltages.
For example:
When I have 5,15vDC on pin and GND, I am getting 4,85 when I connect them to the converter.
Your controller does not have any analog output. What you measure is the 5V supply voltage. Dunno what makes that voltage differ from the USB supply voltage, a scope may reveal more details.
Voltage from PC via USB goes thru a PTC Resettable fuse, which has a finite resistance. Current thru the resistor creates voltage which feeds the VCC pin, which then goes thru an output drive transistor, which also has a resistance (Rds) when turned on.
So, the voltage you see will be lower than what the PC outputs, and will vary by the amount of current draw by the board overall, and by the specific output load.