Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESP32 Port of B-Robot_EVO2 Code
01-17-2018, 08:14 PM
Post: #11
RE: ESP32 Port of B-Robot_EVO2 Code
(01-17-2018 03:00 PM)mou Wrote:  great. I want a circuit diagram ...Blush

You could start with the circuit diagram from the original so-called brain shield:
http://forums.jjrobots.com/attachment.php?aid=244
Wrip off Arduino and Wifi Module and adopt the rest to the ESP32 board you're going to use. For connecting components like stepper drivers and IMU you could orient yourself on the pin descriptions mentioned on my GitHub page.

Important note: Meanwhile I learned from others rebuilding the bot, that recent updates of arduino-esp32 broke the I2C subsystem at least rendering the IMU connection useless since it will fail after a few seconds uptime. Workaround: Use this version of arduino-esp32 for the robot:
https://github.com/espressif/arduino-esp...7917e0309c

Best regards,
ghmartin77
Find all posts by this user
Quote this message in a reply
01-20-2018, 10:51 AM
Post: #12
RE: ESP32 Port of B-Robot_EVO2 Code
Thank you for your kindness.Big Grin
Find all posts by this user
Quote this message in a reply
01-20-2018, 05:33 PM
Post: #13
RE: ESP32 Port of B-Robot_EVO2 Code
Hi,
I created a wiring diagram and build a robot. The ESP32 is driven by 5V.

Please note that I use DRV8825 stepper driver. To configure 1/16 micro steps the wiring is different than with A4988.

Good luck!
cu
neunmann

   
Find all posts by this user
Quote this message in a reply
02-09-2018, 11:58 AM
Post: #14
RE: ESP32 Port of B-Robot_EVO2 Code
When the robot is powered on, it operates normally. However, when the WiFi is connected, the motor is not powered and may fall. esp32 uses Goouuu-esp32. Thank you!
Find all posts by this user
Quote this message in a reply
05-17-2018, 03:45 PM
Post: #15
RE: ESP32 Port of B-Robot_EVO2 Code
Thanks for your code.
So, I have some problem with my step motor. I build with nema 14 stepping motor. When the robot calibrate angle finished. I push it up. The stepping motor increases the speed until it shakes.
I tried to reduce MAXSPEED but it can't fix it.
Please suggest me to fix that.
Find all posts by this user
Quote this message in a reply
05-17-2018, 06:45 PM
Post: #16
RE: ESP32 Port of B-Robot_EVO2 Code
(05-17-2018 03:45 PM)beebrain Wrote:  Thanks for your code.
So, I have some problem with my step motor. I build with nema 14 stepping motor. When the robot calibrate angle finished. I push it up. The stepping motor increases the speed until it shakes.
I tried to reduce MAXSPEED but it can't fix it.
Please suggest me to fix that.

Could you upload a video of the behavior depicted. Just from the descriptions I have no idea what's going on...
What is MAXSPEED, anyway? I cannot find it in the code.
Find all posts by this user
Quote this message in a reply
05-18-2018, 10:30 AM
Post: #17
RE: ESP32 Port of B-Robot_EVO2 Code
(05-17-2018 06:45 PM)ghmartin77 Wrote:  
(05-17-2018 03:45 PM)beebrain Wrote:  Thanks for your code.
So, I have some problem with my step motor. I build with nema 14 stepping motor. When the robot calibrate angle finished. I push it up. The stepping motor increases the speed until it shakes.
I tried to reduce MAXSPEED but it can't fix it.
Please suggest me to fix that.

Could you upload a video of the behavior depicted. Just from the descriptions I have no idea what's going on...
What is MAXSPEED, anyway? I cannot find it in the code.

Thank you for your reply. I am sorry for my mistake. I mean MAX_ACCEL.
For a video file, I will record and upload it.
Find all posts by this user
Quote this message in a reply
05-19-2018, 08:08 AM
Post: #18
RE: ESP32 Port of B-Robot_EVO2 Code
https://www.youtube.com/watch?v=aVvr6yR4thg
This is my video.
Find all posts by this user
Quote this message in a reply
05-19-2018, 03:27 PM
Post: #19
RE: ESP32 Port of B-Robot_EVO2 Code
Thanks for uploading the video.

Changing MAX_ACCEL won't help. This is used for maximum speed of the motors if you're moving the robot back and forth via the app. It's not used when just getting into balance.

Difficult to say from the video, but I'd say your motors are turning too fast. Temporary stalling of one of the motors in your video also could be an indicator of to quick movement. So here's my guess:
Check if your stepper driver are set to the correct microstep resolution. The robot and the code are configured for 200 steps per revolution and 1/16th microstep resolution.
Before changing the hardware you could also try to tweak the code. Maybe yours are set to 1/8th microstep resolution by chance. This can be changed by setting MICROSTEPPING in defines.h to 8 (actually anything != 16 will do).
This will reconfigure the speed factor used in Motors.cpp (lines #29ff and lines #75ff).

Please provide the name or spec of your motors and the stepper drivers, if nothing else helps.

Best regards,
ghmartin77
Find all posts by this user
Quote this message in a reply
05-20-2018, 08:16 AM
Post: #20
RE: ESP32 Port of B-Robot_EVO2 Code
(05-19-2018 03:27 PM)ghmartin77 Wrote:  Thanks for uploading the video.

Changing MAX_ACCEL won't help. This is used for maximum speed of the motors if you're moving the robot back and forth via the app. It's not used when just getting into balance.

Difficult to say from the video, but I'd say your motors are turning too fast. Temporary stalling of one of the motors in your video also could be an indicator of to quick movement. So here's my guess:
Check if your stepper driver are set to the correct microstep resolution. The robot and the code are configured for 200 steps per revolution and 1/16th microstep resolution.
Before changing the hardware you could also try to tweak the code. Maybe yours are set to 1/8th microstep resolution by chance. This can be changed by setting MICROSTEPPING in defines.h to 8 (actually anything != 16 will do).
This will reconfigure the speed factor used in Motors.cpp (lines #29ff and lines #75ff).

Please provide the name or spec of your motors and the stepper drivers, if nothing else helps.

Best regards,
ghmartin77


Thank you ghmartin77,
I have used A4988 driver and set to 16 micro steps. I defined 16 to Microstep in defines.h. My steping motor is nema14 and I not sure specific spec of motor to much because a sticker of spec broken.
However, I will try to change step motor and run it again.
Thank you.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)