Certified FOCBOX Suppliers | Get Focbox Unity

Recording data from VESC? Summary of tools

vesc;data;logging

#1

Wondering if anyone’s come up with a way of recording data from your VESC with out having to hold a laptop that’s wired to your VESC and recording the screen (which is what I did once)? My method worked, and I have pretty graphs, but it’s too risky riding with a laptop and wires and all.

I was thinking if there was some code running on the VESC that recorded this data to a USB thumb drive, attached via a USB single to the USB port on the VESC. Something simple like that which can save data without a laptop.


#2

+1. I have tried to have the UART work but no luck so far. Ideally if I can program something like an open logger to collect these data that would be awesome. I have one of these, just couldn’t make the system work at all with the VESC.

Leo


#3

Do you know what files/classes this data flouts around in? I want to try to write something to log data, but the structure of the vesc code confused me (could be because I need to learn c, but that’s why I’m taking parallel programming this fall).

Do you know where to find more documentation on the vescs code structure? I found only little pieces here and there on vedders site.


#4

has anyone thought of maybe using a PC Stick or NUC?


#5

I need to research those more, but that sounds like a good idea. I was hoping for a cheaper option though.


#6

Here’s what Vedder says about UART comms

http://vedder.se/2015/10/communicating-with-the-vesc-using-uart/

Also, in terms of implementation it would be nice to have a bluetooth or wifi module sending data to a mobile phone app or maybe directly to open logger SD card.

Leo


#7

have you seen what @jacobbloy did with the bluetooth module and iphone app? That might just be the solution.

I just need to see what’s going on while I’m riding and watt meters are too hard to read while going 25+ mph. A phone in my hand is more reasonable.


#8

Yes I have seen that. That would be good. I don’t need to have a real time view, I really don’t want to check my phone going 30 mph :slight_smile:. All I want is for it to record the data (and possibly export it) for later review.

And here’s a library that communicates with the VESC using an Arduino

Leo


#9

while discussing option for VESC data logging we collected a lot of information in another thread. Now we would like to make this information acessable for everybodey. So here it goes, the current summary of VESC data logging options. Thanks a lot to @makevoid for compiling a lot of the information and investing his time so far!

@makevoid Arduino SD Data Logger - OpenSource
Hardware:

  • Arduino connected to VESC via UART
  • Standard SD Card shield

Code:

This code logs data in a JSON time series format.

Power the arduino off the VESC or use a common ground. The code runs on the Arduino device and pulls the data out of the VESC. The data is then stored on a standard SD card shield connected to the arduino. You need to set the VESC to ppm + uart mode and you only get the right data if the controller is on and connected.
If you want to analyze the data, the SD card needs to be removed. You can then analyze the data either using the JSON data to GIF generator or the graph tool mentioned below.
If there are enough requests, makevoid might add a CSV format as output.


@makevoid JSON data to GIF generator - OpenSource
@makevoid also made a program that takes the JSON time series and generates a text gif to embed in videos
Code:

The program runs on Linux, opens the log file VESC_LOG.TXT and creates a GIF image based on the data in the log file. This image can be included in videos.


@makevoid JSON to graph app to make video overlays
Software:


gpxlBen VESC data logger to iOS – OpenSource
Hardware:

Code:

The adafruit chip is connected to the VESC via UART and forwards the serial data to an iOS device. The program runs on the iOS device, no change needed in the VESC firmware. Set the VESC to ppm + uart mode. You only get the right data if the controller is on and connected.
You need somebody with a mac and XCode to compile the code for you and create the iOS app.
The original app shows VESC values but does not logging (yet).
The fork by makevoid added code to do logging as well.


solarturtle vedder esc monitor - Android app
Hardware:

Install the app via Google Play, connect the HC-05 to the VESC via UART. The HC-05 forwards the serial data to the android device. Set the VESC to ppm + uart mode. You only get the right data if the controller is on and connected. The app on the device shows real time and peak values. Logging to file possible, Excel format (to be verified)


Traction app - for iOS and android
hardware:

  • serial port to bluetooth connector (E.g. HC-05)

Code:

Dashboard app for electric vehicules, similar to solarturtle app, looks very advanced.


ARDUINO - help and ideas thread
VESC Monitor - Android App
ARDUINO - help and ideas thread
#10

Some screenshots and notes about the 3 apps:

gpxlBen (iOS):

has nice graphs and logging to file on my branch - somebody could compile it and release a beta on tesflight for users of this forum


Solarturtle (Android): [DL LINK]

(not open source, we could contact the developer and ask if he wants to release it as open and maybe support him with some donations? or make the Traction app work then we have an app for android already and we don’t need this - the upside is that it can be downloaded without compilation as it’s already published on the google play store)


Traction:

http://www.electric-skateboard.builders/uploads/db1493/optimized/3X/e/9/e9a21665c7faa731679d48196adbc78416b19f23_1_690x388.png

the code seems really well done but the current version seems to display only the mosfet temp (the one in the screenshot above labeled as Drive T) out of the box, as all the data it’s sent together it shouldn’t be too difficult to display (and log to file) the other data as well… I will attempt to do it next week…


an useful link: amazon search of hc-05


demo video using gpxlBen app (json logfile fork) + the ruby sdl2 tool to make the video


#11

That is written for a ESP8266 (Wemos mini D1). So my board has it’s own wifi. If anybody wants to have the code i can share the scetch for the ESP and the android apk.


#12

I have the HC-05, do you connect all 6 pins to the vesc? Could you show me a picture of where its connected to the vesc? Sorry I have no knowledge or experience of anything on this forum besides skateboarding, but I’m willing to learn more about electronics. Thanks.


#13

This post was flagged by the community and is temporarily hidden.


[Inactive] Vesc android/iOS app
#14

You have to connect the HC 05 pins to the UART pins on the VESC

HC05 --- VESC
VCC - - -  5V
GND - - - GND
RX  - - -  TX
TX  - - -  RX 

leave the other pins unconnected

You can use the VESC 3.3V pin as well


#15

If you have a mac and xcode you can download the project and build it on your device, otherwise you can pm your UDID via pm and I can send you a compiled app


#16

Your in luck because I’m getting my developer account again today and will be putting it in the app store. I have 15 of the adafruit bt chips on their way and I will be soldering them up with plugs. I’m planning in the near future to find time to work on some new apps for this chip.


#17

thank you!


#18

This post was flagged by the community and is temporarily hidden.


#19

I can’t make any promises of when it will be in there though… I’ve never submitted an app before, and I hear the process can be grueling… so we shall see. But I already renewed my developers license and in the proccess of enter the massive amount of info they want, haha.


#20

I have everything hooked up but the VSC monitor app (solarturtle) isn’t displaying anything (everything still at 0). Im on android btw. Its also already paired to my phone. In bldc tool, its set to ppm+uart.
Just to make sure it’s wired properly:

hc05 – vesc
5v - 5v
GND - GND
rx - tx
tx - rx

is that correct?

Do I have to configure the Bluetooth module first or will it work out of the box?