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.
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.
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
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.
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.
Power for rpi from any battery
@longhairedboy fuck screens, portable projector, screen on the road in front of you
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.
you thought I haven’t thought about this? You wouldn’t be able to see it during the day though!
You wouldn’t be able to see an rpi screen either
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…
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!
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:
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:
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:
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
You might have to
sudo chmod +x BLDC_Tool
because I 100% definitely know what I’m talking about, mmhmm, definitely, absolutely no copy-paste at all…
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
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.