Skip to content

Commit f7e4c2d

Browse files
committed
Merge branch 'dev' of github.com:askuric/Arduino-FOC into dev
2 parents ed089a9 + ce2cf2c commit f7e4c2d

File tree

1 file changed

+47
-9
lines changed

1 file changed

+47
-9
lines changed

README.md

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Proper low cost FOC supporting boards are very hard to find these days and even
2929

3030
<a href="https://www.infineon.com/cms/en/product/evaluation-boards/bldc_shield_tle9879/" >Infineon</a> | <a href="https://github.com/gouldpa/FOC-Arduino-Brushless">FOC-Arduino-Brushless</a>
3131
------------ | -------------
32-
<img src="https://www.infineon.com/export/sites/default/_images/product/evaluation-boards/BLDC_Motor_Shild_with_TLE9879QXA40.jpg_1711722916.jpg" width="400px"> | <img src="https://hackster.imgix.net/uploads/attachments/998086/dev_kit_89eygMekks.jpg?auto=compress%2Cformat&w=1280&h=960&fit=max" width="400px">
32+
<img src="https://www.infineon.com/export/sites/default/_images/product/evaluation-boards/BLDC_Motor_Shild_with_TLE9879QXA40.jpg_1711722916.jpg" height="300px" width="400px">| <img src="https://hackster.imgix.net/uploads/attachments/998086/dev_kit_89eygMekks.jpg?auto=compress%2Cformat&w=1280&h=960&fit=max" width="400px">
3333
:x: Open Source | :heavy_check_mark: Open Source
3434
:heavy_check_mark:Simple to use | :x: Simple to use
3535
:heavy_check_mark:Low cost | :heavy_check_mark: Low cost
@@ -38,22 +38,60 @@ Proper low cost FOC supporting boards are very hard to find these days and even
3838

3939

4040
## All you need for this project is (an exaple in brackets):
41-
- Brushless motor - 3 pahse (IPower GBM4198H-120T [Ebay](https://www.ebay.com/itm/iPower-Gimbal-Brushless-Motor-GBM4108H-120T-for-5N-7N-GH2-ILDC-Aerial-photo-FPV/252025852824?hash=item3aade95398:g:q94AAOSwPcVVo571:rk:2:pf:1&frcectupt=true))
41+
- Brushless DC motor - 3 pahse (IPower GBM4198H-120T [Ebay](https://www.ebay.com/itm/iPower-Gimbal-Brushless-Motor-GBM4108H-120T-for-5N-7N-GH2-ILDC-Aerial-photo-FPV/252025852824?hash=item3aade95398:g:q94AAOSwPcVVo571:rk:2:pf:1&frcectupt=true))
4242
- Encoder - ( Incremental 2400cpr [Ebay](https://www.ebay.com/itm/600P-R-Photoelectric-Incremental-Rotary-Encoder-5V-24V-AB-2-Phases-Shaft-6mm-New/173145939999?epid=19011022356&hash=item28504d601f:g:PZsAAOSwdx1aKQU-:rk:1:pf:1))
43-
- Arduino + BLDC motor driver
44-
- L6234 driver [Drotek](https://store-drotek.com/212-brushless-gimbal-controller-l6234.html), [Ebay](https://www.ebay.fr/itm/L6234-Breakout-Board-/153204519965)
43+
- Arduino + BLDC motor driver ( L6234 driver [Drotek](https://store-drotek.com/212-brushless-gimbal-controller-l6234.html), [Ebay](https://www.ebay.fr/itm/L6234-Breakout-Board-/153204519965))
4544

4645
Alternatively the library supports the arduino based gimbal controllers such as:
47-
- HMBGC V2.2 [Ebay](https://www.ebay.com/itm/HMBGC-V2-0-3-Axle-Gimbal-Controller-Control-Plate-Board-Module-with-Sensor/351497840990?hash=item51d6e7695e:g:BAsAAOSw0QFXBxrZ:rk:1:pf:1)
46+
- HMBGC V2.2 ([Ebay](https://www.ebay.com/itm/HMBGC-V2-0-3-Axle-Gimbal-Controller-Control-Plate-Board-Module-with-Sensor/351497840990?hash=item51d6e7695e:g:BAsAAOSw0QFXBxrZ:rk:1:pf:1))
4847

4948
# Using the library
50-
## Conneciton of encoder and motor
49+
## Conneciton of encoder and motor
50+
51+
### Arduino FOC Shield v1.1
52+
53+
54+
### Arduino UNO + L6234 breakout broad
55+
The code is simple enough to be ran on Arudino Uno board.
5156

5257
<p>
53-
<img src="extras/Images/arduino_connection.png" height="400px">
54-
<img src="extras/Images/connection.jpg" height="400px">
58+
<img src="extras/Images/arduino_connection.png" height="">
59+
</p>
60+
61+
#### Encoder
62+
- Encoder channels `A` and `B` are connected to the Arduino's external intrrupt pins `2` and `3`.
63+
- Optionally if your encoder has `index` signal you can connect it to any available pin, figure shows pin `4`.
64+
- The librtary doesnt support the Index pin for now (version v1.1.0)
65+
#### L6234 breakout board
66+
- Connected to the arduino pins `9`,`10` and `11`.
67+
- Additionally you can connect the `enable` pin to the any digital pin of the arduino the picture shows pin `8` but this is optional. You can connect the driver enable directly to 5v.
68+
- Make sure you connect the common ground of the power supply and your Arduino
69+
##### Motor
70+
- Motor phases `a`, `b` and `c` are connected directly to the driver outputs
71+
- Motor phases `a`,`b`,`c` and encoder channels `A` and `B` have to be oriented right for the algorightm to work. But don't worry about it too much. Connect it in initialy as you wish and then if it doesnt move reverse pahse `a` and `b` of the motor, that should be enogh.
72+
73+
74+
### HMBGC V2.2
75+
To use HMBGC controller for vector control (FOC) you need to connect motor to one of the motor terminals and connect the Encoder. The shema of connection is shown on the figures above, I also took a (very bad) picture of my setup.
76+
77+
<p>
78+
<img src="extras/Images/hmbgc_connection.png" height="">
79+
<img src="extras/Images/setup1.jpg" height="300px">
5580
</p>
56-
To use HMBGC controller for vector control (FOC) you need to connect motor to one of the motor terminals and connect the Encoder. The shema of connection is shown on the figures above, I also took a (very bad) picture of my setup.
81+
82+
83+
#### Encoder
84+
- Since HMBGC doesn't have acces to the arduinos external interrupt pins `2` and `3` and additionally we only have acces to the analog pins, we need to read the encoder
85+
- Optionally if your encoder has `index` signal you can connect it to any available pin, figure shows pin `4`.
86+
- The librtary doesnt support the Index pin for now (version v1.1.0)
87+
- L6234 breakout board is connected to the arduino pins `9`,`10` and `11`.
88+
- Additionally you can connect the `enable` pin to the any digital pin of the arduino the picture shows pin `8` but this is optional. You can connect the driver enable directly to 5v.
89+
- Motor is connected directly to the driver outputs
90+
- Make sure you connect the common ground of the power supply and your Arduino
91+
Motor phases `a`,`b`,`c` and encoder channels `A` and `B` have to be oriented right for the algorightm to work. But don't worry about it too much. Connect it in initialy as you wish and then if it doesnt move reverse pahse `a` and `b` of the motor, that should be enogh.
92+
93+
94+
5795

5896
## The code
5997
The code is organised in two libraries, BLDCmotor.h and endcoder.h. BLDCmotor.h contains all the necessary FOC funciton implemented and encoder.h deals with the encoder. I will make this better in future. :D

0 commit comments

Comments
 (0)