Shop OBEX P1 Docs P2 Docs Learn Events
Rare Wheel Encoder Sensors Available: Strike Now! - Page 2 — Parallax Forums

Rare Wheel Encoder Sensors Available: Strike Now!

24

Comments

  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-08-22 05:54
    erco wrote: »
    Sounds like we plum cleaned out the Ebay seller of these sensors! At least the big lots of 100 are gone.

    Don't know about that - he is selling lots of 100 for $95

    http://www.ebay.com/itm/100pcs-Hamamatsu-P5587-Photo-IC-output-digital-Photoreflector-reflective-Sensors-/221271321066?pt=LH_DefaultDomain_0&hash=item3384cc69ea#ht_194wt_1170
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-08-22 08:07
    They are excellent line follower sensors and proximity sensors as well. You don't have to just use them with wheel encoders. The guy could have a reel or two of 5000.
  • WhitWhit Posts: 4,191
    edited 2013-08-22 20:19
    Hey erco, old buddy, old pal...

    Can I get ten?
  • ercoerco Posts: 20,256
    edited 2013-08-22 21:59
    You got it, Pal! I PM'ed you.
  • PublisonPublison Posts: 12,366
    edited 2013-08-23 08:35
    Just received my 10. Three day cross country First Class shipping. Way to go USPS!. He even included the Data Sheet, printed in color!

    In static tube AND in a static bag.

    Great ebayer.
  • ercoerco Posts: 20,256
    edited 2013-08-23 08:54
    Yep, I got mine yesterday in a giant triangular mailing tube. Will divy up per requests, but it will take me a few days to sort out. Swamped.

    Must be posting too much. :)
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-08-23 09:02
    Publison wrote: »
    Just received my 10. Three day cross country First Class shipping. Way to go USPS!. He even included the Data Sheet, printed in color!

    In static tube AND in a static bag.

    Great ebayer.

    I got mine yesterday and already fried one - forgot the LED resistor - DUMB!

    They are tiny and the pins are really thin. Could be tricky to hookup since the lead spacing is odd.

    @erco = how did you decide on the pull-up resistor value in your diagram?

    - Ron
  • ercoerco Posts: 20,256
    edited 2013-08-23 10:12
    That schematic came from Acroname, back when they carried the sensor. Not on their website now AFAIK, but it's exactly what I've used numerous times. There's a small schematic on the back of the data sheet Pub mentioned, but no resistor values though: http://www.junun.org/MarkIII/datasheets/P5587.pdf

    See also schematic at http://www.seattlerobotics.org/encoder/200010/dead_reckoning_article.html

    Yes, sensor & pins are tiny, but I just bent the pins to fit into standard 0.100" perfboard.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-08-23 11:19
    The datasheet shows a value of RL as 1.2k in the "Condition" column for "Transfer Characteristics"
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-08-23 16:20
    I decided not to put the pull-up resistor on the board - it will be on the microcontoller end.

    Note: the components on the 2nd board are shifted left one column so that when the two boards face each other, the sensors directly face each other.

    Works well in testing with a BS2 and erco's encoder image printed on an inkjet...

    attachment.php?attachmentid=103585


    P5587 boards.jpg
    I
    1024 x 768 - 97K
  • ercoerco Posts: 20,256
    edited 2013-08-23 17:41
    Nice Ron, you didn't waste any time! Here's some info & pics of my Scribbler 1 install some four years ago: http://forums.parallax.com/showthread.php/109024-Scribbler-Wheel-Encoder-Project?p=773889&viewfull=1#post773889

    Edit: I had much better luck with encoder disks printed on a color laser printer as opposed to an inkjet
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-08-23 18:21
    erco, if you have any more of these to get rid of let me know. I could use 6 of them if available.
    Is there anything in the OBEX yet for these encoders?

    Edit: Can encoders be used when running HB-25 motor controllers?
  • ercoerco Posts: 20,256
    edited 2013-08-23 18:34
    You got it, NWCCTV. 6 or 10? :)

    That will leave 10 for some hardy soul who is sitting on the fence. I can't believe Duane and Martin_H have maintained radio silence. Either they're "above it all", or they are not self-respecting roboticists. :)

    Mike Cook is a self-respecting roboticist x5. :)

    I'll get these out Monday guys, please PM me your addresses.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-08-23 19:06
    Let's do 10 in case I fry any. Do you still have my address?
  • Martin_HMartin_H Posts: 4,051
    edited 2013-08-23 19:25
    erco wrote: »
    I can't believe Duane and Martin_H have maintained radio silence. Either they're "above it all", or they are not self-respecting roboticists. :)

    I'm tempted all right. But I recently bought the parts to make quadrature encoders using a QRD1114 and some Schmidt triggers. These would have been really handy before I made that purchase. If I buy 4 of these off you I'll feel like I need to make two sets of encoders to justify it.

    I'm planning on upgrading one of my two CBA robots to quadrature encoders for better precision.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-23 22:40
    erco wrote: »
    I can't believe Duane and Martin_H have maintained radio silence. Either they're "above it all", or they are not self-respecting roboticists.

    I have a confession to make. I occasionally purposefully don't view some forum threads. Generally the threads I try to ignore are started by erco.

    Wait, it's not an insult! It's a compliment!

    As you know, I have a hard time sitting back and letting others have all the fun. Everytime someone posts a figure 8 video, I'm gung ho to find another robot in order to make another figure 8 attempt myself. In order to get anything done on projects I already have underway, I need to keep myself from starting new projects.

    So I don't look at some threads I think may tempt me into starting another project. I made sure and waited until the fourth had come and gone before looking at the flag waving challenge.

    If it looks like I may be ignoring some thread or project, it may well be because I think it looks too interesting for me not to want to be an active participant.

    So see, it's a compliment that I was ignoring this thread.

    Now thanks to your PM, I'll have to come up with some cool ways of using these sensors.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-08-24 22:05
    Is it possible to use these encoders on motors that are controlled with an HB-25? I have the Wild Thumper which uses 2 HB-25's that control 3 motors each.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-08-24 22:47
    NWCCTV wrote: »
    Is it possible to use these encoders on motors that are controlled with an HB-25? I have the Wild Thumper which uses 2 HB-25's that control 3 motors each.

    You have a couple of problems in trying to use these encoders with the Wild Thumper. One problem is where to mount the encoder disk to use with the sensor. I doubt the motor shaft extends through the back side of the motor so you'd need to mount the encoder disk somewhere on the wheel side of the motor. I'm not sure if there's a good spot for mounting the encoder disk on the wheel side of the motor or not.

    Another issue is what to do with the encoder information if you are able to mount the encoder disk and sensor.

    Do you want to use the information to track how far the WT travels? If so, (assuming you can mount the encoder) you should be able to get useful information from the sensor to aid in odometry.

    If you want to use the encoder information to control the speed in some sort of PID algorithm then you'll have a problem since you're sharing the motor controller among three motors. You wont have a way of individually controlling each motor's speed. This will limit the usefulness of the encoder information.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-08-25 12:11
    Here is a short video showing the the sensor counting the stripes on a wheel spun by hand
  • ercoerco Posts: 20,256
    edited 2013-08-25 12:16
    Beautimous, Ron. My first satisfied customer makes it look so easy! That's a single sensor, not quadrature, right?
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2013-08-25 12:23
    erco wrote: »
    Beautimous, Ron. You make it look so easy! That's a single sensor, not quadrature, right?
    Yep! I just wanted to make sure it wasn't missing any transistions - that wheel image you provided has 36 white/black stripes so spinning it slowly by hand let me see what was being detected. Not sure about high rpms though...

    Here is the BS2 code
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    DecPts      CON    $77   ' "w" Decimal point command
    Brightness  CON    $7A   ' "z" Brightness command 0(bright) - 254(dim)
    setBaud     CON    $7F   ' DEL 0=2400, 1=4800, 2=9600, 3=1440, 4=19200, 5=38400, 6=57600
    ClearScr    CON    $76   ' "v" clear display and set position to 1st digit
    Digit1      CON    $7B   ' "{" set individual segments for digit one
    Digit2      CON    $7C   ' "|" set individual segments for digit two
    Digit3      CON    $7D   ' "}" set individual segments for digit three
    Digit4      CON    $7E   ' "~" set individual segments for digit four
    #SELECT $STAMP                          ' Select Baud constants
      #CASE BS2, BS2E, BS2PE
        T1200       CON     813
        T2400       CON     396
        T4800       CON     188
        T9600       CON     84
        T19K2       CON     32
      #CASE BS2SX, BS2P
        T1200       CON     2063
        T2400       CON     1021
        T4800       CON     500
        T9600       CON     240
        T19K2       CON     110
      #CASE BS2PX
        T1200       CON     3313
        T2400       CON     1646
        T4800       CON     813
        T9600       CON     396
        T19K2       CON     188
    #ENDSELECT
    Inverted        CON     $4000           'Value for inverted serial format
    Baud            CON     T9600      '+ Inverted 8,N,1 inverted
    seg7 CON 2  'seven seg LED display
    LED  PIN 0
    sens PIN 4
    cnt VAR Word
      OUTPUT led
      INPUT sens
    
      SEROUT seg7,Baud,[ClearScr]
      PAUSE 100
      SEROUT seg7,Baud,[Brightness, 16]   '0]
      PAUSE 100
      SEROUT seg7,Baud,[DEC4 cnt]
    '  DEBUG CLS, CRSRXY, 0, 0, DEC5 cnt
      PAUSE 500
    DO
      DO WHILE IN4=0   
      LOOP
      led = IN4
      DO WHILE IN4=1   
      LOOP
      led = IN4
      cnt=cnt+1
      SEROUT seg7,Baud,[DEC4 cnt]
    '  DEBUG CRSRXY, 0, 0, DEC5 cnt
    LOOP
    
    
  • ercoerco Posts: 20,256
    edited 2013-08-27 20:37
    I finally mailed out the sensors to eveyone today, so look for a first class business envelope size to everyone except NWCCTV, who got some grippers too. Cheap, yes; fast, no! PM me when you get them, guys.
  • Mike CookMike Cook Posts: 829
    edited 2013-08-31 13:38
    erco, you mail box is full!
    Errors
    The following errors occurred with your submission
    erco has exceeded their stored private messages quota and cannot accept further messages until they clear some space.

    Tried to pm but kept getting the error above.

    I received the sensors today and need to send you some $$. Let me know,

    Thanks!
  • ercoerco Posts: 20,256
    edited 2013-08-31 20:28
    Thanks, just made some room in my mailbox. Glad to hear the sensors made it. Will advise $$.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2013-08-31 20:53
    erco, did you get my PM? If not I will resend.
  • ercoerco Posts: 20,256
    edited 2013-08-31 21:37
    NWCCTV wrote: »
    erco, did you get my PM? If not I will resend.

    No sir, please resend.
  • Mike CookMike Cook Posts: 829
    edited 2013-09-01 19:01
    Used one of the P5587’s on a small perf board to test various setups.

    Only thing that I changed was the current limiting resistor (750 to 470) in the attached schematic.

    I used the example program provided for the Parallax QTI line sensor for a quick test.

    Display reads 1 when nothing is blocking the sensor and 0 when a piece of white paper covers the sensor.


    Tip: Don’t throw away all of those cheap phone cameras, they are handy to check IR LEDs to see if they are illuminated!

    ' -----[ Title ]----------------------------------------------------------------
    ' QTI Line Sensor Test
    '
    ' {$STAMP BS2px}
    '
    ' -----[ I/O Definitions ]------------------------------------------------------
    '
    LineSnsrPwr CON 14                         ' line sensor power      Vcc Pin #5
    LineSnsrIn CON 15                          ' line sensor input      Out Pin #3
    '
    '
    ' -----[ Constants ]------------------------------------------------------------
    '
    ClrEOL CON 11                              ' clear to end of line (DEBUG)
    '
    '
    ' -----[ Variables ]------------------------------------------------------------
    '
    Sense VAR Word                             ' sensor raw reading
    '
    '
    ' -----[ Main Code ]------------------------------------------------------------
    '
    Read_Sensor:
      HIGH LineSnsrPwr ' activate sensor
      HIGH LineSnsrIn ' discharge QTI cap
      PAUSE 1
      RCTIME LineSnsrIn, 1, Sense ' read sensor value
      LOW LineSnsrPwr ' deactivate sensor
    
    
    
    
    Display:
      DEBUG HOME
      DEBUG "Sensor ", CR
      DEBUG "-----", CR
      DEBUG DEC Sense, ClrEOL
      PAUSE 100
      GOTO Read_Sensor
    

    BlockedSensor.png
    NothingBlockingSensor.png
    BS2_P5587.jpg
    P5587_DataSheet.jpg
    P5587_Schematic.png
    1024 x 1001 - 174K
    1024 x 305 - 31K
    418 x 662 - 14K
    454 x 354 - 8K
    451 x 355 - 8K
  • ercoerco Posts: 20,256
    edited 2013-09-01 20:36
    Looks like an erco-recommended sensor on an erco-recommended dollar breadboard.

    Me so happy I could just cry! :)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-02 14:15
    Okay, I'm about ready to drill some holes in a servo case and attempt to read a striped pattern on one of the gears (yet to be affixed).

    Is there a prefered orientation for these? should the two dots on the sensor be parallel with the encoder lines? Is there in info about how thin the encoder lines can be? I figure I'll try to keep the lines at least 1/8 inch wide.

    Has anyone used these with a Prop yet? I don't suppose and extra 4.7K resistor on the output line will interfere with the sensor's function?

    I've read ecro mention inkjet printed stripes don't get picked up by the sensor. Have any of you tried a Sharpie to darken the stripes?
  • ercoerco Posts: 20,256
    edited 2013-09-02 14:22
    Who's this "ecro" guy?

    I like the dots parallel to stripes. Haven't done extensive testing, but it makes sense intuitively.

    Have you got access to a laser printer & coated paper? That's best IMO. I blanch at the thought of manually darkening via Sharpie. Maybe try coated paper in your inkjet printer first.
Sign In or Register to comment.