fablabnbg / OpenWordClock

GNU General Public License v3.0
22 stars 6 forks source link

Resistors? #1

Closed jnweiger closed 8 years ago

jnweiger commented 8 years ago

The readme mentions appropriate resistors. What are appropriate values? Would it work without resistors too? Would save much work, if the controller survives.

eskaista commented 8 years ago

150Ohm

faheus commented 8 years ago

Depends on quantity of LEDs, on bigger clocks You might use lower resistance.

jnweiger commented 8 years ago

I'd calculate like this: Power supply Vcc = 5V Voltage drop per LED Vled = 2V Atmega328 Imax = 40mA

R = (Vcc - Vled) / Imax = (5V-2V)/0.04A = 75 ohm.

Taking Ri the internal resistance per GPIO pin into account, we only need to implement the remaining Rext for R = Ri + Rext. The Atmega328 datasheet mentions a Voltage drop/rise of ca 1V when draining/sourcing 20mA on a GPIO pin. Thus Ri = 1V/0.02A = 50 ohm.

A value of Rext = R - Ri = 75 ohm - 50 ohm = 25 ohm is sufficient. It is possible that no damage is done with Rext = 0 ohm.

jnweiger commented 8 years ago

I understrand that often LEDs die. My assumption was that there are always enough LEDs in parallel to drain all the currrent that the controller provides. In reality, this does not work. Stick to the resistors.