You are here

ramping up RPM over uart (solved)

3 posts / 0 new
Last post
Davideo
Offline
Last seen: 2 years 3 months ago
Joined: 2017-09-19 15:38
Posts: 21
ramping up RPM over uart (solved)

Hi I've got a vesc with 4.12 driving a sensored outrunner motor. I'm using rollinggeckos vesc6 libs to control the vesc from an arduino compatible platform.

Many things are going great, and i'm controlling the RPM with the appropriate command in my program. For my design I'm attempting to control te rate of acceleration from one speed to the next, for this i wrote a function that uses the time since the command is given to multiply the additional RPM's by.  This kind of works, except for that the vesc doesn't seem to want to change the speed very smoothly, but rather stops ever so briefly every time the rpm is increased. 

Any one out there who dealt with a similar issue?

**UPDATE**

As it turns out my issue was related to using the - SSD1306 Monochrome 0.96" OLED display with 128x64 pixels -

This display is very slow and while it's updating the content, the CPU of my Teensy is busy. As a result the updates of RPM values to the VESC slows down noticeably.

Ones again the VESC isn't the issue :-)

 

Moderators note; should i remove the traces of my stupidity or do i leave this here as a monument for others to learn from?

 

 

 

wdaehn
Offline
Last seen: 3 years 2 weeks ago
Joined: 2017-09-12 17:26
Posts: 65

Opposite experience. For me the VESC behaves perfectly. You can see that even in the realtime logging of the VESC, the velocity ramp is perfectly linear.

 

How often do you send a packet? I send 50 per second. The VESC has a safety feature, which is that if no packet is received for a given time, it assumes communication loss and stops. see the keep-alive logic. That was at least my immediate thought reading your statement.

Davideo
Offline
Last seen: 2 years 3 months ago
Joined: 2017-09-19 15:38
Posts: 21

>How often do you send a packet?

Not sure, I'm leaving it up to the speed of my teensy. However the requested .rpm values out of the struct that i get from the vesc are updating really well. 

Are you using RPM to make the ramp happen or are you using another way to get your velocity ramp?