Results 1 to 8 of 8

Thread: Using +5V from analog input with 3rd party sensor

  1. Using +5V from analog input with 3rd party sensor

    Hi,

    I bought some robotic wheel encoders that are not Phidgets. They are quad encoders and have Gnd, +5V, A and B connections.
    http://www.roboticsconnection.com/pc...der-combo.aspx

    I'm hoping to "borrow" +5v from one of the analog inputs on the 8/8/8 board and then connect the ground and signal to the digital inputs/gnd on the other edge of the board.

    My question is should I tie off the analog input to Gnd, or leave it unconnected?

    Thanks,
    Steve

    (I appreciate that this invalidates a whole bunch of stuff, but I'd really like to know the right way to do this)
    Last edited by shobley; 02-15-2007 at 12:26 PM.

  2. Re: Using +5V from analog input with 3rd party sensor

    Your idea makes sense, but the inputs on the 8/8/8 only sample 125 times per second, which isn't enough to handle the high frequencies your encoders will generate. You're going to need something like the High-Speed Encoder Phidget:

    http://www.trossenrobotics.com/store...igh-Speed.aspx

    This cranks up your sample rate from 125 Hz to 500 kHz, and it connects directly to the computer via USB.

    edit: Although it isn't pictured, the encoder board comes with a connector with leads so you can easily hook up the four leads from your encoder.
    Last edited by Dave; 02-15-2007 at 12:36 PM.

  3. Re: Using +5V from analog input with 3rd party sensor

    Hmmm....

    That's really interesting - now can I use a A/B on the encoder for A on wheel one and A and wheel two...

    If you see what I mean.

    Since the computer controls the direction of the wheels I'm not really using the A/B on the sensor.

    I really don't want to have to hook up 2 extra USB devices if I can help it.

    Steve

  4. Re: Using +5V from analog input with 3rd party sensor

    That would be nice, but the encoder board just sends one value back to the computer. There's no way to separate the channels.

  5. Re: Using +5V from analog input with 3rd party sensor

    So just before I order these - how do they work?

    I don't think that the USB interface can send back 500,000 signals a second, so I'm assuming that the encoders do all the fast work and send back a rotation speed value?

    (or something like that)

    Steve

  6. Re: Using +5V from analog input with 3rd party sensor

    The Phidget keeps a running count and periodically sends the total to the computer.

    [edit] Disclaimer: This is just what I've infered by using software that interacts with the encoder. I am not a programmer and I did not design this device.
    Last edited by Dave; 02-16-2007 at 11:17 AM.

  7. Re: Using +5V from analog input with 3rd party sensor

    Hmmmm...

    Now this has got me thinking - can you set board to send the count in an event to the host application? At a precise time?

    It must be something like that - because at 500KHz there's no way windows messaging loop could get accurate results by polling the board.

    (I bought them by the way! - but i think they must be stuck in the snow)

  8. Re: Using +5V from analog input with 3rd party sensor

    Here's what the COM API Manual has to say about the Phidget Encoder:

    Property: EncoderPosition() as Long
    Access: Get, Put By Value
    Description: Returns / Sets the position of the encoder shaft. An incremental encoder will increment or decrement this property based on the direction of rotation.

    Property
    : NumInputs as Long
    Access: Get By Value
    Description: The number of inputs on this particular I/O device. Please see the hardware descriptions for the details of device variations.

    Property: NumEncoders() as Long
    Access: Get By Value
    Description: Returns the number of encoders supported by this device.

    Property: InputState(Index as Long) as Boolean
    Access: Get By Value
    Description: Returns the state of the designated input. In the case of a switch or button which is
    normally open, True would correspond to when the switch is pressed.

    Event: OnPositionChange(Index as Long, Time as Long, EncoderDisplacement as Long)
    Description: Occurs when the encoder shaft is rotated. EncoderDisplacement indicates the change since the last OnPositionChange event was fired, and may be positive (clockwise) or negative. Time is an estimate, in milliseconds, of the time since the last event was fired.
    EncoderDisplacement and Time may be used to calculate a rough estimate of velocity.

    Event: OnInputChange(Index as Long, NewState as Boolean)
    Description: This event is triggered when the input's state is changed. The number of the particular input is returned, as well as the state of the input: True is On, False is Off. In the case of a switch (button) implementation, True would correspond to when the switch is pressed.
    I'm primarily a hardware geek. High-level programming is largely a mystery to me, so I'll let the manual speak for itself.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 29
    Last Post: 03-06-2007, 11:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •