Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Help with a wemos D...
 
Share:
Notifications
Clear all

Help with a wemos D1 mini pro project!

4 Posts
2 Users
0 Likes
294 Views
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  
#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();
}
}

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

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:

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:
 

Here is another video of a failed attempt:

[url] https://youtu.be/URC1zY3y0tY [/url]

At my wit's end.
Help.

 


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

It is a lot to digest - but compliments on the very complete info ...

I will admit that I haven't watch all 3 videos.
p.s. the last one won't play.

 

Now, looking at your drawing, my first gut feeling tells me you Power supply may not be adequate ...
I'm just guess, since I do not know anything about the step-down efficiency, but the 12V LED strip, assuming it 29 LEDs (correct?) then I'd have to guess that 12V/1A is not sufficient. If I recall correctly, each LED block draws up to 60mA. So ... 29 LEDs x 60mA = 1740 mA = 1.74 A ... granted, that would be all LEDs op max brightness white. But you only have 1A, and the step-down converter + Wemos + stepper motor will needs some as well.

Suggestion: try this entire setup without the LED strip. Simply disconnect it completely, and see if the rest works.
If it does, then we know for sure: power isn't sufficient.
If it still doesn't work, then we may not have learned much, since we do not know the power loss of conversion. But hopefully it will show us something.

The Wemos getting hot could also be an indication that too much power is being pulled from it.
For that reason: Caution - as this may blow up your 3rd Wemos. 😱 

Also: I'd highly recommend using a 5V power supply, and no step-down.
Ans of course: try each individual component first before combining.

I'd start with just the Wemos, don't wire anything else yet.
If all seems fine (you may not know 100% for sure of course), I'd connect the stepper driver and motor.
If that works: feel if the Wemos is still getting hot. 
If all this works, then you know again that the power draw from the LED strip may be too much.

I hope this helps a little bit.


ReplyQuote
 Anonymous
Joined: 53 years ago
Posts: 0
Topic starter  
Posted by: @hans

It is a lot to digest - but compliments on the very complete info ...

I will admit that I haven't watch all 3 videos.
p.s. the last one won't play.

 

Now, looking at your drawing, my first gut feeling tells me you Power supply may not be adequate ...
I'm just guess, since I do not know anything about the step-down efficiency, but the 12V LED strip, assuming it 29 LEDs (correct?) then I'd have to guess that 12V/1A is not sufficient. If I recall correctly, each LED block draws up to 60mA. So ... 29 LEDs x 60mA = 1740 mA = 1.74 A ... granted, that would be all LEDs op max brightness white. But you only have 1A, and the step-down converter + Wemos + stepper motor will needs some as well.

Suggestion: try this entire setup without the LED strip. Simply disconnect it completely, and see if the rest works.
If it does, then we know for sure: power isn't sufficient.
If it still doesn't work, then we may not have learned much, since we do not know the power loss of conversion. But hopefully it will show us something.

The Wemos getting hot could also be an indication that too much power is being pulled from it.
For that reason: Caution - as this may blow up your 3rd Wemos. 😱 

Also: I'd highly recommend using a 5V power supply, and no step-down.
Ans of course: try each individual component first before combining.

I'd start with just the Wemos, don't wire anything else yet.
If all seems fine (you may not know 100% for sure of course), I'd connect the stepper driver and motor.
If that works: feel if the Wemos is still getting hot. 
If all this works, then you know again that the power draw from the LED strip may be too much.

I hope this helps a little bit.

At last a well thought and caring answer. 

First of all, the 12V / 1A power supply is the power supply of a whole 5m LED strip WS2811 from which I have cut a little over 1.5 meter. So pretty sure it's enough.
Weird thing is I  tried without the led strip and the voltage in the outputs of the step down converter drops to 3.4V when I connect the wemos or the stepper driver to it.


ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 9 years ago
Posts: 2236
 

You're welcome 😊 

Just to keep in mind for the power supply:
Count the number of LEDs you have on the strip, your drawing suggests 29, did I read that right?
Each LED block pulls 60mA at peak (white light, max brightness). So that would account for a max load of 1.74 A.
Something to keep in mind, since you add additional electronics, but you already eliminated this as a potential issue (you fully disconnected the strip right?).

The power drop to 3.4 V for the converter is suspicious;
Either not enough goes in (12V side) or too much is being pulled out - either can trigger a voltage drop.

You did say that the Wemos got hot - another concern that a too much power is passing a component, which could be due to a short or due to too much power needed for the stepper-driver. Double check the wiring for shorts, and make sure the driver and motor do not pull to much.

Since you already tried everything without LED strip, give it a try without the driver and motor (completely disconnected!).
If that works; just connect the driver but not the motor.
If that works, then we know it may be the motor pulling too much (which may still not explain why the Wemos gets hot).

Normally in cases like this, where the answer isn't obvious, I'd really start assembling things from scratch, one step at a time.

Step 1 - 12V power + LED strip + Converter -> does it supply 5V?
Step 2 - Connect Wemos -> Does it work, and Wemos does not get hot?
Step 3 - Connect driver board -> Does it work, Wemos not hot, and power still 5V?
Step 4 - Connect motor.

In one of these steps things will either go sideway, or you by accident "fixed" the problem because you did a clean build.


ReplyQuote
Share: