Arduino output pin from 5V to 3.3V I just have a question regarding Arduino output-pins and Voltage divider, because I am getting other results than what my calculations are giving me.

I have measured the output-pin (from the Arduino) at 4.74V, according to my caulculations I will have and output voltage of 3.39V, with R1 = 4k ohm and R2 = 10k ohm, but when I use my multimeter to measure I read a voltage of 0.97V.

I have tested with a 9V battery, measured to 8.72V. With the same resistors, the calculations gives me 6.23V as output, when I use my multimeter I can read a output of 6.21 which I consider as ok.

So my question is, why is my output from the Arduino only 0.97V with the voltage divider?

For information: I am using Arduino OSEPP Uno R3 Plus.

Hope someone can give me helpfull information.

***************************************update********************************************

My code:

int echoPin = 7;
int trigPin = 6;

int SignalPin = 10;

void setup(){

  pinMode(echoPin, INPUT);
  pinMode(trigPin, OUTPUT);

}

void loop(){

  float distanceCentimeters;
  int pulseLenMicroseconds;

  digitalWrite(trigPin, LOW);
  delayMicroseconds(20);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(100);
  digitalWrite(trigPin, LOW);

  pulseLenMicroseconds = pulseIn(echoPin, HIGH);

  distanceCentimeters = pulseLenMicroseconds / 29.387 / 2;

  if(distanceCentimeters &lt;= 35 &amp;&amp; distanceCentimeters &gt;= 10){

      digitalWrite(SignalPin, HIGH);

  } else {

      digitalWrite(SignalPin, LOW);

  }

  delay(400);

}


Image of the setup (not with Raspberry Pi).
Your code does not configured SignalPin as an output, but only trigPin.

As already explained in comments, your observed voltage is due not really to the voltage divider you constructed, but rather one formed by the "weak" internal pull-up resistance and your external resistors.  From your measurement, it appears the value of the weak internal pull-up is about 35K, which is within the range of expectations.  That and your 4K external form the top of the divider (39K) while your 10K forms the lower half, yielding about a fifth of the supply voltage.

In some versions of the Arduino library, writing to an input pin enables and disables the internal pull-up resistor, so you could have observed your program seeming to control the pin - but at minimal drive strength.

To get the desired behavior, you merely need to add

pinMode(SignalPin, OUTPUT);