Skip to content

Commit 0bb6414

Browse files
authored
Update from_scratch.md
1 parent 676e6ab commit 0bb6414

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/simplefoc_library/code/from_scratch.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ void loop() {
744744
Once you have the code ready, upload it to your board and open the serial terminal. If everything is connected correctly you should see the motor spinning. If the motor does not spin, please check the following things:
745745
1. Make sure you use the right driver class and right pwm pins, this one is usually very simple and you can find a lot of docs about these things in our [driver docs](drivers_config) and in our [guide to choosing the PWM pins](choosing_pwm_pins).
746746
2. Make sure to use a proper voltage limit. All of these examples assume you are using a gimbal type motor with high phase resistance (~10 Ohms). For higher power motors, the current will probably be too high, putting your motor+driver at risk. As a rule of thumb, if your motor has a servo type plug, you should be fine.
747-
`motor.voltage_limit` will directly determine the current passing through the motor: `current = phase_resistance*motor.voltage_limit`. So to avoid too high currents please try to find what is the phase resistance of your motor and set the `motor.voltage_limit` such that the current does not surpass 2 Amps for example: `motor.voltage_limit = 2*phase_resistance`. The best option would be to provide your phase resistance value to the motor by setting the parameter `motor.phase_resistance` and then you can use `motor.current_limit` instead of the `motor.voltage_limit` making this issue much simpler. If you wanna try to measure the phase resistance of your motor you can find the our guide [here](phase_resistance).
747+
`motor.voltage_limit` will directly determine the current passing through the motor: `current = motor.voltage_limit/motor.phase_resistance`. So to avoid too high currents please try to find what is the phase resistance of your motor and set the `motor.voltage_limit` such that the current does not surpass 2 Amps for example: `motor.voltage_limit = 2*phase_resistance`. The best option would be to provide your phase resistance value to the motor by setting the parameter `motor.phase_resistance` and then you can use `motor.current_limit` instead of the `motor.voltage_limit` making this issue much simpler. If you wanna try to measure the phase resistance of your motor you can find the our guide [here](phase_resistance).
748748
If you cannot find the phase resistance of your motor and cannot measure it with your multimeter start small: `motor.voltage_limit < 1;`.
749749
3. Make sure to put the right pole pair number. This you can find in most data-sheets, if you are not sure what is the true number don't worry this step is intended to test/find exactly this value. 😄
750750

0 commit comments

Comments
 (0)