Searching \ for 'PICs and Rotary Encoders' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=encoder
Search entire site for: 'PICs and Rotary Encoders'.

Truncated match.
PICList Thread
'PICs and Rotary Encoders'
1995\10\18@095930 by Mike Goelzer

flavicon
face
       I would like to build a small odometer for a toy car.  The way I
plan to do this is to use a rotary encoder wheel that would rub along the
ground.  As the car
moved forward, the rotary encoder wheel would roll on the ground, and the
microprocessor would increment a counter of the distance traveled and display
it somehow.  My question is this, how accurate would this be?  In essence, I
would
hook the encoder wheel to some wheel that had a known circumference (say 1
cm) and then count the revolutions.  If I knew how many "clicks" (IOW,
changes in output) the encoder made per revolution, would it not be possible
to count these and increment a counter of centimeters traveled after each
revolution?  I have this nagging feeling that there is some flaw in this
idea that I haven't realized yet (especially since I've never worked with
encoders before).  If anyone has used a PIC + rotary encoder in a similar
application before, or sees some obvious flaw in the above logic that I'm
missing, please tell me.

Any comments on the feasibility idea would be appreciated.

Thanks.

-mike
--
Mike Goelzer
<spam_OUTmgoelzerTakeThisOuTspamus.net>

1995\10\18@112716 by Siegfried Grob

flavicon
face
Mike Goelzer wrote:


       I would like to build a small odometer for a toy car.  The way I
plan to do this is to use a rotary encoder wheel that would rub along the
ground.  As the car
moved forward, the rotary encoder wheel would roll on the ground, and the
microprocessor would increment a counter of the distance traveled and display
it somehow.  ...


My comments:

If you really want to use a rotary encoder you can find an application note
from/at parallax. I'm sorry, but I don't have the exact document name/number
available.

I would solve the problem in a cheaper, easier but less accurate way, which
seems to be still exact enough for toy applications. It is used in most
electronic speedometers for bicycles (at least in Germany).

Simply stick a litte magnet onto one of the rotating wheels and a reed-contact
(I'm not sure if this is the proper term, I mean these magnetically closed/
opened switches within a glass tube) at the chassis.
A PIC, preferrably a 16C84, will recognize one pulse for a complete revolution.
If you need data on the direction of driving, fix a second reed-contact next
to the first, and look which of the two contacts gave the first pulse with
the other pulse being delayed a bit.
The 16C84 can be operated in power-saving 'wake-up-on-keystroke' mode and the
accumulated driven distance can be permanently stored in the on-chip EEPROM.

Siggi

1995\10\19@040722 by m.d.simpson.bra0505

flavicon
face
I suggest when you make it, you by a cheapo mouse, and pull it
apart.  you'll have the led and detector, and the rotary
encoding wheel.  I think there's PIC software for a mouse in the
Microchip Databook, put basically all you need to do is find out
how many pulses there are to the CM (or better still a 1M for
accuracy), and divide the pulses by that to give distance.Mark

1995\10\20@202920 by Newfound Electronics

flavicon
face
>Mike Goelzer wrote,

>        I would like to build a small odometer for a toy car.  The way I
>plan to do this is to use a rotary encoder wheel that would rub along the
>ground.  As the car
>moved forward, the rotary encoder wheel would roll on the ground, and the
>microprocessor would increment a counter of the distance traveled and display
>it somehow.  My question is this, how accurate would this be?  In essence, I
>would

snip snip

{Quote hidden}

Mike,
         I have used a quadrature encoder with a PIC as a digital joystick.
The PIC generated a PWM output is simulate the anolog pot. Because of the
hign speed of the PICs and the bit testing instructions, the PICs are ideal
for this sort of work.

Here is my suggestion. Buy yourself a cheap mouse. Look at its specs. That
will tell you the distance per revolution. No Math required! Well actually,
for a single revolution, you must divide the count by four as the encoder is
quad-rate-ture. So I lied about the "no math" bit.

Actually, depending on the speed of the car you may need to gear down to the
encoder and use a 20Mhz PIC.

Rat the mouse?? and get the encoder section. Hook it up to the PIC, the
encoder outputs are at suitable levels.

For software, please see the mouse stuff in the embedded controller handbook
and also look at the parallax app notes as I seen something there using
quadrature encoders that appeared faster.

Of course with something like this, you will  have to  fiddle until your
fingers bleed to get it right. Have fun!

Regards

Jim Robertson


-----------------------------------------------------------------
NEWFOUND ELECTRONICS,  Makers of low cost,
mega featured PIC programming tools.
.....newfoundKILLspamspam@spam@ne.com.au
------------------------------------------------------------------

More... (looser matching)
- Last day of these posts
- In 1995 , 1996 only
- Today
- New search...