Hi, my name is Zach, and you're watching byte sized,
if you clicked on this video, chances are you have a lot of creative ideas
and you enjoy making things.
My goal with this channel is to give you the knowledge,
the inspiration and the confidence to make your ideas a reality.
I recently bought this tripod
and I thought it would be a fun idea to add some motion control
to make my shots more visually interesting.
I've gone through all of the motors that I have here on hand,
and I think I found one that's going to work.
This is a NEMA 23 stepper motor,
and it should have plenty of torque to rotate this camera arm.
The first thing I need to do is to figure out how I'm going
to mechanically couple these two things together.
I need to design a part that will slide
onto the stepper motor and fit inside this little rotating red piece.
So I'm going to take some measurements
and I'm going to jump on the computer and start designing that piece.
It took me a couple of iterations, but I finally got a little 3D
printed adapter that will fit snugly inside this rotating part.
So earlier I showed you this NEMA 23 motor.
It's probably a little bit too big for this application.
There's just not enough room for it to fit in there.
So I have a smaller NEMA 17 motor.
Now, it doesn't have as much torque as this bigger one,
but that's why I'm going to test this out.
So it fits a lot better in here. And if it has enough torque, great.
If it doesn't, I'm going to have to figure out how to make this bigger one work.
So here's that NEMA 17 motor.
The wires that are on there are much too long.
So I'm going to go ahead and trim those off.
Then I'm going to use the multimeter
here to verify which of the motor windings belong to which color wire.
So I'm going to put the probes on to a pair of wires.
And I'm looking for a very low resistance to tell me which ones are winding pairs.
So if I remember right, I think that the red
and the blue are a motor winding pair, so I'm going to test the resistance
between those two using the multimeter, and I'm looking for a really low
resistance here.
So let's see what we've got.
I'm measuring 4.6 Ohms, which sounds right.
So if I measure one of the other ones, I should get a really high resistance
or infinite resistance, which tells me that they're not a pair.
So if I measure the black one, for example, and the blue one,
those are not a pair.
And now I see open loop or something really high.
So that confirms that the blue and red are a pair.
And the black and the green are a pair.
So I'm going to wire it up to my motor controller just like that.
At this point, I've got this stepper motor wired to the motor controller.
I've got a power supply
also wired up to the motor controller, and I set it to 12 volts.
Next, I've put a little bit of code on an Arduino nano
and connected up to the motor controller.
All it takes from the Arduino is a step signal and a direction signal
to talk to the motor controller, and that will spin the motor around.
So this is the first time I'm hooking it all up.
Let's see if it works.
So when I plug in the power supply
and nothing happens,
I've got it set to twelve volts.
I wonder if it's not enabled or something like that.
All right. Well, I'm going to sit here and troubleshoot this for a second.
I'm also going to put some blue tape around the shaft here
so I can tell when it's spinning around.
So give me a moment.
I'm going to troubleshoot this and figure it out.
maybe the enable needs to be active,
low, maybe instead of
pulling it, need to pull a low level.
No, I hope we hear something.
Oh, yeah, it's totally doing something.
It's starting it's starting to spin now.
But I think I have the steps per revolution.
Not set right. I think that's got to be it, because it's only spinning
like a little bit.
And I just didn't see it before. Oh, yeah. Cool.
Well, let me get that sorted out.
I think that's just a quick setting in the code,
and I can figure this out real quick.
I think there was a couple of things wrong here.
The first one was the enable signal.
It wasn't very clear based on the labels here.
Typically, it'll have like an active high or an active low signal, meaning
either connected to five volts or to ground to enable the stepper motor.
This wasn't very clear.
In this case, I actually just leave it
floating to enable it and then connect it to five volts to disable it.
So I've got that sorted out.
And then the other thing, as I mentioned just now, is I think the steps
per revolution or the number of pulses per revolution was not set correctly .
The code that I have, I downloaded the library from somebody
and it says in there to assume that you're using 1X micro stepping.
And I had the switches on the side of this set to 32X micro stepping.
So I just adjusted the switches here and hopefully that should fix it again.
I'm going to plug it in right here
and we're going to see if this starts spinning around.
There we go. Awesome.
Check it out. Spinning around.
So it does one revolution
and then pauses and then does another revolution.
So now I'm going to connect it up to the tripod to see if it has enough
torque to spin the amount of mass that's going to be on there.
Now I'm going to test this with the tripod, I've got the boom
all set up and I'm going to issue a command to turn the stepper motor
and I'm going to insert it
into the tripod to see if it has enough torque to spin this.
So I'm going to go ahead and issue the command.
And you can see that the boom arm is turning,
I have it set to turn pretty slow,
but it's definitely strong enough to turn this now that I've got this working,
the next step will be to design a bracket to mount the stepper motor
to the tripod frame. So I don't have to hold my hand here.
So here's what I have so
far for this mounting bracket that's going to attach to the tripod.
You can see here that I've designed sort of this arm that sticks out
and it's got a little hole in there that's going to utilize an existing
thumb screw that's on the tripod, and that's how it's going to mount
securely to the tripod.
So I'm going to go ahead and print this out to see if I have the dimensions.
It's probably going to take a couple of tries to get this right.
But I think this is going to work.
So here's that existing thumb screw that I was talking about.
You can see that
if I remove the thumb screw, I can insert this mounting bracket here like this.
But I can already tell that this first attempt that I've printed,
it doesn't line up with the center of rotation.
So I'm going to have to extend this little arm just a bit
to make sure that motor lines up just perfect.
After about a half hour of printing, I've got version two here done,
and I've got a good feeling that this is going to work much better.
So I'm going to install some screws to the motor
and then attach it to the tripod using this thumb screw.
Now I'm going to test this by
rotating it, using the motor controller.
I would consider that a big success.
Everything worked the way I was planning,
and I'm really happy with what I see so far.
I actually got a little bit too confident and increase the speed too much,
and I stripped out that little top part that connects to the motor shaft.
The profile on that motor shaft has a flat face like a D
and stripped out that piece, which is not a big deal
because I can just reprint in a little take like 10 minutes.
So I'm going to do that.
And then I'm also lower that speed so I don't run into the same issue again
with all of that done.
And the next step is going to be to kind of clean up all of these
electronics and mount them underneath the motor somehow to make it look clean.
Before I go any further, let me tell you about the sponsor of this video,
and that is Altium.
Altium makes a PCB design software called Altium Designer.
If you've ever done any sort of electrical design,
you're going to want to check out Altium Designer.
In my career as an electrical engineer, I've used a lot of different software.
And let's be honest, most of it is crap.
That is not the case with Altium Designer.
It is beautifully designed.
It's modern, and they're continually updating it to have the latest features.
What's cool about Altium Designer is that it's an all in one platform.
Some of the other software that I've used,
you have to use different programs to do your schematic capture
and then your board layout and then your component selection and your net list,
And it's a huge mess. That's not the case with Altium Designer.
It's all built into one package.
Another cool thing about Altium is that it has cloud features.
It's got something called Altium 365, which is a cloud workspace
that allows you to collaborate with other people and do version control.
If you want to get a better idea of what you can make with Altium Designer.
Go follow them on Instagram.
And there's lots of different examples
of what people have made using their software.
If you're ready to take your PCB design to the next level,
go check out Altium Designer, and you can do that
by clicking on the link in the description.
And when you sign up for a subscription, you'll get a 30 percent discount.
Altium is an awesome company.
They believe in what I do here on this channel
and they make these videos possible. So go check them out.
I really appreciate you supporting the sponsors
and I appreciate Altium for sponsoring this video.
So I've just finished assembling this little 3D printed
mounting plate that connects the Arduino board to the motor controller.
I needed a way to power this module, so I found a 3D printed adapter
that will work with my drill battery.
The problem was that I couldn't
find the right contacts that would mate with the contacts on my drill battery.
So I ended up just going with a regular LiPo battery.
Next, I 3D printed this holder,
which will hold the battery as well as the motor controller,
and it'll strap to the leg of the tripod.
One of the most useful things that you'll find on motion control systems
like CNC machines are something called limit switches or end stops.
This is usually accomplished
by having either a mechanical switch or some sort of electronic switch
that will close when the motor reaches a certain point.
In this case, I'm going to be using a reed switch, which is activated by a magnet.
I have an extra hole here
right on the side of the tripod that will work perfect, with the exception
that it's just barely too small to fit the diameter of this reed switch.
So I'm going to have to drill that out a little bit.
But otherwise, this should fit right in there.
So I've actually redesigned that shaft adapter piece to have a little arm
and a little spot for a magnet so that when I slide this in here
and then rotate it, it'll actually activate this reed switch.
I've got everything wired up and connected to the tripod.
The final piece that I'm missing is being able to send commands and programing
the Arduino to tell the motor controller to start and stop in certain positions.
And to do that, I'm going to be using a firmware called grbl.
grbl is a gcode interpreter.
So that means that I can send regular G codes to the Arduino
and it will interpret those commands into motor movements.
I don't want to have to tether this to a computer using a USB cable.
So I installed a Bluetooth module
that will allow me to send those gcode commands from my phone.
Earlier, I was discussing having two different sized
motors, the NEMA 17 and the name of 23.
With my initial test, I thought I was going to get by
with the NEMA 17, but it's clear that I need to move up to the NEMA 23.
So I've printed a couple of extra motor brackets.
The biggest issue is having all of that
weight on one side with nothing to counterbalance it on the other side.
So I printed this little counterweight here
that I'm going to fill with some heavy objects
that will help balance out the weight.
If this project inspired you to build something of your own,
I'd love to hear about it down in the comments,
or maybe you have a creative way that I could use this setup.
One thing that I just thought of was
if I could figure out a way to mount this upside down and point the camera inward
as it rotates around, I could use it to do like a 3D scan of an object or person.
I hope this project video showed you how to take a complex idea
and break it down into more manageable pieces.
If you enjoy watching project videos like this, you should subscribe to byte sized.
That way you can stay up to date with all the things that I'm working on.
You should also consider becoming a byte sized
supporting member either through Patreon or YouTube memberships.
When you become a byte sized
supporting member, you get access to cool things like behind the scenes content,
access to the discord server, live streams and monthly video hangouts.
Thanks for watching this video, and I look forward to seeing you next time.
The first thing I need to figure out is to figure out...
this vertical piece and actually
what's going on here.
There we go. Here's that existing thumb screw that I was talking about.
Oh, my gosh. Oh, assembling this mount-
What is this called?