Breaking

Wednesday, January 8, 2020

Fiberoptic joystick with quadrature encoders and arduino--- make money online

Fiberoptic joystick with quadrature encoders and arduino--- make money online

hi everyone I thought I'd show you my
latest project this is a standard
computer joystick that's not that
interesting but this particular joystick
is entirely optical so there is no wires
inside here this is only glass fibers
inside this cable meaning that the
joystick has no electronics inside her
this part of it is completely free of
electronics why would you want that you

may want to put this joystick into an
environment where you cannot have any
electricity for either safety reasons or
in this case this joystick is going to
be used inside MRI and an EEG machines
so you don't want wires in those
environments because it might interfere
with the magnetic field or may cause a
safety issue in those environments so I
developed this joystick that is entirely
metal free actually there's no all the
fasteners are plastic and as I mentioned
the sensing method is entirely optical
so this cable contains a total of eight
fibers and this is an NPO MPO connector
which is an industry standard for
multiple fiber optics in sort of one
connector so typically these have 12
fibers in them as this one does but I'm
only using eight and it all snaps
together like that and I bought this
pre-made cable which breaks out the
eight fibers into individual lines and
I'll show you inside this box so you can
see where those fibers go here's all the
electronics inside the interface box I
guess I'll start on the optical side
over here we have eight optical fibers
four of them are transmitters and in
this case the transmitters are just on
all the time it's not really sending any
data so there's just a couple of current
limiting resistors and I think I set
them to about seventy five milliamps for
each one of those transmitters so it's a
fair bit of power and I'll put up a link
to the
to the datasheet on these parts so then
we have the receivers over here this
company Ave ago or a vago or whatever
makes a bunch of optical components and
they make two versions of this receiver
this particular one has a trigger in
there and it's meant for low-speed data
communications so the output swings from
0 volts and then is supposed to snap
very quickly up to 5 volts I found that
they don't actually snap all that
quickly if the input optical signal is
kind of slowly changing you can get
these parts to not suddenly switch but
anyway what you essentially get is a
square wave out of these that tracks the
input and it's it's set somewhat
arbitrarily so when the input power goes
over a certain threshold the signal out
of these switches so what we have is for
plain old square waves from these
receivers and that gets fed into a chip
also made by a vago and this is a set of
counters and quadrature decoders so that
as the signals change in here the
counters count up and down and the
reason I chose to use this chip is
because you can clock it pretty quickly
over here I've got a five five five
circuit running at about a hundred
kilohertz and so this chip uses the
hundred kilohertz clock signal to figure
out the state transitions in the
quadrature signals you could go much
faster this chip can handle clock rates
up to about 33 megahertz however I found
if you clock at that fast it will pick
up noise and you know tiny little
twitches and stuff in these signals and
it's just not helpful so by lowering the
clock signal you can actually make the
system more noise resistant and in this
case having 100 kilohertz clock is
plenty fast to you know capture the
movement from the joystick okay so once
the counters in here are synced up with
the movement of the joystick the Arduino
samples the values from this chip it
reads them out in a the
segments that's a 32-bit counter for
each channel so it reads out a bunch but
I think I only asked I'll put some more
details at the Arduino Kota but I only
only read the last two bytes because the
there's not enough travel so I don't
really need all 32 bits and the main job
that I was using the Arduino to do is to
keep track of the minimum and maximum
and automatically scale the output so
one problem with incremental encoders
like this quadrature system is that when
you first power on the device it doesn't
know where the joystick is so you can't
have like an absolute number associated
with it so what the Arduino does is it
captures the minimum and maximum
position for a given session and then
scales the output so that it's always
outputting a percentage of that range so
this would require the user to move the
joystick around into complete revolution
right after powering up so that the
devices the code in the Arduino knows
what the minimum and maximum value is
and then from here I sent that scaled
sort of percentage range to this 80 mega
chip which does USB interfacing so I
realize this is kind of a lot of chips
it would be actually much better just to
have a single 18 mega chip read the
quadrature signals and go all the way
through to USB but in the name of
getting a circuit done quickly and
easily I did it this way and kept the
code pretty simple using modular
components like this allows me to change
things later on to rather than be
dedicated to one specific 18 mega chip
ok so if we turn the joystick over you
can see how it's built inside and we
have the bundle of fiber optics coming
in here and splitting off into the
individual fibers so two of the fibers
are positioned on one side of this
encoder wheel and two of the fibers are
positioned on the other side and they're
set up so that the distance between the
two fibers is a 90 degree phase
difference in the pitch of the encoder
wheel
as the wheel spins the light is broken
up in such a way that it's 90 degrees
out of phase for the two channels and
then you have the same thing for the
other axis so and when I rotate the
joystick handle the movement is you know
split up into vertical and horizontal
rotation and that's what turns the
encoder discs and sends the signal out
the optical cable I chose the the core
diameter 62 and a half micrometers to be
about the width of an encoding segment
on one of these code wheels at the right
radius so as the code wheel turns it
pretty much out almost a hundred percent
occludes the fibre end and that works
out pretty good because you get a nice
strong square wave signal out of the
optical system these are actually
surprisingly tough I wanted to show what
you can get away with one of these
fibers it would seem that a glass fiber
would be pretty delicate but check out
what you can do with one of these you
can really I mean you would never do
this to you would never be able to make
it go this and it's it'll all just snap
back and you can even get a fair bit of
signal this doesn't attenuate the signal
as much as you might think so I'll just
go ahead and break one just so you can
see what it's going to take it's
actually pretty surprising how small the
radius can get before it actually breaks
so if I push on this thing still
together still together try to break it
and I finally snapped as you can see you
really have to try to break one of these
now when you strip the protective jacket
off and expose just the glass fiber then
it gets quite fragile
here's one of these fiber stripping
tools and so if I strip off that
protective jacket and you can just
barely see it but there's the fiber
itself now the thing is pretty delicate
and it I just broke a piece off even
though it's impossible to see and this
is the part where you actually you know
insert the glass fiber into the into the
ferrule like this and I'll put a link to
a video that shows how to do the

termination there and polish the end 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, make money from home online, make money online fast, earn dollar online free, online earning ways, best online money earning, earn money online with surejob, make money online, online money making sites, best sites to make money online, earn money online paypal, online earn money by typing, best survey sites, ways to earn money online, ways to earn money from home, make money online without investment, make money online surveys, 
s

No comments: