Parallax Wheel Motor: Question about Encoder use
TheGregster
Posts: 3
I purchased the Parallax wheel/motor kit with encoders.· The system tots around a small laptop with its principal sensor being a camera using a reduced optical flow algorithm for obstacle avoidance.· The motors are controlled via a Phidgets 12V motor controller connected via USB to the laptop.··Navigation will be by dead reckoning, so the encoders are·critically important.·
The problem is the hardware connection to the encoders.··Apparently,·it would be difficult to attach them to a PC.· No·worries, I·have a·few microcontrollers (oopics)·sitting around which can talk to the PC via a serial port.· I·figured I could just connect the encoders to a couple pins on·a microcontroller.· And then have the microcontroller poll the encoders for position and speed·and then·relay the·results to the PC via the serial port. ·
This all sounded good until I looked at the documentation for the encoders.· It assumes I am using HB25 Motor Controllers.· I am not; I already have·a few·phidgets, and the phidgets interface·easily to PCs whereas·I am not sure he HB25s do.· So much of the documentation is irrelavant to me. So I have questions about this·"serial" data interface to the encoders.
From what I can tell, there·are not seperate send and receive pins for the serial interface (which would have made talking to it trivial).··Sure there are two pins marked as DATA to the controller, but from what I can tell, it appears they are shorted together (right?)· So if you are·using just one pin for both sending and receiving, you must have some protocol for deciding who can talk when on the line.· Where is this protocol documented?· Is this protocol usually implemented in software on the microcontroller, or is there some chip set I am supposed to be using?· Does an oopic microcontroller have that chip?· Does a·Basic stamp?· ········
The problem is the hardware connection to the encoders.··Apparently,·it would be difficult to attach them to a PC.· No·worries, I·have a·few microcontrollers (oopics)·sitting around which can talk to the PC via a serial port.· I·figured I could just connect the encoders to a couple pins on·a microcontroller.· And then have the microcontroller poll the encoders for position and speed·and then·relay the·results to the PC via the serial port. ·
This all sounded good until I looked at the documentation for the encoders.· It assumes I am using HB25 Motor Controllers.· I am not; I already have·a few·phidgets, and the phidgets interface·easily to PCs whereas·I am not sure he HB25s do.· So much of the documentation is irrelavant to me. So I have questions about this·"serial" data interface to the encoders.
From what I can tell, there·are not seperate send and receive pins for the serial interface (which would have made talking to it trivial).··Sure there are two pins marked as DATA to the controller, but from what I can tell, it appears they are shorted together (right?)· So if you are·using just one pin for both sending and receiving, you must have some protocol for deciding who can talk when on the line.· Where is this protocol documented?· Is this protocol usually implemented in software on the microcontroller, or is there some chip set I am supposed to be using?· Does an oopic microcontroller have that chip?· Does a·Basic stamp?· ········
Comments
When querying the position controller the command sent will include the ID of the position controller that you want to respond.
Look here starting on page 11.
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
I just simply sending out the eight bits for the command, then switch the microcontroller's I/O line from output to input (hopefully that happens before the response comes), and then listen to what bits come back.
Thanks, I will give it a try and post the results here. (Sorry for the confusion, I am used to seperate send and recieve wires on serial protocols).
Rich H
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The Simple Servo Tester, a kit from Gadget Gangster.
Post Edited (W9GFO) : 2/26/2010 6:01:23 AM GMT
to get to it:
try going to Parallax.com then go to·accessories like you are going to buy the wheel kit on line.
at the bottom of the wheel kit sales information page is a bit called downloads.
there you will find:· Position Controller test interface:
http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/PositionControllerTestInterface(v1_2_1).zip