<div dir="ltr">If you REALLY wanted to do it the most analog way possible, you can use OTAs to make variable filters/time counters and achieve the 1/13 tuning range you want (you can get a few orders of magnitude from these circuits). Other than an interesting design exercise, I don't see any real value in going down that path, though.<div>I think it's optimal to focus on how you can get an accurate representation of the paper holes in the microcontroller, and then use software to interpret them. I would also use the microcontroller to control the speed of the roll with a PID, helping you achieve higher tempo stability and also use that feedback into your code. If you can measure the shaft speed, then you can easily calculate the on/off times your algorithm has to look for to always work flawlessly.</div><div>Really interesting project, keep us posted!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 11 Nov 2022 at 07:53, Donald Tillman <<a href="mailto:don@till.com">don@till.com</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">Interesting problem.<br>
<br>
Try setting up the light source and phototransistor for an aperture width of exactly the distance between sequential holes.  Ie., one hole plus one space.<br>
<br>
  -- Don<br>
--<br>
Donald Tillman, Palo Alto, California<br>
<a href="https://www.till.com" rel="noreferrer" target="_blank">https://www.till.com</a><br>
<br>
> On Nov 10, 2022, at 5:56 PM, Jean-Pierre Desrochers <<a href="mailto:jpdesroc@oricom.ca" target="_blank">jpdesroc@oricom.ca</a>> wrote:<br>
> <br>
> Hi all,<br>
>  <br>
> My Player piano reader project is going fine so far..<br>
> Some little robotics stuff (stepper motors, sensors, etc..) going on now..<br>
> I’m now in the process of reading the small holes scrolling<br>
> with the music paper rolls ‘sandwiched’ between Infrared leds and 88 x Photo transistors (see the image below).<br>
> The actual music data appears on the paper as parallel lines of small successive holes<br>
> shown in blue below. Because of the need of paper sturdyness for long duration notes the original paper punches<br>
> made small successive holes in the same note line instead of a steady cut in paper<br>
> that could eventualy be damaged over time..<br>
> That is shown by the blues dots below (successive holes).<br>
> Now I need to read these constant note ‘ignoring’  all the occuring small holes<br>
> during these long  duration notes..<br>
> The second line shows what the reading Photo transistor ‘sees’<br>
> and the third line shows an ideal reading stored in the micro.<br>
> So far there are 2 ways I found to get close of the ideal reading :<br>
> #1  Place a capacitor in parallel with each Photo transistors to get rid of the ‘pulsating holes’ on a continuous note<br>
> #2  Use software with separate counters to ‘skip’ the incoming small pulses just enough not to miss any ‘real’ short notes.<br>
> My challenge here is that the paper roll speed will be a variable one<br>
> which could be varied from  1feet/min  up to  13feet/min.<br>
> That’s a  1 to 13 ratio !!<br>
> So method #1 using caps in parallel with the photo-transistors (fixed RC time)  will not be feasable (I think).<br>
> Is there another way you could think of to get rid of these small pulses<br>
> when necessary ? <br>
> Thanks !<br>
<br>
_______________________________________________<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>