├── .gitattributes ├── .gitignore ├── Firmware ├── Arduija_Demo │ └── Arduija2_1_1.ino ├── EasyDriver_Example1 │ └── EasyDriver_Example1.ino ├── EasyDriver_Example2 │ └── EasyDriver_Example2.ino ├── EasyDriver_Example3 │ └── EasyDriver_Example3.ino ├── EasyDriver_Example4 │ └── EasyDriver_Example4.ino ├── EasyDriver_Example5 │ └── EasyDriver_Example5.ino ├── README.md └── SparkFun_Easy_Driver_Basic_Demo │ └── SparkFun_Easy_Driver_Basic_Demo.ino ├── Hardware ├── EasyDriver_v45.brd ├── EasyDriver_v45.sch ├── EasyDriver_v45_BOM.xls └── EasyDriver_v45_sch.pdf ├── Production └── EasyDriver_GiantPanel_v45.brd ├── README.md └── notes.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## SparkFun Useful stuff 3 | ################# 4 | 5 | ## AVR Development 6 | *.eep 7 | *.elf 8 | *.lst 9 | *.lss 10 | *.sym 11 | *.d 12 | *.o 13 | *.srec 14 | *.map 15 | 16 | ## Notepad++ backup files 17 | *.bak 18 | 19 | ## BOM files 20 | *bom* 21 | 22 | ################# 23 | ## Eclipse 24 | ################# 25 | 26 | *.pydevproject 27 | .project 28 | .metadata 29 | bin/ 30 | tmp/ 31 | *.tmp 32 | *.bak 33 | *.swp 34 | *~.nib 35 | local.properties 36 | .classpath 37 | .settings/ 38 | .loadpath 39 | 40 | # External tool builders 41 | .externalToolBuilders/ 42 | 43 | # Locally stored "Eclipse launch configurations" 44 | *.launch 45 | 46 | # CDT-specific 47 | .cproject 48 | 49 | # PDT-specific 50 | .buildpath 51 | 52 | 53 | ############# 54 | ## Eagle 55 | ############# 56 | 57 | # Ignore the board and schematic backup files 58 | *.b#? 59 | *.s#? 60 | 61 | 62 | ################# 63 | ## Visual Studio 64 | ################# 65 | 66 | ## Ignore Visual Studio temporary files, build results, and 67 | ## files generated by popular Visual Studio add-ons. 68 | 69 | # User-specific files 70 | *.suo 71 | *.user 72 | *.sln.docstates 73 | 74 | # Build results 75 | [Dd]ebug/ 76 | [Rr]elease/ 77 | *_i.c 78 | *_p.c 79 | *.ilk 80 | *.meta 81 | *.obj 82 | *.pch 83 | *.pdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.vspscc 93 | .builds 94 | *.dotCover 95 | 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 97 | #packages/ 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opensdf 104 | *.sdf 105 | 106 | # Visual Studio profiler 107 | *.psess 108 | *.vsp 109 | 110 | # ReSharper is a .NET coding add-in 111 | _ReSharper* 112 | 113 | # Installshield output folder 114 | [Ee]xpress 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish 128 | 129 | # Others 130 | [Bb]in 131 | [Oo]bj 132 | sql 133 | TestResults 134 | *.Cache 135 | ClientBin 136 | stylecop.* 137 | ~$* 138 | *.dbmdl 139 | Generated_Code #added for RIA/Silverlight projects 140 | 141 | # Backup & report files from converting an old project file to a newer 142 | # Visual Studio version. Backup files are not needed, because we have git ;-) 143 | _UpgradeReport_Files/ 144 | Backup*/ 145 | UpgradeLog*.XML 146 | 147 | 148 | ############ 149 | ## Windows 150 | ############ 151 | 152 | # Windows image file caches 153 | Thumbs.db 154 | 155 | # Folder config file 156 | Desktop.ini 157 | 158 | 159 | ############# 160 | ## Python 161 | ############# 162 | 163 | *.py[co] 164 | 165 | # Packages 166 | *.egg 167 | *.egg-info 168 | dist 169 | build 170 | eggs 171 | parts 172 | bin 173 | var 174 | sdist 175 | develop-eggs 176 | .installed.cfg 177 | 178 | # Installer logs 179 | pip-log.txt 180 | 181 | # Unit test / coverage reports 182 | .coverage 183 | .tox 184 | 185 | #Translations 186 | *.mo 187 | 188 | #Mr Developer 189 | .mr.developer.cfg 190 | 191 | # Mac crap 192 | .DS_Store 193 | -------------------------------------------------------------------------------- /Firmware/Arduija_Demo/Arduija2_1_1.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************** 2 | Arduija: Arduino Controlled Ouija Board 3 | Joel Bartlett 4 | Casey Kuhns 5 | SparkFun Electronics 6 | Oct. 22, 2014 7 | https://github.com/JoelEB/Arduija2_1_1 8 | 9 | This sketch uses the AccelStepper Library to controll two stpper motors, 10 | driven by two Big Easy Driver boards from SparkFun. Letters on a Ouija 11 | board are mapped out, given coordinates, and then massages are spelled 12 | out by looking up the coordinates in that table. 13 | 14 | Development environment specifics: 15 | Arduino IDE .0+ 16 | Arduino Uno 17 | 18 | This code is beerware; if you see me at the local pub, 19 | and you've found our code helpful, please buy us a round! 20 | 21 | Distributed as-is; no warranty is given. 22 | ***********************************************************/ 23 | #include 24 | #include //include the Accel Stepper Library 25 | #define MAX_ARRAY_LENGTH 32 26 | 27 | // Define two steppers and the pins they will use 28 | AccelStepper stepperX(1, 4, 5);//X axis 29 | AccelStepper stepperY(1, 6, 7);//Y axis 30 | //(driver=true, step, dir) 31 | 32 | int enableX = 10;//pins to controll the enable pins on each of the Big Easy Drivers 33 | int enableY = 11;//I tried using the intenral setEnablePin() function in the AccelStepper library 34 | //but couldn't get it to work, even when I inverted them with setPinsInverted(). 35 | 36 | int posX = 0;//Varibales to keep track of the planchet's current position 37 | int posY = 0; 38 | 39 | int switch_x_left = 8;//Limit switch variables 40 | int switct_y_top = 9; 41 | int switch_x_right = 3;//trying to set these up as interrupts (W.I.P.) 42 | int switch_y_bottom = 2; 43 | 44 | int bigButton = 12;//Added big dome pushbutotn to have it display a message when pressed. 45 | //Original plan was to have it run constantly, but the smaller stepper motor (ROB-09238) 46 | //gets hot when ran for even a shoirt while. I'm pushing it past it's max ratings. I would 47 | //recommend using a 68oz.-in. motor (ROB-10846) on both axes. Make sure you disable all motors 48 | //when not in use to minimize heat dissipation and power consumption. 49 | 50 | long randomNumber;//Random number for displaying random message when butotn is pressed. 51 | 52 | //table to store coordinates for all the letters, #s, etc on the board. 53 | //Due to the nature of the magnets and drag, getting exact coordinates took 54 | //lots of trial an error, and is still not perfect when you have the planchet 55 | //move in from different sides of the letter. 56 | unsigned int coordinatesTable[39][3] = { 57 | 1000,2600,'a', 58 | 2800,1900,'b', 59 | 4400,1700,'c', 60 | 6100,1500,'d', 61 | 8200,1300,'e', 62 | 9300,1100,'f', 63 | 11800,1200,'g', 64 | 13700,1200,'h', 65 | 15500,1100,'i', 66 | 16800,1500,'j', 67 | 18700,1700,'k', 68 | 20300,2100,'l', 69 | 22800,2500,'m', 70 | 1200,4500,'n', 71 | 2500,3900,'o', 72 | 4300,3400,'p', 73 | 6000,3200,'q', 74 | 7900,2800,'r', 75 | 9700,2600,'s', 76 | 11500,2600,'t', 77 | 13600,2700,'u', 78 | 15400,2700,'v', 79 | 17200,2800,'w', 80 | 19400,3400,'x', 81 | 20800,4000,'y', 82 | 22800,4500,'z', 83 | 0,0,'0', 84 | 0,0,'1', 85 | 0,0,'2', 86 | 0,0,'3', 87 | 0,0,'4', 88 | 0,0,'5', 89 | 0,0,'6', 90 | 0,0,'8', 91 | 0,0,'9', 92 | 4400,10,'+',//YES 93 | 19900,10,'-',//NO 94 | 0,0,'!',//GOODBYE 95 | 11700,100,'.'//SPACE 96 | }; 97 | //------------------------------------------------------------------------------ 98 | void setup() 99 | { 100 | Serial.begin(115200);//Serial print for debug 101 | 102 | pinMode(bigButton, INPUT_PULLUP);//Pullup button so external resistor is not needed 103 | randomSeed(analogRead(0));//Read analog(0) for random number generation 104 | 105 | pinMode(enableX, OUTPUT);// 106 | pinMode(enableY, OUTPUT); 107 | 108 | digitalWrite(enableX, HIGH);//Diable the motors 109 | digitalWrite(enableY, HIGH); 110 | 111 | //Had to play with these vallues to find a speed and acceleration that looked good 112 | //but also still ran smoothly. Tweeking these values and physically changing the 113 | //potentiometers on the Big Easy Driver will affect the speed of each axis. 114 | //BEWARE, changing these settings will change coordinates and mess up any characters 115 | //you have mapped out already. 116 | stepperX.setMaxSpeed(6000); 117 | stepperX.setAcceleration(5000); 118 | stepperY.setMaxSpeed(4000); 119 | stepperY.setAcceleration(4000); 120 | 121 | //This is the internal AccelStepper enable calls referred to 122 | //earlier. Must be called within setup() (W.I.P.) 123 | //stepperX.setEnablePin(10); 124 | //stepperY.setEnablePin(11); 125 | //stepperX.setPinsInverted(0,0,1);//invert the enable pin 126 | //stepperY.setPinsInverted(0,0,1); 127 | 128 | pinMode(switch_x_left, INPUT_PULLUP); 129 | pinMode(switct_y_top, INPUT_PULLUP); 130 | pinMode(switch_x_right, INPUT_PULLUP); 131 | pinMode(switch_y_bottom, INPUT_PULLUP); 132 | //Switch interrupts to ensure the planchet never goes out of bounds (W.I.P.) 133 | //attachInterrupt(0, homeing2, FALLING); //switct_y_bottom 134 | //attachInterrupt(1, homeing2, FALLING);//switch_x_right 135 | 136 | homeing();//set the cursor back to its home position at 0,0 first and on every reset 137 | 138 | } 139 | //------------------------------------------------------------------------------ 140 | void loop() 141 | { 142 | if(digitalRead(bigButton) == LOW)//Wait until the big dome pusbutton is pressed to start spelling a message 143 | { 144 | ouijaMessage();//Select a random message from the list and print it 145 | } 146 | 147 | //Uncomment this line and comment out everything else in loop() to jog the planchet with keyboard inputs 148 | //moveWithKeyboard(); 149 | } 150 | //------------------------------------------------------------------------------ 151 | void enableMotors() 152 | { 153 | //Enable the motors 154 | digitalWrite(enableX, LOW); 155 | digitalWrite(enableY, LOW); 156 | } 157 | //------------------------------------------------------------------------------ 158 | void disableMotors() 159 | { 160 | //Disable the motors 161 | digitalWrite(enableX, HIGH); 162 | digitalWrite(enableY, HIGH); 163 | } 164 | //------------------------------------------------------------------------------ 165 | void homeing() 166 | { 167 | enableMotors(); 168 | //Decided to move Y axis first since one of the magnets was hitting if it was all the way away from home. 169 | if(digitalRead(switct_y_top) == HIGH) 170 | { 171 | while(digitalRead(switct_y_top) == HIGH) 172 | { 173 | stepperY.moveTo(posY); 174 | stepperY.run(); 175 | posY = posY - 1; 176 | //Serial.println(posY); 177 | } 178 | if(digitalRead(switct_y_top) == LOW) 179 | stepperY.stop(); 180 | posY = 0; 181 | stepperY.setCurrentPosition(0); 182 | } 183 | else 184 | { 185 | posY = 0; 186 | stepperY.setCurrentPosition(0); 187 | } 188 | 189 | if(digitalRead(switch_x_left) == HIGH)//check to make sure this axis isn;t already in the home posotion 190 | { 191 | while(digitalRead(switch_x_left) == HIGH)//if it is not at home (HIGH) ... 192 | { 193 | stepperX.moveTo(posX);//start moving the X axis back to the home position 194 | stepperX.run(); 195 | posX = posX - 1;//decrement the position until we reach 0 (where the switch is triggered) 196 | } 197 | if(digitalRead(switch_x_left) == LOW)//Once the switch is hit and the signal goes LOW... 198 | stepperX.stop();//stop the motor 199 | posX = 0;//set this axis position to 0 200 | stepperX.setCurrentPosition(0); 201 | } 202 | else 203 | { 204 | posX = 0; 205 | stepperX.setCurrentPosition(0); 206 | } 207 | disableMotors(); 208 | } 209 | //------------------------------------------------------------------------------ 210 | void ouijaDelay(void){ 211 | //Delay to make it spoooooooky 212 | //Standard Delay until we can make it more spooky 213 | delay(200); 214 | } 215 | //------------------------------------------------------------------------------ 216 | //Look through the table until a character matching the current one is found 217 | int findSymbolInTable(char symbol){ 218 | int tableIndex; 219 | 220 | for(tableIndex = 0; tableIndex <= 39; tableIndex++){ 221 | //Serial.println(char((coordinatesTable[tableIndex][2]))); 222 | if(symbol == char(coordinatesTable[tableIndex][2])){ 223 | //Serial.print("Char FOUND = "); 224 | //Serial.println(tableIndex); 225 | return tableIndex; //Return the table location 226 | } 227 | } 228 | return -1; //if we got to the point 229 | // we didn't find our value in the table 230 | } 231 | 232 | //------------------------------------------------------------------------------ 233 | //Used to move the planchet to the next location on the baord. 234 | void moveToSymbol(char character) 235 | { 236 | int tableIndex = findSymbolInTable(character); 237 | 238 | //Serial.print("x = "); 239 | //Serial.println(coordinatesTable[tableIndex][0]); 240 | 241 | //Serial.print("y = "); 242 | //Serial.println(coordinatesTable[tableIndex][1]); 243 | 244 | //MoveMotors 245 | stepperX.moveTo(coordinatesTable[tableIndex][0]); 246 | stepperY.moveTo(coordinatesTable[tableIndex][1]); 247 | 248 | while((stepperX.distanceToGo() != 0)||(stepperX.distanceToGo() != 0)){ 249 | //Serial.println(stepperX.distanceToGo()); 250 | stepperY.run(); 251 | stepperX.run(); 252 | //if(digitalRead(switch_x_right) == LOW || digitalRead(switch_y_bottom) == LOW) 253 | //homeing(); 254 | } 255 | 256 | return; 257 | } 258 | 259 | 260 | //------------------------------------------------------------------------------ 261 | void ouijaPrint(char* charArray){ 262 | int i; 263 | for(i = 0; i <= MAX_ARRAY_LENGTH; i++){ 264 | //Serial.print(charArray[i]); //Debug the array as we move 265 | if(charArray[i] != 0){ 266 | ouijaDelay(); 267 | moveToSymbol(charArray[i]); 268 | ouijaDelay(); 269 | //if(digitalRead(switch_x_right) == LOW || digitalRead(switch_y_bottom) == LOW) 270 | //homeing(); 271 | } //Only move if there if valid data, if not let the loop run out. 272 | else break; 273 | } 274 | return; 275 | } 276 | //------------------------------------------------------------------------------ 277 | //Stores different messages to be speled out by the Ouija 278 | void ouijaMessage() 279 | { 280 | enableMotors(); 281 | randomNumber = random(5);//Generate a random number between 1-5 282 | switch (randomNumber) //switch messages based on that random number 283 | { 284 | case 0: 285 | {char arrayThing[30] = {'h','e','l','.','l','o',0}; 286 | ouijaPrint(arrayThing); 287 | homeing();}//Go back to home after each massage is printed 288 | break; 289 | case 1: 290 | { 291 | char arrayThing2[30] = {'s','p','a','r','k','f','u','n',0}; 292 | ouijaPrint(arrayThing2); 293 | homeing();} 294 | break; 295 | case 2: 296 | { 297 | char arrayThing3[30] = {'h','a','p','.','p','y','.','h','a','l','.','l','o','w','e','.','e','n',0};; 298 | ouijaPrint(arrayThing3); 299 | homeing();} 300 | break; 301 | case 3: 302 | { 303 | char arrayThing4[30] = {'g','r','a','n','d','m','a','.','s','a','y','s','.','h','i',0};; 304 | ouijaPrint(arrayThing4); 305 | homeing();} 306 | break; 307 | case 4: 308 | { 309 | char arrayThing5[30] = {'l','e','t','.','y','o','u','r','.','g','e','e','k','.','s','h','i','n','e',0};; 310 | ouijaPrint(arrayThing5); 311 | homeing();} 312 | break; 313 | default: 314 | disableMotors(); 315 | } 316 | disableMotors(); 317 | } 318 | //------------------------------------------------------------------------------ 319 | //This function was used to jog each axis 100 "steps" in each direction 320 | //call in loop and comment out everything else to allow keyboard control 321 | void moveWithKeyboard() 322 | { 323 | enableMotors(); 324 | if(Serial.available() > 0) 325 | { 326 | int temp = Serial.read(); 327 | 328 | if(temp == 119 || temp == 87)//dec for 'w' 329 | { 330 | stepperY.moveTo(stepperY.currentPosition() - 100); 331 | //stepperY.setSpeed(2000); 332 | while(stepperY.distanceToGo() != 0) 333 | { 334 | stepperY.run(); 335 | } 336 | Serial.print(stepperX.currentPosition()); 337 | Serial.print(" "); 338 | Serial.println(stepperY.currentPosition()); 339 | } 340 | if(temp == 115 || temp == 83)//dec for 's' 341 | { 342 | stepperY.moveTo(stepperY.currentPosition() + 100); 343 | //stepperY.setSpeed(2000); 344 | while(stepperY.distanceToGo() != 0) 345 | { 346 | stepperY.run(); 347 | } 348 | Serial.print(stepperX.currentPosition()); 349 | Serial.print(" "); 350 | Serial.println(stepperY.currentPosition()); 351 | } 352 | if(temp == 97 || temp == 65)//dec for 'a' 353 | { 354 | stepperX.moveTo(stepperX.currentPosition() - 100); 355 | //stepperX.setSpeed(3000); 356 | while(stepperX.distanceToGo() != 0) 357 | { 358 | stepperX.run(); 359 | } 360 | Serial.print(stepperX.currentPosition()); 361 | Serial.print(" "); 362 | Serial.println(stepperY.currentPosition()); 363 | } 364 | if(temp == 100 || temp == 68)//dec for 'd' 365 | { 366 | stepperX.moveTo(stepperX.currentPosition() + 100.00); 367 | //stepperX.setSpeed(3000); 368 | while(stepperX.distanceToGo() != 0) 369 | { 370 | stepperX.run(); 371 | } 372 | Serial.print(stepperX.currentPosition()); 373 | Serial.print(" "); 374 | Serial.println(stepperY.currentPosition()); 375 | } 376 | 377 | //move in larger increments with the right side of the keyboard 378 | if(temp == 105 || temp == 73)//dec for 'i' 379 | { 380 | stepperY.moveTo(stepperY.currentPosition() - 1000); 381 | while(stepperY.distanceToGo() != 0) 382 | { 383 | stepperY.run(); 384 | } 385 | Serial.print(stepperX.currentPosition()); Serial.print(" "); Serial.println(stepperY.currentPosition()); 386 | } 387 | if(temp == 107 || temp == 75)//dec for 'k' 388 | { 389 | stepperY.moveTo(stepperY.currentPosition() + 1000); 390 | //stepperY.setSpeed(2000); 391 | while(stepperY.distanceToGo() != 0) 392 | { 393 | stepperY.run(); 394 | } 395 | Serial.print(stepperX.currentPosition()); Serial.print(" "); Serial.println(stepperY.currentPosition()); 396 | } 397 | if(temp == 106 || temp == 74)//dec for 'j' 398 | { 399 | stepperX.moveTo(stepperX.currentPosition() - 2000); 400 | //stepperX.setSpeed(3000); 401 | while(stepperX.distanceToGo() != 0) 402 | { 403 | stepperX.run(); 404 | } 405 | Serial.print(stepperX.currentPosition()); Serial.print(" "); Serial.println(stepperY.currentPosition()); 406 | } 407 | if(temp == 108 || temp == 76)//dec for 'l' 408 | { 409 | stepperX.moveTo(stepperX.currentPosition() + 2000); 410 | while(stepperX.distanceToGo() != 0) 411 | { 412 | stepperX.run(); 413 | } 414 | Serial.print(stepperX.currentPosition()); Serial.print(" "); Serial.println(stepperY.currentPosition()); 415 | } 416 | 417 | } 418 | disableMotors(); 419 | } 420 | //------------------------------------------------------------------------------ 421 | void drawCircleCW()//(W.I.P.) 422 | { 423 | enableMotors(); 424 | stepperX.moveTo(12000); 425 | stepperY.moveTo(1000); 426 | while((stepperX.distanceToGo() != 0)||(stepperX.distanceToGo() != 0)) 427 | { 428 | stepperX.run(); 429 | stepperY.run(); 430 | } 431 | 432 | stepperX.moveTo(14000); 433 | stepperY.moveTo(2000); 434 | while((stepperX.distanceToGo() != 0)||(stepperX.distanceToGo() != 0)) 435 | { 436 | stepperX.run(); 437 | stepperY.run(); 438 | } 439 | 440 | stepperX.moveTo(12000); 441 | stepperY.moveTo(3000); 442 | while((stepperX.distanceToGo() != 0)||(stepperX.distanceToGo() != 0)) 443 | { 444 | stepperX.run(); 445 | stepperY.run(); 446 | } 447 | 448 | stepperX.moveTo(8000); 449 | stepperY.moveTo(2000); 450 | while((stepperX.distanceToGo() != 0)||(stepperX.distanceToGo() != 0)) 451 | { 452 | stepperX.run(); 453 | stepperY.run(); 454 | } 455 | 456 | stepperX.moveTo(12000); 457 | stepperY.moveTo(2000); 458 | while((stepperX.distanceToGo() != 0)||(stepperX.distanceToGo() != 0)) 459 | { 460 | stepperX.run(); 461 | stepperY.run(); 462 | } 463 | disableMotors(); 464 | } 465 | 466 | 467 | 468 | 469 | 470 | -------------------------------------------------------------------------------- /Firmware/EasyDriver_Example1/EasyDriver_Example1.ino: -------------------------------------------------------------------------------- 1 | // Example1 code for Brian Schmalz's Easy Driver Example page 2 | // http://www.schmalzhaus.com/EasyDriver/EasyDriverExamples.html 3 | 4 | void setup() { 5 | pinMode(8, OUTPUT); 6 | pinMode(9, OUTPUT); 7 | digitalWrite(8, LOW); 8 | digitalWrite(9, LOW); 9 | } 10 | 11 | void loop() { 12 | digitalWrite(9, HIGH); 13 | delay(1); 14 | digitalWrite(9, LOW); 15 | delay(1); 16 | } 17 | -------------------------------------------------------------------------------- /Firmware/EasyDriver_Example2/EasyDriver_Example2.ino: -------------------------------------------------------------------------------- 1 | // Example2 code for Brian Schmalz's Easy Driver Example page 2 | // http://www.schmalzhaus.com/EasyDriver/EasyDriverExamples.html 3 | 4 | int Distance = 0; // Record the number of steps we've taken 5 | 6 | void setup() { 7 | pinMode(8, OUTPUT); 8 | pinMode(9, OUTPUT); 9 | digitalWrite(8, LOW); 10 | digitalWrite(9, LOW); 11 | } 12 | 13 | void loop() { 14 | digitalWrite(9, HIGH); 15 | delayMicroseconds(100); 16 | digitalWrite(9, LOW); 17 | delayMicroseconds(100); 18 | Distance = Distance + 1; // record this step 19 | 20 | // Check to see if we are at the end of our move 21 | if (Distance == 3600) 22 | { 23 | // We are! Reverse direction (invert DIR signal) 24 | if (digitalRead(8) == LOW) 25 | { 26 | digitalWrite(8, HIGH); 27 | } 28 | else 29 | { 30 | digitalWrite(8, LOW); 31 | } 32 | // Reset our distance back to zero since we're 33 | // starting a new move 34 | Distance = 0; 35 | // Now pause for half a second 36 | delay(500); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Firmware/EasyDriver_Example3/EasyDriver_Example3.ino: -------------------------------------------------------------------------------- 1 | // Example3 code for Brian Schmalz's Easy Driver Example page 2 | // http://www.schmalzhaus.com/EasyDriver/EasyDriverExamples.html 3 | 4 | #include 5 | 6 | // Define a stepper and the pins it will use 7 | AccelStepper stepper(1, 9, 8); 8 | 9 | int pos = 3600; 10 | 11 | void setup() 12 | { 13 | stepper.setMaxSpeed(3000); 14 | stepper.setAcceleration(1000); 15 | } 16 | 17 | void loop() 18 | { 19 | if (stepper.distanceToGo() == 0) 20 | { 21 | delay(500); 22 | pos = -pos; 23 | stepper.moveTo(pos); 24 | } 25 | stepper.run(); 26 | } 27 | -------------------------------------------------------------------------------- /Firmware/EasyDriver_Example4/EasyDriver_Example4.ino: -------------------------------------------------------------------------------- 1 | // Example4 code for Brian Schmalz's Easy Driver Example page 2 | // http://www.schmalzhaus.com/EasyDriver/EasyDriverExamples.html 3 | 4 | #include 5 | 6 | // Define two steppers and the pins they will use 7 | AccelStepper stepper1(1, 9, 8); 8 | AccelStepper stepper2(1, 7, 6); 9 | 10 | int pos1 = 3600; 11 | int pos2 = 5678; 12 | 13 | void setup() 14 | { 15 | stepper1.setMaxSpeed(3000); 16 | stepper1.setAcceleration(1000); 17 | stepper2.setMaxSpeed(2000); 18 | stepper2.setAcceleration(800); 19 | } 20 | 21 | void loop() 22 | { 23 | if (stepper1.distanceToGo() == 0) 24 | { 25 | pos1 = -pos1; 26 | stepper1.moveTo(pos1); 27 | } 28 | if (stepper2.distanceToGo() == 0) 29 | { 30 | pos2 = -pos2; 31 | stepper2.moveTo(pos2); 32 | } 33 | stepper1.run(); 34 | stepper2.run(); 35 | } 36 | -------------------------------------------------------------------------------- /Firmware/EasyDriver_Example5/EasyDriver_Example5.ino: -------------------------------------------------------------------------------- 1 | // Example5 code for Brian Schmalz's Easy Driver Example page 2 | // http://www.schmalzhaus.com/EasyDriver/EasyDriverExamples.html 3 | 4 | #include 5 | 6 | // Define the stepper and the pins it will use 7 | AccelStepper stepper1(1, 9, 8); 8 | 9 | // Define our three input button pins 10 | #define LEFT_PIN 4 11 | #define STOP_PIN 3 12 | #define RIGHT_PIN 2 13 | 14 | // Define our analog pot input pin 15 | #define SPEED_PIN 0 16 | 17 | // Define our maximum and minimum speed in steps per second (scale pot to these) 18 | #define MAX_SPEED 500 19 | #define MIN_SPEED 0.1 20 | 21 | void setup() { 22 | // The only AccelStepper value we have to set here is the max speeed, which is higher than we'll ever go 23 | stepper1.setMaxSpeed(10000.0); 24 | 25 | // Set up the three button inputs, with pullups 26 | pinMode(LEFT_PIN, INPUT_PULLUP); 27 | pinMode(STOP_PIN, INPUT_PULLUP); 28 | pinMode(RIGHT_PIN, INPUT_PULLUP); 29 | } 30 | 31 | void loop() { 32 | static float current_speed = 0.0; // Holds current motor speed in steps/second 33 | static int analog_read_counter = 1000; // Counts down to 0 to fire analog read 34 | static char sign = 0; // Holds -1, 1 or 0 to turn the motor on/off and control direction 35 | static int analog_value = 0; // Holds raw analog value. 36 | 37 | // If a switch is pushed down (low), set the sign value appropriately 38 | if (digitalRead(LEFT_PIN) == 0) { 39 | sign = 1; 40 | } 41 | else if (digitalRead(RIGHT_PIN) == 0) { 42 | sign = -1; 43 | } 44 | else if (digitalRead(STOP_PIN) == 0) { 45 | sign = 0; 46 | } 47 | 48 | // We only want to read the pot every so often (because it takes a long time we don't 49 | // want to do it every time through the main loop). 50 | if (analog_read_counter > 0) { 51 | analog_read_counter--; 52 | } 53 | else { 54 | analog_read_counter = 3000; 55 | // Now read the pot (from 0 to 1023) 56 | analog_value = analogRead(SPEED_PIN); 57 | // Give the stepper a chance to step if it needs to 58 | stepper1.runSpeed(); 59 | // And scale the pot's value from min to max speeds 60 | current_speed = sign * ((analog_value/1023.0) * (MAX_SPEED - MIN_SPEED)) + MIN_SPEED; 61 | // Update the stepper to run at this new speed 62 | stepper1.setSpeed(current_speed); 63 | } 64 | 65 | // This will run the stepper at a constant speed 66 | stepper1.runSpeed(); 67 | } 68 | -------------------------------------------------------------------------------- /Firmware/README.md: -------------------------------------------------------------------------------- 1 | SparkFun Easy Driver Example Code 2 | ====================================== 3 | 4 | 5 | Repository Contents 6 | ------------------- 7 | * **/Arduija_Demo** - Firmware for the [Arduija Project](https://www.sparkfun.com/news/1631). 8 | * **/SparkFun_Easy_Driver_Basic_Demo** - Firmware for the [Easy Driver Hookup Guide](https://learn.sparkfun.com/tutorials/easy-driver-hook-up-guide). 9 | * **/EasyDriver_Example1** -Example 1 from SchmalzHaus. 10 | * **/EasyDriver_Example2** -Example 2 from SchmalzHaus. 11 | * **/EasyDriver_Example3** -Example 3 from SchmalzHaus. 12 | * **/EasyDriver_Example4** -Example 4 from SchmalzHaus. 13 | * **/EasyDriver_Example5** -Example 5 from SchmalzHaus. 14 | -------------------------------------------------------------------------------- /Firmware/SparkFun_Easy_Driver_Basic_Demo/SparkFun_Easy_Driver_Basic_Demo.ino: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | SparkFun Easy Driver Basic Demo 3 | Toni Klopfenstein @ SparkFun Electronics 4 | March 2015 5 | https://github.com/sparkfun/Easy_Driver 6 | 7 | Simple demo sketch to demonstrate how 5 digital pins can drive a bipolar stepper motor, 8 | using the Easy Driver (https://www.sparkfun.com/products/12779). Also shows the ability to change 9 | microstep size, and direction of motor movement. 10 | 11 | Development environment specifics: 12 | Written in Arduino 1.6.0 13 | 14 | This code is beerware; if you see me (or any other SparkFun employee) at the local, and you've found our code helpful, please buy us a round! 15 | Distributed as-is; no warranty is given. 16 | 17 | Example based off of demos by Brian Schmalz (designer of the Easy Driver). 18 | http://www.schmalzhaus.com/EasyDriver/Examples/EasyDriverExamples.html 19 | ******************************************************************************/ 20 | //Declare pin functions on Redboard 21 | #define stp 2 22 | #define dir 3 23 | #define MS1 4 24 | #define MS2 5 25 | #define EN 6 26 | 27 | //Declare variables for functions 28 | char user_input; 29 | int x; 30 | int y; 31 | int state; 32 | 33 | void setup() { 34 | pinMode(stp, OUTPUT); 35 | pinMode(dir, OUTPUT); 36 | pinMode(MS1, OUTPUT); 37 | pinMode(MS2, OUTPUT); 38 | pinMode(EN, OUTPUT); 39 | resetEDPins(); //Set step, direction, microstep and enable pins to default states 40 | Serial.begin(9600); //Open Serial connection for debugging 41 | Serial.println("Begin motor control"); 42 | Serial.println(); 43 | //Print function list for user selection 44 | Serial.println("Enter number for control option:"); 45 | Serial.println("1. Turn at default microstep mode."); 46 | Serial.println("2. Reverse direction at default microstep mode."); 47 | Serial.println("3. Turn at 1/8th microstep mode."); 48 | Serial.println("4. Step forward and reverse directions."); 49 | Serial.println(); 50 | } 51 | 52 | //Main loop 53 | void loop() { 54 | while(Serial.available()){ 55 | user_input = Serial.read(); //Read user input and trigger appropriate function 56 | digitalWrite(EN, LOW); //Pull enable pin low to allow motor control 57 | if (user_input =='1') 58 | { 59 | StepForwardDefault(); 60 | } 61 | else if(user_input =='2') 62 | { 63 | ReverseStepDefault(); 64 | } 65 | else if(user_input =='3') 66 | { 67 | SmallStepMode(); 68 | } 69 | else if(user_input =='4') 70 | { 71 | ForwardBackwardStep(); 72 | } 73 | else 74 | { 75 | Serial.println("Invalid option entered."); 76 | } 77 | resetEDPins(); 78 | } 79 | } 80 | 81 | //Reset Easy Driver pins to default states 82 | void resetEDPins() 83 | { 84 | digitalWrite(stp, LOW); 85 | digitalWrite(dir, LOW); 86 | digitalWrite(MS1, LOW); 87 | digitalWrite(MS2, LOW); 88 | digitalWrite(EN, HIGH); 89 | } 90 | 91 | //Default microstep mode function 92 | void StepForwardDefault() 93 | { 94 | Serial.println("Moving forward at default step mode."); 95 | digitalWrite(dir, LOW); //Pull direction pin low to move "forward" 96 | for(x= 0; x<1000; x++) //Loop the forward stepping enough times for motion to be visible 97 | { 98 | digitalWrite(stp,HIGH); //Trigger one step forward 99 | delay(1); 100 | digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again 101 | delay(1); 102 | } 103 | Serial.println("Enter new option"); 104 | Serial.println(); 105 | } 106 | 107 | //Reverse default microstep mode function 108 | void ReverseStepDefault() 109 | { 110 | Serial.println("Moving in reverse at default step mode."); 111 | digitalWrite(dir, HIGH); //Pull direction pin high to move in "reverse" 112 | for(x= 0; x<1000; x++) //Loop the stepping enough times for motion to be visible 113 | { 114 | digitalWrite(stp,HIGH); //Trigger one step 115 | delay(1); 116 | digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again 117 | delay(1); 118 | } 119 | Serial.println("Enter new option"); 120 | Serial.println(); 121 | } 122 | 123 | // 1/8th microstep foward mode function 124 | void SmallStepMode() 125 | { 126 | Serial.println("Stepping at 1/8th microstep mode."); 127 | digitalWrite(dir, LOW); //Pull direction pin low to move "forward" 128 | digitalWrite(MS1, HIGH); //Pull MS1, and MS2 high to set logic to 1/8th microstep resolution 129 | digitalWrite(MS2, HIGH); 130 | for(x= 0; x<1000; x++) //Loop the forward stepping enough times for motion to be visible 131 | { 132 | digitalWrite(stp,HIGH); //Trigger one step forward 133 | delay(1); 134 | digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again 135 | delay(1); 136 | } 137 | Serial.println("Enter new option"); 138 | Serial.println(); 139 | } 140 | 141 | //Forward/reverse stepping function 142 | void ForwardBackwardStep() 143 | { 144 | Serial.println("Alternate between stepping forward and reverse."); 145 | for(x= 1; x<5; x++) //Loop the forward stepping enough times for motion to be visible 146 | { 147 | //Read direction pin state and change it 148 | state=digitalRead(dir); 149 | if(state == HIGH) 150 | { 151 | digitalWrite(dir, LOW); 152 | } 153 | else if(state ==LOW) 154 | { 155 | digitalWrite(dir,HIGH); 156 | } 157 | 158 | for(y=0; y<1000; y++) 159 | { 160 | digitalWrite(stp,HIGH); //Trigger one step 161 | delay(1); 162 | digitalWrite(stp,LOW); //Pull step pin low so it can be triggered again 163 | delay(1); 164 | } 165 | } 166 | Serial.println("Enter new option:"); 167 | Serial.println(); 168 | } 169 | -------------------------------------------------------------------------------- /Hardware/EasyDriver_v45.brd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | DIR 143 | GND 144 | M+ 145 | EasyDriver 146 | STEP 147 | MOTOR 148 | A 149 | B 150 | 05.19.14 BPS 151 | +5V 152 | GND 153 | +5V 154 | GND 155 | CUR 156 | MS1 157 | SLP 158 | PFD 159 | RST 160 | ENABLE 161 | MS2 162 | APWR 163 | PWR IN 164 | SchmalzHaus.com/ 165 | 3/5V 166 | v4.5 167 | 1 168 | + 169 | TP1 170 | ADJ 171 | 172 | 173 | 174 | 175 | 176 | 177 | 05/19/14 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | Brian Schmalz 199 | Produced by SparkFun 200 | 201 | 202 | 203 | 204 | 205 | <b>SMALL OUTLINE INTEGRATED CIRCUIT</b><p> 206 | wide body 7.5 mm/JEDEC MO-119AA<br> 207 | Source: http://www.atmel.com/dyn/resources/prod_documents/doc4126.pdf 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | >NAME 244 | >VALUE 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | <b>Panasonic Aluminium Electrolytic Capacitor VS-Serie Package D</b> 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | >NAME 298 | >VALUE 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | <b>SOT-223</b> 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | >NAME 327 | >VALUE 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | Solder jumper, small, shorted with trace. No paste layer. Trace is cuttable. 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | >NAME 349 | >VALUE 350 | 351 | 352 | Small solder jumper with no paste layer so it will open after reflow. 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | >NAME 362 | >VALUE 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 877 | 878 | 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | 888 | 889 | 890 | 891 | 892 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 900 | 901 | 902 | 903 | 904 | 905 | 906 | 907 | 908 | 909 | 910 | 911 | 912 | 913 | 914 | 915 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | 926 | 927 | 928 | 929 | 930 | 931 | 932 | 933 | 934 | 935 | >NAME 936 | >VALUE 937 | 938 | 939 | 940 | 941 | 942 | 943 | 944 | >NAME 945 | >VALUE 946 | 947 | 948 | 949 | 950 | 951 | 952 | 953 | 954 | 955 | >NAME 956 | >VALUE 957 | 958 | 959 | 960 | 961 | 962 | 963 | 964 | 965 | 966 | 967 | <b>Stand Off</b><p> 968 | This is the mechanical footprint for a #4 phillips button head screw. Use the keepout ring to avoid running the screw head into surrounding components. SKU : PRT-00447 969 | 970 | 971 | 972 | 973 | 974 | 975 | <h3>SparkFun Electronics' preferred foot prints</h3> 976 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> 977 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 978 | <br><br> 979 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 980 | <br><br> 981 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 982 | 983 | 984 | 985 | 986 | 987 | 988 | 989 | 990 | 991 | 992 | >NAME 993 | >VALUE 994 | 995 | 996 | 997 | 998 | 999 | 1000 | 1001 | 1002 | 1003 | 1004 | >NAME 1005 | >VALUE 1006 | 1007 | 1008 | 1009 | 1010 | <h3>SparkFun Electronics' preferred foot prints</h3> 1011 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> 1012 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 1013 | <br><br> 1014 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 1015 | <br><br> 1016 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | >NAME 1029 | >VALUE 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | <h3>SparkFun Electronics' preferred foot prints</h3> 1038 | In this library you'll find discrete LEDs for illumination or indication, but no displays.<br><br> 1039 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 1040 | <br><br> 1041 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 1042 | <br><br> 1043 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | >NAME 1053 | >VALUE 1054 | 1055 | 1056 | 1057 | 1058 | <h3>SparkFun Electronics' preferred foot prints</h3> 1059 | In this library you'll find non-functional items- supply symbols, logos, notations, frame blocks, etc.<br><br> 1060 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 1061 | <br><br> 1062 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 1063 | <br><br> 1064 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 1065 | 1066 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | 1108 | 1109 | <h3>SparkFun Electronics' preferred foot prints</h3> 1110 | In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.<br><br> 1111 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 1112 | <br><br> 1113 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 1114 | <br><br> 1115 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 1116 | 1117 | 1118 | 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | >NAME 1126 | >VALUE 1127 | 1128 | 1129 | 1130 | 1131 | <h3>SparkFun Electronics' preferred foot prints</h3> 1132 | In this library you'll find resistors, capacitors, inductors, test points, jumper pads, etc.<br><br> 1133 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 1134 | <br><br> 1135 | <b>Licensing:</b> Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 1136 | <br><br> 1137 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 1138 | 1139 | 1140 | 1141 | 1142 | 1143 | 1144 | 1145 | 1146 | <h3>SparkFun Electronics' preferred foot prints</h3> 1147 | In this library you'll find all manner of retired footprints for resistors, capacitors, board names, ICs, etc., that are no longer used in our catalog.<br><br> 1148 | We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com. 1149 | <br><br> 1150 | <b>Licensing:</b>Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/ 1151 | <br><br> 1152 | You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage. 1153 | 1154 | 1155 | Released under the Creative Commons Attribution Share-Alike 3.0 License 1156 | https://creativecommons.org/licenses/by-sa/3.0/ 1157 | Designed by: 1158 | 1159 | 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | 1166 | 1167 | 1168 | 1169 | 1170 | 1171 | <b>SPARKFUN EAGLE Design Rules - plus 8/8 Gold Phoenix</b> 1172 | <p> 1173 | The default Design Rules have been set to cover 1174 | a wide range of applications. Your particular design 1175 | may have different requirements, so please make the 1176 | necessary adjustments and save your customized 1177 | design rules under a new name. 1178 | 1179 | 1180 | 1181 | 1182 | 1183 | 1184 | 1185 | 1186 | 1187 | 1188 | 1189 | 1190 | 1191 | 1192 | 1193 | 1194 | 1195 | 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | 1202 | 1203 | 1204 | 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | 1214 | 1215 | 1216 | 1217 | 1218 | 1219 | 1220 | 1221 | 1222 | 1223 | 1224 | 1225 | 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | 1235 | 1236 | 1237 | 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | 1244 | 1245 | 1246 | 1247 | 1248 | 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | 1255 | 1256 | 1257 | 1258 | 1259 | 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | 1281 | 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | 1341 | 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | 1367 | 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | 1383 | 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | 1445 | 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | 1457 | 1458 | 1459 | 1460 | 1461 | 1462 | 1463 | 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | 1502 | 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 1513 | 1514 | 1515 | 1516 | 1517 | 1518 | 1519 | 1520 | 1521 | 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | 1609 | 1610 | 1611 | 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | 1626 | 1627 | 1628 | 1629 | 1630 | 1631 | 1632 | 1633 | 1634 | 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 | 1679 | 1680 | 1681 | 1682 | 1683 | 1684 | 1685 | 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | 1695 | 1696 | 1697 | 1698 | 1699 | 1700 | 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | 1732 | 1733 | 1734 | 1735 | 1736 | 1737 | 1738 | 1739 | 1740 | 1741 | 1742 | 1743 | 1744 | 1745 | 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 1769 | 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 1777 | 1778 | 1779 | 1780 | 1781 | 1782 | 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 1794 | 1795 | 1796 | 1797 | 1798 | 1799 | 1800 | 1801 | 1802 | 1803 | 1804 | 1805 | 1806 | 1807 | 1808 | 1809 | 1810 | 1811 | 1812 | 1813 | 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 | 1821 | 1822 | 1823 | 1824 | 1825 | 1826 | 1827 | 1828 | 1829 | 1830 | 1831 | 1832 | 1833 | 1834 | 1835 | 1836 | 1837 | 1838 | 1839 | 1840 | 1841 | 1842 | 1843 | 1844 | 1845 | 1846 | 1847 | 1848 | 1849 | 1850 | 1851 | 1852 | 1853 | 1854 | 1855 | 1856 | 1857 | 1858 | 1859 | 1860 | 1861 | 1862 | 1863 | 1864 | 1865 | 1866 | 1867 | 1868 | 1869 | 1870 | 1871 | 1872 | 1873 | 1874 | 1875 | 1876 | 1877 | 1878 | 1879 | 1880 | 1881 | 1882 | 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | 1889 | 1890 | 1891 | 1892 | 1893 | 1894 | 1895 | 1896 | 1897 | 1898 | 1899 | 1900 | 1901 | 1902 | 1903 | 1904 | 1905 | 1906 | 1907 | 1908 | 1909 | 1910 | 1911 | 1912 | 1913 | 1914 | 1915 | 1916 | 1917 | 1918 | 1919 | 1920 | 1921 | 1922 | 1923 | 1924 | 1925 | 1926 | 1927 | 1928 | 1929 | 1930 | 1931 | 1932 | 1933 | 1934 | 1935 | 1936 | 1937 | 1938 | 1939 | 1940 | 1941 | 1942 | 1943 | 1944 | 1945 | 1946 | 1947 | 1948 | 1949 | 1950 | 1951 | 1952 | 1953 | 1954 | 1955 | 1956 | 1957 | 1958 | 1959 | 1960 | 1961 | 1962 | 1963 | 1964 | 1965 | 1966 | 1967 | 1968 | 1969 | 1970 | 1971 | 1972 | 1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | -------------------------------------------------------------------------------- /Hardware/EasyDriver_v45_BOM.xls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/Easy_Driver/e9a837d2d62bce969f3b7b8bddde6330001a6b99/Hardware/EasyDriver_v45_BOM.xls -------------------------------------------------------------------------------- /Hardware/EasyDriver_v45_sch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/Easy_Driver/e9a837d2d62bce969f3b7b8bddde6330001a6b99/Hardware/EasyDriver_v45_sch.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Easy Driver 2 | =========== 3 | 4 | ![Easy Driver](https://cdn.sparkfun.com/assets/learn_tutorials/2/4/1/EasyDriver_Angled.jpg) 5 | 6 | [*Easy Driver (ROB-12779)*](https://www.sparkfun.com/products/12779) 7 | 8 | 9 | The EasyDriver is a simple to use stepper motor driver, compatible with anything that can output a digital 0 to 5V pulse (or 0 to 3.3V pulse if you solder SJ2 closed on the EasyDriver). 10 | The EasyDriver requires a 7V to 20V supply to power the motor and can power any voltage of stepper motor. 11 | 12 | 13 | Repository Contents 14 | ------------------- 15 | * **/Firmware** - Any firmware that the part ships with, 16 | * **/Hardware** - All Eagle design files (.brd, .sch, .STL) 17 | * **/Production** - Test bed files and production panel files 18 | 19 | Documentation 20 | -------------- 21 | 22 | * **[Hookup Guide](https://learn.sparkfun.com/tutorials/easy-driver-hook-up-guide)** - Basic hookup guide for the Easy Driver. 23 | * **[Brian Schmalz: Easy Driver](http://schmalzhaus.com/EasyDriver/)** - More specs and FAQ. 24 | 25 | 26 | License Information 27 | ------------------- 28 | 29 | _Note: This product is a collaboration with Brian Schmalz. A portion of each sales goes back to him for product support and continued development._ 30 | -------------------------------------------------------------------------------- /notes.txt: -------------------------------------------------------------------------------- 1 | EasyDriver Notes.txt 2 | 3 | A file to keep thoughts about each version, test results, changes, etc. 4 | 5 | 10/27/2013 (Just ideas/wishes at this point) 6 | For v4.5, add current limiting resistors to all inputs 7 | For v4.5, add pull downs to STEP and DIR (ALL inputs have pull down or pull ups) 8 | For v4.5, add P-FET reverse polarity protection 9 | For v4.5, make 3.3/5 switch a cuttable jumper + .1" header for easy re-setting (change SJ1 and SJ2) 10 | 11 | 02/25/2014 12 | SparkFun requested: 13 | For v4.5 switch to normal SparkFun 0603 footprints for all Rs and Cs (done) 14 | For v4.5 add date code to version number (done) 15 | For v4.5 add OSHW logo to board (done) 16 | For v4.5 update silk screen for 10K trimpot so it's right (done) 17 | For v4.5 Update 10K trimpot footprint based on part SparkFun is actually using - TRIMPOT-3MM-2 - for part 22AR10KLFTR (done) 18 | 19 | 05/16/2014 v4.5 Prototype Testing 20 | * Minimum voltage necessary to trigger STEP and DIRECTION inputs (M+ at 12V): 21 | * Existing v4.5 design (R18 and R18 before the pulldowns) 22 | * At 5V Vcc, 2.9V is needed to trigger STEP and DIR 23 | * At 3.3V Vcc, 2.0V is needed to trigger STEP and DIR 24 | * With R18 and R19 after the pulldowns (rather than before), 25 | * At 5V Vcc, 2.7V needed for STEP and DIR 26 | * Ad 3.3V Vcc, 1.8V needed for STEP and DIR 27 | * Vcc measurements (M+ at 12V): 28 | * With 3/5V jumper open (default) : 5.027V 29 | * With 3/5V jumper closed : 3.300V 30 | * TP1 needs to not have solder mask over it, and needs to be bigger in order to be easy to hit with a volt meter probe. 31 | * Recommend SparkFun set pot so that TP1 = 2V. This will set the coil current at about 333mA 32 | * Recommend changing R5 to 2.4K. This gives complete lower range to VRef and thus allows lower current limits for smaller stepper motors. Tested this out by replacing R5 (5.1K) with 2.4K resistor, and low end current now works much better. Minimum coil current (with Current Adjustment Pot set CW and R5=2.4K) = 145mA/phase. 33 | * Maximum coil current measured (with Current Adjustment Pot set CCW) = 840mA/phase 34 | * Confirmed proper operation of MS1/MS2/ENABLE/SLEEP/RESET inputs 35 | * Tested four different NEMA-12 motors, all had good performance given various M+ input voltages, step speeds, and current pot adjustment values. 36 | * Tested M+ input voltage from 5V to 30V. Properly adjusting step speed and current limit pot gave good performance over entire range. --------------------------------------------------------------------------------