cancel
Showing results for 
Search instead for 
Did you mean: 

Throttle signal in STEVAL-CTM009V1 (Eval Board) and STEVAL-TTM002V1 (Control Board) for Motor Control?

tejas_amp
Associate III

I am using STEVAL-CTM009V1 (Eval Board) and STEVAL-TTM002V1 (Control Board) for Motor Control, by software side (SPC5 and MC Monitor Live), it is controllable. I want to interface throttle with it but i am unable to find throttle signal in eval board, have gone through the documentations but no use, Please Suggest !

1 ACCEPTED SOLUTION

Accepted Solutions

Hello tejas_amp,

Well it all depends on your application needs, as well as the rate at which you wish to sample the voltage level from your throttle, and if you check every time if your voltage level is in the boundaries you fixed.

Let me explain with an example : if you put your if check on an infinite while loop (in your main.c for instance) and that you check your voltage level every ms, you will end up programming a new Torque Ramp every millisecond, which is not useful, you only need to set it once.
I would advise to check if your voltage level has changed boundaries before making any modification.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

View solution in original post

4 REPLIES 4
Gael A
ST Employee

Hello tejas_amp,

I am sorry but I fear I do not really understand what you are trying to do here.
The way I understand it is that you want to control your motor speed using an external throttle, am I right ?

If that is true, then as the STEVAL-CTM009V1 has no embedded Potentiometer, a throttle code needs to be manually implemented. You can take a look at how the Potentiometer code has been implemented on the MCSDK (using a generated code for G431 + IHM16 for example) and try to reproduce it on your setup with your own throttle connected to a soundly chosen pin knowing you only need an ADC Channel for this.

 

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Yeah, that's correct, I want to connect my controller to external throttle & achieve regulate motor speed. I accept your method to manually implement potentiometer. But can I do something like below:
1. Sensed voltage level from throttle to a A_IN pin in microcontroller. (probably 0-5 V)

2. Using if-else with A_IN, ramp up/down motor speed.

example: 

if A_IN > 3 and A_IN < 4:

MC_programSpeedRamp(2000 RPM, 4000);

Is this correct thinking or has faults?

Hello tejas_amp,

Well it all depends on your application needs, as well as the rate at which you wish to sample the voltage level from your throttle, and if you check every time if your voltage level is in the boundaries you fixed.

Let me explain with an example : if you put your if check on an infinite while loop (in your main.c for instance) and that you check your voltage level every ms, you will end up programming a new Torque Ramp every millisecond, which is not useful, you only need to set it once.
I would advise to check if your voltage level has changed boundaries before making any modification.

If you agree with my answer, please consider accepting it by clicking on 'Accept as solution'.

Hope this will help,
Gaël A.

Thanks a lot! I will try it.

Last small doubt, In STM Cube IDE after selecting Pin usage in .ioc file, all configurations automatically get generated but in this SPC5 with these controller and power eval board, it's not getting generated.

 

tejas_amp_0-1720601570780.png

Here, I am making Pin No. 43 as Analog Input through ADC Channel2. Can you please help me in how to sense voltage input from this pin?