Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESP32 Port of B-Robot_EVO2 Code
05-11-2019, 03:00 AM
Post: #71
RE: ESP32 Port of B-Robot_EVO2 Code
Hi, Martin:
I eventually received my ESP32. It is a 30 pin Dev. Board. I put it together using a perforated and uploaded your code. Everything works perfectly. Thank you very much for your help.
Attached are two photos.        
Find all posts by this user
Quote this message in a reply
05-11-2019, 05:23 PM
Post: #72
RE: ESP32 Port of B-Robot_EVO2 Code
Cool, well done!
(Your) Kudos go to the guys from JJRobots. I just ported the existing code and poked around with simplified hardware...
Find all posts by this user
Quote this message in a reply
05-13-2019, 04:51 PM
Post: #73
RE: ESP32 Port of B-Robot_EVO2 Code
(05-11-2019 05:23 PM)ghmartin77 Wrote:  Cool, well done!
(Your) Kudos go to the guys from JJRobots. I just ported the existing code and poked around with simplified hardware...

Thanks.
Just curious. I know the JJRobots app also measures the battery level. Have you implement the same thing? If yes, which input pin are you using? (I think they use pin
A4.)
Find all posts by this user
Quote this message in a reply
05-13-2019, 07:10 PM
Post: #74
RE: ESP32 Port of B-Robot_EVO2 Code
N-yes... sort of Smile
Haven't implemented it in my hardware setup and removed parts of the code.
Reading loop is still there: https://github.com/ghmartin77/B-ROBOT_EV...t.cpp#L360
If you #define TELEMETRY_BATTERY 1 the code is in and you will get a compile error that there's no BROBOT_readBattery.
If you take it from here https://github.com/jjrobots/B-ROBOT_EVO2...os.ino#L78 and add some battery variable definitions, adjust to your hardware setup planned and configure you analog input pin as desired, it COULD work Smile

Challenge accepted?

BR,
ghmartin77
Find all posts by this user
Quote this message in a reply
05-14-2019, 02:39 AM (This post was last modified: 05-14-2019 04:54 PM by twinclouds.)
Post: #75
RE: ESP32 Port of B-Robot_EVO2 Code
(05-13-2019 07:10 PM)ghmartin77 Wrote:  N-yes... sort of Smile
Haven't implemented it in my hardware setup and removed parts of the code.
Reading loop is still there: https://github.com/ghmartin77/B-ROBOT_EV...t.cpp#L360
If you #define TELEMETRY_BATTERY 1 the code is in and you will get a compile error that there's no BROBOT_readBattery.
If you take it from here https://github.com/jjrobots/B-ROBOT_EVO2...os.ino#L78 and add some battery variable definitions, adjust to your hardware setup planned and configure you analog input pin as desired, it COULD work Smile

Challenge accepted?

BR,
ghmartin77
I will try when got time Smile.
I found one issue though. Sometimes, the Android Apps would stopped controlling the bot. This usually happens when the bot was fast moving and the controller quickly moved to the center to stop it. As a result, it shakes violently or falls down. After that, it cannot be controlled correctly. The bot can still stand but in some case, it will turn but not moving forward or backward. In other cases, it stopped move at all. I need to restart the bot and the app to make it work again.
I didn't observe this for the app when controlling R-Robot implemented using Leonardo or pro-micro.
Have you encounter something like this at all?
Edit: I recompiled and uploaded the sketch using the old known-to-work version with Arduino IDE for esp32 (before 1.01), it seems working fine. Will report if I find anything more.
Find all posts by this user
Quote this message in a reply
05-14-2019, 05:33 PM (This post was last modified: 05-16-2019 05:12 AM by ghmartin77.)
Post: #76
RE: ESP32 Port of B-Robot_EVO2 Code
Interesting behavior. Never seen something like this. Especially not with the old arduino-ESP32 version. The new one I just tested for ~10 minutes without any finding.
Very interested in your analysis results... Maybe 1.0.2 isn't as stable as we hoped from the quick testing...
Find all posts by this user
Quote this message in a reply
05-15-2019, 04:47 AM
Post: #77
RE: ESP32 Port of B-Robot_EVO2 Code
It happened again with the old arduino-ESP32. Not sure if this is a hardware problem or software problem. I will do more testing to see what happens.
Find all posts by this user
Quote this message in a reply
05-15-2019, 05:20 AM (This post was last modified: 05-15-2019 05:23 AM by ghmartin77.)
Post: #78
RE: ESP32 Port of B-Robot_EVO2 Code
My guess is hardware/electronics.
When going fast, then stopping, current drawn by the motors is stopped immediately, which might result in current peaks that could have negative effects if not taken care of properly.
Did you integrate the capacitors for the motors in your setup (can't see them on the pictures, but maybe they are below the motor drivers as in my own setup)? Did you adjust the drivers' current appropriately?

Quote:The bot can still stand but in some case, ...
Balancing functionality is in the code of the bot, so that does not surprise me.

Quote:...it will turn but not moving forward or backward.
That's strange from a software perspective. If the wifi connection would have been broken, you couldn't steer at all. Neither turn nor move in any way.
Maybe just one motor is active at that point, which would match your description of shaking violently.

To sum it up, my guess is still hardware Smile
If you share details of your setup, maybe the electronic cracks in this forum can help.

BR,
ghmartin77
Find all posts by this user
Quote this message in a reply
05-15-2019, 10:29 PM (This post was last modified: 05-15-2019 10:30 PM by twinclouds.)
Post: #79
RE: ESP32 Port of B-Robot_EVO2 Code
Thanks for your comments and suggestions.
I recompiled the sketch using 1.02 Arduino-ESP32. It works right now. I added two 100uF capacitors anyway. Hope this fixed the problem.
"Turning but not moving forward/backward" is strange. It is probably related to app-bot interface. Nothing wrong with the motors.
Let's see what is going to happen.
Find all posts by this user
Quote this message in a reply
05-24-2019, 06:22 AM
Post: #80
RE: ESP32 Port of B-Robot_EVO2 Code
All problems gone after adding the capacitors?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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