These are chat archives for esp8266/Arduino

4th
Aug 2016
Stavros Korokithakis
@skorokithakis
Aug 04 2016 12:19
hey everyone
i want to pulse an infrared LED from the ESP. right now i have it connected to the 5V input via an nMOS, but the LEDs burn out too easily (I think they may be 1.5V LEDs, but it's a low duty cycle so they are usually ok and produce bright IR light). what is a good way to guard against LEDs burning while still producing bright light?
Martin Ayotte
@martinayotte
Aug 04 2016 13:13
@skorokithakis , like any other kind of LEDs, it need current limiting resistor.
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:13
ah :/
i didn't know that was necessary, alas
Martin Ayotte
@martinayotte
Aug 04 2016 13:14
Hoping you've purchased it in bulk, that would means you have plenty of others
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:15
yep. they were only $0.10 each
i just bought some high-power 5V LEDs as well, and i want to avoid frying them too
do they need resistors as well>
they're 200 mA peak
i don't know their internal resistance to calculate the current without a resistor
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:21
@martinayotte i don't understand why they need resistors... if they're 1.6V LEDs and I give them 1.6V, shouldn't they be fine?
Shelby Merrick
@forkineye
Aug 04 2016 13:38
LEDs are current driven devices, that's just the forward voltage drop.
18 Ohm or so should work if you're feeding it 5V - http://led.linear1.org/1led.wiz
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:41
@forkineye ah, so i just need a resistor to drop the voltage to the appropriate level, right?
Shelby Merrick
@forkineye
Aug 04 2016 13:41
well, to limit the current to it. just put it in series with the LED
200ma is an awful lot for an LED though. you'll need a 2W resistor to bleed off that much from a 5V source
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:42
i will, i'm just trying to understand why, i'm not getting it :/ i think it's the "current-driven device" part that i don't get
@forkineye that's peak, it's 100 mA sustained
Shelby Merrick
@forkineye
Aug 04 2016 13:43
I'd go with that value unless your running it at a low duty cycle
Just plug the numbers in here and you'll be good to go - http://led.linear1.org/1led.wiz
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:44
@forkineye yeah, it's running at a < 50% duty cycle
let me try that calculator again
Shelby Merrick
@forkineye
Aug 04 2016 13:45
@skorokithakis this may help explain it a little better as well. just basic ohm's law stuff - http://www.ohmslawcalculator.com/led-resistor-calculator
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:46
i understand ohm's law, but, from what i know, the LED has an internal resistance, and thus the current is acceptable for its nominal voltage (e.g. 1.6V). i'm wondering why (/whether) i need to add a resistor if i'm already supplying its nominal voltage
Shelby Merrick
@forkineye
Aug 04 2016 13:56
@skorokithakis This may help a little. Once the diode is forward biased the current easily runs away from you. Many things can effect this like thermals, etc... http://electronics.stackexchange.com/questions/76367/accounting-for-led-resistance
Stavros Korokithakis
@skorokithakis
Aug 04 2016 13:57
ah, thank you
Stavros Korokithakis
@skorokithakis
Aug 04 2016 14:06
@forkineye thanks for that, i had no idea what forward/reverse bias meant
by the way, how can there be a breakdown voltage? isn't a diode supposed to not allow reverse current?
Stavros Korokithakis
@skorokithakis
Aug 04 2016 14:11
ugh, now i'm even more confused. this LED datasheet says the LED is 5V but lists forward voltage as 1.35 and reverse as 5V. isn't the forward voltage supposed to be the 5V?
Shelby Merrick
@forkineye
Aug 04 2016 14:28
1.35 is the forward drop. Use that and the rated current for your calculations.
The reverse would be the reverse breakdown voltage and would probably destroy the led if reversed biased that much
@skorokithakis this may help explain forward / reverse a little better than I - http://electronics.stackexchange.com/questions/10962/what-is-forward-and-reverse-voltage-when-working-with-diodes
Stavros Korokithakis
@skorokithakis
Aug 04 2016 15:04
@forkineye thank you, let me read
can you take a look at the datasheet here and tell me if this needs a resistor? :/ http://www.vishay.com/docs/81011/tsal6400.pdf
Shelby Merrick
@forkineye
Aug 04 2016 15:08
@skorokithakis I'd use a 39 Ohm 1W resistor in series with it if you were using a 5V supply. This is based off the 1.35V forward drop and 100ma current rating. If efficiency matters, I'd consider a constant current source for it. What's the end goal?
you could bump the current as well since you're 50% duty cycle, but i wouldn't do it unless you need to
Stavros Korokithakis
@skorokithakis
Aug 04 2016 15:12
@forkineye it's just an IR remote control, it'll be fine with a resistor, i'm just confused because the LEDs were advertised as 5V leds, so i thought they didn't need a resistor
but yeah, from what you linked it seems that all diodes need a current-limiting resistor, otherwise they just let as much current as they can pass through
Shelby Merrick
@forkineye
Aug 04 2016 15:22
If you're buying some, you could grab some 22ohm 2W resistors as well for 200ma if the 100ma ouput isn't strong enough for you. For testing, I'd just stick the lowest value I had on hand that's 39 Ohms and greater.
as the resistance goes up, required wattage rating for heat dissipation goes down, but of course your output gets less as well.
Martin Ayotte
@martinayotte
Aug 04 2016 15:38
@skorokithakis , there is no advertise about 5V in the datasheet you provided, as @forkineye said the 5V is the reverse voltage breakout.
Stavros Korokithakis
@skorokithakis
Aug 04 2016 15:38
this thing is only going to be operating for a second a day, so it's probably good enough. i only got the high-powered leds because i figured they'd be better than the normal ones, and also because they said 5V. as long as they work with a 100 Ohm resistor, i'm okay, thank you
@martinayotte you guys are right, i searched ebay for 5v LED and saw 5mm and confused it with 5V
so yeah, no 5V anywhere. i'll add a suitable resistor, thank you
i'll need to read up on diodes, i don't like not understanding this completely
Mehrdad K
@mkeyno
Aug 04 2016 21:39
hi , does anyone know how can I restore my board setting in Arduino IDE
my all ESP board setting suddenly disappear
I've tried to modified preferences.txt file in Arduino 15 folder but no success yet
any help really appreciated
Stavros Korokithakis
@skorokithakis
Aug 04 2016 23:02
@mkeyno i don't use arduino, i'm afraid :(
you should try platformio instead
Mehrdad K
@mkeyno
Aug 04 2016 23:04
not tried platformio yet but I presume most of folks here use Arduino IDE
Stavros Korokithakis
@skorokithakis
Aug 04 2016 23:04
@mkeyno i would be surprised if most didn't use platformio
Mehrdad K
@mkeyno
Aug 04 2016 23:06
really ? what exceptional capability it has more than Arduino IDE,
Stavros Korokithakis
@skorokithakis
Aug 04 2016 23:08
@mkeyno it requires fewer clicks :P
it has a library manager, autoupdates, easy OTA, a bunch of stuff
Mehrdad K
@mkeyno
Aug 04 2016 23:14
actually I'm suffer from the poor Arduino coding environment and tried to use Eclipse instead ,right know I use notepad++ to edit my code , I really addicted to visual studio environment and this make me suffer to writing code with Arduino IDE , but yet not find any proper substitute of it
Stavros Korokithakis
@skorokithakis
Aug 04 2016 23:15
you can use platformio ide
Mehrdad K
@mkeyno
Aug 04 2016 23:18
have you had any issue with platformio using other library and core such as teeny
Stavros Korokithakis
@skorokithakis
Aug 04 2016 23:18
i haven't used platformio for anything other than arduino and esp, those are the only two i have
Michael Miller
@Makuna
Aug 04 2016 23:20
Arduino has library manager and auto updates. While many here may use platform io, IT IS NOT THE PRIMARY environment. I tried it and the install steps failed several times for me, and I found the editor was awful. I use VS Community to edit, IDE to compile. I have a library and my target audience uses Arduino IDE mostly.
Mehrdad K
@mkeyno
Aug 04 2016 23:24
I've just check the link , and I find ,I installed it long ago , but can't fully remember why discard this platform ,