Shop OBEX P1 Docs P2 Docs Learn Events
Analog sensor on propeller — Parallax Forums

Analog sensor on propeller

BotdocterBotdocter Posts: 271
edited 2010-03-22 18:18 in Accessories
I need wheel encoders and i came to this idea. I have a mouse with a potentiometer like scrolling sensor. This one doesn't stop at the end of the turn though.

There must be a way to use this as wheel encoders?
I believe it works like this:

everytime the scroll is in default there is no connection. With every click the scroll does, it makes contact on the pieces between the clicks.

The mouse board below uses the same scroll sensor.
mouse_pc_board_top.jpg

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1 Parallax Propeller Robot Control Board
1 Memsic MX2125 accelerometer/ tilt
1 Parallax Ping))) ultrasonic sensor

a few motors and a whole lot of chaos!

Comments

  • kwinnkwinn Posts: 8,697
    edited 2010-03-20 03:22
    They are optical sensors (probably quadrature encoders) and could be used for wheel encoders to provide direction and speed information. Hard part would be mounting and coupling them to the wheel. I would suggest trying to fit them to the motor shaft if it is accessible from the back of the motor.

    Keep in mind they are meant for the relatively light use in a mouse and may wear out (mechanically) if put to heavy use on a motor.

    Post Edited (kwinn) : 3/20/2010 3:29:19 AM GMT
  • BotdocterBotdocter Posts: 271
    edited 2010-03-21 21:05
    This is no optical sensor. It has 3 legs and the two outer pins are switches. (mechanical)

    | |
    \ \
    | |
    |
    |

    on every click it closes the switches or opens them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1 Parallax Propeller Robot Control Board
    1 Memsic MX2125 accelerometer/ tilt
    1 Parallax Ping))) ultrasonic sensor

    a few motors and a whole lot of chaos!
  • FranklinFranklin Posts: 4,747
    edited 2010-03-22 02:12
    Take a look at 'rotary encoder' outputs the switches close and open in a specific pattern that the processor can use to determin the direction and distance of the movement.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • kwinnkwinn Posts: 8,697
    edited 2010-03-22 03:18
    Are you talking about the micro switches at the top and bottom of the left side of the board? If so, those are the mouse button switches. I thought you were talking about the scroll wheel assembly. This looks like an optical mouse and I have never disassembled an optical mouse and found a scroll wheel with mechanical switches. First time for everything I guess.
  • BotdocterBotdocter Posts: 271
    edited 2010-03-22 12:07
    No i don't mean the micro switches. It's the scroll sensor. It should work with a resistor i think.
    Just count the clicks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1 Parallax Propeller Robot Control Board
    1 Memsic MX2125 accelerometer/ tilt
    1 Parallax Ping))) ultrasonic sensor

    a few motors and a whole lot of chaos!
  • kwinnkwinn Posts: 8,697
    edited 2010-03-22 14:00
    Yes, if it has switches then pullup resistors on the prop pins you use and ground on the other side of the switches should be all that is required.
  • BotdocterBotdocter Posts: 271
    edited 2010-03-22 18:18
    How much Ohm should the pull-up resistor be?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1 Parallax Propeller Robot Control Board
    1 Memsic MX2125 accelerometer/ tilt
    1 Parallax Ping))) ultrasonic sensor

    a few motors and a whole lot of chaos!
Sign In or Register to comment.