You are here

PWM on output

6 posts / 0 new
Last post
ml2311
Offline
Last seen: 3 years 4 months ago
Joined: 2021-08-24 14:42
Posts: 1
PWM on output

Dear all,

I would like to add a PWM to control and have a feedback on the motor RPM. Is there a specific cable plan or any tips to do this?

I am using the MTVESC7.12 V2 50V 200A VESC75/300 based Speed Controller.

Thank you!

 

Flyingtux
Offline
Last seen: 1 year 9 months ago
Joined: 2021-08-23 17:00
Posts: 16

Hi,

I'm interest too to have the rpm info in a pwm output to be able to check the current rpm in a external device,

Thanks if somebody can help

 

 

Flyingtux
Offline
Last seen: 1 year 9 months ago
Joined: 2021-08-23 17:00
Posts: 16

Hi,

no news on that features ?

Thanks

sp3swj
Offline
Last seen: 5 months 1 week ago
Joined: 2020-11-16 01:10
Posts: 9

In this project is used  PPM port as  output for serwo control

https://github.com/RacecarJ/vesc-firmware

 

Jarek sp3swj

Flyingtux
Offline
Last seen: 1 year 9 months ago
Joined: 2021-08-23 17:00
Posts: 16

Thanks Jarek,

but currently in the code i'ts cheese or desert. I mean even pwm input(to command vesc) or pwm output (to commande a servo).

I would like to conserve pwm input and add a erpm output on another IO.

Regards,

 

Flyingtux
Offline
Last seen: 1 year 9 months ago
Joined: 2021-08-23 17:00
Posts: 16

does anybody could help to configure simple servo output on AUX instead of servo

I put this in servo_simple.c:servo_simple_init(void)

#ifdef SERVO_SIMPLE_USE_AUX_PIN
    palSetPadMode(AUX_GPIO, AUX_PIN, PAL_MODE_ALTERNATE(HW_ICU_GPIO_AF) |
            PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUDR_FLOATING);
#else
    palSetPadMode(HW_ICU_GPIO, HW_ICU_PIN, PAL_MODE_ALTERNATE(HW_ICU_GPIO_AF) |
            PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUDR_FLOATING);
#endif //SERVO_SIMPLE_USE_AUX_PIN

commands_printf("Servo Output Initialized\n");

 

 

I put this in hw_75_300.h to disable any call to AUX_ON() or AUX OFF()

#define AUX_GPIO                GPIOC //external led, original was GPIOC
#define AUX_PIN                    12 //external led, original was 12
#ifdef SERVO_SIMPLE_USE_AUX_PIN
#define AUX_ON()
#define AUX_OFF()
#else
#define AUX_ON()                palSetPad(AUX_GPIO, AUX_PIN)
#define AUX_OFF()                palClearPad(AUX_GPIO, AUX_PIN)
#endif //SERVO_SIMPLE_USE_AUX_PIN

I can read "Servo Output Initialized" in terminal put no output on AUX_PIN !!!!