<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<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 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;}
/* 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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@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>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><img border=0 width=894 height=503 style='width:9.3125in;height:5.2395in' id="Image_x0020_1" src="cid:image002.jpg@01DB2C63.37C01040"><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><img border=0 width=604 height=505 style='width:6.2916in;height:5.2604in' id="Image_x0020_2" src="cid:image006.jpg@01DB2C63.37C01040"><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></div></body></html>