[FIXED] Wemos MotorShield V1.0 NO i2c-adress
Moderators: grovkillen, Stuntteam, TD-er
[FIXED] Wemos MotorShield V1.0 NO i2c-adress
Good day guys,
I have several problems with my wemos motorshields. In the last days I ordered 4 of those shields and no one is working on my wemos.
I prepared a wemos D1 mini pro with the i2c scanner library, but no one of my boards can be found. Probably I missed something to get these things working, but I tried almost all I've found.
At first I tested the bare boards with the i2c scanner, after that I tested the method with STM32 flashing tool to getting a direct access to the stm, but none of that worked.
Now I'm thinking about to bou a ST Link programmer to flash the STM32 with a new firmware.
Can anybody help me to find out what's the problem of the boards?
I have several problems with my wemos motorshields. In the last days I ordered 4 of those shields and no one is working on my wemos.
I prepared a wemos D1 mini pro with the i2c scanner library, but no one of my boards can be found. Probably I missed something to get these things working, but I tried almost all I've found.
At first I tested the bare boards with the i2c scanner, after that I tested the method with STM32 flashing tool to getting a direct access to the stm, but none of that worked.
Now I'm thinking about to bou a ST Link programmer to flash the STM32 with a new firmware.
Can anybody help me to find out what's the problem of the boards?
Last edited by tomtom on 16 May 2020, 07:01, edited 1 time in total.
Re: Wemos MotorShield V1.0 NO i2c-adress
That sounds like a reasonable idea. If you purchased all the non-functional boards from the same supplier then maybe they are missing firmware. Regardless, the original firmware is buggy. So you should reflash the MotorShields with updated firmware. Details are explained here:Now I'm thinking about to buy a ST Link programmer to flash the STM32 with a new firmware.
https://www.letscontrolit.com/wiki/inde ... otorshield
- Thomas
Re: Wemos MotorShield V1.0 NO i2c-adress
Hi Thomas,
i tried the "Installation" in your link many times with my TTL programmer now, but i cant find the motorshield.
All i´ve got is: Probably i need the ST Link programmer for this behavior?
Another solution is the "We have a fixed Firmware" in this link:
https://hackaday.io/project/18439-motor ... rogramming
But i need the ST link programmer for this too.
i tried the "Installation" in your link many times with my TTL programmer now, but i cant find the motorshield.
All i´ve got is: Probably i need the ST Link programmer for this behavior?
Another solution is the "We have a fixed Firmware" in this link:
https://hackaday.io/project/18439-motor ... rogramming
But i need the ST link programmer for this too.
Re: Wemos MotorShield V1.0 NO i2c-adress
You don't need an ST-Link programmer, just the program stm32flash and the new motor_shield.bin firmware and an USB2TTL adapter.
You may have the same problem that I had at first. The instructions for changing the firmware are not complete. It is described that before programming "Short the RTS and the 3V pins on the shield together". However, the description lacks that this connection must be removed after programming.
You may have the same problem that I had at first. The instructions for changing the firmware are not complete. It is described that before programming "Short the RTS and the 3V pins on the shield together". However, the description lacks that this connection must be removed after programming.
Re: Wemos MotorShield V1.0 NO i2c-adress
Hi Ruprecht,
yes i already know that, but i can´t flash the firmware, whenever the USB2TTL programmer doesn´t recogize the motor shield.
I soldered the RTS and 3V pins together, hooked up everything like in the description and powered the TTL programmer up.
After checking the right COM port in my device manager, i wrote down the first command into cmd and got the "Failed to init device" message back.
If you check your own motor shield, a simple i2c scanner is able to find your device on the arduino, but mine has no i2c adress - the computer/TTL programmer can´t find it, because the STM32 chip probably has no i2c adress yet.
It´s difficult for me to find out whats the problem now.
Last chance for me to directly access the STM32 chip with the ST-Link programmer (solder two wires to the legs of the STM32 chip) https://cdn.hackaday.io/images/9683431479845007181.jpg
and directly modify the flash on it with the motorshield.bin firmware, otherwise all of the shields are bricked or whatever...
yes i already know that, but i can´t flash the firmware, whenever the USB2TTL programmer doesn´t recogize the motor shield.
I soldered the RTS and 3V pins together, hooked up everything like in the description and powered the TTL programmer up.
After checking the right COM port in my device manager, i wrote down the first command into cmd and got the "Failed to init device" message back.
If you check your own motor shield, a simple i2c scanner is able to find your device on the arduino, but mine has no i2c adress - the computer/TTL programmer can´t find it, because the STM32 chip probably has no i2c adress yet.
It´s difficult for me to find out whats the problem now.
Last chance for me to directly access the STM32 chip with the ST-Link programmer (solder two wires to the legs of the STM32 chip) https://cdn.hackaday.io/images/9683431479845007181.jpg
and directly modify the flash on it with the motorshield.bin firmware, otherwise all of the shields are bricked or whatever...
Re: Wemos MotorShield V1.0 NO i2c-adress
The ST-Link programmer has been reported to work better than USB programming. Some say it is because of the chance of using an incompatiabe UBS-TTL dongle.yes i already know that, but i can´t flash the firmware, whenever the USB2TTL programmer doesn´t recogize the motor shield.
I suspect that your boards are missing firmware. But maybe they have been connected wrong.but mine has no i2c adress - the computer/TTL programmer can´t find it, because the STM32 chip probably has no i2c adress yet.
- Thomas
Re: Wemos MotorShield V1.0 NO i2c-adress
I tried 3 different serial adapters now.
With cp2102, ftdi and pl2303 chips. None of them found the motor shields.
Let's wait for the st link programmer to do further testings
With cp2102, ftdi and pl2303 chips. None of them found the motor shields.
Let's wait for the st link programmer to do further testings
Re: Wemos MotorShield V1.0 NO i2c-adress
Here's instructions on how to use the Wemos D1 for programming the MotorShield (instead of USB-TTL).
https://github.com/thomasfredericks/wemos_motor_shield
- Thomas
https://github.com/thomasfredericks/wemos_motor_shield
- Thomas
Re: Wemos MotorShield V1.0 NO i2c-adress
Hi Thomas,
thanks for your help, but I tried this too.
Doesn't work for me. I have to wait for the ST Link programmer, this is the only possible solution now.
Hope to get this boards working soon.
thanks for your help, but I tried this too.
Doesn't work for me. I have to wait for the ST Link programmer, this is the only possible solution now.
Hope to get this boards working soon.
Re: Wemos MotorShield V1.0 NO i2c-adress
Hi guys,
now I'm one step ahead.
I was able to flash all my wemos motorshields with the MotorShield.bin file from the link:
https://hackaday.io/project/18439-motor ... rogramming
I connected my fully loaded 3S Lipo battery to GND and VM of the shield, wired my DC motor to A1 and A2 of the shield and put the MotorShield beside the wemos on a tripple base.
At first I flashed the wemos with the espeasy firmware and did the setup for MotorShield under the devices tab (GPIO 4 and GPIO 5) for i2c. The i2c scanner found the shield on i2c adress 0x30 how expected.
Next step was to send an command to the wemos. I used the http method to send the FORWARD command over network to the board and got the OK message back.
The logfile of the espeasy told me, that it has received the command successfully, but the motor doesn't spin.
I did a lot of tests and none of my motorshields send the commands to the connected motor.
At least I flashed the wemos with a simple sketch to directly spin the motors and controlled the output in the serialmonitor. It seems the motor has to move now, but he didn't.
After many hours of testing I'm really frustrated about this stuff.
I don't know what the problems of the boards are.
Did I anything missing?
Which library must work on the firmware I've flashed to the wemos motorshields?
Or do you have any other ideas?
Best regards,
Tom
now I'm one step ahead.
I was able to flash all my wemos motorshields with the MotorShield.bin file from the link:
https://hackaday.io/project/18439-motor ... rogramming
I connected my fully loaded 3S Lipo battery to GND and VM of the shield, wired my DC motor to A1 and A2 of the shield and put the MotorShield beside the wemos on a tripple base.
At first I flashed the wemos with the espeasy firmware and did the setup for MotorShield under the devices tab (GPIO 4 and GPIO 5) for i2c. The i2c scanner found the shield on i2c adress 0x30 how expected.
Next step was to send an command to the wemos. I used the http method to send the FORWARD command over network to the board and got the OK message back.
The logfile of the espeasy told me, that it has received the command successfully, but the motor doesn't spin.
I did a lot of tests and none of my motorshields send the commands to the connected motor.
At least I flashed the wemos with a simple sketch to directly spin the motors and controlled the output in the serialmonitor. It seems the motor has to move now, but he didn't.
After many hours of testing I'm really frustrated about this stuff.
I don't know what the problems of the boards are.
Did I anything missing?
Which library must work on the firmware I've flashed to the wemos motorshields?
Or do you have any other ideas?
Best regards,
Tom
Re: Wemos MotorShield V1.0 NO i2c-adress
Is the voltage of the battery enough to get the motor turning? Possibly the voltage drops too low when it tries to turn...
/Ton (PayPal.me)
Re: Wemos MotorShield V1.0 NO i2c-adress
The battery is full. It powers the motor with 12.4V.
Re: Wemos MotorShield V1.0 NO i2c-adress
Unfortunately the MotorShield plugin responds "OK" to nearly everything, even if the command syntax is wrong or the motorshield board is dead. As a cheap sanity check, please post the exact http command you used so we can see what was sent.I used the http method to send the FORWARD command over network to the board and got the OK message back.
Honestly, you're at a place where you need to get an electronics buddy over to your workbench to review all the little details. Sometimes a fresh pair of eyes can spot something important.
If you like to use our eyes then post (1) a screenshot of the motorshield's plugin settings, (2) clear photos of all your wiring so that we can see what you have built, and (3) any rules you have written.
BTW, if your test hardware is using a breadboard with temporary plug-in wiring (Dupont cables, alligator clip wires, etc.) then it's time to get out the soldering iron and make more reliable connections. Too many projects have been derailed due to those "temporary" connections that look fine but aren't.
- Thomas
Re: Wemos MotorShield V1.0 NO i2c-adress
Hello again.
I got it finally working!
Here's my solution of the latest problems.
I had to solder the jumper RTS and the Jumper i2C on the bottom of the board together. This was needed to control the board via wemos.
After I got it with a simple wemos MotorShield library working, I had to flash the espeasy.
After that and new configurations on the esp web UI, I tried again to control the motor per http commands and it didn't works again.
I found out, that the motor drains the battery with the predefined 0,5A and 7V, but it wont spin.
To fix this problem I had to adjust the example of the http command from the value of 99 (Motorspeed) command to 20 and after that it runs.
I can't explain why the motor wasn't able to spin with 99, but now everything is fixed and all of my motorshields are working very well.
Now I'm ready to finalize my project.
Thanks to all helpers in this forum.
Best regards,
Tom
I got it finally working!
Here's my solution of the latest problems.
I had to solder the jumper RTS and the Jumper i2C on the bottom of the board together. This was needed to control the board via wemos.
After I got it with a simple wemos MotorShield library working, I had to flash the espeasy.
After that and new configurations on the esp web UI, I tried again to control the motor per http commands and it didn't works again.
I found out, that the motor drains the battery with the predefined 0,5A and 7V, but it wont spin.
To fix this problem I had to adjust the example of the http command from the value of 99 (Motorspeed) command to 20 and after that it runs.
I can't explain why the motor wasn't able to spin with 99, but now everything is fixed and all of my motorshields are working very well.
Now I'm ready to finalize my project.
Thanks to all helpers in this forum.
Best regards,
Tom
Re: Wemos MotorShield V1.0 NO i2c-adress
Great to hear you solved the problem. BTW, what is the name of the ESPEasy bin file you loaded into your Wemos D1 Mini that is working?
Edit: I updated the wiki and added this solder bridge image.
https://www.letscontrolit.com/wiki/inde ... otorshield
- Thomas
Regarding the solder jumpers, they should look like the photo below:I had to solder the jumper RTS and the Jumper i2C on the bottom of the board together. This was needed to control the board via wemos.
Edit: I updated the wiki and added this solder bridge image.
https://www.letscontrolit.com/wiki/inde ... otorshield
- Thomas
Re: [FIXED] Wemos MotorShield V1.0 NO i2c-adress
Hi Thomas,
I used this firmware ESP_Easy_mega-20200426_normal_ESP8266_4M1M.bin
Now I probably found an bug, while I was building my project.
Do you have a BH1750 sensor and a MotorShield?
Please try both modules together.
The MotorShield has i2c adress 0x30 and the BH1750 sensor has i2c adress 0x23.
If I was using the bh1750 alone, it works very well. Same for the MotorShield, but when I connected both, the wemos rebooting all the time or it doesn't find any wifi connection.
Edit:. Can you advise me, how to bugfix the espeasy without WiFi connection?
Do espeasy write logfiles into the flash?
I used this firmware ESP_Easy_mega-20200426_normal_ESP8266_4M1M.bin
Now I probably found an bug, while I was building my project.
Do you have a BH1750 sensor and a MotorShield?
Please try both modules together.
The MotorShield has i2c adress 0x30 and the BH1750 sensor has i2c adress 0x23.
If I was using the bh1750 alone, it works very well. Same for the MotorShield, but when I connected both, the wemos rebooting all the time or it doesn't find any wifi connection.
Edit:. Can you advise me, how to bugfix the espeasy without WiFi connection?
Do espeasy write logfiles into the flash?
Re: [FIXED] Wemos MotorShield V1.0 NO i2c-adress
I have the MotorShield, but not a BH1750.Do you have a BH1750 sensor and a MotorShield?
Which BH1750 board are you using? Link to supplier would be helpful. Reason I ask is because some have I2C pull-ups sourced by 5V, which I think may cause problems. If this is what yours has then these two resistors should be removed.
You can enable the serial log feature in the Advanced settings page. Then all activity will be sent to the serial console for debugging.Can you advise me, how to bugfix the espeasy without WiFi connection? Do espeasy write logfiles into the flash?
- Thomas
Re: [FIXED] Wemos MotorShield V1.0 NO i2c-adress
Hi Thomas,
i´m using the GY-302 Board for the BH1750 sensor.
I used putty to check the serial output of the board and yes, how i thought. the board is rebooting all the time, if both, motorshield and bh1750 connected. EDIT:
Thats the board i´m using And thats the way i´ve connected it with the wemos d1 mini pro: EDIT 2:
I found this schematic of the GY-302(BH1750) board.
Probably the two resistors in the red cycle of the picture below are the same as my 103 (10k) SMD resistors on the board.
Can I desolder them or what should i do?
i´m using the GY-302 Board for the BH1750 sensor.
I used putty to check the serial output of the board and yes, how i thought. the board is rebooting all the time, if both, motorshield and bh1750 connected. EDIT:
Thats the board i´m using And thats the way i´ve connected it with the wemos d1 mini pro: EDIT 2:
I found this schematic of the GY-302(BH1750) board.
Probably the two resistors in the red cycle of the picture below are the same as my 103 (10k) SMD resistors on the board.
Can I desolder them or what should i do?
Re: [FIXED] Wemos MotorShield V1.0 NO i2c-adress
The schematic you posted shows that the pullups are sourced by 3.3V. So that's good (do not remove them). But as a sanity check, use your voltmeter and confirm.I found this schematic of the GY-302(BH1750) board.
Probably the two resistors in the red cycle of the picture below are the same as my 103 (10k) SMD resistors on the board.
Can I desolder them or what should i do?
Try a different 5V power supply. Some are "noisy" and cause reboots.
Also, I suggest you install a much older ESPEasy bin file. For example, the branch on Mar-15-2019 when the plugin was officially released. If that works then you'll know there is a bug in the more recent releases.
- Thomas
Re: [FIXED] Wemos MotorShield V1.0 NO i2c-adress
Ok, i measured the Pullups and they´ve 3.3V on the Pinside.
I flashed the branch from March 15, 2019 and had the same issues.
The board can find a wifi network and is booting normally
- if the BH1750 is connected AND the motorshield (WITHOUT soldered RST pin) is connected too, but cant find the i2C adress from the motorshield
- if the BH1750 OR the motorshield (WITH soldered RST pin) is connected
It is rebooting all time
- if BH1750 AND motorshield WITH soldered RST pin is connected
Edit: I measured the Voltage after the pullups from the MotorShield too. There are only 0.55V outgoing. Should they have 3.3V too?
I flashed the branch from March 15, 2019 and had the same issues.
The board can find a wifi network and is booting normally
- if the BH1750 is connected AND the motorshield (WITHOUT soldered RST pin) is connected too, but cant find the i2C adress from the motorshield
- if the BH1750 OR the motorshield (WITH soldered RST pin) is connected
It is rebooting all time
- if BH1750 AND motorshield WITH soldered RST pin is connected
Edit: I measured the Voltage after the pullups from the MotorShield too. There are only 0.55V outgoing. Should they have 3.3V too?
Re: [FIXED] Wemos MotorShield V1.0 NO i2c-adress
Strange problem. I'm running out of ideas. Here's some final hail Mary things to try (one at a time, not all at once):Edit: I measured the Voltage after the pullups from the MotorShield too. There are only 0.55V outgoing. Should they have 3.3V too
1. Did you try a different 5V power supply? There have been many reported reboot problems that were related to dirty power.
2. Disconnect RST reset on the MotorShield. Do a cold boot (remove power, apply power). Does it boot correctly on a cold boot?
3. Are your wire leads short? Long leads can cause I2C problems.
4. Disable NTP time. See if that helps.
5. Change I2C ClockStretchLimit value on the Advanced settings page.
6. Disconnect the 5V power connection from the MotorShield. Instead, power the MotorshShield from 3.3V.
I think you'll need to use an O-scope to see what is going on. Could be normal I2C activity or evil latched-up signals.Edit: I measured the Voltage after the pull-ups from the MotorShield too. There are only 0.55V outgoing. Should they have 3.3V too
- Thomas
Who is online
Users browsing this forum: No registered users and 130 guests