Hi once again all. I'm setting up a dedicated PIC for wheel control with the feedback of 6 magnets (On each wheel) and hall effect sensors. I'm not sure if this is still referred to as an optical encoder because as I see it there are no optics involved however, The basic premise of operation is:
The main board and motor board will be connected by 2 lines (Data & Control). These two boards communicate with a homemade protocol to insure there will be no bumping heads. The protocol will be similar to the PS/2 KB protocol.
The motor-boards whole job is to follow commands given to it by the main board. An instruction might be: Forward 10, 2.5, 1 (Go forward 10 feet, speed of 2.5 r/s, Dead stop when arrive)
Here's the topic in question:
1) Can I measure the speed of the wheels by measuring the Pulse Width of the Magnets affecting the Hall Sensor? ________|``````|________|``````|___________ *** *** Or should I be measuring the time in-between the Magnet affected pulses? ________|``````|________|``````|___________ ******** 2) Also a problem that comes to mind is how can the PIC measure both wheels at the same time accurately? This is why I thought the shorter (Magnet affected pulses) would be better to measure.The magnets will hopefully arrive today. And I will be tackling these issues (As well I'm sure, some that I haven't thought of) and I will post results. I will be googling for some odometry data as well.
Thanks for any input,
Rick-