You are here

VESC 5.01 + ESP8266 + UART no data received?

4 posts / 0 new
Last post
i-make-robots
Offline
Last seen: 4 years 5 months ago
Joined: 2020-04-16 02:09
Posts: 2
VESC 5.01 + ESP8266 + UART no data received?

Hello!

Thank you for the patience and care you give to everyone who comes through here.  I hope that my question is easy and well put.

I'm trying to get an ESP8266 to drive a VESC.

I have a 5045/200kv brushless motor on a flipsky (FSESC 4.12 50A Based on VESC® 4.12) with a 2200mAh 11.1v 25C battery.  I have solid blue/green lights on the VESC and I can drive the motor from the VESC tool through a usb-mini connection, so I know the motor/batter/vesc combo works.

I disconnect the USB and connect instead to the ESP8266.  The ESP8266 matches these pinouts https://i2.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/05/ESP...

  • VESC P3 pin 6 -> nothing
  • VESC P3 pin 5 -> nothing
  • VESC P3 pin 4 -> GND
  • VESC P3 pin 3 -> nothing
  • VESC P3 pin 2 -> ESP8266 pin D7
  • VESC P3 pin 1 -> ESP8266 pin D8

Image here: https://imgur.com/gallery/IuPslE3  On this breadboard the VIN/GND connect to nothing.

I can talk to the ESP no trouble.  I have https://github.com/Peemouse/VescUart installed.  I can't getVescValues() or getFWversion().  I have also tried https://github.com/SolidGeek/VescUart and https://github.com/bastianraschke/ESP8266VESC .

I found http://vedder.se/wp-content/uploads/2015/01/PCB_Front-1024x683.png and http://vedder.se/wp-content/uploads/2015/01/Schematic-1.png to make sure I was wiring things right.  FlipSky's P3 has seven pins instead of the six I find documented online, which is concerning.  I tried swapping RX/TX pins with no success.  Now I'm out of ideas.

If you have a hint, suggestion, encouragement, or humorous "man, I've been there", please respond.

Thank you!

 

TheFallen
Offline
Last seen: 1 month 1 day ago
VESC FreeVESC Original
Joined: 2017-09-11 11:46
Posts: 222

You've posted a picture of the v4.6 schematic and I think that's at least v4.12 hardware so its not too surprising they're out of sync.

That's taken from the v4.10 schematic and shows the 7th pin.
You have the VESC TX connected to the ESP8266's RXD2 and the VESC's RX connected to the ESP8266's TXD2 so that seems reasonable.
They both ought to be at +3V3 levels so no translation is required. Do you have a common 0v/GND/pin3 connection? I can't see one, without that the serial will get confused.

Now you don't actually say what the problem is? Are you trying to send commands from the ESP8266 to the VESC and the ESP8266 isn't recognising any serial characters at all from the VESC?
Have you enabled the UART control mode on the VESC via USB?
Have you used a logic analyser/2nd serial convertor to spy on the serial lines to see if the ESP8266 is actually sending characters? at the right speed?
Have you verified that the VESC isn't sending characters and the ESP is just ignoring them?
Sometimes the way libraries are written you may find your code sending the wrong format back and forth, e.g. the library gives you an array of bytes to send, so you send each byte as two characters.

I guess what I'm suggesting is write a simple bit of code that just polls for battery voltage and then try to verify everything.

Sen
Offline
Last seen: 3 years 11 months ago
Joined: 2021-01-09 13:49
Posts: 1

I'm pretty intrigued with making my own tx and rx for the vesc, is there any complete guide of how to make your own using esp8266 in the net? I've been looking but still unsuccessful

sen

Nickklas
Offline
Last seen: 1 year 9 months ago
Joined: 2021-04-06 08:16
Posts: 1

Hello,

I have a similar problem. I connect my Arduino Mega to a Flipsky V6.6 with the current firmware 5.2. The UART connection only works halfway. I can call up the firmware with getfwversion (), but with getvescvalues () I don't get any data. Does anyone have any ideas about this?

Thanks

Nick