1
+ RpiMotorLib, A Raspberry pi python motor library
2
+ --------------------------------------------------
3
+
1
4
![ ScreenShot dcmotor] ( https://github.com/gavinlyonsrepo/RpiMotorLib/blob/master/images/RF310T11400.jpg )
2
5
![ ScreenShot Nema] ( https://github.com/gavinlyonsrepo/RpiMotorLib/blob/master/images/nema11.jpg )
3
6
![ ScreenShot L298N] ( https://github.com/gavinlyonsrepo/RpiMotorLib/blob/master/images/L298N.jpg )
4
7
![ ScreenShot A4988] ( https://github.com/gavinlyonsrepo/RpiMotorLib/blob/master/images/A4988.jpg )
5
8
9
+ Table of contents
10
+ ---------------------------
11
+
12
+ * [ Table of contents] ( #table-of-contents )
13
+ * [ Overview] ( #overview ) )
14
+ * [ Installation] ( #installation )
15
+ * [ Information script] ( #information-script )
16
+ * [ Files] ( #files )
17
+ * [ Dependencies] ( #dependencies )
18
+ * [ Components] ( #components )
19
+ * [ Notes] ( #notes )
20
+
6
21
Overview
7
22
--------------------------------------------
8
23
* Name: RpiMotorLib
9
24
* Title: Raspberry pi motor library.
10
- * Description: A python 3 library for various motors and servos
11
- to connect to a raspberry pi.
25
+ * Description:
26
+
27
+ A python 3 library for various motors and servos to connect to a raspberry pi.
12
28
There are three categories in library.
13
- Stepper motors , Dc Motors and Servos. The following is a list of tested parts
14
-
15
- 1 . Stepper motor
16
- * Unipolar 28BYJ-48 Stepper motor controlled by ULN2003 driver module
17
- * Bipolar Nema 11 Stepper motor controlled by L298N H-Bridge Motor controller module.
18
- * Bipolar Nema 11 Stepper motor controlled by A4988 Stepper Motor Driver Carrier
19
- * Bipolar Nema 11 Stepper motor controlled by DRV8825 Stepper Motor Driver Carrier
20
- * Bipolar Nema 11 Stepper motor controlled by A3967 Stepper Motor Driver aka "easy driver v4.4"
21
- * Bipolar Nema 11 Stepper motor controlled by TB6612FNG Dual Motor Driver Carrier
22
-
23
- 2 . DC motors
24
- * DC brushed motor controlled by L298N Motor controller module.
25
- * DC brushed motor controlled by a transistor.
26
- * DC brushed motor controlled by L9110S Motor controller module.
27
- * DC brushed motor controlled by DV8833 Motor controller module.
28
- * DC brushed motor controlled by TB6612FNG Dual Motor Driver Carrier
29
-
30
- 3 . Servo
31
- * Servo controlled by RPi.GPIO module PWM.
32
- * Servo controlled by pigpio library module PWM.
33
-
34
- The end user can import this library into their projects
29
+ Stepper motors , Dc Motors and Servos.
30
+ The end user can import this library into their projects
35
31
and then control the components with short snippets of code.
36
32
The library is modular so user can just import/use the section they need.
37
33
38
-
39
- * Author: Gavin Lyons
34
+ * Main Author: Gavin Lyons
40
35
* URL: https://github.com/gavinlyonsrepo/RpiMotorLib
41
-
42
- Table of contents
43
- ---------------------------
44
-
45
- * [ Overview] ( #overview )
46
- * [ Table of contents] ( #table-of-contents )
47
- * [ Installation] ( #installation )
48
- * [ Usage] ( #usage )
49
- * [ Files] ( #files )
50
- * [ Dependencies] ( #dependencies )
51
- * [ Features] ( #features )
52
- * [ Software Matrix] ( #software-matrix )
53
- * [ See Also] ( #see-also )
54
- * [ Communication] ( #communication )
55
- * [ History] ( #history )
56
- * [ Copyright] ( #copyright )
57
- * [ Contributers] ( #contributers )
36
+ * History: CHANGELOG.md is at repository in documentation.
37
+ * Contributers: [ Erez Levanon] ( https://github.com/erezlevanon )
38
+ * Copyright: Copyright (C) 2018 Gavin Lyons. See LICENSE.md in documentation.
39
+ * Contact: github or glyons66@hotmail.com .
58
40
59
41
Installation
60
42
-----------------------------------------------
@@ -70,25 +52,17 @@ Make sure that python 3.5.3 and pip have been installed on your machine, then:
70
52
sudo pip install rpimotorlib
71
53
```
72
54
73
- Usage
55
+ Information script
74
56
-------------------------------------------
75
-
76
- In addition to library files a small script is installed
77
- to display version and help information.
78
-
79
- Run the information script by typing (for Linux systems)
57
+ A small script is installed to display version and help information.
58
+ Run the information script by typing.
80
59
RpiMotorScriptLib.py -[ options]
81
60
82
- Options list :
83
-
84
61
| Option | Description |
85
62
| --------------- | --------------- |
86
63
| -h | Print help information and exit |
87
64
| -v | Print version information and exit |
88
65
89
- To learn how to use the Library in programs.
90
- Go to features section below
91
-
92
66
Files
93
67
-----------------------------------------
94
68
rpiMotorLib files are listed below:
@@ -107,130 +81,82 @@ rpiMotorLib files are listed below:
107
81
Dependencies
108
82
-----------
109
83
110
- 1 . RPi.GPIO 0.6.3
111
-
112
- A module to control Raspberry Pi GPIO channels
84
+ 1 . RPi.GPIO 0.6.3 [ Rpi.GPIO pypi page] ( https://pypi.python.org/pypi/RPi.GPIO )
113
85
86
+ A module to control Raspberry Pi GPIO channels.
114
87
This package provides a class to control the GPIO on a Raspberry Pi.
115
-
116
88
This should already be installed on most Raspberry Pis.
117
89
118
- [ Rpi.GPIO pypi page] ( https://pypi.python.org/pypi/RPi.GPIO )
119
-
120
-
121
- 2 . pigpio 1.60-1
90
+ 2 . pigpio 1.60-1 [ Homepage] ( http://abyz.co.uk/rpi/pigpio/ )
122
91
123
92
This Dependency is * Optional* , it is currently
124
93
only used in one of the two servo control options.
125
- See Features section below for details on why you would chose this.
126
94
pigpio is a library for the Raspberry which allows
127
95
control of the General Purpose Input Outputs (GPIO).
128
- See homepage for installation and setup instructions.
129
96
130
- [ Homepage] ( http://abyz.co.uk/rpi/pigpio/ )
97
+ Components
98
+ ----------------------
131
99
100
+ Şeparate help files are in documentation folder to learn how to use library.
101
+ Click on the relevant URL in help file section.
102
+ Test files used during development are in test folder of repo.
103
+ Example snippets are also available in some of the documentation files.
132
104
133
- Features
134
- ----------------------
105
+ 1 . Stepper motors
106
+
107
+ | Motor | Motor controller| Help File URL link |
108
+ | ----- | ----- | ----- |
109
+ | Unipolar 28BYJ-48 | ULN2003 driver module | [ URL ] ( Documentation/28BYJ.md ) |
110
+ | Bipolar Nema 11 | L298N H-Bridge controller module | [ URL ] ( Documentation/Nema11L298N.md ) |
111
+ | Bipolar Nema 11 | A4988 Stepper Driver Carrier | [ URL ] ( Documentation/Nema11A4988.md ) |
112
+ | Bipolar Nema 11 | DRV8825 Stepper Driver Carrier | [ URL ] ( Documentation/Nema11DRV8825.md ) |
113
+ | Bipolar Nema 11 | A3967 Stepper Driver aka "easy driver v4.4" | [ URL ] ( Documentation/Nema11A3967Easy.md ) |
114
+ | Bipolar Nema 11 | TB6612FNG Dual Driver Carrier | [ URL ] ( Documentation/Nema11TB6612FNG.md ) |
115
+
116
+ 2 . DC motors
117
+
118
+ | Motor | Motor controller| Help File URL link |
119
+ | ----- | ----- | ----- |
120
+ | DC Brushed Motor | L298N Motor controller module. | [ URL ] ( Documentation/L298N_DC.md ) |
121
+ | DC Brushed Motor | A transistor. | [ URL ] ( Documentation/Transistor_DC.md ) |
122
+ | DC Brushed Motor | L9110S Motor controller module. | [ URL ] ( Documentation/L9110S_DC.md ) |
123
+ | DC Brushed Motor | DV8833 Motor controller module. | [ URL ] ( Documentation/DRV8833_DC.md ) |
124
+ | DC Brushed Motor | TB6612FNG Dual Motor Driver Carrier| [ URL ] ( Documentation/TB6612FNG_DC.md ) |
125
+
126
+ 3 . Servos
135
127
136
- I have created separate help files in documentation folder to learn how to use library :
128
+ | Servo | Link |
129
+ | ----- | ----- |
130
+ | Servo software timing | [ RPi.GPIO module PWM ] ( Documentation/Servo_RPI_GPIO.md ) |
131
+ | Servo hardware timing | [ pigpio library module PWM ] ( Documentation/Servo_pigpio.md ) |
137
132
138
133
139
- 1 . Servos:
134
+ Notes
135
+ ------------------------------
140
136
141
- NOTE: There are two different options for controlling the servo.
137
+ There are two different options for controlling the servo.
142
138
When using Rpi_GPIO option you may notice twitching at certain
143
139
delays and stepsizes. This is the result of the
144
140
implementation of the RPIO PWM software timing. If the application requires
145
141
precise control the user can pick the pigpio library
146
142
which uses hardware based timing. The disadvantage being they must install
147
143
another dependency.
148
144
149
- [ Servo RPi.GPIO PWM] ( Documentation/Servo_RPI_GPIO.md )
150
-
151
- [ Servo pigpio PWM] ( Documentation/Servo_pigpio.md )
152
-
153
-
154
- 2 . Stepper Motors:
155
-
156
- [ 28BYJ stepper motor ULN2003 ] ( Documentation/28BYJ.md )
157
-
158
- [ Nema 11 stepper motor L298N ] ( Documentation/Nema11L298N.md )
159
-
160
- [ Nema 11 stepper motor A4988 ] ( Documentation/Nema11A4988.md )
161
-
162
- [ Nema 11 stepper motor DRV8825 ] ( Documentation/Nema11DRV8825.md )
163
-
164
- [ Nema 11 stepper motor A3967] ( Documentation/Nema11A3967Easy.md )
165
-
166
- [ Nema 11 stepper motor TB6612FNG] ( Documentation/Nema11TB6612FNG.md )
145
+ NEMA 11 bipolar stepper motors where used in tests but most other bipolar 4-pin motors of similar type
146
+ should work in place of Nema 11.
167
147
168
-
169
-
170
- 3 . DC Motors:
171
-
172
- [ L298N DC Motor] ( Documentation/L298N_DC.md )
173
-
174
- [ Transistor DC Motor] ( Documentation/Transistor_DC.md )
175
-
176
- [ L9110S DC Motor] ( Documentation/L9110S_DC.md )
177
-
178
- [ DRV8833 DC Motor] ( Documentation/DRV8833_DC.md )
179
-
180
- [ TB6612FNG DC Motor] ( Documentation/TB6612FNG_DC.md )
181
-
182
- Test files used during development are in test folder of repo.
183
- Example snippets are also available in some of the documentation files.
184
-
185
-
186
- Software Matrix
187
- --------------------------
188
-
189
- There is a ODS file in the Documentation folder called Matrix,
148
+ There is a libre office spreadsheet file in the Documentation folder called Matrix,
190
149
which shows which class is used for which controller,
191
150
or consult the docstring of the appropriate python file.
192
151
193
152
194
- See Also
195
- ---------------------------
196
-
197
- A lot of this code will work on similar components/modules but has not
198
- been tested due to parts lacking.
199
-
200
- For example:
201
153
202
- The A4988/DRV8825 code ** may** work with other * pololu* modules.
203
- See this link for list of alternatives and drop-in replacements for this module.
204
- [ pololu product 1182] ( https://www.pololu.com/product/1182 ) .
205
154
206
- The Servo code should on most standard servos.
207
155
208
- Most 4 pin bipolar stepper motors should work in place of Nema 11.
209
156
210
157
211
- Communication
212
- -----------------------
213
- If you should find a bug or you have any other query,
214
- please send a report.
215
- Pull requests, components, suggestions for improvements
216
- and new features welcome.
217
- * Contact: Upstream repo at github site below or glyons66@hotmail.com
218
- * Upstream repository: https://github.com/gavinlyonsrepo/RpiMotorLib
219
158
220
159
221
- History
222
- ------------------
223
- CHANGELOG.md is at repository in documentation section.
224
160
225
- Copyright
226
- -------------
227
- Copyright (C) 2018 Gavin Lyons
228
- This program is free software; you can redistribute it and/or modify
229
- it under the terms of the GNU General Public license published by
230
- the Free Software Foundation, see LICENSE.md in documentation section
231
- for more details.
232
161
233
162
234
- Contributers
235
- --------------------
236
- [ Erez Levanon] ( https://github.com/erezlevanon )
0 commit comments