Skip to content

Commit

Permalink
Merge pull request #24 from simplefoc/dev
Browse files Browse the repository at this point in the history
Update docs for 2.3.2 release
  • Loading branch information
runger1101001 authored Dec 1, 2023
2 parents 497f638 + aa8baca commit 668160f
Show file tree
Hide file tree
Showing 8 changed files with 816 additions and 18 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
# simplefoc.github.io

Documentation website for SimpleFOCproject

- [Documentation](https://docs.simplefoc.com)
- [Community forum](https://community.simplefoc.com)
- [Shop](https://simplefoc.com/shop)


## Running the site using anaconda environement

Nice tutorial: https://s-canchi.github.io/2021-04-30-jekyll-conda/

First create the new anaconda environmnet using the `environment.yaml`file

```
conda env create -f environment.yaml
conda env create -f environement.yaml
conda activate simpledocs
```

Once in the environment `simpledocs` install jekyll

```
gem install jekyll bundler
```

Then install necessary jekyll dependencies of the simplefoc docs:

```
# Optionally specify "--path /some/other/dir" to avoid needing root.
bundle install
```

And you're ready to go!

Just make sure that whenever you open your terminal to generate the website to activate the conda environment:
```
conda activate simpledocs
```


## Generating the website
## Generating the website

To generate the site locally clone the repo to your local directory and then open terminal inside the repo folder and run:

```
bundle exec jekyll serve
```

Since the site is quiet large sometimes the `--incremental` flag helps with faster execution

```
bundle exec jekyll serve --incremental
```
Expand All @@ -50,4 +58,4 @@ bundle exec jekyll serve --incremental
- `url: "http://olddocs.simplefoc.com" `
- `baseurl: "v2.2.3"`
3) run `bundle exec jekyll build`
4) in `_site` you have the generated html
4) in `_site` you have the generated html
7 changes: 6 additions & 1 deletion docs/simplefoc_library/hardware/motors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ Arduino <span class="simple">Simple<span class="foc">FOC</span>library</span> su
- 2 phase (4 wire)

## 📢 Make sure to read this before running any motor!

Before running any BLDC motor with the <span class="simple">Simple<span class="foc">FOC</span>library</span> please make sure your hardware can handle the currents your motor requires.

The simplest way to do it is by checking the motor phase resistance `R`. Either check the datasheet of your motor and search for the resistance value or measure it yourself using a multimeter. Then check the value of your power supply voltage `V_dc` and once when you have the values you can find the maximum current `I_max` value by calculating:
The simplest way to do it is by checking the motor phase resistance `R`. Either check the datasheet of your motor and search for the resistance value or [measure it yourself using a multimeter](phase_resistance).

Then check the value of your power supply voltage `V_dc` and once when you have the values you can find the maximum current `I_max` value by calculating:

```cpp
I_max = V_dc/R
```

Finally check the value of the maximum current `I_max` with the datasheet of your driver board. If the `I_max` is too high you can lower the power supply voltage `V_dc` in order prevent too high peaks of the current. If you are not able to change your power supply voltage you can limit the voltage set to motor in software.
<blockquote class="warning">
<p class="heading">NOTE</p>
Expand Down
72 changes: 72 additions & 0 deletions docs/simplefoc_library/hardware/motors/phase_resistance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
layout: default
title: Phase resistance
nav_order: 3
description: "Arduino Simple Field Oriented Control (FOC) library ."
permalink: /phase_resistance
parent: Motors
grand_parent: Supported Hardware
grand_grand_parent: Arduino <span class="simple">Simple<span class="foc">FOC</span>library</span>
---

# Phase resistance

The term "phase resistance" may lend itself to some ambiguity, in both meaning and method for measurement. This page attempts to explain how to measure its value, which is required by several of the control algorithms in SimpleFOC.

In this documentation, phase resistance corresponds to the resistance of a single coil inside your motor, measured in Ohms. The line resistance is the resistance between two (non-center) motor leads.

## Identification of 3-phase motors

In the case of 3-phase BLDC motors, you first need to learn whether the motor is wound in a Wye (a.k.a "star") or Delta configuration. Once you know that, it's simple maths to compute the phase resistance from the phase-to-phase measurement.

Additionally, a 3-phase motor may expose 3 or 4 leads, which will affect how phase resistance is measured. In the case of a wye/star motor, the fourth lead corresponds to the center point (a.k.a. "star point"), and will show the least resistance when measured against the other leads.

![3-phase-configurations.svg](extras/Images/3-phase-configurations.svg)

> Common configurations for 3-phase motors ([source](https://en.wikipedia.org/wiki/File:Delta-Star_Transformation.svg)).
## Procedure

Steps to measure phase resistance for different coil configurations and number of leads. You'll need a multi-meter that can measure resistance and your wits.

### 3-wire Wye/Star

Diagram:

![3-phase-3-wire-star.svg](extras/Images/3-phase-3-wire-star.svg "3-phase-3-wire-star.svg")

Procedure:

1. Use a multi-meter to measure the resistance across any pair of leads (in Ohms), this is referred to as the "line resistance". All three possible pairs of leads must show the same resistance.
2. **Divide the measurement by two** to obtain the final value for the phase resistance of your motor.

> In Wye/Star configuration, you're measuring two phases at once across each pair, so the measured resistance must be divided by `2`.
### 4-wire Wye/Star

Diagram:

![3-phase-4-wire-star.svg](extras/Images/3-phase-4-wire-star.svg)

In this case, you'll need to first identify the lead connected to the "center point" (labeled `N_abc` in the diagram above).

Procedure:

1. Use a multi-meter to measure the resistance across all pairs of leads (in Ohms), looking for a lead with exactly half the resistance than the lead pairs that exclude it.
2. The resistance between the lead with the least resistance is connected to the "center point". Label it appropriately.
3. Measure the resistance across the center point you just identified and any of the remaining three leads. This value is the phase resistance of your motor.

> In a 4-wire Wye/Star configuration, the resistance between the center point (4-th lead) and any of the three main leads is the phase resistance, because the measurement does not involve any of the other phases.
### 3-wire Delta

Diagram:

![3-phase-3-wire-delta.svg](extras/Images/3-phase-3-wire-delta.svg)

Procedure:

1. Use a multi-meter to measure the resistance across all pairs of leads (in Ohms). All measurements must be equal.
2. **Multiply the measurement by 1.5** to obtain the final value for the phase resistance of your motor.

> In Delta configuration, you measure all phases at once; one of them being in parallel with the remaining two in series. Since all phase resistances are equal, the measurement must be multiplied by `1.5`.
147 changes: 147 additions & 0 deletions extras/Images/3-phase-3-wire-delta.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 668160f

Please sign in to comment.