Suggestions for OpenSource Electric Unicycle firmware

Support for creating custom user applications on the VESC.
lizardmech
Posts: 171
Joined: 19 Jan 2016, 10:54
Location: Australia

Re: Suggestions for OpenSource Electric Unicycle firmware

Postby lizardmech » 06 Apr 2017, 08:18

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.

yes_we_can_gogreen
Posts: 40
Joined: 13 Apr 2016, 10:27
Location: uk

Re: Suggestions for OpenSource Electric Unicycle firmware

Postby yes_we_can_gogreen » 06 Apr 2017, 08:45

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.

Jackl
Posts: 8
Joined: 12 Mar 2017, 22:23

Re: Suggestions for OpenSource Electric Unicycle firmware

Postby Jackl » 07 Jul 2017, 09:12

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!

maxkinz
Posts: 29
Joined: 30 Jun 2017, 14:41

Re: Suggestions for OpenSource Electric Unicycle firmware

Postby maxkinz » 29 Aug 2017, 10:22

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

maxkinz
Posts: 29
Joined: 30 Jun 2017, 14:41

Re: Suggestions for OpenSource Electric Unicycle firmware

Postby maxkinz » 29 Aug 2017, 11:26

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.


Return to “Custom Applications”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest