Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to 5v

Moderator: Steve

Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to 5v

Postby alanmcdonley » Thu Jul 30, 2015 4:36 am

Will the PiDA digital input work with my wheel encoders, which use Hamamatsu P5586 running at 5v, with a 6.8k pull-up resistor to 5v on the encoder output?

http://www.junun.org/MarkIII/datasheets/P5587.pdf

Alan
alanmcdonley
 
Posts: 90
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to

Postby mikronauts » Thu Jul 30, 2015 7:27 am

They should work perfectly on the DIO inputs.

How many pulses per second (maximum) from your encoders?

The SERVO inputs have a voltage divider on them, so they may work as well, but it would be a waste to use the high speed Pi I/O for such a low speed signal.

FYI,

The voltage divider uses a 2k4 before the Pi pin with a 4k7 resistor to ground. We could model it with Spice, or just measure the output :)

alanmcdonley wrote:Will the PiDA digital input work with my wheel encoders, which use Hamamatsu P5586 running at 5v, with a 6.8k pull-up resistor to 5v on the encoder output?

http://www.junun.org/MarkIII/datasheets/P5587.pdf

Alan
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to

Postby alanmcdonley » Thu Jul 30, 2015 2:07 pm

mikronauts wrote:How many pulses per second (maximum) from your encoders?


The wheels have 66 stripes and and max speed seems to be around 60 stripes per second at a blazing 2/3 fps.
alanmcdonley
 
Posts: 90
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to

Postby mikronauts » Thu Jul 30, 2015 7:11 pm

The DIO pins will handle that fine.

I've been able to read an ADC at approx. 10ksps from Python, so 60 pulses should be a piece of cake - just set the MCP23S17 for an edge interrupt, and read the interrupt register on it at least 100 times per second - then you can't miss any pulses, and Nyquist does not apply.

alanmcdonley wrote:
mikronauts wrote:How many pulses per second (maximum) from your encoders?


The wheels have 66 stripes and and max speed seems to be around 60 stripes per second at a blazing 2/3 fps.
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm

Re: Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to

Postby alanmcdonley » Thu Jul 30, 2015 7:58 pm

mikronauts wrote:
The DIO pins will handle that fine. ... read the interrupt register on it at least 100 times per second


No way to interrupt Pi through the Droid Alpha with the encoder ticks?

(I'm not asking how it is done, only that it can be done with the Droid Alpha.)

Alan
p.s forgot to mention call sign WB0ZJJ in my introduction
alanmcdonley
 
Posts: 90
Joined: Thu Jul 23, 2015 10:50 am
Location: Boynton Beach, Florida

Re: Input Compatibility? Hamamatsu P5587 w/ 6.8k pull-up to

Postby mikronauts » Thu Jul 30, 2015 9:14 pm

You can set up a callback function with pigpio

http://abyz.co.uk/rpi/pigpio/python.html#callback

however that only works on Pi-native pins (SERVO1-SERVO8) or the additional GPIO's on a 40 pin Pi (pin 27-40)

alanmcdonley wrote:
mikronauts wrote:
The DIO pins will handle that fine. ... read the interrupt register on it at least 100 times per second


No way to interrupt Pi through the Droid Alpha with the encoder ticks?

(I'm not asking how it is done, only that it can be done with the Droid Alpha.)

Alan
p.s forgot to mention call sign WB0ZJJ in my introduction
mikronauts
 
Posts: 119
Joined: Tue Sep 16, 2014 6:58 pm


Return to Pi Droid Alpha

Who is online

Users browsing this forum: No registered users and 1 guest

cron