[sdiy] Reading IR phototransistors in a 8X8 matrix

Didrik Madheden nitro2k01 at gmail.com
Mon Aug 15 23:35:05 CEST 2022


Interesting idea, but why scan the PTs, and not the LEDs? You could
essentially have 8 PTs with 8 fibers leading up to each. Likewise, you
could have 8 banks of 8 LEDs each (or 1 LED with 8 fibers going out of it)
each controlled by 1 IO pin with a drive transistor. Maybe this will lead
to sensitivity issues with the PTs though?

Another method entirely would be to use boards with a shift register on
each, like the venerable 74HC165. Those could be easily daisy-chained for
an arbitrary number of inputs and still use only a total of about 4 IO
pins. Depending on your MCU architecture, you might have to bitbang the
protocol, use a SPI hardware unit to transfer one byte using hardware, or
even multiple bytes in one transfer using DMA. Using this method, you might
be able to align the PTs using the placement on the board, and not even
have to use optical fibers in the first place.

You could also place the phototransistors in a staggered fashion on the
boards if they're too wide to fit side by side in a row with the pitch of
the holes on the paper. (If this was the original reason for using optical
fibers.) This will skew the read timing of course, but nothing you can't
fix in software,

/Didrik

On Mon, 15 Aug 2022 at 21:05, Jean-Pierre Desrochers <jpdesroc at oricom.ca>
wrote:

> I'm designing a piano Roll reader/player (yes antique paper piano rolls !)
> that will read holes on a scrolling paper and play the actual musical notes
> using MIDI standards..
> This has already been done in the past but with very few documentations
> left
> for DIYers like me.
>
> So.. I'm thinking of using IR (940nm) LEDs, phototransistors and aligned
> short optical fibers
> to read the actual scrolling holes. 90 phototransistors will be used as
> 'bit' readers.
> I would use IR because paper is mostly opaque to 940nm wavelength
> compared to visible light that could get through it.
>
> Because of that high quantity of PT’s to be read I was thinking of using
> rows/columns matrix of switches like keyboards in synths like this:
>
>
>
> But instead of switches like in this circuit I would use 2 pins
> phototransistors like this one:
>
>
> The resistors could be around 10K and this configuration would use only 2
> x 8 bits ports.
>
> But I was wondering about using PT’s in a matrix like that would bring
> glitches or noise
>
> In the CPU readings..
> Has anybody used PT’s in such a circuit ?
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org
>


-- 
/Didrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20220815/20492083/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 159091 bytes
Desc: not available
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20220815/20492083/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13562 bytes
Desc: not available
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20220815/20492083/attachment-0001.png>


More information about the Synth-diy mailing list