Breaking

Wednesday, January 8, 2020

Design and build a spin coater-----make money online

Design and build a spin coater-----make money online
Add caption
today on applied science of going to
talk about how I designed and built this

spin coater so I'll describe everything
I learned about low-cost motor
controllers and make all the code and
circuitry available in case you have a
similar motor based project so let's see
this thing in action it's got a rotor
here and I've put Flathead brass screws
in here so that when I slip a microscope
slide in and put one more screw in it
holds it down and keeps it from moving
on the rotor so I press the green button
and it spins at about 400 rpm
indefinitely and the idea is that you
want to put a liquid on to the spinning
slide and the spinning motion of the
spin coater will fling the liquid out
and make a very even coating on the
slide so I'm going to use this liquid
which is a photoresist and I realize I'm
doing this under shop lighting so it's
not going to be really useful but this
will just give you the idea and then we
press the green button again and the
Machine goes through a very controlled
acceleration up to about 3000 rpm
and when it reaches 3,000 it holds the
speed and it's counting up in seconds so
the whole idea here is that we want this
process to be very repeatable because we
want a very consistent even layer of
photoresist I had a different spin
coater previously that didn't work
nearly as well so this is a really nice
upgrade you'll see we're getting up to
about 30 seconds 32 the machine has a
really rapid deceleration and then you
can see that the slide is now nice and
coated with this green photoresist so
here's a slide I coded earlier you can
see that after it sits out under the
fluorescent lighting this one is nice
and green this one is nice and blue
because it's been exposed by the
fluorescent lighting in the shop so
let's take this thing apart and you can
see how it's built this splash guard
just lifts out it's actually just
sitting in here captain side-to-side
with these plastic blocks here but it
really just lifts out and the reason it
has this internal lip here is so that
when the thing flings excess liquid out
it will fall down into this moat instead
of making a mess on the table so as you
can see here this is using a motor
designed for like a quadcopter or
something like that and the reason for
that is that the market for these motor
controllers and motors for quad copters
is really developed so you can get these
for very cheap so I bought a couple just
because I mean this is like fifteen or
ten dollars or something like that and
the controller for it is similarly about
ten or fifteen bucks it's so cheap that
even single chips from digi-key that
would do a similar thing cost almost as
much as the entire board so let's open
this up and we can see what's in here
okay so here's the insides of the box
and this project was definitely a case
of using whatever I had available on the
shelf so a lot of these things I already
had in fact the only thing that I
actually bought for this project was the
motor in the controller itself but
anyway let's take a look at this so
we've got switched mains coming in here
coming down to the switch mode power
supply
it's about seven and a half or eight
volts kind of weird but that's actually
the voltage that I needed and I just
happen to have this playing around then
we have an old-fashioned parallel
interface LCD up here the motor
controller and an Arduino micro that
runs the whole show so those two buttons
are disconnected right up to the Arduino
micro and we're using its internal
pull-up resistors to sense the state of
those buttons a nice little tip if
you're using a abs project box like this
and you want to mount a circuit board or
a heavy thing like this what you can do
is cut some chunks of thick ABS plastic
this is maybe 3/8 of an inch thick and
drill a hole and tap it in this chunk
and then what you can do is attach the
chunk with a screw to your circuit board
kind of like that thread that in there
so that there's a plastic foot here and
then just drop the whole thing in to
your plastic enclosure and then add some
solvent weld I ran out of thickened a
solvent weld that you can use this on
abs you can also just use sewer pipe
cement from the hardware store it works
great very strong like that foot the
project box itself will break before
that foot comes off so if you need to
fix something like a heavy power supply
board this works just fine it also gives
you the ability to kind of move it
around inside the project box before you
commit to it okay so let's talk about
motor selection for a second when I
started this project I didn't know that
I was going to be using one of these
quadcopter motors I thought oh you know
maybe a stepper motor would be okay and
this project is not particularly well
suited for a stepper motor because the
speeds are kind of high so you saw it
was running at 3000 rpm but potentially
we'd want it to go up to four or even
5,000 rpm and that's really pushing it
for a stepper motor in addition the
steppers don't really turn particularly
smoothly and since there's no feedback
you kind of have to add a tachometer or
a spin sensor to make sure that you
aren't missing steps I realized that the
rotor on this thing is not particularly
heavy so it's sort of a known
acceleration profile it's unlikely that
you'd miss steps but even still you'd
probably want some feedback so I
decided not to use the stepper motor and
then that leaves you know you could just
use a plain old DC motor in fact in my
previous spin coater this was the older
model I just used this old cheap DC
motor egg out of an old cassette deck or
something like that and I had that same
aluminum rotor pressed on to the shaft
here and this thing sat down in here
like this and I had a little bit more of
a this thing was a little bit taller I
cut the stop to make the the new shield
but anyway the it's not quite enough
power would be nicer if it accelerated
and decelerated with more control so
that was out another good idea is to use
a hard drive so when thinking about
stuff that already exists in the world
that kind of does what we want a hard
drive is actually pretty close so this
will get up to you know 7,000 rpm no
problem it's even got this nice bearing
system so that the thing spins smoothly
and it even a hoody has like a disc
shape on the front and the motor is
built into this nice aluminum housing so
we can kind of you know bolt this down
it'd be great and in fact if you go on
eBay there's a company selling low-cost
spin encoders made out of hard drive
motors and when I say low-cost I mean
like five hundred to a thousand dollars
compared to what the semiconductor
industry charges for these things which
is you know probably tens of thousands
there's another nice feature about these
these often have a solid spindle so this
particular one doesn't but on some hard
drive models the center of the spindle
actually doesn't spin because it goes
all the way through the motor to the
bottom and the cool thing about that is
if you attach a vacuum hose to the
bottom you can put a rubber o-ring on
the top and then when you put your glass
microscope slide down on that you can
use vacuum to hold the microscope slide
down and that gives you this nice
convenient vacuum Chuck so I liked that
idea
however these motors still don't have
quite enough power so you know your 7200
rpm hard drive may take you know five or
ten seconds to come up to speed and
that's actually about right but when I
started this project I thought I needed
to have much faster acceleration to have
a good spin coater and in a minute I'll
show you this thing connected
with the debug port and it's actually
pretty impressive how quickly this thing
can change speeds another slight problem
with using a hard drive motor is that
this is a four wire brushless DC motor
and it's wired up in what's called a Wye
configuration so the four wires are one
two three and four
and obviously it's called a Y because it
looks like that but most of the
brushless DC motors that are built for
quadcopters and similar things are a
three wire and it's called a Delta
configuration because it looks like a
Greek Delta and so the one two three
wires there and these are not really
interchangeable you can sort of get away
with it a little bit but generally not
really and also the coil resistances for
these are generally not quite the same
as they are for quadcopter motors so it
is and then you know later on you'll
find out that the the controllers that
they make for these things are so cheap
that it's just silly not to use them so
I decided not to go with the hard drive
motor if you go to a site like hobbyking
or one of the places that sells a whole
bunch of stuff for making your own quad
copters you'll find the prices on these
things are just really low I mean this
was probably ten dollars or something I
think they even have small motor
controllers that are even under ten
dollars and it's kind of silly because
if you go to digi-key and just look up
the parts like if you just buy all the
FETs that to make this or even though
you know a monolithic chip that's got
all the fats in there even that's going
to get close to ten dollars just in
parts and so it's kind of silly to not
buy this since it already has the
firmware it already has the controller
the capacitor I mean everything and then
the motor itself is ten to twenty
dollars and it's known to work with it
so you kind of are guaranteed a working
system just with these two parts if you
wanted to take a simple approach you
could just use these parts as they are
and these motor controllers are designed
to be controlled by this you know servo
standard so it's three wires ground
power and the servo signal and the servo
signal is just a pulse width it varies
from I think half a millisecond up to
one and 1/2 milliseconds and that sort
of indicates the throttle range
so you could totally connect this right
up to your microcontroller and people
have already written servo libraries so
you can just tell it how much in
percentage you want and this thing will
everything will work just fine so
there's almost no tweaking to do
although I wanted a couple extra bits of
functionality one of them is that I
wanted this thing to slow down on
command so since this is built for a
quadcopter there really isn't any need
to break the motor so if you you know
lower the throttle just the air
resistance of the propeller that this
thing would normally be connected to it
will slow it down but you can actually
configure these things to the engine
braking I mean regenerative braking and
even just full braking and luckily
enough the community is really well
developed around these things in fact I
don't know of any other product that
actually lists a hex file on the package
it says afro and FedEx and at first I
was thinking you know what how would
they just put the name of the hex file
on a package I mean what does that even
mean and then you realize that you're
entering this entire like huge community
that's very very well developed where
there's a lot of jargon going on and it
takes hours just to figure out what's
going on but basically the hardware has
become very standardized and lots of
folks have written their own firmware
and modding it is super common and it's
actually very well documented it just
takes a while to get going so take a
look at the description of this video
and I'll put links that will save you a
lot of time if you're interested in
modifying the firmware for one of these
you know for better or worse it is
written in assembly although again it is
fairly well documented another
interesting bit is that some of these
are made to be programmable over the
servo wire so with just three
connections you in theory can send a bit
stream over the control wire if you give
it the right sequence and someone even
wrote a Chrome extension such that you
can flash your firmware through Chrome
just with this one connection going to I
think they sell it a little USB
programmer so I tried it using an
Arduino as the programmer you can also
connect this to an Arduino and use that
as the programmer but it didn't work in
fact it actually ruined my device and
luckily I was able to
but it did actually stop it from working
so I can't endorse that route but
luckily what I did is just on this
particular board they've actually broken
out the in circuit programming port and
so these yellow wires here are going to
a programming header and again I just
used an Arduino as my programmer
compiled the assembly downloaded the
firmware to this thing and everything
worked great so I'll put details to that
in the description so here the mods that
I made to this thing in the assembly
firmware one is that instead of
controlling it over this you know servo
half millisecond timing pulse you can
actually configure this thing to accept
I squared C commands this is pretty cool
since you could actually potentially
have you know five or ten of these motor
controllers in a project and control
them all of them over the I squared C
bus from your microcontroller or
whatever you've got so that's cool and
then also instead of just you know
relying on the timing accuracy of
microseconds to get the signal you want
if you're actually giving it the value
you want over I squared C you can be
much more accurate and much more
reproducible so that's good and then
also I wanted this thing to slow down if
I gave it a slower speed than where the
motor was currently spinning like I said
for most quadcopter applications that
you know engine braking doesn't really
make any sense because as soon as you
lower the throttle it'll slow down but
for RC car applications sometimes you
want regenerative braking so that's a
switch in the code that's relatively
easy to flip also if you give this thing
the command of zero speed it can do a
much more aggressive braking thing so
instead of regenerative braking all the
way down to zero if you give this a zero
it will actually you know essentially
short out the motor windings in the
controller so that it will decelerate as
quickly as possible the difference is
that when it's regenerative braking it's
still commutated so that the thing knows
where the motor is where the rotor is
and then you can speed back up quickly
if you want if you give it the command
of zero that will actually stop
commutation so it no longer knows where
the motor is is it's just going to try
to slow it down as quickly as possible I
should add that a lot of these motors
you know hobby brushless DC motors come
in two flavors censored and sensorless
and censored doesn't mean it tops like a
sailor it just means that they have Hall
effect sensors in here so that the
controller can know the position of the
rotor at all times and if it knows that
then it can apply the current to those
three windings in such a way that it can
always make the rotor spin exactly in
the way that it should to get to get a
decent rotation with a sensorless motor
if this rotor isn't spinning there's no
electricity coming out of these things
and with no Hall effect sensors the
controller has no idea where the rotor
is so the only thing it can do is just
give it essentially a random pulse and
then wait for a minute and see if the
spinning rotor induces a voltage on the
unused pin and then it can figure out
where the rotor is based on the voltages
that it's creating just from its spin so
a lot of times you'll see one of these
motors start up it'll actually go
backwards for about a half turn and then
the controller realizes it started it in
the wrong direction but once it's moving
then it knows where the rotor is and it
can speed up again so the sensor sensor
lists motors are a bit more common and
cheaper and for applications where this
is not connected like you'd want a
censored motor if you were driving a
bicycle or a vehicle because the wheel
is in contact with the ground and it
doesn't really have the ability to just
kick it backwards for a half turn to see
where the rotor is so it kind of needs
to have a good way to accelerate from
zero for a quadcopter application it's
just connected to a propeller that's
just sitting in air so it doesn't really
it's easy to get the motor started in
retrospect I would probably try to go
for a censored application for this
thing but another challenge was getting
a motor that doesn't spin too quickly so
these things are designed to be
connected to small propellers and they
spin very fast you know 10,000 20,000
rpm even but I wanted to go slow so when
I was dispensing the fluid on here you
know 3 or 400 rpm is fine and getting a
motor that actually goes that slow is
tricky I thought I'd point out another
bit of circuitry before we move on this
is kind of a weird little device it's a
potentiometer voltage divider and the
output of the voltage divider is connect
to the gate of a pretty beefy and FET
and then the source of the end fed is
connected to ground and the drain is
connected to VCC basically the eight
fold output of that power supply and so
since I mentioned I wanted this thing to
be able to slow down if I commanded a
lower rpm then it's currently spinning
it has to do something with all the
energy that's currently in the rotor and
since it's continuing to commutated
can't short out the motor windings
because that would prevent the
controller from seeing where the motor
is so what what ends up happening since
it's basically a regenerative braking
system all that power that's in the
rotor all the energy that's in that
stored in that spinning rotor has to go
back into the power supply but that
eight volt switch mode power supply is
not too happy about it in fact it's not
able to sync much current at all so
there has to be some way of getting rid
of that excess energy so this what this
is is basically a programmable Zener
diode so in normal operation the N FET
is not turned on at about seven or eight
volts but as the voltage Rises it
eventually turns the N FET on and starts
conducting eventually looks like a short
if the voltage gets high enough so I
don't know if that's really production
quality I don't know if I would put that
in real production circuit in fact I've
never seen anything quite like that
before but it is very simple and it does
work very well I haven't tested it over
temperature stability or anything but
let me know what you think about that
part of the goal this project was just
to write a really tight PID control loop
for this motor system so that I could
command any rpm and get it to go to that
speed very quickly even though it turned
out for spin coders it's not critical to
have a really fast ramp rate so I'm
going to control this through the serial
interface and just command it to go to
1000 rpm so you can see it's starts up
and does just fine try 2000
it manages to reach the speed very
quickly and comes to a standstill so
when I command a zero speed then it's
using full braking and it stops
commutated but if we go from say 2000
down to 1000 then that's essentially the
regenerative braking thing where that
funny circuit is absorbing the powers
try that there is 0 to 2000 if we go to
0 or if we go to 1000 it's not quite as
quick and part of that is because the
circuit is not really designed for
regenerative braking and so it's it
doesn't pull as much energy out of the
system as you know as it could but to go
up to 4000 it's not quite as snappy
because I've limited the total throttle
setting just because I don't really need
to go that fast but it is kind of neat
to see the thing go to its extreme
perform performance limits ok well let
me know if you have any questions about

that and I will see you next time byeearn skrill money, best way to earn money from home, make instant money online absolutely free, trusted online money making sites, online income site, best online earning, money online, earn money from home, earn dollars online, earn money online, earn money online 2019, earn money online by typing pages, earn money online daily, online work at home and earn money, online earning, earn money online free, online money earning sites, earn real money online, e commerce ideas to make money, easiest way to earn money online, best way to earn money online, make money from home, make money online free, money making sites, earn from home, real ways to make money from home, online income ideas, make real money online, top online earning websites, earn money online fast, top 10 money earning websites, earn money without investment, earn money online for students, best sites to earn money, make money online 2019, earn easy money online, earn money online instantly, real money earning sites,

No comments: