Skip to content

Commit

Permalink
Update from_scratch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric authored Feb 3, 2025
1 parent 676e6ab commit 0bb6414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/simplefoc_library/code/from_scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ void loop() {
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:
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).
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.
`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).
`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).
If you cannot find the phase resistance of your motor and cannot measure it with your multimeter start small: `motor.voltage_limit < 1;`.
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. 😄

Expand Down

0 comments on commit 0bb6414

Please sign in to comment.