[chbot] Shaft Encoder
rjtp at ihug.co.nz
Thu Sep 4 21:53:39 BST 2008
<200809040959.40179.manningc2 at actrix.gen.nz> <005901c90e82$547634a0$0301010a at swing>
X-Priority: 5 (Lowest)
Message-ID: <0c284f8f2253768ba1b30c07fbbacf34 at ihug.co.nz>
X-Sender: rjtp at ihug.co.nz
Received: from [126.96.36.199] (gatekeeper.tait.co.nz)
by webmail.ihug.co.nz (running Vodafone Webmail/0.1)
via TCP with HTTP/1.1
id <0c284f8f2253768ba1b30c07fbbacf34 at ihug.co.nz>;
05 Sep 2008 08:53:39 +1200
User-Agent: Vodafone Webmail/0.1
Content-Type: text/plain; charset="UTF-8"
Like the ideas very much, next time around I'll try your PCB arrangement.
Here's my old approach, with the interrupter before gearing:
(which reminds me I really must get around to sorting out our photos...)
I've updated this on the new design to a three segment wheel as the motor
cogs at 60 degree intervals.
Any chance you will be passing through Christchurch to show us your
On Thu, 4 Sep 2008 23:35:25 +1200, "Mikael Stewart"
<mikael.stewart at gmail.com> wrote:
> This may be veering a little off topic but I figure since I haven't come
> across this on the net before I'd share it with you people... who knows,
> may be of use...
> In the recent past I've used two DIY optical encoder concepts that seem
> work quite well. In both cases I've used the optical sensor and
> detector from inside a computer mouse. In one case I also used the
> wheel from inside the same mouse which I attached to one end of a motor
> a double ended shaft. This encoder has 36 counts per rev, which gives 144
> ticks per rev (2.5 deg.) resolution + direction when clocking on both
> of both signals (36x4) - the dsPIC i'm using conveniently does this in
> hardware. The downside is that these sensors are designed for slow
> operation, so with weak pull up resistors (or pull down as the case may
> the voltage swing at high speeds reduces and the signal begins to look
> and more sinusoidal until the micro eventually stops registering the
> transitions completely. Since the offset differs negligibly (mainly with
> ambient light), I solved the problem using a simple voltage comparator +
> hysteresis on both channels. The result is the ability to register at
> 4000rpm + direction without any hint of a glitch. I haven't tested beyond
> this speed as the motors I'm using don't go any faster!
> I've uploaded some photos to show you what I'm talking about:
> http://mikael.geekland.org/photos/P1010009.JPG -- motor before adding
> http://mikael.geekland.org/photos/P1010016.JPG -- after (only one mouse
> two motors needed!).
> http://mikael.geekland.org/photos/P1010020.JPG -- after close-up.
> http://mikael.geekland.org/photos/P1010022.JPG -- one of the rejected
> shows how simple it is though!
> What the photos don't show is the plastic cover essential for blockign
> ambient light, thus keeping the signal offset stable. Also, the vtg
> comparator circuit is on the microcontroller side of electronics, so the
> motor pcb only has a essential pull up resistors + led + detector.
> ... WIth that out of the way, the other method I've tested but not really
> used was inspired by the SRS encoder article at
> http://www.seattlerobotics.org/encoder/200109/dpa.html. I took the
> postscript file from here but instead of printing on paper, i made a much
> higher resolution encoder on OHP plastic and protected the print side
> transparent Duracell (stickable dust cover for books). Using the fine
> sensitivity of the mouse quadrature detector obviously allows for quite a
> high resolution disc (far superior to what the SRS article illustrates).
> Remember also that even if the pitch is a little too small for the
> quadrature encoder, all that happens is a little cross coupling between
> and OFF states, which basically turns a square wave output more
> which again is easily solved using a voltage comparator circuit. The
> coupling between channels is probably not so much an issue, so long as
> have detectable phase difference. Also, the OHP + Duracell combination
> rigid enough for quite a large disc. I used a homemade Perspex washer
> thingy to attach to the motor shaft. Downside is of course that it
> some room either side of the encoder wheel for led + detector.
> Ok I'm done :)
> ----- Original Message -----
> From: "Charles Manning" <manningc2 at actrix.gen.nz>
> To: <chchrobotics at lists.linuxnut.co.nz>
> Sent: Thursday, September 04, 2008 9:59 AM
> Subject: Re: [chbot] Shaft Encoder
>>I just checked data sheets and other info...
>> The UGN3141 turns on at 100Gauss and off at 45Gauss. The Earth's
>> field is less than one Gauss. Therefore there is no need for a
>> magnet with these parts.
>> On Thursday 04 September 2008 08:44:40 Charles Manning wrote:
>>> There are different kinds of hall effect sensors. Some need to have
>>> alternate poles to turn on/off and some do not.
>>> With the HE sensor I am using I only need one magnet.
>>> The HE sensors are a bit more expensive than optical forks, but they
>>> much simpler to use and don't need any supporting electronics.
>>> I bought the tiny magnets from a place in USA by mail order, but might
>>> up using something I bought from Natures Discovery.
>>> Interestingly, that flexible fridge magnet stuff is made up of
>>> bands of north and south magnet and would make an effective linear
>>> Quite a few DC motor encoders use HE sensors because they are far more
>>> robust against dust etc than optical sensors.
>>> On Thu, Sep 4, 2008 at 8:34 AM, Richard Jones <rjtp at ihug.co.nz> wrote:
>>> > Thanks Charles,
>>> > The UGN3141 Hall effect sensor from South Island Components does look
>>> > interesting, a little more expensive than optical.
>>> > To ensure that the hall effect sensors get low enough gauss to
>>> > do
>>> > magnets need to be alternated N S N S? That would mean an even number
>>> > so
>>> > to detect direction of rotation you need 90 degree separation between
>>> > hall effect devices rather than 180 degree that works with an odd
>>> > number.
>>> > Where do you get your tiny magnets?
>>> > I wonder if you might be able to place the hall effect sensor
>>> > inside a brushed DC motor?
>>> > Richard
>>> > On Thu, 4 Sep 2008 07:38:10 +1200, "Charles Manning"
>>> > <cdhmanning at gmail.com
>>> > wrote:
>>> > > Hi Richard
>>> > > There's an alternative that we are dabbling with using a Hall
>>> > > sensor
>>> > > that is probably a lot easier to do than shaft encoders.
>>> > > The Hall Effect sensor is just a 3-pin transistor like device that
>>> > detects
>>> > > a
>>> > > magnetic field (eg. UGN3141 from South Island Components). The
>>> > > can be
>>> > > one of those tiny 2.5mm Neodymium magnets embedded in a gear (Drill
>>> > hole
>>> > > and glue it in). Since some of gears inside the gearbox rotate
>>> > > fast you can get pretty good resolution.
>>> > >
>>> > > On Wed, Sep 3, 2008 at 10:06 PM, Richard Jones <rjtp at ihug.co.nz>
>>> > > wrote:
>>> > >> I came across this shaft encoder arrangement for the Tamiya
>>> > >> Twin-Motor
>>> > >> Gearbox: http://www.noplabs.com/twinmotor/twinmotor.html
>>> > >> This came via the HBRC mailing list. Andrew showed something along
>>> > >> these lines at one of our robotics meetings several years back.
>>> > >>
>>> > >> Richard
>>> > >>
>>> > >>
>>> > >> _______________________________________________
>>> > >> Chchrobotics mailing list
>>> > >> Chchrobotics at lists.linuxnut.co.nz
>>> > >> http://lists.ourshack.com/mailman/listinfo/chchrobotics
>>> > _______________________________________________
>>> > Chchrobotics mailing list
>>> > Chchrobotics at lists.linuxnut.co.nz
>>> > http://lists.ourshack.com/mailman/listinfo/chchrobotics
>> Chchrobotics mailing list
>> Chchrobotics at lists.linuxnut.co.nz
> Chchrobotics mailing list
> Chchrobotics at lists.linuxnut.co.nz
More information about the Chchrobotics