thehookup / Motorized_MQTT_Blinds

Motorized_MQTT_Blinds
299 stars 75 forks source link

Integer Position #40

Open ledrewski3 opened 4 years ago

ledrewski3 commented 4 years ago

I'm having trouble running the motor for the first time. It won't move. Not sure if I'm sending the topic the right way?

millerj1119 commented 3 years ago

I am having this same problem. I have all of the connection correct and flashed my 8266 with the needed information. Downloaded the MQTT Explorer and everything seems to be sending and receiving correctly. but no motor movement. Any ideas?

kboghdady commented 2 years ago

I am having the same issue

T00LF00L commented 2 years ago

A bit late here, but I just built this project and had the same problem. I can tell you what’s wrong, the wiring diagram is incorrect. Wire the stepper driver this way and it will work. E867D788-9DB6-41DF-8CF1-0724C767641C

T00LF00L commented 2 years ago

SLP is active low input. Meaning, pulling this pin LOW puts the driver in sleep mode, minimizing the power consumption. You can invoke this especially when the motor is not in use to conserve power.

RST is also an active low input. When pulled LOW, all STEP inputs are ignored, until you pull it HIGH. It also resets the driver by setting the internal translator to a predefined Home state. Home state is basically the initial position from where the motor starts and it’s different depending upon the microstep resolution.

FAULT is an output that drives LOW whenever the H-bridge FETs are disabled as the result of over-current protection or thermal shutdown. It should NOT receive +5V.

The module does not have any logic supply pin as DRV8825 gets its power from the internal 3V3 voltage regulator. However, you should common your microcontroller’s ground with GND LOGIC pin. 26C9CC72-6860-483F-B883-DA9AE88CD5DC

webxl commented 2 years ago

@T00LF00L This did the trick for me, thanks!

T00LF00L commented 2 years ago

@webxl Awesome, glad I could help someone! I’ve since done a little more research and learned this driver was updated at one point and the pin out changed. The driver pictured in the wiring diagram is the new version, but the wiring as shown is in fact correct for the old driver version.

reinervl commented 2 years ago

@T00LF00L this new wiring diagram fixed it for me as well., so thank you! However, I may have a new issue. Every time the nodeMCU loses power and restarts after power is back, the motors won't move until I unplug them and plug them back in. It's as if the nodeMCU can't handle the motors being connected at start-up. Any ideas on how to remediate this?

T00LF00L commented 2 years ago

@reinervl strange problem.. I’d start by first probing the three logic pins going to the stepper driver. Send open & close commands and see if the logic is outputting low/high correctly. DIR should switch low or high depending on open or close, EN should go momentarily high, and STEP should pulse high your number of steps. This way you’ll know if the nodeMCU is actually working correctly on power up or not.

reinervl commented 2 years ago

@T00LF00L thanks for your help. I should also mention that I have 4 stepper motors and drivers (1 driver per motor) connected to one nodeMCU. When I leave them all connected and I plug in power, all 3 pins (EN, STEP, DIR) read 1.54V so floating? When I disconnect all motors/drivers and then plug in power everything works and STEP and DIR read low (0V) and EN reads HIGH (3.3V).

T00LF00L commented 2 years ago

@reinervl To be perfectly honest with you.. this is the first circuit I've built in 30 years, the last time I wrote code was on a Commodore 64 and this project took me 4 days of troubleshooting to finally get working with Home Assistant and HomeKit. Coincidentally I just had one blind do the exact same thing you described, but it's only happened that one time. I did some Google.. it says these three pins have a 'weak' high during boot, but they can be high or low and it won't affect boot. So the only other thing I could find is maybe it's a power delivery issue during boot? Sorry I can't really be much more help as electronics were very different in the 80s, you may want to open a new discussion? I'm still trying to figure out why mine occasionally open back back up at night..