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.
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
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?
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.
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.
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.
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.
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.
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
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.
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,
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
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?
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.
Comments
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
Can I get ten?
In static tube AND in a static bag.
Great ebayer.
Must be posting too much.
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
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.
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...
I
Edit: I had much better luck with encoder disks printed on a color laser printer as opposed to an inkjet
Is there anything in the OBEX yet for these encoders?
Edit: Can encoders be used when running HB-25 motor controllers?
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.
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.
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.
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.
Here is the BS2 code
Tried to pm but kept getting the error above.
I received the sensors today and need to send you some $$. Let me know,
Thanks!
No sir, please resend.
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!
Me so happy I could just cry!
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?
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.