cancel
Showing results for 
Search instead for 
Did you mean: 

Speed control

Ranjeet Singh
Senior

how we can change the speed of motor in STEVAL -SPIN3201 using external Potentionmeter?/or inbuilt Potentionmeter (Variable resistor )?

1 ACCEPTED SOLUTION

Accepted Solutions
Gael A
ST Employee

Hello Ranjeet Singh,

Using the MCSDK 6.1.2, you can enable the potentiometer while configuring your project via WorkBench.
Under Stage Configuration, check the Potentiometer box :
STEVAL_SPIN3201.PNG

The generated project should include a speed control using the board's potentiometer.

Hope this will help,
Gaël A.

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

11 REPLIES 11
Gael A
ST Employee

Hello Ranjeet Singh,

Using the MCSDK 6.1.2, you can enable the potentiometer while configuring your project via WorkBench.
Under Stage Configuration, check the Potentiometer box :
STEVAL_SPIN3201.PNG

The generated project should include a speed control using the board's potentiometer.

Hope this will help,
Gaël A.

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

Hope this will help,
Gaël A.
Ranjeet Singh
Senior

how to solve this in old software 5.4.7 ?

Hello Ranjeet Singh,

Unfortunately, the potentiometer feature was not available in MCSDK 5.4.7 and was introduced in version 6.0.
However, you can still implement it yourself with a bit of coding.

Hope this will help,
Gaël A.

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

Hope this will help,
Gaël A.

sir ,can i know how i can add this coding?

It's not something you click to "add". In this context "coding" is a verb and means you have to develop/write code!

yeah sir,i got your point ,but from where i can get this code,can you share code?or code link

Gael A
ST Employee

Hello Ranjeet Singh,

In my opinion, the easiest way to do it is to generate two projects using MCSDK 6.1.2 : one with potentiometer enabled and the other without, and see what the differences are so you can copy the potentiometer related part of the code to your 5.4.7 project.

Hope this will help,
Gaël A.

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

Hope this will help,
Gaël A.

Not "get" that code somewhere, but, as Gaël already said: "implement it yourself" Which part of that phrase you don't understand? It means creating a code, not copying.

How do I set what this potentiometer is used for?
For example, by default it seems to be used for setting speed, but what if I want to use it for setting any other value, like max torque, position or max amperage value?
Likewise, what happens if I have more than one Potentiometer on my board, how do I change which is used for what?