I am pretty new to electronics and trying to learn some basics. What I am having trouble with is how to figure what resistor value to use. I'll put links in to the data sheets of the parts I am using. If someone could explain the formulas I'd greatly appreciate it. Here is the setup I have... I have an MCU that produces 3.3V and max rating of 20mA. I really want to stay between 5mA - 10mA on each pin. What I would like to do is use the MCU + tinyled + solid state relay (which has small led in it) + resistor (or maybe no resistor?).
So we have 3.3V to work with.
The led I was thinking of using 550-1304 on this datasheet.
Then in series with this solid state relay.
So here is what I got to but I don't know if it is correct or not:
3.3V - 1.8V (Vf of the led) - 1.15V (Vf of led in SSR) = 0.25V (So my resistor needs to handle 0.25V?)
3mA is needed to activate the SSR, and it looks like 2mA is needed to make the led light up, so I am guessing 5mA.
I then took that for the Ohm's law formula, R = V / I which I did this: R = 0.25 / 0.005, R = 50. Is this the correct way to do it? And I am hooking these up in series, how do I know that the led is going to get 2mA and the SSR 3mA and that they don't share it equally i.e. both get 2.5mA? How do I determine how much each component uses? Also is this the correct formula to figure out what I need? I was trying to keep my part count down and not have to throw in a transistor if possible since the pins seem capable of driving the 5mA load. Some insight and general how you figure it out info would be great to see. Thanks!!