<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-ligatures:none;
        mso-fareast-language:FR-CA;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR-CA link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Very good point.<o:p></o:p></p><p class=MsoNormal>In any situations anyway, I’m having fun !<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=FR style='mso-ligatures:none;mso-fareast-language:FR-CA'>De :</span></b><span lang=FR style='mso-ligatures:none;mso-fareast-language:FR-CA'> Synth-diy <synth-diy-bounces@synth-diy.org> <b>De la part de</b> Oren Leavitt via Synth-diy<br><b>Envoyé :</b> 1 novembre 2024 15:02<br><b>À :</b> synth-diy@synth-diy.org<br><b>Objet :</b> Re: [sdiy] Using a PIC micro as an Octal schmitt buffer with programmable threshold levels..<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Hmmmnnn..<span style='mso-ligatures:none;mso-fareast-language:FR-CA'><o:p></o:p></span></p><p>I'm wondering if you can accomplish the same by shifting the photo transistor grounds slightly negative -1 volt or so? <o:p></o:p></p><p>For example run the photo transistors off of +5V and -1V.<o:p></o:p></p><div><p class=MsoNormal>On 11/1/24 12:37 PM, Jean-Pierre Desrochers via Synth-diy wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi list,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Long post here..<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Since I often asked help and suggestions on this forum for many issues,<o:p></o:p></p><p class=MsoNormal>I thought: Here is an idea I'd like to share..<o:p></o:p></p><p class=MsoNormal>Some months ago I talked about a project I was working on<o:p></o:p></p><p class=MsoNormal>to read old piano paper rolls.<o:p></o:p></p><p class=MsoNormal><a href="https://www.youtube.com/watch?v=ZhH9kftuT_A&t=2s">https://www.youtube.com/watch?v=ZhH9kftuT_A&t=2s</a><o:p></o:p></p><p class=MsoNormal>This project works well.. but with some paper holes reading issues I had to address.<o:p></o:p></p><p class=MsoNormal>Let me explain:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The 88 paper holes are read using IR photo transistors with 100k pullup resistors<o:p></o:p></p><p class=MsoNormal>with the help of 74HCS165 SPI buffers through a PIC micro.<o:p></o:p></p><p class=MsoNormal>A wide Infrared LEDs band is in front of the scrolling paper that has holes<o:p></o:p></p><p class=MsoNormal>punched in it (played notes). Each hole lets the IR beam reach an aligned Phototransistor<br>that has a ‘light pipe’ to ‘conduct’ the light beam to it.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='mso-ligatures:none'><img border=0 width=894 height=503 style='width:9.3125in;height:5.2395in' id="Image_x0020_2" src="cid:image001.jpg@01DB2C78.E376E840"></span><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Some of the light pipes has more difficulties to get the light flow to its PT..  <o:p></o:p></p><p class=MsoNormal>This arrangement causes some PT’s ‘ON’ low state to get too high in voltage values<br>read by the 74HCS165 SPI readers. The PT OFF state does not cause any problem<o:p></o:p></p><p class=MsoNormal>since  it goes high impedance up to 5vdc. Ok. But the ON low state values can go from 0.31v up to 1.7v !!<br><u>Because of the very variable 74HCS165 threshold voltage values from chip to chip</u><o:p></o:p></p><p class=MsoNormal>this sometimes causes reading problems and loss of some paper hole notes..<o:p></o:p></p><p class=MsoNormal>I tried to use 470k pullup resistors instead of 100k but the system<o:p></o:p></p><p class=MsoNormal>starts to get in an unreliable floating state when no notes detected.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Here is my idea..<o:p></o:p></p><p class=MsoNormal>Why not use a small PIC micro to work as an octal schmitt input buffer<o:p></o:p></p><p class=MsoNormal>that has programmed threshold levels at fixed specific values ?<br>Here are the HCS165 threshold levels compared with my PIC threshold :<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='mso-ligatures:none'><img border=0 width=604 height=505 style='width:6.2916in;height:5.2604in' id="Image_x0020_1" src="cid:image002.jpg@01DB2C78.E376E840"></span><o:p></o:p></p><p class=MsoNormal>Now the PT’s could have up to 2.5v in their ON (low state) and still<br>be read as a low state by the still in place HCS165 SPI readers..<o:p></o:p></p><p class=MsoNormal>88 notes means 11 x PIC16F1829.. <o:p></o:p></p><p class=MsoNormal>The use of 8 x ADC inputs, applying threshold values while reading<br>to finaly output 8 x standard digital I/O.<o:p></o:p></p><p class=MsoNormal>Voilà !<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='mso-ligatures:none;mso-fareast-language:FR-CA'><br><br><o:p></o:p></span></p><pre>________________________________________________________<o:p></o:p></pre><pre>This is the Synth-diy mailing list<o:p></o:p></pre><pre>Submit email to: <a href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a><o:p></o:p></pre><pre>View archive at: <a href="https://synth-diy.org/pipermail/synth-diy/">https://synth-diy.org/pipermail/synth-diy/</a><o:p></o:p></pre><pre>Check your settings at: <a href="https://synth-diy.org/mailman/listinfo/synth-diy">https://synth-diy.org/mailman/listinfo/synth-diy</a><o:p></o:p></pre><pre>Selling or trading? Use <a href="mailto:marketplace@synth-diy.org">marketplace@synth-diy.org</a><o:p></o:p></pre></blockquote></div></div></body></html>