Page 8 of 8

Re: Suggestions for OpenSource Electric Unicycle firmware

Posted: 06 Apr 2017, 08:18
by lizardmech
The only problem with this is it lacks SVM and sensorless operation. Will the hall sensors give good enough data at high RPM? It would be interesting to know if something similar was being used in the chinese controllers or if they only use the halls for startup. On the other hand this code could be really good for gimbals as it's easy on the MCU you could probably run 3 motors or more on a single M4.

Re: Suggestions for OpenSource Electric Unicycle firmware

Posted: 06 Apr 2017, 08:45
by yes_we_can_gogreen
It does have SVM, although it is on a table and not calc in real time.

I am still working to have it working for Electric Unicycle application and I hope improve over the time, specially when there will be a need.

Sensorless, I should implement after having EUC application code.

Re: Suggestions for OpenSource Electric Unicycle firmware

Posted: 07 Jul 2017, 09:12
by Jackl
Hi Everyone!

I am also trying to build a Unicycle, based on the VESC Controller.

I was reading out an MPU6050 input that into an PID Controller and then control the Vedder via UART. It is not as stable as I want it to be. I reckon this is due to deadtimes in the communicaiton between the Arduino and the VESC.

I am now trying to implement the balancing algorithm into the VESC directly as a custom app.
Does anybody have a working MPU6050 implementation for the VESC? This would really accellerate my progress!

Cheers!

Re: Suggestions for OpenSource Electric Unicycle firmware

Posted: 29 Aug 2017, 10:22
by maxkinz
Hi Jackl !

I recently had success connecting to the MPU 6050 using this library :

https://github.com/jevermeister/MPU6050-ChibiOS

- It is appearently abandoned and old but... it works - at least as far as I can tell - haven't played much with using the dmp or anything but getting raw data is easy enough ....

Remember to hw_start_i2c(); before you initialize otherwise the app crashes - a good debugging option is the terminal as suggested here :

http://vedder.se/2015/08/vesc-writing-c ... lications/

- but it didnt do it for me so I quickly recompiled BLDC tool to include an additional realtime data plot.The terminal is however very useful to find out if your thread is running using the "threads" command. (remember to use chRegSetThreadName("name_of_thread")).

Also I do develop on a CJMCU-407 board as I dont want to risk my controller so I haven't actually tested it on the VESC itself wich I will delay until Kalman filtering is running.

Good luck with your project !
Max

Re: Suggestions for OpenSource Electric Unicycle firmware

Posted: 29 Aug 2017, 11:26
by maxkinz
P.S. PM me for sourcecode etc. Its a "Quick and dirty" hack so far not documented very well etc. so I am not going to upload it to github or anything but you are obviously welcome to use it "as it is" if anyone is interested.