I'm having some problems with my project. The project involves a motorized turntable (bipolar stepper motor) controlled with accelstepper and mqtt messages. I'm using Wemos D1 Mini..
Code seems fine and everything works exept for 1 thing: I want to be able to update the code after I have connected all the wires, without the need to disconnect any of the connected wires from the Wemos. I'm not sure how/if this can be done. I want to be able to just connect a USB to the Wemos and upload code fast and easy. However when I have tried this (with all the wires connected but power source turned off), the Wemos stops working and will not accept any more USB uploads and It seems shorted/broken =(
Would really appreciate any tips on how I can wire this in a better way so that it works. Or perhaps an explenation why it will not work the way I want
what kinds of tests did you do to conclude that your wemos D1 is broken?
If you have everything wired together but switched off your Converter XL4015
but still have the wire between your RaspBerry pi zero 2W connected on the 3.3V pins
Your Wemos D1 is mini is forced to power the RaspBerry Pi Zero over the 3.3V pin
which surely overloads the voltage-regulator on the Wemos D1 mini
From your picture of the wiring it seems that the only purpose of the RaspBerry Pi zero is to create the 3.3V
Is this true?
You should use a second adjustable DC-DC-stepdown regulator with enough current capacity and a diode in the plus-wire so that only current can flow from the 3.3V DC-DC-stepdown regulator towards the Wemos D1 mini but not "backwards"
Use a shottky diode which has a low forward-voltage drop of 0.2 to 0.3V
or if you use a standard diode like 1N4007 adjust the voltage behind the diode to 3.2V
Which means the DC-DC-stepdown-regulator will be at aprox. 3.9V. With the voltage-drop of the diode of 0.7V behind the diode there will be 3.2V
If you use a shottky-diode with voltage-drop 0.2V adjust to 3.4V
Anyway adjust the voltage behind the diode to 3.2V with the Wemos D1 mini dis-connected
You shoud not use the raspberry pi zero to power the Wemos D1 mini.
The ESP8266 has short current spikes that are too high for the onboard voltage regulator of the raspberry pi
Well, I tried disconnecting all the wires and then connecting a usb wich failed. Then I tried uploading to another Wemos and no problem..
The Raspberry is only for running a access point, a user interface, a little node red logic and to manipulate message strings published to a local (on the raspberry pi) mqtt broker. The Wemos connects to the broker and listends to messages published.
Thank you for the advice about putting another voltage regulator in + a diode. I did not consider voltage spikes from the esp8266..
No way of avoiding putting any more hardware in, eh? =) I was hoping maybe it could be wired differently somehow and get it to work the way I want without putting more hardware in..
I tried 5v directly from the regulator to the wemos first. That should work too I guess, but I forgot to connect a ground between the stepper driver and the Wemos. Then when I couldnt get it to work and the Wemos broke, I decided to try the 3.3v instead, and here we are =)
Ok I'm trying to wrap my head around this =D. Lets say that it's possible to power the wemos with 4.8v to the 5v pin (i think/hope this is fine)
So I assume I could just connect the 5v pin on the Wemos to the 5v output on the stepdown regulator, and put a Schottky diode (0.2v or maybe less if possible) between the step down regulator and the Wemos. Then I connect the raspberry pi also to the 5v output of the voltage regulator. This should work, right?
Do i need to consider how much current the stepper driver pulls from the Wemos when enabled???