Comments (8)
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.
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.
from lights.
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.
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.
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.
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.
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.
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.
from lights.
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.
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
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.
from lights.
Related Issues (20)
- SK6812 Firmware keeps rebooting/disconnecting. HOT 2
- My diyhue-ESP light is not found by my original Philips Hue Bridge HOT 2
- Entertainment support for FastLED sketches wanted HOT 4
- [beta] Reduce or disable logging to syslog HOT 4
- Arduino nano 33 IoT support HOT 6
- sk6812 gradient HOT 7
- Use SK6812 white LED for better color reproduction HOT 1
- Color change HOT 6
- What Type is Yeelight LED strip? HOT 2
- Change LED Pin HOT 2
- Unable to download and flash via Web HOT 6
- Issues changing individual lights on WS2812 gradient strip via lights API HOT 6
- Web flash tool unable to download firmware HOT 2
- Feature Request: New Sketch: Gradient & Gradient TV RGBCCT HOT 8
- Samsung TV Hue Sync App not working HOT 2
- Hue Gradient led strip type HOT 8
- Self-compiled sketches == reset loop HOT 6
- ESP32/ESP-C3_Controller_Board BOM - CPL HOT 2
- Arduino IDE / Flashing config help needed, just getting resets right now. HOT 29
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lights.