Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ESP8266 control system

Status
Not open for further replies.
It's a simple step-down that lowers the voltage, in my case from 12V to about 2V:


Once you adjust it, it will remain 2V even if for instance you change the supply voltage to 15V or 5V, it will remain constant 2V. I will have to test it tomorrow, see how it behaves. Granted, till now i always used parallel where both things in parallel were always on. I thought that if you add another led in parallel, it will simply mean that the system will use double the power, meaning double the power draw. I mean, i worked like that with fans for years, if u attach 2 fans to the motherboard instead of 1, it always meant they both spin at full power, the same if u connected only 1 ... but you had to be careful since 2 fans in parallel will draw double the power so you have to make sure the 3 pin fan connector on MB can handle it ... I will test it tomorrow and report.
 

Visitor

Well-Known Member
The maximum voltage ESP8266 pins can handle is 3.3 volts (there is strong evidence the I/O pins are actually 5volt tolerant – a forum post by Expressif stating so – but that's a discussion for another time), so you can't connect your LEDs to greater than 3.3 volts and switch them with an open-drain output to ground. That pin will see 12 volts or whatever voltage the LEDs are connected to when they are off.

Connect the LEDs (via resistors) to 3.3 volts and switch to ground (output pin low) or connect them between ground and the port pin (pin high turns them on).
 
Ah, my mistake, if i said that. Anyway i intend to connect the LEDs to 3.3V pin on my esp8266 board no matter what. Forget what i said about 12V ... i meant it as an example for step-down, that, or i simply meant 3.3V. Anyway, i plan to power the LEDs by either IO pin or 3.3V pin and i plan to use either step-down or resistor to lower the voltage to 2V. So it will be 2V no matter what. The only problem is, like i said, the lack of proper resistors. Step-down would make this a lot simpler because i can simply adjust voltage first to 1.8V .. and measure how much current goes through the LED .. and then i adjust the voltage further until it is 5mA. I will hand pick the LEDs with the same resistance, or as close as possible, obviously they will all be of the same color and type. The only question is ... will LEDs light different when only 1 is on as opossed to when 3 are on. I will check tomorrow in anycase, i am happy to burn 3 LEDs for the sake of learning something new :)
 

gophert

Well-Known Member
Most Helpful Member
By the way, it is completely safe to parallel 3 LEDs u8ng one resistor IF, ?IF, IF, your total current For all three LEDs is Less than the Rated current of each LED. The concern is thermal runaway and that cannot happen with such low currents. I commonly use 3 red LEDs in parallel at 1 to 3mA, these indicator LEDs are rated for 20mA each.
But, But But, the three LEDs may have slightly different brightness.
 

Visitor

Well-Known Member
By the way, it is completely safe to parallel 3 LEDs u8ng one resistor IF, ?IF, IF, your total current For all three LEDs is Less than the Rated current of each LED. The concern is thermal runaway and that cannot happen with such low currents. I commonly use 3 red LEDs in parallel at 1 to 3mA, these indicator LEDs are rated for 20mA each.
But, But But, the three LEDs may have slightly different brightness.

The big IF is IF Vf is well matched. Connect an RGB LED (3 LEDs in one shell) in parallel via a signal resistor and guess what you get?

RED. No green or blue. Vf of the red LED is about 2.2v. Vf for the green and blue is around 3.3v. The red LED illuminates and clamps the voltage to 2.2v and the other LEDs can't turn on.
 

gophert

Well-Known Member
Most Helpful Member
The big IF is IF Vf is well matched. Connect an RGB LED (3 LEDs in one shell) in parallel via a signal resistor and guess what you get?

RED. No green or blue. Vf of the red LED is about 2.2v. Vf for the green and blue is around 3.3v. The red LED illuminates and clamps the voltage to 2.2v and the other LEDs can't turn on.
Yeah, the same LEDs was implied when I sad Three RED LEDs. I forgot I was talking to engineers - I am happy to fill your daily need to find an sliver of ambiguity in an instruction.
 

Visitor

Well-Known Member
Yeah, the same LEDs was implied when I sad Three RED LEDs. I forgot I was talking to engineers - I am happy to fill your daily need to find an sliver of ambiguity in an instruction.

Pardon the hell out of me. Since this poster seems to have a limited understanding of how LEDs work, I was trying to provide a better understanding.
 
Alright, thank you for the replies. My knowledge is indeed limited and i am learning as i go. As i said, the sole reason i was asking about leds in parallel was the fact that i need it in 2 weeks and aliexpress means 2 months, which is not an option. But in the meanwhile i found a local shop with resistors and will buy them there tomorrow, so i do plan to give each led its own resistor.

But as i really like experiments, i made a simple experiment with step-down. I plan to use 3 green LEDs but in this case i only used 2 to make things simpler. I used 4 multimeters: 1 for voltage and 3 for current: the far right measures current going into the step-down and the other 2 amps measure how much current goes into each LED. Sadly my multimeters are cheap so they only show as low as 10mA, so because usage of each LED is jumping between 0 and 10mA, i can assume its usage is somewhere under 10mA, which is good enough for me. Now as you see, there is no visual difference when i connect 1 or 2 LEDs. Another interesting thing, if you noticed .. when i connect the second LED, the voltage at the step-down output seems to rise very slightly and when only 1 LED is connected, it drops slightly.

One thing that i didn't remember when planning to use step-down is that in order to power the step-down i need to connect both ground and 3.3V to it. And that is a problem since i want the LEDs ground to be IO pins in sink mode. So that wouldn't work anyway.

What i am really interested in is how will the result differ when i use 1 resistor between 3.3V pin and + pins of all 3 LEDs and grounds from them going into a separate IO pins.

I know LEDs of same color can have different resistance and you have to match them as close as possible. Though since i am using such low current of 5mA, the difference between 2 LEDs of same color would have to be gigantic, to somehow draw deadly current of more than 20mA into 1 of them. But since its parts from aliexpress, you never know :) Btw, the way i did things till now using step-down and LEDs ... i never bothered with what voltage the LED needs, i only kept in mind the max current it can handle. So i would start as low as 1.5V ... and if i wasn't happy with the current flowing, i would slowly raise the voltage value until i got 5-10mA per LED.

Now to clarify, in the end i plan to use a separate resistor for each LED, that is, 3 resistors together. But i am really interested how the thing would act with 1 resistor. I will include my findings here when i do them. For now, i included this interesting video.

 

audioguru

Well-Known Member
Most Helpful Member
You never said the voltage (color) of your LEDs. Red is 1.8V to 2.2V and white and blue is 3.0V to 3.6V.
LEDs are not made identical. Some white ones are 3.0V and other white ones are 3.6V and if they are in parallel then only the one with the lowest voltage will light. I have a cheap Chinese flashlight with 24 LEDs in parallel so they must have paid somebody to test them all and group them into piles having identical voltages.
 

audioguru

Well-Known Member
Most Helpful Member
An LED must NEVER be powered directly from a voltage without having a series current-limiting resistor. Your experiment used the resistance of the current-meter and wires. My cheap flashlight used the resistance of the cheap battery and the LEDs nearly burned out when I used a modern battery without adding a resistor.

One of your meters showed 1.4 something. An old green LED was about 2.2V and a modern green LED is 3V to 3.6V like a white LED so your 1.4V could not be the LED voltage.
 
1.4V is the voltage output of step-down. If i went as high as 2.2V, i would prolly get the full 20mA per LED.

As for current limiting, i never knew that. I was sure that if u set the voltage low enough, that will limit the current. Anyway, i am going to pick up the resistors in an hour and each LED will get its own resistor.
 

Nigel Goodwin

Super Moderator
Most Helpful Member
1.4V is the voltage output of step-down. If i went as high as 2.2V, i would prolly get the full 20mA per LED.

As for current limiting, i never knew that. I was sure that if u set the voltage low enough, that will limit the current. Anyway, i am going to pick up the resistors in an hour and each LED will get its own resistor.

You don't need the step-down, in fact you shouldn't really use a step-down, it's quite a bizarre idea?. LED's are current driven, and MUST be current limited, so a voltage regulator really has no use at all.

It's really VERY, VERY simple - you just need LED's and series resistors - and either source or sink current with the I/O pin's, it makes little difference which way you do it. 'Personally' I'd usually source the current, unless there was some reason not to - such as a small keypad with LED that I've just been playing with, both the keys and the LED share a common positive rail, so require the I/O pin to sink the LED current to light the LED.
 

Pommie

Well-Known Member
Most Helpful Member
Most micros (ESP included) I/O pins seem to be able to sink more current than source so active low seems to be the way to go. Personally, with modern LEDs I find 20mA far too bright and run indicator LEDs at ~1mA. With a 3.3V supply you need to drop ~ 1V so for 20mA you need ~ 50 ohm and for 1mA ~1k.

Mike.
 

audioguru

Well-Known Member
Most Helpful Member
Your video shows your green LED lighting when powered directly from 1.4V and you guess it will be bright at 20mA when it is fed 2.2V. But look at this graph that shows my LED is dim at 1.6V and is burning out at 1.8V. You need a series resistor to reduce the sensitivity to voltage changes:
 

Attachments

  • LED voltage and current.gif
    LED voltage and current.gif
    38.2 KB · Views: 49
I used a 150 ohm resistor, i was using 3.3V pin on esp8266 board. My multimeter wasn't able to detect the current, granted it will only show as low as 0.01A. But it stayed at constant 0.00A, only jumping to 0.01A every 5 seconds or so. The LED is plenty bright for my needs, i could even make it less bright but its ok for now.
 
Status
Not open for further replies.

Latest threads

Top