I've got two unknown LED's connected in series to a 12V source via a 47 Ohm resistor.
Now I would like to power them off 5V, how would I calculate the proper resistor value?
Firstly I think you'll find that resistor value is 470R?
Using the forward voltage from the datasheet at 1.6V, and plugging 12V, 1.6V, 20mA and 2 LEDs into an online calculator like this one you'll find 470 Ohms is the recommended resistor value. Change that voltage to 5V and you'll get 100 Ohms as the new current limiting resistor.
I don't believe in 47 Ohm @ ( 12 V - 2*1.3 V ) This would give 190 mA, far beyond the max 50 mA.
Either the datasheet does not fit, or it's not 12V, or it's not 47 Ohms.
Easiest solution: use a 1k pot, start at 1k, and see when you have sufficient brightness.
If the leds really start shining at about 1.2V and 15 mA is a proper current (according to your datasheet) ,
you can easily run them in series with a 200 .. 300 Ohms resistor at 5V.
Assuming you use 20 mA current and 1.2V forward voltage:
Solution 0: 2 x 1 array uses 2 LEDs exactly
+----|>|----|>|---/\/\/----+ R = 150 ohms
The wizard says: In solution 0:
each 150 ohm resistor dissipates 60 mW
the wizard thinks ¼W resistors are fine for your application
together, all resistors dissipate 60 mW
together, the diodes dissipate 48 mW
total power dissipated by the array is 108 mW
the array draws current of 20 mA from the source.
It works with power supply from 5 v ~ 90 v, never need change resistor when power supply change. plus temperature compensated, the current keep constant when temperature change.
The high quality SSR (solid state relay), use LED driver IC to replace resistor for support variable input voltage 5 v ~25 v to drive optoisolators, other wise if OK with 5 v then 25 v's current is too high. same thing happen with 25 v.
If you use SSR with Arduino, the SSR with led driver IC is the way to go, since if SSR use resistor the current is set at 15 v.
I would place a bet on the outcome that the GPIO pin is actually using PWM and not continuous current if the resistor is only 47 Ohms. A LED can by driven at much higher current when you don't leave it turned on full-time.