Stepper Motor

stepper

As we approach the end of the semester I’ve felt more of an urgency to work towards my final project. The main output device (and maybe only) I’m planning to use is a stepper motor which Jake mentioned would be a week's worth of work in itself.
stepper
I went to Jake's office hours on Friday and he advised a couple of routes to go down for controlling a stepper motor and even gave me a step stick and a stepper motor, however after some testing I found out that the stepper motor was broken.
jake_oh
The motor runs on a higher voltage than the XIAO rp2040 can supply so I had to find an external power source, so I opted for a 9v battery however I’m not sure if this is exactly what I want to use for the final since it's kind of clunky.
Finished
Once I got the motor running on the breadboard I wanted to create a pcb that was mountable on the back of the motor so it could be integrated into my final project machine. I found the datasheet for my motor but I couldn't find a 3d model which would have been nice for building a more intricate housing.
data
The fab library had a stepstick with a different layout so I just used two eight pad through hole components and spaced them 12.7 mm apart which was the standard spacing of my step stick (2.54 * 5)
motorsc
Recently I’ve enjoyed removing all the material from the pcb because it looks nice but after spending over an hour milling this I think I’ll save the nicer ones for the final iterations.
milledstepstick
milledstepstick
Recently I’ve enjoyed removing all the material from the pcb because it looks nice but after spending over an hour milling this I think I’ll save the nicer ones for the final iterations.
Desolder
I didnt think about the mounting of the step stick to the pcb so much but I soldered them vertically which seemed to work fine despite the awkward dimensions it will have. I think for my final I’ll design a way to have it mounted on the back. I wasn't super confident in how to mill holes that small with the roland so I'll have to inquire about that. I’m using micropython to test the device so here’s the code I’ve been using to do simple revolutions of the motor:
Desolder
As one can see, the code is very primative, I'm glad though that I was able to get it to move and that I could figure out the external power source because that's something I havent encountered yet. I'm excited to write more motor code for the final project because I think that's the meat of the project that I'm interested in! Also considering moving away from something less pre-manufactured as a step stick and design my own pcb for that.