Giter Club home page Giter Club logo

Comments (8)

mariusmotea avatar mariusmotea commented on August 11, 2024

Hi, Check the two transistors in top-right corner:

https://github.com/diyhue/Lights/blob/master/ESP32/ESP-C3_Controller_Board/schematic.pdf

The POWER_MOSFET_PIN is any free GPIO pin you can connect to toogle the mosfet.

GitHub
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.

from lights.

physicsG avatar physicsG commented on August 11, 2024

Thanks for pointing to some documentation :) I feel that for my case it should be simpler as I'm using a Wemos D1 Mini (ESP8266). Do you know of a simpler diagram/use-case?

from lights.

mariusmotea avatar mariusmotea commented on August 11, 2024

You need only Q1,Q2 and R3 from that schematic. You can also try using just one transistor (the power MOSFET) but you will cut the ground in this case (not the +5V power line) and this may result in some 5V returning on the DATA IN pin of the strip directly to ESP8266

from lights.

ryancasler avatar ryancasler commented on August 11, 2024

You could also use a relay instead on the 5v line. This would cause an audible click as a relay is a physical switch. Or you could use a P-channel Mosfet on the 5v line as well.

from lights.

Fisico avatar Fisico commented on August 11, 2024

Keep in mind if you don't use smd mosfets you want to select one with as little internal resistance as possible. Otherwise you need a cooler for it.

from lights.

physicsG avatar physicsG commented on August 11, 2024

Thanks for thinking with me here. Sorry for hijacking an issue tracker for this.

I happen to have an IRF640N, which is an N-channel mosfet. I tried to wire it as follows:

Gate: Connected to digital pin GPIO13 (D7) on the Wemos D1 mini.
Drain: Connected to the negative terminal of my WS2812 LED strip.
Source: Connected to the ground of my power supply.

I'm using the generic WS2812 strip ESP8266 code here: https://github.com/diyhue/Lights/tree/master/ESP8266/Generic_WS2812_Strip

Wiring it normally without transistor works fine and gives me the normal led control. When using the scheme above with the transistor, the first led in my led strip of 18 leds turned on very dimly, but there is no control whatsoever.

What could I be doing wrong? Am I missing a resistor somewhere? The code uses POWER_MOSFET_PIN 13.

GitHub
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.

from lights.

mariusmotea avatar mariusmotea commented on August 11, 2024

First you should measure with a multimeter if D7 pin voltage change from 3.3V to 0V when you toggle the light. This will indicate that everything is ok at ESP level and the firmware and the issue is with the mosfet wiring.

One possible issue, the mosfet will require some ms to close and provide power to the strip, and i think the setup code will be executed with the strip not powered. For this reason using a smaller transistor to drive the mosfet will ensure fast switch.

from lights.

ryancasler avatar ryancasler commented on August 11, 2024

Also, you should be using a resistor to pull the gate to ground when it is not being pushed high by the D1 mini. You can look at this one with regards to how the Mosfet should be wired:
https://github.com/diyhue/Lights/tree/master/ESP8266/Generic_Dimmable_Light

GitHub
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.

from lights.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.