Wemos D1 mini pro issue. HELP!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Patrinos
New user
Posts: 3
Joined: 04 Apr 2022, 02:23

Wemos D1 mini pro issue. HELP!

#1 Post by Patrinos » 04 Apr 2022, 03:19

I am trying to make my first arduino simple project based on the directions of this video for a gift to my fiancee https://www.youtube.com/watch?v=duiAbLs ... 7n%27Makes

You may watch it so you can understand better.

It uses the app Blynk.

I follow his directions exactly but I made one change: I use a WS2811 led strip with a 12V-1A power supply so I power the LED strip from the power supply by soldering it on the step down converter's inputs.

Long story short, I fried 2 Wemos. Maybe it was my fault because I accidentally put wrong wire to the wrong input. I dont remember tbh.

The connections are fine.

Here was the circuit: Image
Here is the code:

Code: Select all

#include <Adafruit_NeoPixel.h>
#include <SPI.h>
#include <BlynkSimpleEsp8266.h>
#include <ESP8266WiFi.h>
#include <Stepper.h>

#define PIN D2
#define NUMPIXELS 60
#define BLYNK_PRINT Serial

int motorSpeed; 
int motorDirection; 

const int stepsPerRevolution = 4096; 

BlynkTimer timer; 
Stepper myStepper(stepsPerRevolution, 14, 12, 13, 15); 
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

void stepperControl() {
  if (motorSpeed > 0) {
    if (motorDirection == 0) {  // Rotate Clockwise
      myStepper.step(stepsPerRevolution / 50);
    } else {  // Rotate CounterClockwise
      myStepper.step(-stepsPerRevolution / 50);
    }
  }
}

void setup()
{
  Serial.begin(9600);
  timer.setInterval(1, stepperControl);
  Blynk.begin("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXX");
  pixels.begin();
  pixels.setBrightness(55);
}

void loop()
{
  Blynk.run();
  timer.run();
}



BLYNK_WRITE(V0)
{
  motorSpeed = param.asInt();
  myStepper.setSpeed(motorSpeed);
}


BLYNK_WRITE(V2)
{

  int R = param[0].asInt();
  int G = param[1].asInt();
  int B = param[2].asInt();
  Serial.println(R);
  Serial.println(G);
  Serial.println(B);
  for (int i = 0; i < NUMPIXELS; i++) {

    pixels.setPixelColor(i, pixels.Color(R, G, B));

    pixels.show();
  }
}
Here was my first failure:
https://www.youtube.com/watch?v=SOYLV7v2Txo

I gave a shot at it again.

Removed the led strip from the equation, to simplify things.
Bought a new same Wemos.

1) The sketch uploads successfully again.
2) Voltage measurements seem fine before the wemos is connected.
3) When Wemos is connected to the circuit, Voltage across the 5V input of the Wemos as long as positive output of the step down converter becomes about 3.4V (!!!). Even though before wemos, the voltage is at 5V!
4) Stepper driver lights come on except the 4th one. Stepper motor not rotating.
5) Blynk app isn't identifying connectivity from the Wemos so I cant control the motor from there.

Note: When connected from the USB, the lights of the stepper driver dont even light on and serial monitor of Arduino IDE is BLANK!
The connections of the inputs of the stepper driver are correct since I copied them from the tutorial.
Also, the Wemos gets kind of hot.

New simpler circuit:
Image

Here is another video of a failed attempt:

https://youtu.be/URC1zY3y0tY

At my wit's end.
Help.

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Wemos D1 mini pro issue. HELP!

#2 Post by Ath » 04 Apr 2022, 09:00

There are a few issues here:
- Wemos D1 does not allow connection to anything with higher voltage than 5V on any GPIO pin (and even that is a sort of a stretch), better keep that limited to 3.3V
- WS281x series of NeoPixels needs ~70% of VCC on the data in pin to properly accept input steering, for 12V VCC that's ~8.4V, so that's not feasible using a directly connected Wemos
- Most examples have at least 1 resistor in series with the data in pin to the Wemos, to limit the current. Couldn't find that in your drawing

To properly connect things up you will need a level converter (couldn't find a schematic in a quick google search, sorry) to get from the 3.3V GPIO signal level to the 12V signal level needed for the NeoPixels
/Ton (PayPal.me)

Patrinos
New user
Posts: 3
Joined: 04 Apr 2022, 02:23

Re: Wemos D1 mini pro issue. HELP!

#3 Post by Patrinos » 04 Apr 2022, 16:07

Ath wrote: 04 Apr 2022, 09:00 There are a few issues here:
- Wemos D1 does not allow connection to anything with higher voltage than 5V on any GPIO pin (and even that is a sort of a stretch), better keep that limited to 3.3V
- WS281x series of NeoPixels needs ~70% of VCC on the data in pin to properly accept input steering, for 12V VCC that's ~8.4V, so that's not feasible using a directly connected Wemos
- Most examples have at least 1 resistor in series with the data in pin to the Wemos, to limit the current. Couldn't find that in your drawing

To properly connect things up you will need a level converter (couldn't find a schematic in a quick google search, sorry) to get from the 3.3V GPIO signal level to the 12V signal level needed for the NeoPixels
Hi. Thank you for answering and being a good sport.

1) I am not connecting more than 5V. I am connecting exactly 5V. Also, why does the simpler of the circuits (one with one stepper motor) not working then?
2) I've been searching for week and most say Data pin of WS2811 accepts 5V. (one of many examples: https://www.reddit.com/r/led/comments/5 ... _data_pin/)
3) That resistor is optional. Searched and founf it too and it's 33 ohms.

But the real question is:
WHY HIS SIMPLER CIRCUIT WORKS AT A YOUTUBE VIDEO WITH SO MANY VIEWS, AND MINE IS NOT WORKING. THE ONLY DIFFERENCE IS WS2811 AND THE 12V POWER SUPPLY (WHICH IS THE POWER SUPPLY OF THE THAT LED STRIP BTW!). Help?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Wemos D1 mini pro issue. HELP!

#4 Post by Ath » 04 Apr 2022, 16:45

Patrinos wrote: 04 Apr 2022, 16:07 ... THE ONLY DIFFERENCE IS WS2811 AND THE 12V POWER SUPPLY (WHICH IS THE POWER SUPPLY OF THE THAT LED STRIP BTW!)...
As suggested, most likely 'only' that.
I have explained why the LED's can't work, as they need ca. 8.4V or more (70%-100% of 12V) as input signal, but the Wemos GPIO is a) possibly being destroyed by the passive signal that is on that pin, and b) the max. 3.3V it can supply is not enough. Using 5V WS281x LED's may work, or it may not, it depends on the sensitivity/willingness of the LED's. Check this thread: viewtopic.php?t=8996 for a very similar issue.
/Ton (PayPal.me)

Patrinos
New user
Posts: 3
Joined: 04 Apr 2022, 02:23

Re: Wemos D1 mini pro issue. HELP!

#5 Post by Patrinos » 04 Apr 2022, 18:41

Ath wrote: 04 Apr 2022, 16:45
Patrinos wrote: 04 Apr 2022, 16:07 ... THE ONLY DIFFERENCE IS WS2811 AND THE 12V POWER SUPPLY (WHICH IS THE POWER SUPPLY OF THE THAT LED STRIP BTW!)...
As suggested, most likely 'only' that.
I have explained why the LED's can't work, as they need ca. 8.4V or more (70%-100% of 12V) as input signal, but the Wemos GPIO is a) possibly being destroyed by the passive signal that is on that pin, and b) the max. 3.3V it can supply is not enough. Using 5V WS281x LED's may work, or it may not, it depends on the sensitivity/willingness of the LED's. Check this thread: viewtopic.php?t=8996 for a very similar issue.
Ok, even if you're right, that doesnt explain why the simpler circuit, the one with only one stepper motor, doesn't work.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 22 guests