[sdiy] Using a PIC micro as an Octal schmitt buffer with programmable threshold levels..

Benjamin Tremblay btremblay at me.com
Fri Nov 1 20:17:09 CET 2024


I humbly suggest using higher-voltage CMOS Schmidt triggers to reduce noise. 
Or to use a darlington phototransistor. 
Making everything work on 3.3v is a hobbling constraint.

> On Nov 1, 2024, at 1:37 PM, Jean-Pierre Desrochers via Synth-diy <synth-diy at synth-diy.org> wrote:
> 
> Hi list,
>  
> Long post here..
>  
> Since I often asked help and suggestions on this forum for many issues,
> I thought: Here is an idea I'd like to share..
> Some months ago I talked about a project I was working on
> to read old piano paper rolls.
> https://www.youtube.com/watch?v=ZhH9kftuT_A&t=2s
> This project works well.. but with some paper holes reading issues I had to address.
> Let me explain:
>  
> The 88 paper holes are read using IR photo transistors with 100k pullup resistors
> with the help of 74HCS165 SPI buffers through a PIC micro.
> A wide Infrared LEDs band is in front of the scrolling paper that has holes
> punched in it (played notes). Each hole lets the IR beam reach an aligned Phototransistor
> that has a ‘light pipe’ to ‘conduct’ the light beam to it.
>  
> <image002.jpg>
>  
>  
> Some of the light pipes has more difficulties to get the light flow to its PT..  
> This arrangement causes some PT’s ‘ON’ low state to get too high in voltage values
> read by the 74HCS165 SPI readers. The PT OFF state does not cause any problem
> since  it goes high impedance up to 5vdc. Ok. But the ON low state values can go from 0.31v up to 1.7v !!
> Because of the very variable 74HCS165 threshold voltage values from chip to chip
> this sometimes causes reading problems and loss of some paper hole notes..
> I tried to use 470k pullup resistors instead of 100k but the system
> starts to get in an unreliable floating state when no notes detected.
>  
> Here is my idea..
> Why not use a small PIC micro to work as an octal schmitt input buffer
> that has programmed threshold levels at fixed specific values ?
> Here are the HCS165 threshold levels compared with my PIC threshold :
>  
> <image006.jpg>
> Now the PT’s could have up to 2.5v in their ON (low state) and still
> be read as a low state by the still in place HCS165 SPI readers..
> 88 notes means 11 x PIC16F1829.. 
> The use of 8 x ADC inputs, applying threshold values while reading
> to finaly output 8 x standard digital I/O.
> Voilà !
>  
>  
>  
>  
> ________________________________________________________
> This is the Synth-diy mailing list
> Submit email to: Synth-diy at synth-diy.org <mailto:Synth-diy at synth-diy.org>
> View archive at: https://synth-diy.org/pipermail/synth-diy/
> Check your settings at: https://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org <mailto:marketplace at synth-diy.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20241101/c6ec8402/attachment.htm>


More information about the Synth-diy mailing list