BLDC Tool on a Raspberry Pi

Before you ask why I want to run BLDC Tool on a Raspberry Pi, why not? There would be so many things you can achieve if you had realtime access to your VESC. you could program things to work in a certain way. besides, you could do a lot more by adding motion, heat sensors etc.

I tried compiling the BLDC Tool on a raspberry pi 2 running on Raspbian Jesse, with no luck. I think thats because I was unable to make Qt work on the Pi.

Before I give more details regarding what went wrong when I tried compiling the BLDC Tool on the pi, I just wanted to see if anyone had any luck with this.

Orkun

1 Like

Tried these fixes? http://vesc-project.com/node/138

2 Likes

I owe you lunch! After eight hours of fiddling around trying to compile the qt app on the raspi, this was the only thing that made it work. Thanks, man! I will make a short how-to guide about this soon.

1 Like

oh hell yes.

Would you be able to source some sort of screen to go with itā€¦ like some kind of touch screen or maybe a clamshell device with a screen and keyboard?

@longhairedboy I already tried doing that on a 3.5 inch GPIO touchscreen. But since qt apps dont scale like that, it was impossible to see the whole window without maybe panning around the screen. Instead I was thinking of creating an iphone hotspot and connecting to the raspi via VNC. Nevertheless, this is what it looked like :slight_smile:

I know its whacky as hell, but I just wanted to see how worthwhile it is to collect usage data and adjust settings on the go.

Three problems remain with this setup:

  • Feeding power to the pi through the VESC.

  • Adding another vesc to make use of the dual hub motors.

  • Editing the Ackmaniac BLDC Tool to work on smaller resolution screens WITHOUT panning. (cant show how it looks like on the screen since I had to delete the LCD Drivers for emptying space for all the qt packages)

BLDC Tool needs a locally hosted service API so it can run headless. Compiling QT for a million screens is stupid when you could load it up as a service and just plop a JS app on top of it. Any JS app. For any situation, such as these dumb tiny screens.

2 Likes

not very familiar with javascript. I will look what needs to be done tomorrow. it would be awesome if someone housed an LCD screen on their setup, for benchmarking with different VESC builds, motors, etc.

1 Like

You could effectively do that with a data logger and then build something to parse and display the data in a usable , friendly, and possibly exciting fashion. Plenty of charts and graphs and the ability to compare them as overlays and whatever. There are apps for phones that do some of this but i would like to see a nice desktop app with big screen support for really showing all those datas and their bits. At some point iā€™m going to do this because thatā€™s actually something i can do. Ripping logs is a skillset i happen to have. Also replaying the log as recorded media through some kind of dashboard would be amazing.

1 Like

Power for rpi from any battery

@longhairedboy fuck screens, portable projector, screen on the road in front of you :sunglasses:

1 Like

only if it can be done with high powered lasers to defeat the sun light.

lasers that can also be used to target and vaporize flying insects headed for my face.

1 Like

you thought I havenā€™t thought about this? :smiley: You wouldnā€™t be able to see it during the day though!

You wouldnā€™t be able to see an rpi screen either :yum:

Well done on porting to Pi, Iā€™d love to try this too. Any progress on writing the ā€œHow to?ā€ Iā€™ve got a need to change contorl parameters on the fly whilst runningā€¦ and recording data would be great too.

Iā€™m using a bike hub motor in regen (For a flying wind turbineā€¦ Daisy windswept-and-interesting.co.uk) Taking a Pi out in the field is going to be better than taking my pc outā€¦ :frowning:

For my first test all I want to be able to do is Monitor unloaded ERPM, then set an ERPM level and send it as a UART control equivalent of the VESCtool (in Windows) button for setting ERPM speeds. Iā€™d also like to be able to send the equivalent stop command to avoid any regen. Iā€™m hoping to eventually use live wind data or line angle data to set rotor speeds.

Any bonus functionality like displaying voltageā€¦ rocks! thanks

1 Like

I first started with the standard raspbian jesse OS. You need to update and upgrade your OS to make sure everything is working fine. So begin with entering these:

sudo apt-get update
sudo apt-get upgrade

Depending on your internet connection, this might take a while. After this, you are going to get the dependencies to compile bldc-tool on your raspberry pi:

sudo apt-get install qt-sdk

Always good practice to restart after this. make sure you have the correct bldc-tool for your specific firmware. I used the @Ackmaniacā€™s bldc-tool for my setup, since it supports v2.54 After this, change your working directory on the terminal to the folder where bldc-tool files are.

cd /(PATH TO YOUR BLDC-TOOL FILES)

Now we have to add some parameters into the vesc_tool.pro file. Open that with nano:

nano vesc_tool.pro

add this line to the end of the file. press ctrl+c and then type Y to save your changes:

CONFIG += C++11   

afterwards, run these two lines to clear your working space:

make clean
qmake

You will have to wait for a while, it took me around 5-7 minutes to compile everything together. At the end you should have a new file called BLDC_Tool . Run this line in the BLDC_Tool directory to run the program:

./BLDC_Tool

I might be wrong about the file name but it should be a file with no extension. Let me know if you run into any problems. It would be a nice idea to create a mobile hotspot and make the raspberry connect to it, and then create a VLC Connection to the raspberry to control the operation of the BLDC Tool

3 Likes

You might have to sudo chmod +x BLDC_Tool first, then ./BLDC_Tool

because I 100% definitely know what Iā€™m talking about, mmhmm, definitely, absolutely no copy-paste at allā€¦

:stuck_out_tongue:

EDIT: For future reference, b264 posted a those instructions but then deleted his post because he remembered he wasnā€™t going to be helpful any more, so I copy-pasted them from the edit history :wink:

4 Likes

Thanks for this awesome post! It looks like it canā€™t run the make line and compile. It gets me here: make: *** No rule to make target ā€˜cleanā€™. Stop.