<div dir="ltr">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?<div><br></div><div>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.</div><div><br></div><div>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,</div><div><br></div><div>/Didrik</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 15 Aug 2022 at 21:05, Jean-Pierre Desrochers <<a href="mailto:jpdesroc@oricom.ca">jpdesroc@oricom.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="FR-CA" style="overflow-wrap: break-word;"><div class="gmail-m_1417437993907144075WordSection1"><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">I'm designing a piano Roll reader/player (yes antique paper piano rolls !)<br>that will read holes on a scrolling paper and play the actual musical notes<br>using MIDI standards..<br>This has already been done in the past but with very few documentations left<br>for DIYers like me.<u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">So.. I'm thinking of using IR (940nm) LEDs, phototransistors and aligned short optical fibers<br>to read the actual scrolling holes. 90 phototransistors will be used as 'bit' readers.<br>I would use IR because paper is mostly opaque to 940nm wavelength<br>compared to visible light that could get through it.<u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">Because of that high quantity of PT’s to be read I was thinking of using<br>rows/columns matrix of switches like keyboards in synths like this:<u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA"><u></u> <u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA"><img width="498" height="497" style="width: 5.1875in; height: 5.177in;" id="gmail-m_1417437993907144075Image_x0020_4" src="cid:182a35bd8777745b41"></span><span lang="EN-CA"><u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">But instead of switches like in this circuit I would use 2 pins phototransistors like this one:<br><img width="153" height="144" style="width: 1.5937in; height: 1.5in;" id="gmail-m_1417437993907144075Image_x0020_5" src="cid:182a35bd8774cff312"><br><br><u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">The resistors could be around 10K and this configuration would use only 2 x 8 bits ports.<u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">But I was wondering about using PT’s in a matrix like that would bring glitches or noise<u></u><u></u></span></p><p class="gmail-m_1417437993907144075MsoPlainText"><span lang="EN-CA">In the CPU readings.. <br>Has anybody used PT’s in such a circuit ?<u></u><u></u></span></p></div></div>_______________________________________________<br>
Synth-diy mailing list<br>
<a href="mailto:Synth-diy@synth-diy.org" target="_blank">Synth-diy@synth-diy.org</a><br>
<a href="http://synth-diy.org/mailman/listinfo/synth-diy" rel="noreferrer" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>
Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" target="_blank">marketplace@synth-diy.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">/Didrik</div>