Motor Shield v2.0

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
kirelam
Normal user
Posts: 29
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

User avatar
ThomasB
Normal user
Posts: 1064
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: 29
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?


User avatar
ThomasB
Normal user
Posts: 1064
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
Core team member
Posts: 8643
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: 29
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.

User avatar
ThomasB
Normal user
Posts: 1064
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: 29
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: 29
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: 29
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

hoods
New user
Posts: 3
Joined: 27 Feb 2018, 21:53

Re: Motor Shield v2.0

#12 Post by hoods » 02 Nov 2019, 13:16

Hi kirelam,

would you mind to share your concrete hardware (stepper, motor shield etc.) chosen incl. links or specs?
Which ESPEasy plugin did you use and had you to modify the plugin or worked it out of the box?
Can you control your stepper also to move only a specific number of steps?
If you had to modify it maybe it's worth to share it here in the forum.

I have a similar project but struggeling to get the stepper working in a consistent way.

Thanks in advance, hoods

TungstenE2
Normal user
Posts: 123
Joined: 03 Apr 2018, 21:46

Re: Motor Shield v2.0

#13 Post by TungstenE2 » 07 Nov 2019, 13:22

@kirelam: I am also very interesed in your setup, hardware and configuration. Would you mind to share this information (links, screenshots) with us?

I plan to build a dosing pump and struggle to find working hardware with ESPeasy.

thx

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

Re: Motor Shield v2.0

#14 Post by kirelam » 07 Nov 2019, 13:24

I will share all i have!

Bit busy right now, but i will put all stuff here.

Greetz,
Kirelam

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

Re: Motor Shield v2.0

#15 Post by kirelam » 07 Nov 2019, 13:33

I'm at work right now so not a lot of time,

But i can give you this in between time.
This is the project i used this tech for and the discription tells a little bit about the usage and the sources.

https://www.thingiverse.com/thing:3684827

If there are any questions, please specify them and i will awnser.

Regards,
Kirelam

TungstenE2
Normal user
Posts: 123
Joined: 03 Apr 2018, 21:46

Re: Motor Shield v2.0

#16 Post by TungstenE2 » 07 Nov 2019, 13:57

nice project, I have my chicken door operated with ESPeasy.

My questions are:

- which motor shield did you use? (link)
- which motor did you use? (stepper or normal DC)
- how did you configure the motor in ESPeasy?

As the chicken feeder is not so precise, as I assume, I am planning for a dosing pump which should be used for 4ml dosing per day.
So I am searching for the right hardware (motorshield, motor and peristaltic pump) to work with ESPeasy.

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

Re: Motor Shield v2.0

#17 Post by kirelam » 07 Nov 2019, 16:30

- which motor shield did you use?
https://nl.aliexpress.com/item/32898563 ... 4c4do28s0Q

- which motor did you use? (stepper or normal DC)
https://nl.aliexpress.com/item/32907886 ... 4c4dU1XzNl
I used this motor, because the motorshield can only handle up to i believe 1.2 amps or so per motor channel (2 channels). I tried a 1.7 and friend the motor shield :P

- how did you configure the motor in ESPeasy?
the plugin in ESPEASY that allows this motor shield is only in the developers build, wich can be found in every latast build pakket.
most of the time it has DEV in the name of the firmware. It is a long list of builds. there should only be one version of DEV*** i believe.
https://www.letscontrolit.com/wiki/inde ... ield_v2%22


As the chicken feeder is not so precise, as I assume, I am planning for a dosing pump which should be used for 4ml dosing per day.
So I am searching for the right hardware (motorshield, motor and peristaltic pump) to work with ESPeasy.
To be honest. I Think is will be very precise. This because in the command used in ESPEASY, you can specify how much steps it must take each time you trigger it and at what speed in what direction. I guess that even my chickenbot would measure quitte good how much chickenfood in grams it would give. The screw is the variable here and not the stepper motor.
In your case the fluid is very precise, because it would fill the whole tube and so give an exact full ammount of ml.

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

Re: Motor Shield v2.0

#18 Post by kirelam » 07 Nov 2019, 16:34

Ohw and this ESP8266 controller, because the motor shield fits perfectly on it so you do not have to change the datalogic control on the motor shield, that is a pain in the ass.

https://nl.aliexpress.com/item/32758176 ... b201603_52

Also, the motorshield powers the ESP8266. This means that you only have to power the motor shield with 12V DC.
The ESP8266 go's over Wifi and/or can be controlled through rules in the Web console itself.

TungstenE2
Normal user
Posts: 123
Joined: 03 Apr 2018, 21:46

Re: Motor Shield v2.0

#19 Post by TungstenE2 » 07 Nov 2019, 16:49

thx for all the details, but the motor link is not working. can you update?
kirelam wrote: 07 Nov 2019, 16:30

- which motor did you use? (stepper or normal DC)
https://nl.aliexpress.com/item/32907886 ... 4c4dU1XzNl
I used this motor, because the motorshield can only handle up to i believe 1.2 amps or so per motor channel (2 channels). I tried a 1.7 and friend the motor shield :P

TungstenE2
Normal user
Posts: 123
Joined: 03 Apr 2018, 21:46

Re: Motor Shield v2.0

#20 Post by TungstenE2 » 07 Nov 2019, 17:06

You are referring to plugin P048_Motorshield_v2.ino which is in Status 'Testing', right?

https://www.letscontrolit.com/wiki/inde ... lugin_list

Raised a request to move status to 'Normal': https://github.com/letscontrolit/ESPEasy/issues/2717

TungstenE2
Normal user
Posts: 123
Joined: 03 Apr 2018, 21:46

Re: Motor Shield v2.0

#21 Post by TungstenE2 » 07 Nov 2019, 17:35

what kind of power supply do you use to power the Wemos D1 board over the Motorshield and the motors?

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

Re: Motor Shield v2.0

#22 Post by kirelam » 04 Mar 2020, 13:58

Sorry @TungstenE2, really forgot to read the blog :S

I did not use the small D1 Wemos board, i Tried it, but i believe i had a grounding issue, Altough i think it should work!
There should be 2 VCC pins on the Driverboard 5 and 3.3V. You should have to look into this then. Remember to use the same grounding. i read somewhere that was important!


I rather used a Wemos D1 R1 board. This is a format that is the same as an Arduino and thus the adafruit drivershield, so it has all the pins in the right spot.
No soldering needed, Not for power and signal!

Wemos D1 R1 are many china copy's from. look out, do not buy these to cheap. some are crap
Last edited by kirelam on 04 Mar 2020, 14:02, edited 1 time in total.

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

Re: Motor Shield v2.0

#23 Post by kirelam » 04 Mar 2020, 13:59

I promise i will read this forum more often to awnser any questions if needed!

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests