The braking current fix was not enough for me, so here’s another really quick beta. Hoping to get the final version out over the weekend.
Refloat version 1.0.1 has been released
It’s now available in VESC Tool Package Store. When upgrading from Refloat 1.0.0, config backup and restore is not needed.
Fixes
- Locking/unlocking the board no longer writes unrelated changes. (Dado Mista)
- Fix overflowing battery bar in AppUi.
- Add a a deprecation note to the Accelerometer Confidence Decay setting.
- Fix Floaty LEDs communication error if LED Type is not External.
- Fix spurious braking current at standstill on VESC Firmware 6.05 by raising the ERPM threshold to 10.
Hi !
I’m having trouble setting up LEDs on a VESC 6 mkiv by trampa.
I’m trying to use the servo/ppm pin to control SK6812 leds. It’s not super clear which capacitor I need to remove, I guessed it was this one :
On my VESC tool, I completely disabled all apps and set ‘Enable Servo Output’ to False in the general app settings.
In the refloat package settings, LED Pin is set to PPM/Servo pin and LED Type to RGBW.
My scope shows no signal on the servo pin (I double checked, pin is ok when using it as servo output with the standard vesc app).
I ran out of ideas on how to solve this issue, do you have any suggestions ?
Thank you so much !
Hello, assuming it’s the 75_300_mkiv VESC Firmware target, that uses the same pin as the Little FOCer and therefore the LED control should work.
Check the package output in desktop VESC Tool in LispBM Scripting → Console/REPL (assuming VESC Tool 6.05, I think the structure was a bit different in 6.02). You can restart the package by pressing the “Run” button on the right side of the screen to see the log messages right from the startup.
This is the only thing I can think of…
Hello,
I’m using the 60_MK4 vesc firmware with VESC Tool 6.05
As you suggested, here is the output of the console :
Parsing 761 characters
475.448211 [refloat] Initializing Refloat v1.0.0-beta6
Just bumped the version to 1.0.1, still the same 5V on the led power rail, 0V no signal on the data
Ok, that hardware also uses the same pin.
There are no errors in the log, so no clue there.
Please attach your refloat config .xml.
One more thing you can check is the LED thread is running by typing threads
in the VESC terminal and checking “Refloat LEDs” is on the list.
It’s the stock config, all I changed was the led pin config :
LED thread seems to be running :
addr stack prio refs state name motor stackmin time
-----------------------------------------------------------------------------
20002010 20000f4c 64 1 SLEEPING main 1 1480 0 (0.0 %)
20002068 2000217c 1 1 READY idle 1 192 1765 (88.6 %)
20016458 2001673c 64 1 SLEEPING mcif timer 1 440 4 (0.2 %)
20015d10 20016024 63 1 WTOREVT SampleSender 1 772 0 (0.0 %)
20015550 200157d4 124 1 WTOREVT Fault Stop 1 628 0 (0.0 %)
200160b8 20016394 64 1 SLEEPING StatCounter 1 536 0 (0.0 %)
200184f8 200187bc 64 1 SLEEPING foc timer 1 520 0 (0.0 %)
20017ab8 20017d64 64 1 READY foc hfi 1 536 0 (0.0 %)
20018250 2001843c 64 1 SLEEPING foc pid 1 304 0 (0.0 %)
2000fcb8 200106b4 64 1 CURRENT comm_block 1 1664 75 (3.7 %)
200023f8 2000256c 126 1 SUSPENDED usb_lld_pump 1 200 8 (0.4 %)
20012458 20012624 64 1 QUEUED USB read 1 312 2 (0.1 %)
20011ab8 200123dc 64 1 WTOREVT USB process 1 1624 5 (0.2 %)
20005ff8 200068bc 64 1 READY uartcomm proc 1 2096 1 (0.0 %)
20008f80 20009424 64 1 READY BMI Sampling 1 840 204 (10.1 %)
20008210 200086ac 64 1 SLEEPING UAVCAN 1 1032 0 (0.0 %)
200138c8 20013a84 65 1 WTOREVT CAN read 1 296 0 (0.0 %)
20013f08 20014204 64 1 SLEEPING CAN status 1 1 616 0 (0.0 %)
20013b68 20013e64 64 1 SLEEPING CAN status 2 1 616 0 (0.0 %)
20012f28 200137d4 64 1 WTOREVT CAN process 1 2148 0 (0.0 %)
20003188 2000337c 64 1 SLEEPING Main LED 1 352 0 (0.0 %)
20003430 2000362c 64 1 SLEEPING Main periodic 1 360 0 (0.0 %)
20002ee8 200030ec 2 1 READY Flash check 1 360 3 (0.1 %)
20004b10 20004ce4 64 1 SLEEPING Timeout 1 296 0 (0.0 %)
200053c8 20005504 64 1 SLEEPING Shutdown 1 96 0 (0.0 %)
2000a138 2000a9dc 63 1 READY Lisp Eval 1 1344 4 (0.2 %)
2000f418 2000f5ec 62 1 READY Event Helper 1 312 0 (0.0 %)
2000bd2c 2000c010 64 1 SLEEPING Refloat Main 1 508 3 (0.1 %)
2000caa4 2000cdb0 64 1 SLEEPING Refloat LEDs 1 492 2 (0.1 %)
<?xml version="1.0" encoding="UTF-8"?>
<CustomConfiguration>
<ConfigVersion>2</ConfigVersion>
<config_name>RefloatConfig</config_name>
<kp>20</kp>
<kp2>0.6</kp2>
<ki>0.005</ki>
<mahony_kp>2</mahony_kp>
<mahony_kp_roll>1.4</mahony_kp_roll>
<bf_accel_confidence_decay>0.02</bf_accel_confidence_decay>
<kp_brake>1</kp_brake>
<kp2_brake>1</kp2_brake>
<hertz>832</hertz>
<fault_pitch>60</fault_pitch>
<fault_roll>60</fault_roll>
<fault_adc1>2</fault_adc1>
<fault_adc2>2</fault_adc2>
<is_footbeep_enabled>1</is_footbeep_enabled>
<fault_delay_pitch>250</fault_delay_pitch>
<fault_delay_roll>250</fault_delay_roll>
<fault_delay_switch_half>250</fault_delay_switch_half>
<fault_delay_switch_full>250</fault_delay_switch_full>
<fault_adc_half_erpm>200</fault_adc_half_erpm>
<fault_is_dual_switch>0</fault_is_dual_switch>
<fault_moving_fault_disabled>0</fault_moving_fault_disabled>
<fault_darkride_enabled>0</fault_darkride_enabled>
<fault_reversestop_enabled>0</fault_reversestop_enabled>
<tiltback_duty_angle>5</tiltback_duty_angle>
<tiltback_duty_speed>3</tiltback_duty_speed>
<tiltback_duty>0.8</tiltback_duty>
<is_dutybeep_enabled>0</is_dutybeep_enabled>
<surge_angle>0</surge_angle>
<surge_duty_start>0.88</surge_duty_start>
<is_surgebeep_enabled>1</is_surgebeep_enabled>
<tiltback_hv_angle>8</tiltback_hv_angle>
<tiltback_hv_speed>1</tiltback_hv_speed>
<tiltback_hv>64.5</tiltback_hv>
<tiltback_lv_angle>10</tiltback_lv_angle>
<tiltback_lv_speed>1</tiltback_lv_speed>
<tiltback_lv>45</tiltback_lv>
<tiltback_return_speed>1</tiltback_return_speed>
<tiltback_constant>0</tiltback_constant>
<tiltback_constant_erpm>500</tiltback_constant_erpm>
<tiltback_variable>0.1</tiltback_variable>
<tiltback_variable_max>0</tiltback_variable_max>
<tiltback_variable_erpm>0</tiltback_variable_erpm>
<noseangling_speed>5</noseangling_speed>
<inputtilt_remote_type>0</inputtilt_remote_type>
<inputtilt_angle_limit>10</inputtilt_angle_limit>
<inputtilt_speed>25</inputtilt_speed>
<inputtilt_smoothing_factor>1</inputtilt_smoothing_factor>
<inputtilt_invert_throttle>1</inputtilt_invert_throttle>
<inputtilt_deadband>0.1</inputtilt_deadband>
<remote_throttle_current_max>0</remote_throttle_current_max>
<remote_throttle_grace_period>10</remote_throttle_grace_period>
<startup_pitch_tolerance>4</startup_pitch_tolerance>
<startup_roll_tolerance>45</startup_roll_tolerance>
<startup_speed>30</startup_speed>
<startup_click_current>0</startup_click_current>
<startup_simplestart_enabled>0</startup_simplestart_enabled>
<startup_pushstart_enabled>0</startup_pushstart_enabled>
<startup_dirtylandings_enabled>0</startup_dirtylandings_enabled>
<brake_current>6</brake_current>
<ki_limit>30</ki_limit>
<booster_angle>8</booster_angle>
<booster_ramp>4</booster_ramp>
<booster_current>0</booster_current>
<brkbooster_angle>8</brkbooster_angle>
<brkbooster_ramp>4</brkbooster_ramp>
<brkbooster_current>0</brkbooster_current>
<torquetilt_start_current>15</torquetilt_start_current>
<torquetilt_angle_limit>8</torquetilt_angle_limit>
<torquetilt_on_speed>5</torquetilt_on_speed>
<torquetilt_off_speed>3</torquetilt_off_speed>
<torquetilt_strength>0</torquetilt_strength>
<torquetilt_strength_regen>0</torquetilt_strength_regen>
<atr_strength_up>0</atr_strength_up>
<atr_strength_down>0</atr_strength_down>
<atr_threshold_up>1.5</atr_threshold_up>
<atr_threshold_down>1.5</atr_threshold_down>
<atr_speed_boost>0.3</atr_speed_boost>
<atr_angle_limit>8</atr_angle_limit>
<atr_on_speed>4</atr_on_speed>
<atr_off_speed>3</atr_off_speed>
<atr_response_boost>1.5</atr_response_boost>
<atr_transition_boost>3</atr_transition_boost>
<atr_filter>5</atr_filter>
<atr_amps_accel_ratio>9</atr_amps_accel_ratio>
<atr_amps_decel_ratio>8</atr_amps_decel_ratio>
<braketilt_strength>0</braketilt_strength>
<braketilt_lingering>2</braketilt_lingering>
<turntilt_strength>0</turntilt_strength>
<turntilt_angle_limit>3</turntilt_angle_limit>
<turntilt_start_angle>2</turntilt_start_angle>
<turntilt_start_erpm>1000</turntilt_start_erpm>
<turntilt_speed>5</turntilt_speed>
<turntilt_erpm_boost>200</turntilt_erpm_boost>
<turntilt_erpm_boost_end>5000</turntilt_erpm_boost_end>
<turntilt_yaw_aggregate>90</turntilt_yaw_aggregate>
<leds.on>1</leds.on>
<leds.headlights_on>1</leds.headlights_on>
<leds.headlights_transition>0</leds.headlights_transition>
<leds.direction_transition>0</leds.direction_transition>
<leds.lights_off_when_lifted>1</leds.lights_off_when_lifted>
<leds.status_on_front_when_lifted>1</leds.status_on_front_when_lifted>
<leds.front.mode>4</leds.front.mode>
<leds.front.brightness>0.5</leds.front.brightness>
<leds.front.color1>4</leds.front.color1>
<leds.front.color2>0</leds.front.color2>
<leds.front.speed>1</leds.front.speed>
<leds.rear.mode>2</leds.rear.mode>
<leds.rear.brightness>0.5</leds.rear.brightness>
<leds.rear.color1>23</leds.rear.color1>
<leds.rear.color2>0</leds.rear.color2>
<leds.rear.speed>1</leds.rear.speed>
<leds.headlights.mode>0</leds.headlights.mode>
<leds.headlights.brightness>0.5</leds.headlights.brightness>
<leds.headlights.color1>1</leds.headlights.color1>
<leds.headlights.color2>0</leds.headlights.color2>
<leds.headlights.speed>1</leds.headlights.speed>
<leds.taillights.mode>0</leds.taillights.mode>
<leds.taillights.brightness>0.5</leds.taillights.brightness>
<leds.taillights.color1>4</leds.taillights.color1>
<leds.taillights.color2>0</leds.taillights.color2>
<leds.taillights.speed>1</leds.taillights.speed>
<leds.status.brightness_headlights_off>0.5</leds.status.brightness_headlights_off>
<leds.status.brightness_headlights_on>0.2</leds.status.brightness_headlights_on>
<leds.status.show_sensors_while_running>1</leds.status.show_sensors_while_running>
<leds.status.duty_threshold>0.2</leds.status.duty_threshold>
<leds.status.red_bar_percentage>0.2</leds.status.red_bar_percentage>
<leds.status.idle_timeout>0</leds.status.idle_timeout>
<leds.status_idle.mode>4</leds.status_idle.mode>
<leds.status_idle.brightness>0.3</leds.status_idle.brightness>
<leds.status_idle.color1>4</leds.status_idle.color1>
<leds.status_idle.color2>0</leds.status_idle.color2>
<leds.status_idle.speed>1</leds.status_idle.speed>
<hardware.leds.type>2</hardware.leds.type>
<hardware.leds.pin>0</hardware.leds.pin>
<hardware.leds.color_order>1</hardware.leds.color_order>
<hardware.leds.status.count>2</hardware.leds.status.count>
<hardware.leds.status.reverse>0</hardware.leds.status.reverse>
<hardware.leds.front.count>2</hardware.leds.front.count>
<hardware.leds.front.reverse>0</hardware.leds.front.reverse>
<hardware.leds.rear.count>2</hardware.leds.rear.count>
<hardware.leds.rear.reverse>0</hardware.leds.rear.reverse>
<dark_pitch_offset>0</dark_pitch_offset>
<is_beeper_enabled>0</is_beeper_enabled>
<disabled>0</disabled>
</CustomConfiguration>
Just to confirm that my hardware is ok, this is my output when using the servo command in the standard vesc app :
Red is the LED power line and blue the signal line
Ok. Config looks good. I’ve ran out of ideas There might be a difference in the hardware that I’m not aware of and some of the low-level LED-driving code fails or something interferes with it.
I may at some point go through the initialization of that and see if there’s any error handling that could be missing. Another avenue if someone was able and wanted to would be to debug it directly on the hardware and see why it’s not working. I don’t have the hardware and I have a ton of other priorities
Yes, this is the cap that needs to be removed.
VESC 6 uses GPIOB Pin6 for Servo so it should work if you select “servo/ppm” as LED pin. You also need a 1k pullup resistor to 5V on the Din of the 2812B LED strip.
I use fw 6.05 and it works with a 5V RGB 2812B strip. It doesn’t matter if “enable servo output” is true or false. Under app settings/general chose “none” or “uart” for “APP to Use”
My LED strip didn’t work without a pullup resistor. I connected the pullup to the seperate 5V supply of the strip, not 3.3V from the VESC MCU.
Thank you so much, the 1k pullup resistor did the trick !
Oh, I’m dumb, sorry
I thought I don’t even need to mention that because you measured the pin with an oscilloscope. But I haven’t realized the pin is configured differently to work with the pullup and it needs it, otherwise it shows no signal
Hey! So I switched over to Refloat today on both my GTV and XRV and everything went smoothly. For the KP Mahoney settings, I followed what was in this post. When I did and gave the boards a test ride, the board was tilting up and down like a rodeo/ seesaw. I changed them back to what they were before and no issue. Should I be having them at something different? They are currently
KP:1.90
KI: 1.40
ACD: .02
Thanks