5
\$\begingroup\$

I've recently gotten interested in electronics and so after doing some reading I've decided to have a go at building my own simple electronics circuit to control a 12V RGB LED Strip with wifi. I've chosen the ESP8266 chip, but at the moment I'm still focussing on getting it all connected.

I have a question and a problem:

About the MOSFETs:

I decided on mosfets after having read rants against the commonly used TIP120s, but for my application do I need to worry about the difference between standard mosfets and logic level mosfets?

I've found these two at local store: IRLZ44N(PBF?) and IRLB8721(PBF?) Apparently one is logic level and one's standard? Which do I use? They're the same price.

Problem with voltage input:

My LED Strip needs 12v, and the breakout board has a voltage regulator on board that takes in 4-6v. This means that I either hook up the strip directly to a 12v supply and find a way to step it down to 5v for the chip, or power the strip directly from 5v and then find a way to step up to 12v for the strip. Which way would you recommend? I assume stepping down is easier.

And with the chip drawing up to 500mA and the strip up to 1A, I don't think a linear regulator like a LM7805 would suffice; would a buck converter like the LM2596 work? Only thing that's stopping me is I've heard that due to the switching nature of buck converters they introduce a lot of noise and input voltage ripples to devices sharing the power supply. Do I need to worry about this if they're both connected to a 12v power supply and in the same enclosure?

enter image description here

EDIT2: Updated Circuit

enter image description here

EDIT1: Links for MOSFET datasheets as requested:

IRLB8721 - https://cdn-shop.adafruit.com/datasheets/irlb8721pbf.pdf

IRLZ44N - http://www.irf.com/product-info/datasheets/data/irlz44n.pdf

\$\endgroup\$
14
  • 2
    \$\begingroup\$ You can get a circuit diagram out of Fritzing. The wiring diagram (as you have posted) is less than useful for understanding a circuit. The wiring diagram is much like having the hardware in front of you. To see what it does, you have to trace it out and draw it again as a circuit diagram. Make things easier for the people who want to help by providing a proper circuit diagram. \$\endgroup\$
    – JRE
    Dec 28, 2017 at 13:34
  • 6
    \$\begingroup\$ What happened to the days when people starting out in electronics would slowly build knowledge by making LEDs turn on, then using buttons and transistors and potentiometers to alter brightness and switch on and off.... Starting at such simple things gives you a great basis to actually learn. All too often you see 'I'm new and my first circuit is a robot that can speak 1000 languages, jump 20m in the air and uses WiFi, bluetooth. Can someone help me cos I'm stuck'...... Ok, maybe that was a bit exaggerated but you get the idea..... Start simple and learn your way through it \$\endgroup\$
    – MCG
    Dec 28, 2017 at 13:40
  • 2
    \$\begingroup\$ @Casper then you are most likely in for a huge amount of problems and issues and will likely struggle to understand why/how some things work or don't work. Without basic practise and knowledge gained, then it really can be a steep upwards battle which tends to put most people off electronics \$\endgroup\$
    – MCG
    Dec 28, 2017 at 15:34
  • 2
    \$\begingroup\$ I think everyone should be learning the basics before taking on circuits. The fact you asked about logic level mosfets shows and input voltages shows this. If you built up your knowledge, then you would probably not need to ask. So Yes, the fact you are already stuck or need answers shows you do need to apply and practise basics. \$\endgroup\$
    – MCG
    Dec 28, 2017 at 16:04
  • 3
    \$\begingroup\$ Kids these days. In my day, LED strips only came in red, and we had to hand-string them with actual wire and solder, and dim them with "micro"controllers we made out of Erector Set linkage, parts from failed Heathkits, and duct tape. We had Arduinos, but they were called Apple II's and cost $2000 so you didn't dare fry one by connecting it to any experiments. We had to ride a horse to Radio Shack, in the snow, uphill, both ways... And we liked it! Seriously, I'm rooting for you OP! \$\endgroup\$ Dec 29, 2017 at 0:19

2 Answers 2

3
\$\begingroup\$

First of all, welcome to the world of electronics. Thanks for uploading a schematic, as it is much easier to read than a diagram. I have a couple suggestions considering your level.

Use low-side gate drivers

The ESP8266 chip outputs 3.3V logic signals that could not turn any standard MOSFET completely on. That being said, there are many great integrated solutions to address this problem such as low-side gate drivers. One great example is the cheap and easy-to-use TC427. It is characterized for 12V operation and 3.3V logic inputs. Use \$ 1 \mu F \$ and \$ 0.1 \mu F \$ decoupling capacitors near the chip and you've got a simple but effective interface between your SOC and the FETS. You'll need two of them to drive three FETs (2 drivers/chip). As for the FET selection, at such a low current (about 333 mA per FET), it does not make a significant difference, although the IRLB8721 does have lower ON resistance and gate charge, which should generally decrease global power loss.

Use a 5V linear regulator

For the sake of simplicity, start with a 3-terminal linear regulator (7805 type). As Transistor said, it is inefficient but manageable at currents below \$ 100mA \$. Switching regulators are complex and should not be built by beginners. Anyhow, typical current consumption for ESP8266 with 1024 packets at -65dBm (much likely your situation) is 62mA, which should dissipate \$ 0.434 W \$ in the linear regulator. Use a proper heat sink to keep it cool. If you plan to transmit with the ESP8266, power will increase and you will need a proper switching regulator (off-the-shelf, do not build one from scratch at this point).

Stay safe

Double check your connections before applying any power. Have fun with this project.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks for your answer! I've found someone who wrote code for a similar application: "When the app starts it will repeatedly send out packets to the network (so all devices on the network will receive them) and listens for a response. It keeps doing this until it receives a response packet with the contents "acknowledged". Because the controller is programmed to respond to every packet with the string "acknowledged" we know that this is our LED controller." I assume then that power will increase beyond what the 7805 can handle? \$\endgroup\$
    – Casper
    Dec 28, 2017 at 15:25
  • \$\begingroup\$ If you are using the SOC to transmit, the chip may use up to 215 mA (1.5W loss in the regulator). Hence, use a good heat sink (10-15 deg/W) to keep the linear regulator at a safe operating temperature. \$\endgroup\$
    – altai
    Dec 28, 2017 at 15:36
  • \$\begingroup\$ Cool! That's really helpful, and makes it even simpler for me. \$\endgroup\$
    – Casper
    Dec 28, 2017 at 15:38
2
\$\begingroup\$

Since the 12 V LED circuit requires the high power it makes sense to optimise the power supply for that. Use a 12 V PSU with current rating > 1 A.

You haven't given a current requirement for the 5 V circuits so you will have to figure this out yourself. e.g., If the required current at 5 V is 0.1 A then a linear regulator (7805 style) power dissipation would be \$ P = VI = (12 - 5)0.1 = 0.7 \ \mathrm W \$. This would be manageable. For higher currents a buck converter would be more efficient.

I've heard that due to the switching nature of buck converters they introduce a lot of noise and input voltage ripples to devices sharing the power supply. Do I need to worry about this if they're both connected to a 12v power supply and in the same enclosure?

This is a problem for audio and analog electronics where the noise disturbs the signals. Digital logic has noise margin built in and is less susceptible to noise than analog signals are. For this application you will be fine provided you follow good wiring practices. Connect the 5 V and 12 V grounds together at only one point.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.