printing an analogue optical encoder disk

Do you have a question? Post it now! No Registration Necessary

Threaded View
I have a BLDC motor for wich I am considering a single chanel
analogue optical position sensor so it generates a single ramp over
1 whole turn.

Ive made a reflective wheel from some sticky backed paper label,
and a carefully pencil drawn ramp and it works well enough to
prove its feasable.

the next step is to print it out with my inkjet printer,
has anyone done anything like this ?

unless theres already something out there
someone knows of I can probably write some software to generate a
bitmap image with c# if so il post the program or
bitmaps somewhere.

another question is how do I ensure I get the image the exact right size on
the paper
without doing it by trial and error ?

I also assume black would be the best absorber for infra red
but this remains to be seen, or if the some of the other colors are
more reflective than the white paper.
im not even sure if the color needs to be a linear change,
I could use pwm lines thin enough so it doesnt show in the signal.

I have a new epson stylus photo R285.
unfortunatly I intended to get one with waterporrof ink but
they never make it clear if its not waterproof in the sales blurb of the
you have to go and delve into the ink itself.

does anyone know how compatable the two different types are ?
pigment type seem to be the waterproof ones and dye based arnt.
Im not sure a pigment based ink would do anything more than just clog the
jets up permanently wich would be a shame.
a waterproof coating might interfere to much.

many thanks

Colin =^.^=

Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

Someone posted on the same topic here, or an affiliated group, a few months
back and I took a note of the URL he gave:

... might help.


Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

The original thread: =*-*-set-screw-motion+*-running-*-*-*-*-constant-rate+freeware+XP/Vista+centred+zzz+generates-codewheel-images-and-prints-*+build-*-*-optical-encoder+*-*-sound-card-to-digitize-*-*-*-signal+*-message+*-*-shim-would-correct-*+*-*-*-*-signal-processing

Re: printing an analogue optical encoder disk
On Mon, 22 Sep 2008 17:04:39 +0100, "colin"

Quoted text here. Click to load it

Yes, but not with an inkjet printer.  I used an HP2100 laser printer
to get enough pigment on the page.  I also had accuracy (aspect ratio)
problems when I tried it with an inkjet.  I used glossy photo paper,
clear acetate film, and paper labels in the laser for making encoder
disks.  They all worked.  The HP2100 does 1200dpi which was great for

Quoted text here. Click to load it

There's a postscript program for generating the various images with
links to other sites that are doing the same thing.

Quoted text here. Click to load it

You don't use an inkjet printer.  They're very accurate across the
page, but subject to paper slippage and roller wrap accuracy issues
due to the feed rollers.  If the paper goes through flat, you have a
chance.  If it's curled under the inkjet head, forget it.

What I did was to print a grid test page with rulers generated from
the dot count of the page.  You can find graph paper templates
somewhere on the internet or generate your own.  See how close you get
with a microscope or optical measuring tool.  I've found that the
laser is very accurate across the page, but varies slightly
lengthwise, again due to roller slippage.  Cleaning the white clay
junk off the rubber rollers made a huge improvement.  There was also a
problem where the page tended to feed somewhat at an angle.  This
caused some minor issues when I was trying to maintain registration on
multiple passes, but should not be an issue for single pass printing.

Quoted text here. Click to load it

Laser toner is black plastic.  Nothing goes through it, including IR.
No clue on inkjet ink as the formulation can be anything from a dye to
various pigments.  I suggest you avoid this issue and just stick with
the laser printer.

Quoted text here. Click to load it

Huh?  What kind of sensor are you using that responds to colors?  Why
do you need a color encoder disk?

Quoted text here. Click to load it

Archival inks are pigmented inks.

How the mostly water based inks work:
You should be able to find more on the topic by following the patent
references and citations.

Quoted text here. Click to load it

Inkjet nozzles are about 5 to 10 microns in diameter.  The pigment
particles run between 0.02 to 0.30 microns diameter.  The "ultra fine"
inks tend to be on the low end of the particle diameter range.  The
"ultra bright" inks on the high end.

Quoted text here. Click to load it

One is usually sufficient.

Quoted text here. Click to load it

Jeff Liebermann
150 Felker St #D
We've slightly trimmed the long signature. Click to see the full one.
Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

oh well I think you deserve more than one for that reply :)

thanks to the other replies too, actualy I also made a thread about
digital encoders too, but my attempts wernt so good for various reasons
so i quickly gave up as I found a way to use 2ch comercial ones instead.

however this one is analogue, wich makes a bit of diference.
im not sure if there are any analogue generators there, they seem mostly
digital but il have better look through.

It was initialy just a rotor reference pulse but as I need to test run
the BLDC without the encoders id thought id expand it to be a crude
single chanel position encoder as ive used nealry all the available mcu

it worked surprisingly well with just a hand drawn pencil line
so im sure it would be better even with inkjet, ofc once I got it right I
could relativly easily get it done on a laser somewhere.

its also a reflective encoder too as well as being analogue
wich is why the question about different colours,
purley from reflectivity of IR.

I got this inkjet for general use in a hurry becuase my old one decided to
caput 2 days before a presentation and this one becuase it has one of those
trays for printing onto CDs so it has a flat path and I imagine registration
will be a lot better than thin paper.

I was hoping I would be able to print a panel or something,
wich would be dificult in a laser printer, its hard to find a
laser with a flat path wich can take something unbendable,
plus im not sure the transfer or fusing would work so well.
however non waterproof ink isnt very suitable for what I wanted.

however I was mainly not sure as to how control how a bitmap image
scaled to the size of say an a4 sheet.
but as it seems to automaticaly print a photo image file to fill the entire
I gues I could simply use that as a scale to go by.

Colin =^.^=

Re: printing an analogue optical encoder disk
On 9/22/08 11:15 AM, in article 4hRBk.108377$ snipped-for-privacy@newsfe09.ams,

Quoted text here. Click to load it

Regarding print size, check your printer's options to see if you have told
it to expand the document to fill the page.  I use a couple Epson printers
and a HP printer.  All are very accurate in printing the exact size of the
documents I send to them, whether pictures or graphics.

For a current test, I used a limited use, free trial editor, Eazydraw, to
create a 3" circle (measured by it's ruler) inset with a star, and
cross-hairs to locate the center.  It printed the correct dimensions on the
HP.  I picked the HP printer cause it's wireless and I'm lazy today. Other
graphics editors can do as well.

Before I bought my first "good" printer years ago, I compared the outputs of
ink jet printers and postscript printers and found no discernable
difference.  People who have problems with ink jet printers are usually
using cheap quality paper.  For graphics I use 94 Brightness, 24lb Weight
paper.  They also print great on transparency sheets and photo paper.

Re: printing an analogue optical encoder disk
On Mon, 22 Sep 2008 19:15:25 +0100, "colin"

Quoted text here. Click to load it

I'll add it to my karma collection.  I need a karma recharge to
compensate for all the evil things I've been doing.

Quoted text here. Click to load it

I haven't done an analog control system since college.  Far too many
complications as others have mentioned.  You can also do lots of nifty
tricks with digital, like not worrying (much) about critical damping,
drift, stopping on a dime, etc.

Quoted text here. Click to load it

Did you check it under varying conditions?  No load, full load,
overload, ambient light, hot, cold, wet, dry, condensing moisture,
dust, etc?  All of these will affect an analog system.

Quoted text here. Click to load it

Dunno offhand.  It's probably easier to print a page of color stripes
and measure the reflectivity, transparency, absorption, speckle
scatter, and edge diffraction, then to guess.

Quoted text here. Click to load it

It's not unique to inkjet printers but all electronic devices have a
propensity to self destruct just before and during a demonstration or
presentation.  If that's insufficient, the cords, cables, remotes, and
driver disks, tend to hide themselves when needed.  There's no way to
fight it, so just get used to things blowing up at the point of
maximum inconvenience.

Quoted text here. Click to load it

Huh?  I do it all the time.  You can get sheets of sticky back 8.5x11
"label" stock.  Print your front panel, cut to size, punch out the
holes, and stick to an aluminum front panel.  If you want it to look
good, use overpriced glossy photo paper.  If you want durability,
there's paper that has a mylar covering, but requires a thermal
printer.  You can also use clear transparency acetate paper.  Print a
reverse pattern, attach to the front panel, and no protection
required.  Something like this:
Quoted text here. Click to load it

Yep.  I once tried shoving a sheet of aluminum through the laser
printer.  It actually printed, but the aluminum panel dissipated the
heat from the fuser rollers too quickly causing the toner (plastic
dust) to flake off.  It also scratches the drum if you forget to
deburr the holes.  The printer also made some ominous grinding noises
which suggested impending disaster.  Not recommended.

Quoted text here. Click to load it

Transfer works fine, but does not seem to be particularly uniform.
There are always a few dots and holes on the media.  These can be
touched up if necessary.

Quoted text here. Click to load it

I use an image editing program such as Irfanview 4.20:
The setup for printing allows resizing to specific number of pixels in
both x and y axes.  The problem is that if you have a complexicated
pattern, you could end up with fractional pixel round off errors,
which will deteriorate the quality of the image.  Play with it and see
how close you get.

# Jeff Liebermann 150 Felker St #D Santa Cruz CA 95060
# 831-336-2558   
We've slightly trimmed the long signature. Click to see the full one.
Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

some people say digital contains a non linear analogue system...
digital still can have its complications too.

this is mostly a digital system, as it has a PID control loop done by the
with PWM 3phase drive to the BLDC motor. but with various analogue and
digital inputs.

Quoted text here. Click to load it

nope, just spun the disc by hand and looked at it on the osciloscope.
its posible to see its a ramp with a fast edge.
however trying to get it a straight ramp meant adding some more pencil
marks here and rubbing some off there wich ended up in a rather jaged ramp.
its stored/operated in an environmentaly controlled environment,
(very light tight of course) as those things you mentioned severly affect
some of the other digital sensors too.

Quoted text here. Click to load it

thats quite a good idea, however its quite a chalenge to get the glue
interface to be
perfect so its totaly invisible. Ive previously used back engraved perspex
for high usage controls.
glueing the paper on the the rotor did cause some problems as the glue
stained the paper,
the sticky labels wernt a very good stick either. the disc also has to have
a very large
hole in the center wich doesnt help.

thanks again

Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

You'll probably do better to use a quadrature encoder rather than a
single analog channel.  Analog is going to be subject to all sorts of
oddball effects (stray light, aging, temperature -- you name it).

You can extend a quadrature encoder's precision using analog methods
(take analog values of the A and B channel, and use them to do


Tim Wescott
Wescott Design Services
We've slightly trimmed the long signature. Click to see the full one.
Re: printing an analogue optical encoder disk
Quoted text here. Click to load it


I'm with Tim Westcott on this - you'd be much better off with a two-
channel quadrature encoder (which you could buy) generating a digital

I'd go further than Tim in suggesting  that you feed the digital
output into an up-down counter whose output would then drive a D/A
converter, which would give you your single ramp. You may need a high
resolution encoder and high resolution D/A converter to get a ramp
that is as smooth as you would like,but until you tell us more about
your application we can't really be all that specific.

Bill Sloman,Nijmegen

Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

-- depending on your goals.  If you're determined to DIY, and if your
microprocessor skills are strong, then I'll stand by a coarse quadrature
encoder with interpolation.

But many computers these days come with accessory quadrature encoder
hardware.  They're these little ivory-colored things, about the size of
a pack of cigarettes, with a little ball on the bottom and clicky
buttons on top.  After you save away the ball to use as slingshot
ammunition and discard the case, there'll be two dandy little encoder
wheels in there, just waiting to be integrated into your project.


Tim Wescott
Wescott Design Services
We've slightly trimmed the long signature. Click to see the full one.
Re: printing an analogue optical encoder disk
Quoted text here. Click to load it

thanks all I appreciate well the pros and cons of all these options
however there are actually some exceedingly high resolution
2ch quadrature encoders on the shaft wich are tricky to set up
(not to mention theyr pushed way past their ideal max frequency)
but as they are 2ch and not fixed I need a reference pulse.
the start/end of the ramp will be quite suficient to extract a precise
the analogue ramp only needs to be sufficient to enable comutation
in the absence of the quadrature signals while setting it all up.

its controlled by a DSP wich at up to 20krpm has plenty of monentum to
interpolate well between index pulses and it already monitors phase current
to optimise phase angle/voltage, however when the encoders arnt working
start up/slow speed and sudden encoder or rotor slip is awkward wich makes
it dificult to debug.

it does however cope moderatly well in open loop mode as a synchronous
in fact ive tested an induction motor as a good alternative,
but size of 3 phase ones is a bit too large.

the DSP also has a QEI input module but im already
using another 3ch encoder elsewhere, the addition of several acceleromters
and having to double the number of encoders used to increase resolution
and other things has used more pins than id iamgined.
in fact i have just 1 input for this wich fortunatly is analogue.
not to mention its to hard to physically fit more than one sensor
or have more wires etc, not to mention the PWM pulses createa a bit
of havoc with difital pulses.

the only draw back I see it is it sudenly gets a bit of oil on it :s
other analogue problems such as drift can easily be calibrated.
otherwise it would be a cheap commercial alternative.

id love to explain the whole project but this is such a small part of
what would be quite chalenging project to explain in its entirety.

I have however asked many questions here over the last few years,
but often geting stuck and shelving the thing till i have a bright idea,
or new devices come out.

I did however acheive almost sub picosecond resolution (with averaging)
however it seems this didnt detect what i was looking for and need to
improve this by an order of magnitude, I have sevral ideas,
but my health is a bit of an issue atm
it means I have plenty of time to pursue this but not the ability ...
wheres otherwise id probably have the ability but not the time ...

Colin =^.^=

Site Timeline