- Edited
3.9k will be alright. The goal is to obtain a voltage between 2.5V and 3.3V at the digital input of Bela.
A smaller value may not trigger the digital input, while a higher level may break the Beaglebone.
At the same point, you want to keep the current flowing to ground small enough to avoid drawing lots of current for no good reason.
Given this general schematic
V_in-/\/\/--|--/\/\/--gnd
R1 | R2
|
V_out
the first Kirchoff law tells you that
$V_{out} = V_{in} \frac{R_2}{R_1 + R_2}$
The current to ground $I$
is
$ I = \frac{V_{in}}{R_1 + R_2}$
so we can aim at keeping $50000\Omega > R_1 + R_2 > 1000 \Omega $
. A value smaller than $1000\Omega$
would potentially draw too much current, a value much higher than $50000\Omega$
may affect the actual $V_{out}$
value, depending on the input impedance of the digital input.
The values I suggested give the current requirements (giving a total resistance of 6.4k, and a $V_{out} = \frac{4.2k}{2.2k+4.2k} 5V = 3.28V$
.
Your values are also suitable: $R_1 = 2.2k$
and $R_2 = 3.9k$
give a total resistance of 6.1k and a $V_{out} = \frac{3.9k}{2.2k+3.9k} 5V = 3.20V$
.