Issue: VESC with Nunchuk works only with full throttle

Lightweight / Folding / Portable EVs - seats optional
Post Reply
RollingGecko   100 W

100 W
Posts: 110
Joined: Jul 14 2015 2:20am

Issue: VESC with Nunchuk works only with full throttle

Post by RollingGecko » Oct 20 2015 2:17am

Hi,

I've now build an Arduino based Nunchuk replacement with nRF24 that communicates with the VESC over UART an takes also the measured values and gives them back to the remote. Currently I use 2812 to indicate for example voltage state. Later I will add a OED. I will soon publish everything.

I just added a small peace of code to the commands.c message handler. I added a message, that sends the nunchuk data and pasts them the the nunchuck app. So far so good. In the bldc tool I can see, that it reads the information of the y-axis fine.

My problem is now, that the motor starts spinning after the deadband with full throttle. There is no regulation possible. I don't think, that it is caused by my implementation. As I sad, on the bldc tool I can see a good interpretation of the y-axis joystick position.

With PWM and direct current setting over UART it works fine.

Any ideas?

Regards

Andreas
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/

User avatar
benj   100 W

100 W
Posts: 242
Joined: Jun 06 2013 3:32am

Re: Issue: VESC with Nunchuk works only with full throttle

Post by benj » Oct 20 2015 2:42am

Hi Andreas. Are you using current control? If so, that's what happens. Once you have resistance/a load on the motor the current control takes over. If you've got a board ready to roll then just give it a very cautious test whilst standing on it

vedder   100 W

100 W
Posts: 249
Joined: Nov 05 2011 9:37pm

Re: Issue: VESC with Nunchuk works only with full throttle

Post by vedder » Oct 20 2015 2:46am

Nice! I was also planning to add a nunchuk command to the commands interface, but I haven't done it yet. I'm also planning to use the commands interface from the nrf app so that there is no need to add an extra arduino to read data, but I right now I'm working on the FOC implementation so I won't have updates for a while.

Are you sure that there is a problem? The nunchuk app uses current control and if you have no load on the motor it will accelerate to full speed even on very low throttle.
Some of my projects: http://vedder.se
Support my open source ESC development with a small donation

RollingGecko   100 W

100 W
Posts: 110
Joined: Jul 14 2015 2:20am

Re: Issue: VESC with Nunchuk works only with full throttle

Post by RollingGecko » Oct 20 2015 7:46am

Ok. That can be the issue. I didn't try it with load. Just the gear and the roll. But I will !NOT! step on board for first test! Never the less it is still all on a breadboard.

I will try it this evening by holding the roll with my hand (till it get's to hot :))

Thx
@vedder: I can send you a pull request of my changes to BLDC. It is not that much. Take a look to it if you want to.


Currently I''m using a library for the nRF24 https://github.com/TMRh20/RF24 where send the measure data back as a acknowledgment message. So I've a reliable connection without any concerns with switching between receive and send. But I already think on a message based version similar to your UART implementation. Because once a display is attached to the remote, there will come also ideas for configuration etc. up.

Any suggestions are welcome. But I will not write a complete library for the nRF. So it schuld be a layer above the https://github.com/TMRh20/RF24.

It would be great to get rid of the arduino on the board site. At beginning I didn't understand anything of the code on the bldc. But now I'm able to adapt also own applications after hours analizing the code to find out how the UART works. I found yesterday the great explanation to the UART on vedders site. :(

Regards

Andreas
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/

RollingGecko   100 W

100 W
Posts: 110
Joined: Jul 14 2015 2:20am

Re: Issue: VESC with Nunchuk works only with full throttle

Post by RollingGecko » Oct 20 2015 2:11pm

OK. First success. I reduced the motormax to 10A. That allows without load a good control. Pushing the c button holds the speed.

But: I'm not able to accelerate or deaccelerate with pushed cruise-control. :( Why?

And: Reverse does not work. There I will take a look in my code snipped added. Problem is only that I have to wait for a new programmer. I burned mine....don't ask :evil: :oops:
Github: https://github.com/RollingGecko
ArduBoardControl: The Nunchuk Arduino implementation for the VESC: https://github.com/RollingGecko/ArduBoardControler
Berlin Custom Boards: All around DIY longboards: https://www.facebook.com/berlincustomboards/

Post Reply