Motor Shield v2.0

Moderators: Voyager, BertB, rtenklooster, Stuntteam, grovkillen, TD-er

Post Reply
Message
Author
kirelam
Normal user
Posts: 13
Joined: 04 Apr 2016, 12:10
Location: Westervoort

Motor Shield v2.0

#1 Post by kirelam » 11 Mar 2019, 10:12

Dear users,

I have bought 2 motor shields V2.0 now (Aliexpress versions)(both failed). I tried to use it through I2C to my D1 Mini.
To do this i had to cut the logic line to 5v and make connection from the center pad to the 3.3v pad next to it.

I got I2C adresses, but there it is! E
very time i refresh, i get a different I2C adress, where this should be 0x60.
Anyone got an idee how and why this is, or did i just break it?

Supplied 12V to the power inlet and connect neatly through the D4 and D5 (Cl and DA)
I just want to use 1 stepper motor for my chicken feeding system (Gause worm system).

Regards,
Kirelam

ThomasB
Normal user
Posts: 269
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Motor Shield v2.0

#2 Post by ThomasB » 11 Mar 2019, 18:32

Code: Select all

Supplied 12V to the power inlet and connect neatly through the D4 and D5 (Cl and DA)
According to the Wemos Mini D1 Wiki, the I2C SCL is D1 (GPIO-5) and SDA is D2 (GPIO-4).
https://wiki.wemos.cc/products:d1:d1_mini
https://steve.fi/Hardware/d1-pins/

- Thomas

kirelam
Normal user
Posts: 13
Joined: 04 Apr 2016, 12:10
Location: Westervoort

Re: Motor Shield v2.0

#3 Post by kirelam » 12 Mar 2019, 08:35

good awnser. i wrote it the other way arround. I tried switching them, but then offcourse you get no signal.

So i would like to know if other people have this problem en if so, what did they do to get arround it?


ThomasB
Normal user
Posts: 269
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Motor Shield v2.0

#5 Post by ThomasB » 12 Mar 2019, 16:50

very time i refresh, i get a different I2C adress, where this should be 0x60.
Regarding the random i2C address when you refresh, do you mean you are using ESPEasy's I2C scanner? If that is the case then maybe that tool is broken. I'm not saying I know for a fact it is broken, but it is possible. Every release seems to add new challenges, so you have to be fast on your feet and expect the unexpected.
So i would like to know if other people have this problem en if so, what did they do to get arround it?
For full transparency I've never used it. The Wemos Motor Shield plugin is a recent addition, so not a lot of history to go by. You might be one of the first end-users to try it out.

FWIW, see the wiki link posted by TungstenE2, who I believe created this plugin. The wiki mentions reflashing the motorshield's firmware.

Lastly, use short wire connections to SDA and SCL to minimize I2C signal degradation. For initial testing I suggest no longer than 2-3 inches. After it is working you can try using longer wires if necessary.

- Thomas

TD-er
Normal user
Posts: 1201
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Motor Shield v2.0

#6 Post by TD-er » 12 Mar 2019, 22:56

That motor shield is a bit strange with regards to I2C.
If the number of bytes sent to it isn't a multiple of 4 bytes, then it will lock the I2C bus.

kirelam
Normal user
Posts: 13
Joined: 04 Apr 2016, 12:10
Location: Westervoort

Re: Motor Shield v2.0

#7 Post by kirelam » 13 Mar 2019, 09:33

Lock the I2C bus? What does that meen, As in not usable for that moment?

I ordered the Wemos motor shield (Thanx) Hope it will support Stepper motor.
If so i will report the whole proces and project as it is here for future review.

ThomasB
Normal user
Posts: 269
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Motor Shield v2.0

#8 Post by ThomasB » 13 Mar 2019, 18:18

Hmm. It seems there's some overall confusion about the hardware you purchased.

The ongoing comments have been for the Wemos Motor Shield clone that is sold by AliExpress. This one:
https://www.letscontrolit.com/wiki/inde ... otorshield

But there is another motor shield sold by AliExpress that is a clone of the Adafruit Arduino Motor Shield. This one:
https://www.letscontrolit.com/wiki/inde ... ield_v2%22

These two boards are completely different designs and use different ESPEasy plugins. The Wemos motor shield uses an STM processor that has buggy code that is known to crash the I2C buss (may require power cycle to clear). This issue can be solved by reflashing the board with updated firmware, per the plugin's info stated in the letscontrolit wiki.

But maybe you have the Arduino Motor Shield instead of the Wemos motor shield? Please confirm by providing a link to the AliExpress board that you are trying to use.

If you have the Arduino Motor Shield then it does not suffer from i2c lockups due to bad STM firmware. That is because it uses a PCA9865 PWM driver chip instead of the poorly coded STM processor.

So after rethinking the situation (with the Arduino Motor Shield in mind} this list summarizes the situation:
1. You have modified the motor shield for 3.3V logic (cut trace, jump 3.3V pad).
2. You connected SDA and SCL with jumper wires. Note: These must be short wires!
3. Powered the motor shield with 12V.
4. Powered the Wemos D1 Mini by USB.
5. Motor shield does not work. I2C address is randomly reported by I2C scan (?).

But it is unknown if you have connected a common ground wire from the motor shield to the Wemos D1 Mini. The common ground is required. Have you done this?
Edit: Also connect 3.3V from the Wemos to the Motor Shield 3.3V pin. I do not know if the Wemos VReg can reliably provide the necessary current for this.

For more help please post good photos that clearly show how you have wired everything. The little details matter.

- Thomas

kirelam
Normal user
Posts: 13
Joined: 04 Apr 2016, 12:10
Location: Westervoort

Re: Motor Shield v2.0

#9 Post by kirelam » 08 May 2019, 11:31

Dear friends,

I am a bit further and i choose the lazy, but working option.

-The Adafruit Motor shield V2 is a Arduino form factor with that pin-out, so i thought: Why not buy the Wemos D1 R2 with the same pinout specs. All pin positions work and i do not have to tinker with logic voltages (5 > 3.3V pad) < i think this caused partial my problem.

Now i get 2 nice 0x60 and 0x70 adresses concequent!



NEW PROBLEM :D YEAY

The URL command works .The steppermotor works......But..... It jitters and doesn't do a lot. Ok it responds and turns (sort of). The stepper motor is a NEMA17. So the specs are 200 steps etc.

-Have an old 12V 3A adapter connected to the motorshield.
-The LED on the motorshield starts blinking when i give the URL command (The motor jittering seems to be parallel with the blinking) like it doesn't seem to get enough power.
-But this should/may not be the problem, as i use an adequate power supply.
-ESPboard gets it power through the VINN port so it gets its juice of the motor shield.
-I thought, lets sepperate this, so i removed the VINN jumper and plugged in a Micro adapter in the ESP board. maybe it draws to much power in a weird way? or interfeers whatever?!

>>>This didn't solve anything.... :(

-I measured the NEMA17 stepper motor coils. Both seem to be ok and no short circuit.
-The I2C adres is no problem here as the motor shield responds
-The power supply...yeah well i could try a different one, but i read it should be 2A with spikes to 3A, so this one should be ok.
-The ESP board is working as it should

-Maybe the motorshield itself? MOSFET broken?
-have another motorshield laying arround somewhere so i will solder the original 5V logic pads back like they where to make it communicate with the R2 (was an attempt to make it work at 3.3V with an Wemos D1.

I cannot think of anything else :(

Please help dear tinkermasters!
Regards,
Kirelam

kirelam
Normal user
Posts: 13
Joined: 04 Apr 2016, 12:10
Location: Westervoort

Re: Motor Shield v2.0

#10 Post by kirelam » 16 May 2019, 10:11

HA HA i think i got my problem!

The Adafruit motorshield V2.0 supports Stepper motors yes. But not above perpetual power usage. So the Stepper motor cannot be to powerfull.

I Bought a NEMA17 3d printer stepper motor. This one has 2.4NM/Cm and a power usage of 1,7A.
This seemed to be a bit too much, by a little. After searching documentation from the motorshield, they say it supports stepper motors up till 1.5A.

So what was happening with my situation: Motorshield on > Give Stepper command > Stepper motor rotate's > draws too much power > Motor shield power off.
It sucks all the power of the motor shield. LOL how dum easy can it be!
Now i'm waiting for a new NEMA17 Stepper motor drawing 1.2A. With this one, i am garanteed it cannot suck too much power at its peak.

So first things first:
-Check communication from ESP to Motorshield through I2C > 0x60 and 0x70 both visible at the same time in the I2C scan within ESPEASY
-Before you buy a Stepper motor, Check the power usage of your stepper motor. If it is above 1.5A. It will suck your motorshield's power and will cook the motor chip on the motorshield board! < The specific chip (Channel 1on the motor shield got hot really fast!!!

Will keep up to date here what the result will be with a stepper motor within 1.5A.

Greetz,
kirelam

kirelam
Normal user
Posts: 13
Joined: 04 Apr 2016, 12:10
Location: Westervoort

Re: Motor Shield v2.0

#11 Post by kirelam » 23 May 2019, 22:40

Here we are again,

Aliexpress was fast this time :P
the new NEMA17 Stepper motor works like a charm!

-The driver on the motorshield does not get hot anymore also!!! (This was the case with the 1,7Amps Steppermotor)
-Now when i run the steppermotor a lot it gets warm itself, but this can be solved with a old alluminium coolbody laying arround!

This motor is a 0.4Amps. A whole lot less then the last one, but it still has a strong pull on the hub.

This post can be closed for my

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest