Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly)." (By Matt Welsh)


tech / sci.electronics.design / Re: Optimize a TCRT5000L

SubjectAuthor
* Optimize a TCRT5000Lrhor...@gmail.com
+- Re: Optimize a TCRT5000Ljlarkin
+* Re: Optimize a TCRT5000Lke...@kjwdesigns.com
|`* Re: Optimize a TCRT5000Lrhor...@gmail.com
| +* Re: Optimize a TCRT5000Lpiglet
| |`* Re: Optimize a TCRT5000Lrhor...@gmail.com
| | `* Re: Optimize a TCRT5000Lwhit3rd
| |  `* Re: Optimize a TCRT5000Lrhor...@gmail.com
| |   `- Re: Optimize a TCRT5000Lwhit3rd
| +* Re: Optimize a TCRT5000Lke...@kjwdesigns.com
| |`- Re: Optimize a TCRT5000Lrhor...@gmail.com
| `- Re: Optimize a TCRT5000Lnone
+- Re: Optimize a TCRT5000Lwhit3rd
`* Re: Optimize a TCRT5000LJasen Betts
 `* Re: Optimize a TCRT5000Lrhor...@gmail.com
  +- Re: Optimize a TCRT5000LLasse Langwadt Christensen
  `- Re: Optimize a TCRT5000LJasen Betts

1
Optimize a TCRT5000L

<a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64089&group=sci.electronics.design#64089

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:622a:413:: with SMTP id n19mr7386323qtx.238.1622293079649;
Sat, 29 May 2021 05:57:59 -0700 (PDT)
X-Received: by 2002:a0c:cb05:: with SMTP id o5mr8457235qvk.0.1622293079473;
Sat, 29 May 2021 05:57:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sat, 29 May 2021 05:57:59 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea;
posting-account=cinlnAoAAABWWFgc_siC56jRtRTjUix2
NNTP-Posting-Host: 2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
Subject: Optimize a TCRT5000L
From: rhorer...@gmail.com (rhor...@gmail.com)
Injection-Date: Sat, 29 May 2021 12:57:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: rhor...@gmail.com - Sat, 29 May 2021 12:57 UTC

I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter. I will be biasing the diode transmitter at 20mA. Obviously, I will want to use something like an analog comparator or an op amp to make the detector more sensitive and a schmitt trigger to prevent instability. The question is, how can I optimize the sensitivity? Nothing about the rotating material will be known, including its IR reflectivity, except that the surface will have a well defined mark that does allow the reflected light to vary by a significant amount. If the collector resistor is too large, then the phototransistor may easily saturate, and the sensor voltage will never go high enough to set the comparator on each revolution. If the resistor is too large, the sensor voltage may never drop low enough to reset the comparator. I am trying to think of a simple way I could actively normalize the collector current so the sensitivity is right in the nominal range whenever the material and sensor gap change. Of course, this circuit would have to be relatively slow acting, or else it will change the collector voltage too quickly, either causing aliasing or lost data. The incoming pulse frequency may vary between 0.2 Hz and 150 Hz. I am thinking something like the following might work, but I am far from confidant:

http://siliconventures.net/images/Revolution%20Counter.png

Re: Optimize a TCRT5000L

<itk4bg5ra7s89cuoft19krab4cv2v6v4q9@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64093&group=sci.electronics.design#64093

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!paganini.bofh.team!goblin3!goblin.stu.neva.ru!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 29 May 2021 09:51:01 -0500
From: jlar...@highlandsniptechnology.com
Newsgroups: sci.electronics.design
Subject: Re: Optimize a TCRT5000L
Date: Sat, 29 May 2021 07:50:59 -0700
Message-ID: <itk4bg5ra7s89cuoft19krab4cv2v6v4q9@4ax.com>
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 23
X-Trace: sv3-PjfDdkitwRJQd0QQJ9TdDdQ9xNcXWYN0fjya987WA/B3ehqIjK4K0yAGY+F5pUHJa1up9VXNzjzzbzv!CobTRtHl/RavPe5EVaiEKPTelI52Egxx/ExXF9dg6F7jPMmCcBSQWI68CWB9WRseiv+GDzRC6NHE!ldhh/Q==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2917
 by: jlar...@highlandsniptechnology.com - Sat, 29 May 2021 14:50 UTC

On Sat, 29 May 2021 05:57:59 -0700 (PDT), "rhor...@gmail.com"
<rhorerles@gmail.com> wrote:

>I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter. I will be biasing the diode transmitter at 20mA. Obviously, I will want to use something like an analog comparator or an op amp to make the detector more sensitive and a schmitt trigger to prevent instability. The question is, how can I optimize the sensitivity? Nothing about the rotating material will be known, including its IR reflectivity, except that the surface will have a well defined mark that does allow the reflected light to vary by a significant amount. If the collector resistor is too large, then the phototransistor may easily saturate, and the sensor voltage will never go high enough to set the comparator on each revolution. If the resistor is too large, the sensor voltage may never drop low enough to reset the comparator. I am trying to think of a simple way I could actively normalize the collector current so the sensitivity is right in the
>nominal range whenever the material and sensor gap change. Of course, this circuit would have to be relatively slow acting, or else it will change the collector voltage too quickly, either causing aliasing or lost data. The incoming pulse frequency may vary between 0.2 Hz and 150 Hz. I am thinking something like the following might work, but I am far from confidant:
>
>http://siliconventures.net/images/Revolution%20Counter.png

Run the photodiode in linear mode so it never saturates. Then a TIA
and AC amplify the signal, lowpass filter, and zero-cross detect. That
will work better if your target is about 50% duty cycle, rather than a
narrow strip.

--

John Larkin Highland Technology, Inc

The best designs are necessarily accidental.

Re: Optimize a TCRT5000L

<65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64106&group=sci.electronics.design#64106

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ac8:1090:: with SMTP id a16mr4208143qtj.32.1622324988653; Sat, 29 May 2021 14:49:48 -0700 (PDT)
X-Received: by 2002:a37:a2ca:: with SMTP id l193mr10010222qke.137.1622324988508; Sat, 29 May 2021 14:49:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sat, 29 May 2021 14:49:48 -0700 (PDT)
In-Reply-To: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:646:9400:5330:cd1b:4de:ba34:6810; posting-account=PVfQOwoAAAB7kRhNYCwddJrDyiT94AaP
NNTP-Posting-Host: 2601:646:9400:5330:cd1b:4de:ba34:6810
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: kei...@kjwdesigns.com (ke...@kjwdesigns.com)
Injection-Date: Sat, 29 May 2021 21:49:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 43
 by: ke...@kjwdesigns.com - Sat, 29 May 2021 21:49 UTC

On Saturday, 29 May 2021 at 05:58:03 UTC-7, rhor...@gmail.com wrote:
> I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter. I will be biasing the diode transmitter at 20mA. Obviously, I will want to use something like an analog comparator or an op amp to make the detector more sensitive and a schmitt trigger to prevent instability. The question is, how can I optimize the sensitivity? Nothing about the rotating material will be known, including its IR reflectivity, except that the surface will have a well defined mark that does allow the reflected light to vary by a significant amount. If the collector resistor is too large, then the phototransistor may easily saturate, and the sensor voltage will never go high enough to set the comparator on each revolution. If the resistor is too large, the sensor voltage may never drop low enough to reset the comparator. I am trying to think of a simple way I could actively normalize the collector current so the sensitivity is right in the nominal range whenever the material and sensor gap change. Of course, this circuit would have to be relatively slow acting, or else it will change the collector voltage too quickly, either causing aliasing or lost data. The incoming pulse frequency may vary between 0.2 Hz and 150 Hz.. I am thinking something like the following might work, but I am far from confidant:
>
> http://siliconventures.net/images/Revolution%20Counter.png

You may want to think about doing it mostly digitally in a microcontroller.

I implemented a sensor recently using a TCRT5000L and an AVR microcontroller with just a handful of discretes.

I needed to reject ambient light and especially 60(120)Hz modulated light as well as accommodating fairly small reflectance from the detected object.

The phototransistor had series resistor that was selected so that the phototransistor never saturated, the LED emitter was controlled from the MCU so that using the A/D converter measurements were taken at about 1kHz with the LED on and then with it off to discriminate the reflected return from the background ambient light. The A/D results were compared, averaged and thresholded. I didn't need to do 150Hz but it could probably do it.

With an MCU there you could even do the frequency counter in the same MCU. Just connect up one of the very cheap serial driven LED displays that are available and the whole thing could be implemented in one IC and a few other parts.

https://ibb.co/74wzvSt

Re: Optimize a TCRT5000L

<22fd9e11-fb6e-47f0-b0df-4274fc230d2dn@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64112&group=sci.electronics.design#64112

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a37:a705:: with SMTP id q5mr3943452qke.369.1622329997737; Sat, 29 May 2021 16:13:17 -0700 (PDT)
X-Received: by 2002:a37:b143:: with SMTP id a64mr10525620qkf.492.1622329997615; Sat, 29 May 2021 16:13:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sat, 29 May 2021 16:13:17 -0700 (PDT)
In-Reply-To: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=209.221.140.126; posting-account=vKQm_QoAAADOaDCYsqOFDAW8NJ8sFHoE
NNTP-Posting-Host: 209.221.140.126
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <22fd9e11-fb6e-47f0-b0df-4274fc230d2dn@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: whit...@gmail.com (whit3rd)
Injection-Date: Sat, 29 May 2021 23:13:17 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 13
 by: whit3rd - Sat, 29 May 2021 23:13 UTC

On Saturday, May 29, 2021 at 5:58:03 AM UTC-7, rhor...@gmail.com wrote:
> I am using a TCRT5000L photo-interrupter ...
> The question is, how can I optimize the sensitivity? Nothing about the rotating material will be known, including its IR >reflectivity, except that the surface will have a well defined mark

If you can make a known duty cycle, the comparator output can be filtered to make a reference
voltage (for the comparator input) rise when the duty cycle is high, and drop when the duty cycle is low.

Since the comparator senses near ground, consider bypassing the phototransistor collector (capacitor
to ground) and taking input from an emitter resistor (this makes a faster risetime because the emitter
resistor can be circa 100 ohms, has a lower RC time constant with the capacitive transistor).

And, consider adding a few connectors so an oscilloscope can be easily attached to
aid in offset/hysteresis/diode current setting. Consider, also, getting some reflective tape and
dark paint markers, for situations where you want more reflection/absorption control.

Re: Optimize a TCRT5000L

<s8ujni$ero$2@gonzo.revmaps.no-ip.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64116&group=sci.electronics.design#64116

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc3.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.iad.POSTED!not-for-mail
From: use...@revmaps.no-ip.org (Jasen Betts)
Newsgroups: sci.electronics.design
Subject: Re: Optimize a TCRT5000L
Organization: JJ's own news server
Message-ID: <s8ujni$ero$2@gonzo.revmaps.no-ip.org>
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
Injection-Date: Sat, 29 May 2021 23:45:54 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="15224"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 24
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sun, 30 May 2021 00:00:42 UTC
Date: Sat, 29 May 2021 23:45:54 -0000 (UTC)
X-Received-Bytes: 3291
 by: Jasen Betts - Sat, 29 May 2021 23:45 UTC

On 2021-05-29, rhor...@gmail.com <rhorerles@gmail.com> wrote:
> I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter. I will be biasing the diode transmitter at 20mA. Obviously, I will want to use something like an analog comparator or an op amp to make the detector more sensitive and a schmitt trigger to prevent instability. The question is, how can I optimize the sensitivity? Nothing about the rotating material will be known, including its IR reflectivity, except that the surface will have a well defined mark that does allow the reflected light to vary by a significant amount. If the collector resistor is too large, then the phototransistor may easily saturate, and the sensor voltage will never go high enough to set the comparator on each revolution. If the resistor is too large, the sensor voltage may never drop low enough to reset the comparator. I am trying to think of a simple way I could actively normalize the collector current so the sensitivity is right in the nominal range whenever the material and sensor gap change. Of course, this circuit would have to be relatively slow acting, or else it will change the collector voltage too quickly, either causing a
liasing or lost data. The incoming pulse frequency may vary between 0.2 Hz and 150 Hz. I am thinking something like the following might work, but I am far from confidant:
>

At low rates you want to modulate the LED current and use a lock-in
amplifier to discriminate the output, possibly feed that to a slow
data slicer.

At high rates you want to run the LED at fixed current and use a
data-slicer to process the output.

> http://siliconventures.net/images/Revolution%20Counter.png

The fact that they stopped making the CD4553 and 14553 cuggests that discrete
counters are no-longer a good idea.

The ATTINY2313 MCU has a counter capable of almost 10Mhz counting
(with 20MHz clock) 24 bits worth of hardware counters and enough
spare pins to drive at-least 6 7-segment LEDs. there's probably
better suited microcontrollers out there, that's just one that
I'm familiar with.

--
Jasen.

Re: Optimize a TCRT5000L

<52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64118&group=sci.electronics.design#64118

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a37:4484:: with SMTP id r126mr10531820qka.18.1622339757728;
Sat, 29 May 2021 18:55:57 -0700 (PDT)
X-Received: by 2002:ae9:e406:: with SMTP id q6mr10677496qkc.406.1622339757576;
Sat, 29 May 2021 18:55:57 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sat, 29 May 2021 18:55:57 -0700 (PDT)
In-Reply-To: <65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea;
posting-account=cinlnAoAAABWWFgc_siC56jRtRTjUix2
NNTP-Posting-Host: 2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com> <65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: rhorer...@gmail.com (rhor...@gmail.com)
Injection-Date: Sun, 30 May 2021 01:55:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: rhor...@gmail.com - Sun, 30 May 2021 01:55 UTC

On Saturday, May 29, 2021 at 4:49:51 PM UTC-5, ke...@kjwdesigns.com wrote:
> On Saturday, 29 May 2021 at 05:58:03 UTC-7, rhor...@gmail.com wrote:

> You may want to think about doing it mostly digitally in a microcontroller.

I considered doing that. I would either have to multiplex the output lines of the MCU, or else employ an I2C driver such as SAA1064 or PCA9532. With six digits, either one is a bit of a pain.

> I implemented a sensor recently using a TCRT5000L and an AVR microcontroller with just a handful of discretes.
>
> I needed to reject ambient light and especially 60(120)Hz modulated light as well as accommodating fairly small reflectance from the detected object..

I don't think ambient light will be an issue. My shop is lighted with 100% LED lights, which produce very little IR, and probably almost no 60 / 120Hz, plus the device will mostly shadow the target. Varying reflectivity is the big issue. The surface may be mirrored or dull black (in infrared).
> The phototransistor had series resistor that was selected so that the phototransistor never saturated, the LED emitter was controlled from the MCU.

Hmm. I like the idea of controlling the LED current. It could be done either by a microcontroller or an amplifier. Hmm.

> so that using the A/D converter measurements were taken at about 1kHz with the LED on and then with it off to discriminate the reflected return from the background ambient light.

Turning the LED on and off would be highly problematical. It would tend to be taken as a count, especially at 1 KHz. A few MHz might work.

> The A/D results were compared, averaged and thresholded. I didn't need to do 150Hz but it could probably do it.

This is not A/D, in the normal sense. It's just counting pulses. No time component.

> With an MCU there you could even do the frequency counter in the same MCU..

This is not a frequency counter. I don't care about how fast the shaft turns. I care about how many turns, total, between 1 and 10,000. That's why decade counters driving BCD decoders are ideal. There is no computation involved, only pulse counting.

> Just connect up one of the very cheap serial driven LED displays that are available and the whole thing could be implemented in one IC and a few other parts.

A bit more than that, no matter what, not to mention a fair bit of code for either line multiplexing or I2C multiplexing. Costs are similar.

Re: Optimize a TCRT5000L

<deb04ad4-f11e-4471-b24c-cb5990698f58n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64120&group=sci.electronics.design#64120

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:aed:30c1:: with SMTP id 59mr9426827qtf.16.1622340908752;
Sat, 29 May 2021 19:15:08 -0700 (PDT)
X-Received: by 2002:a05:620a:110d:: with SMTP id o13mr10864018qkk.348.1622340908616;
Sat, 29 May 2021 19:15:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!usenet.pasdenom.info!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sat, 29 May 2021 19:15:08 -0700 (PDT)
In-Reply-To: <s8ujni$ero$2@gonzo.revmaps.no-ip.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea;
posting-account=cinlnAoAAABWWFgc_siC56jRtRTjUix2
NNTP-Posting-Host: 2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com> <s8ujni$ero$2@gonzo.revmaps.no-ip.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <deb04ad4-f11e-4471-b24c-cb5990698f58n@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: rhorer...@gmail.com (rhor...@gmail.com)
Injection-Date: Sun, 30 May 2021 02:15:08 +0000
Content-Type: text/plain; charset="UTF-8"
 by: rhor...@gmail.com - Sun, 30 May 2021 02:15 UTC

On Saturday, May 29, 2021 at 7:00:48 PM UTC-5, Jasen Betts wrote:
> On 2021-05-29, rhor...@gmail.com <rhor...@gmail.com> wrote:
> > I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter.
> >
> At low rates you want to modulate the LED current and use a lock-in
> amplifier to discriminate the output, possibly feed that to a slow
> data slicer.

No, again, this is not a frequency counter. It is a rotation counter, a simple pulse counter. I don't need to know how fast the pulses are coming, only how many of them have happened, irrespective of the time period.


> At high rates you want to run the LED at fixed current and use a
> data-slicer to process the output.

The rate is not going to be very high - at most 2000 RPM (33 pulses persecond), and probably a lot less.
> The fact that they stopped making the CD4553 and 14553 cuggests that discrete
> counters are no-longer a good idea.

I'm not sure what your point is, here.

> The ATTINY2313 MCU has a counter capable of almost 10Mhz counting
> (with 20MHz clock) 24 bits worth of hardware counters and enough
> spare pins to drive at-least 6 7-segment LEDs. there's probably
> better suited microcontrollers out there, that's just one that
> I'm familiar with.

I'm not familiar with that chip, but the datasheet says it only has 18 I/O lines (20 pins total). That's plenty with multiplexing, but nowhere nearly enough to drive 42 lines directly.

Re: Optimize a TCRT5000L

<48833585-3d04-4e36-9e75-15bb83238cb0n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64121&group=sci.electronics.design#64121

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:6214:a11:: with SMTP id dw17mr11093188qvb.8.1622345941718;
Sat, 29 May 2021 20:39:01 -0700 (PDT)
X-Received: by 2002:a05:620a:110d:: with SMTP id o13mr11025757qkk.348.1622345941532;
Sat, 29 May 2021 20:39:01 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sat, 29 May 2021 20:39:01 -0700 (PDT)
In-Reply-To: <deb04ad4-f11e-4471-b24c-cb5990698f58n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=85.83.70.155; posting-account=mW5JKwkAAAAMyuWOVeLp8yffyAkVx0g7
NNTP-Posting-Host: 85.83.70.155
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
<s8ujni$ero$2@gonzo.revmaps.no-ip.org> <deb04ad4-f11e-4471-b24c-cb5990698f58n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <48833585-3d04-4e36-9e75-15bb83238cb0n@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: langw...@fonz.dk (Lasse Langwadt Christensen)
Injection-Date: Sun, 30 May 2021 03:39:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Lasse Langwadt Chris - Sun, 30 May 2021 03:39 UTC

søndag den 30. maj 2021 kl. 04.15.11 UTC+2 skrev rhor...@gmail.com:
> On Saturday, May 29, 2021 at 7:00:48 PM UTC-5, Jasen Betts wrote:
> > On 2021-05-29, rhor...@gmail.com <rhor...@gmail.com> wrote:
> > > I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter.
> > >
> > At low rates you want to modulate the LED current and use a lock-in
> > amplifier to discriminate the output, possibly feed that to a slow
> > data slicer.
> No, again, this is not a frequency counter. It is a rotation counter, a simple pulse counter. I don't need to know how fast the pulses are coming, only how many of them have happened, irrespective of the time period.
> > At high rates you want to run the LED at fixed current and use a
> > data-slicer to process the output.
> The rate is not going to be very high - at most 2000 RPM (33 pulses persecond), and probably a lot less.
> > The fact that they stopped making the CD4553 and 14553 cuggests that discrete
> > counters are no-longer a good idea.
> I'm not sure what your point is, here.
> > The ATTINY2313 MCU has a counter capable of almost 10Mhz counting
> > (with 20MHz clock) 24 bits worth of hardware counters and enough
> > spare pins to drive at-least 6 7-segment LEDs. there's probably
> > better suited microcontrollers out there, that's just one that
> > I'm familiar with.
> I'm not familiar with that chip, but the datasheet says it only has 18 I/O lines (20 pins total). That's plenty with multiplexing, but nowhere nearly enough to drive 42 lines directly.

what do you need 42 line for?

Re: Optimize a TCRT5000L

<s8v27q$hcu$1@gonzo.revmaps.no-ip.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64122&group=sci.electronics.design#64122

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
From: use...@revmaps.no-ip.org (Jasen Betts)
Newsgroups: sci.electronics.design
Subject: Re: Optimize a TCRT5000L
Organization: JJ's own news server
Message-ID: <s8v27q$hcu$1@gonzo.revmaps.no-ip.org>
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
<s8ujni$ero$2@gonzo.revmaps.no-ip.org>
<deb04ad4-f11e-4471-b24c-cb5990698f58n@googlegroups.com>
Injection-Date: Sun, 30 May 2021 03:53:30 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="17822"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 44
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sun, 30 May 2021 04:00:43 UTC
Date: Sun, 30 May 2021 03:53:30 -0000 (UTC)
X-Received-Bytes: 3201
 by: Jasen Betts - Sun, 30 May 2021 03:53 UTC

On 2021-05-30, rhor...@gmail.com <rhorerles@gmail.com> wrote:
> On Saturday, May 29, 2021 at 7:00:48 PM UTC-5, Jasen Betts wrote:
>> On 2021-05-29, rhor...@gmail.com <rhor...@gmail.com> wrote:
>> > I am using a TCRT5000L photo-interrupter to drive the input of a bank of 74LS90 decade counters to make a rotation counter.
>> >
>> At low rates you want to modulate the LED current and use a lock-in
>> amplifier to discriminate the output, possibly feed that to a slow
>> data slicer.
>
> No, again, this is not a frequency counter. It is a rotation
> counter, a simple pulse counter. I don't need to know how fast the
> pulses are coming, only how many of them have happened, irrespective
> of the time period.

If you know it's easier to count them reliably.

>
>> At high rates you want to run the LED at fixed current and use a
>> data-slicer to process the output.
>
> The rate is not going to be very high - at most 2000 RPM (33 pulses persecond), and probably a lot less.

In that case just pulse the LED at 125 Khz or something like that and
look at the AM signal you pick up on the phototransistor, that'll
make you pretty-much immune to ambient light sources.

>> The fact that they stopped making the CD4553 and 14553 cuggests that discrete
>> counters are no-longer a good idea.
>
> I'm not sure what your point is, here.
>
>> The ATTINY2313 MCU has a counter capable of almost 10Mhz counting
>> (with 20MHz clock) 24 bits worth of hardware counters and enough
>> spare pins to drive at-least 6 7-segment LEDs. there's probably
>> better suited microcontrollers out there, that's just one that
>> I'm familiar with.
>
> I'm not familiar with that chip, but the datasheet says it only has 18 I/O lines (20 pins total). That's plenty with multiplexing, but nowhere nearly enough to drive 42 lines directly.

It's not hard to multiplex LEDs, or do you need blinding brightness in
your application?

--
Jasen.

Re: Optimize a TCRT5000L

<s8vcae$vt$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64128&group=sci.electronics.design#64128

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: erichpwa...@hotmail.com (piglet)
Newsgroups: sci.electronics.design
Subject: Re: Optimize a TCRT5000L
Date: Sun, 30 May 2021 07:45:33 +0100
Organization: A noisesome patent Spinner
Lines: 50
Message-ID: <s8vcae$vt$1@dont-email.me>
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
<65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com>
<52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 30 May 2021 06:45:35 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="79078a839bed51c2e014dcb857cb7959";
logging-data="1021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19iL37GcRcnz7h/fwuef/3i"
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101
Thunderbird/78.10.2
Cancel-Lock: sha1:TGmzJWllUip9hgTzQ0b0bFienX8=
In-Reply-To: <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>
Content-Language: en-US
 by: piglet - Sun, 30 May 2021 06:45 UTC

On 30/05/2021 02:55, rhor...@gmail.com wrote:
> On Saturday, May 29, 2021 at 4:49:51 PM UTC-5, ke...@kjwdesigns.com wrote:
>> On Saturday, 29 May 2021 at 05:58:03 UTC-7, rhor...@gmail.com wrote:
>
>> You may want to think about doing it mostly digitally in a microcontroller.
>
> I considered doing that. I would either have to multiplex the output lines of the MCU, or else employ an I2C driver such as SAA1064 or PCA9532. With six digits, either one is a bit of a pain.
>
>> I implemented a sensor recently using a TCRT5000L and an AVR microcontroller with just a handful of discretes.
>>
>> I needed to reject ambient light and especially 60(120)Hz modulated light as well as accommodating fairly small reflectance from the detected object.
>
> I don't think ambient light will be an issue. My shop is lighted with 100% LED lights, which produce very little IR, and probably almost no 60 / 120Hz, plus the device will mostly shadow the target. Varying reflectivity is the big issue. The surface may be mirrored or dull black (in infrared).
>
>> The phototransistor had series resistor that was selected so that the phototransistor never saturated, the LED emitter was controlled from the MCU.
>
> Hmm. I like the idea of controlling the LED current. It could be done either by a microcontroller or an amplifier. Hmm.
>
>> so that using the A/D converter measurements were taken at about 1kHz with the LED on and then with it off to discriminate the reflected return from the background ambient light.
>
> Turning the LED on and off would be highly problematical. It would tend to be taken as a count, especially at 1 KHz. A few MHz might work.
>
>> The A/D results were compared, averaged and thresholded. I didn't need to do 150Hz but it could probably do it.
>
> This is not A/D, in the normal sense. It's just counting pulses. No time component.
>
>> With an MCU there you could even do the frequency counter in the same MCU.
>
> This is not a frequency counter. I don't care about how fast the shaft turns. I care about how many turns, total, between 1 and 10,000. That's why decade counters driving BCD decoders are ideal. There is no computation involved, only pulse counting.
>
>> Just connect up one of the very cheap serial driven LED displays that are available and the whole thing could be implemented in one IC and a few other parts.
>
> A bit more than that, no matter what, not to mention a fair bit of code for either line multiplexing or I2C multiplexing. Costs are similar.
>

You mentioned your shop lighting which makes me wonder if this is a
one-off tool for your own use instead of a product for use by the
unskilled mass market? (BTW some LED room lamps can have plenty of 120Hz
depending on the design.)

I built a very similar coil winders turn counter years ago for in-house
usage and simply used a trimpot and schmitt/comparator on the reflective
sensor - despite differing target contrasts it was not hard to find a
sweetspot and I don't recall having to readjust the trimpot. I guess
getting the sensor close is a vital factor.

If you decide to explore the modulated IRED emitter scheme beware the
photo-transistor is very slow.

piglet

Re: Optimize a TCRT5000L

<fd9f710d-76cd-4605-aaa2-a7cdac1328c0n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64140&group=sci.electronics.design#64140

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:6214:d06:: with SMTP id 6mr12501663qvh.56.1622382076824;
Sun, 30 May 2021 06:41:16 -0700 (PDT)
X-Received: by 2002:ad4:420b:: with SMTP id k11mr12625299qvp.18.1622382076675;
Sun, 30 May 2021 06:41:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 30 May 2021 06:41:16 -0700 (PDT)
In-Reply-To: <s8vcae$vt$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea;
posting-account=cinlnAoAAABWWFgc_siC56jRtRTjUix2
NNTP-Posting-Host: 2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
<65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>
<s8vcae$vt$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fd9f710d-76cd-4605-aaa2-a7cdac1328c0n@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: rhorer...@gmail.com (rhor...@gmail.com)
Injection-Date: Sun, 30 May 2021 13:41:16 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: rhor...@gmail.com - Sun, 30 May 2021 13:41 UTC

On Sunday, May 30, 2021 at 1:45:40 AM UTC-5, piglet wrote:

> You mentioned your shop lighting which makes me wonder if this is a
> one-off tool for your own use instead of a product for use by the
> unskilled mass market?

Yes, it is absoltely a one-off, or at most a two-off.

> (BTW some LED room lamps can have plenty of 120Hz
> depending on the design.)

Oh, I imagine so, but I would expect them to be in the minority. These days, a transformer and a rectifier are not any less expensive than a simple switching supply. I may actually have to check one day, if I get up the gumption.

> I built a very similar coil winders turn counter years ago for in-house
> usage and simply used a trimpot and schmitt/comparator on the reflective
> sensor - despite differing target contrasts it was not hard to find a
> sweetspot and I don't recall having to readjust the trimpot.

Of course, I also considered doing that. In fact, little off-the-shelf boards with a TCRT5000L, a potentiometer, and a comparator are selling for under $1 on ebay.

> I guess getting the sensor close is a vital factor.

I exxpect so. The data sheet says, "0.2 to 15mm". I expect more than 10mm would possibly encounter issues. Maybe I am just borrowing trouble, but it seemed to me any system without some sort of feedback would require constant fiddling.
>
> If you decide to explore the modulated IRED emitter scheme beware the
> photo-transistor is very slow.

I have no doubt. The datasheet doesn't give a bandwidth or slew rate, but I would expect a 30 milisecond period to be well within its capabilities. If not, I can always turn the spindle more slowly. Turning at 600 RPM would only produce 100 msec pulses, and would be more than acceptably fast, perhapos even still too fast.

This is for a transformer winder.

Re: Optimize a TCRT5000L

<16ee69ff-f8a0-49b7-9fc4-5e95509d29cbn@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64163&group=sci.electronics.design#64163

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ac8:5f4b:: with SMTP id y11mr11741001qta.158.1622395296720; Sun, 30 May 2021 10:21:36 -0700 (PDT)
X-Received: by 2002:a37:a6c6:: with SMTP id p189mr13308720qke.161.1622395296546; Sun, 30 May 2021 10:21:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 30 May 2021 10:21:36 -0700 (PDT)
In-Reply-To: <1d23db6e-ce1b-4fbd-bc60-08d5a5160b02n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:646:9400:5330:e565:a812:9a18:1c46; posting-account=PVfQOwoAAAB7kRhNYCwddJrDyiT94AaP
NNTP-Posting-Host: 2601:646:9400:5330:e565:a812:9a18:1c46
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com> <65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com> <56808485-99e0-44d7-8287-94c3c2325b0cn@googlegroups.com> <1d23db6e-ce1b-4fbd-bc60-08d5a5160b02n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <16ee69ff-f8a0-49b7-9fc4-5e95509d29cbn@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: kei...@kjwdesigns.com (ke...@kjwdesigns.com)
Injection-Date: Sun, 30 May 2021 17:21:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 119
 by: ke...@kjwdesigns.com - Sun, 30 May 2021 17:21 UTC

On Sunday, 30 May 2021 at 05:56:45 UTC-7, rhor...@gmail.com wrote:
> On Saturday, May 29, 2021 at 9:12:41 PM UTC-5, ke...@kjwdesign.com wrote:
> > The LED is modulated synchronously with the measurement. It wouldn't be taken as a count as the MCU software is in control of it. It is implementing a lock-in amplifier as one of the other posters mentioned.
> So what happens when an LED modulation event is concurrent with a reflected light transition? The MCU can't detect a drop in reflectivity when the LED is shut down, and an increase in reflectivity coincident with an increase in the emitted light is difficult to distinguish.

You mentioned 2000RPM as the maximum speed That is 33Hz or about 30ms per rotation. If you have 180 deg of the shaft black and the rest whit then there will be ~15ms to sample the returned light. Even if modulated at 1kHz that is 15 hits. That is fast enough to allow some averaging and still guarantee that the white portion can be seen.

There is nothing magic about 1kHz. It could be a bit higher. I just ran my software task of a 1kHz timer interrupt and it was more than fast enough. One version I made serves two TCRT5000L sensors with the same processor.

> > > > The A/D results were compared, averaged and thresholded. I didn't need to do 150Hz but it could probably do it.
> I am still very concerned about aliasing and masking.

See above - the rates are such that it is not an issue.

> > The A/D is in the MCU to do the adjustable threshold of the detected light. It hasn't been turned into pulses at that stage.
> I am afraid I don't follow. How is a repetative change in signal levels not a chain of pulses?
> > The software determines the optimum threshold.
> Yes, of course.
> > An analog signal goes into the MCU, pulses come out.
> How is the analog signal not a set of pulses? The amplitude of the signal is changing due to pulses sent to the LED and due to sharply changing reflectivity. Admittedly, the pulses are probably not anything like rail to rail, nor are they particularly clean. That's why I added the Schmitt Trigger.

The Schmitt tigger will be in software so it can have an adaptive threshold.. I would give a small amount of capacitative filtering on the input, that's all.

> > Whether it is indicating RPM or counting rotations is pretty much the same requirement. The only difference is whether the time is involved.
> In practice, maybe yes and maybe no. A frequency counter can miss an occasional transition or register an occasional spurious one - especally if it is random - and still come up with a correct answer. The errors simple represent noise, and can readily be accounted for by averaging over a significant time period. Counting has no such luxury. Not even a single missed or spurious pulse is acceptable.
> > I was thinking of displays like this. It has just two wires for input; clock and data. No I2C multiplexing etc.
> >
> > https://www.aliexpress.com/item/1005001471048548.html?albpd=en1005001471048548&acnt=708-803-3821&aff_platform=aaf&albpg=743612850914&netw=u&albcp=1582410664&sk=UneMJZVf&trgt=743612850914&terminal_id=1bb4c0df3b9842ed8636cbd7c9ccf18d&tmLog=new_Detail&needSmbHouyi=false&albbt=Google_7_shopping&src=google&crea=en1005001471048548&aff_fcid=573c48c596a849fa8da8fda56beea4e6-1622340593353-04022-UneMJZVf&gclid=CjwKCAjwzMeFBhBwEiwAzwS8zNFYeu6XHhZcCPKB7hYTJtjmeV3J_vrAestW9bUXLm6IdIIZAqyM_BoCLjUQAvD_BwE&albag=59754279756&aff_fsk=UneMJZVf&albch=shopping&albagn=888888&isSmbAutoCall=false&aff_trace_key=573c48c596a849fa8da8fda56beea4e6-1622340593353-04022-UneMJZVf&device=c&gclsrc=aw.ds
> Oh, wow! I'm sold. One of those and an Arduino it is. I have a bunch of Arduinos coming in from Ali Express on the way already. Where can I find the communications protocol, or better yet, some sample Arduino code for driving one of these displays?
>
> Thanks a ton, by the way. This advice will save me a fair bit of cash, at the cost of a small amount of simple code writing. I can live with that.
> > I implemented it in an 8-pin device with plenty of room to spare.
> I have no doubt of that. Those displays are golden. In my case, I think I will stick with an Arduino Micro Pro. I will have them on hand in a couple of days, they are cheap enough, and I am already familiar with writing code for the Arduino. If I were building this as a commodity item for widespread sale, I probbaly would use some other controller, but this is a one-off for my own machine shop.

The Arduino is a good choice, I did my initial development on an Arduino as proof of concept and for ease of software development.

The standard Arduino toolset comes with a driver for the TM1637 displays. I have used a different 4 digit display to that 6-digit one but they use the same driver.

https://www.arduino.cc/reference/en/libraries/tm1637/

> > If you want it could just send pulses to the counter you are referring to but using 50-year-old 7490s to do the counting is very wasteful of components.
> I don't really see the point, here. How old the device design might be is irrelevant. To a significant extent, so is the parts count in and of itself. The decade counters are less than $0.50 each. Six of them cost less than the Arduino. It's the display drivers that are expensive, not to mention the pain of having 42 resistors with 96 traces on the PC board, which by the way needs to be a fairly large 4 layer board, twice as expensive as a 2 layer board. No, you have absolutely convinced me, but not because my proposed design employed LS7490s.

Ok, the 74LS90 is about 15 years younger but those older parts require much more wiring and board space.

A couple of other points:

Although you say you don't have much ambient light that does reduce contrast. Agreed LED lights have less infra-red than incandescents but it is not zero. I can saturate my solution with an LED flashlight.

I found it useful to shield the photodetector so it does not pickup light from anywhere other than the moving part - light from the emitter that gets reflected from other parts of the machine will reduce contrast. Although there is some directivity with both the emitter and photodetector I did have issues with light being reflected from other fixed parts of my system. Painting them black helped as did putting a black tube over the detector that finished close to the object being sensed.

Have you read this app note? https://www.vishay.com/docs/80107/80107.pdf

kw

Re: Optimize a TCRT5000L

<6681bce7-1155-462a-a472-2ea165e9da22n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64188&group=sci.electronics.design#64188

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:622a:48b:: with SMTP id p11mr13537628qtx.346.1622439095760; Sun, 30 May 2021 22:31:35 -0700 (PDT)
X-Received: by 2002:a05:620a:110d:: with SMTP id o13mr15147298qkk.348.1622439095581; Sun, 30 May 2021 22:31:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 30 May 2021 22:31:35 -0700 (PDT)
In-Reply-To: <16ee69ff-f8a0-49b7-9fc4-5e95509d29cbn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea; posting-account=cinlnAoAAABWWFgc_siC56jRtRTjUix2
NNTP-Posting-Host: 2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com> <65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com> <56808485-99e0-44d7-8287-94c3c2325b0cn@googlegroups.com> <1d23db6e-ce1b-4fbd-bc60-08d5a5160b02n@googlegroups.com> <16ee69ff-f8a0-49b7-9fc4-5e95509d29cbn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6681bce7-1155-462a-a472-2ea165e9da22n@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: rhorer...@gmail.com (rhor...@gmail.com)
Injection-Date: Mon, 31 May 2021 05:31:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 121
 by: rhor...@gmail.com - Mon, 31 May 2021 05:31 UTC

On Sunday, May 30, 2021 at 12:21:40 PM UTC-5, ke...@kjwdesigns.com wrote:
> On Sunday, 30 May 2021 at 05:56:45 UTC-7, rhor...@gmail.com wrote:
> > On Saturday, May 29, 2021 at 9:12:41 PM UTC-5, ke...@kjwdesign.com wrote:

> You mentioned 2000RPM as the maximum speed That is 33Hz or about 30ms per rotation. If you have 180 deg of the shaft black and the rest whit then there will be ~15ms to sample the returned light. Even if modulated at 1kHz that is 15 hits. That is fast enough to allow some averaging and still guarantee that the white portion can be seen.

Actually, in practice probably considerably slower. Your point is taken, however. This is certainly anything but a high speed application. You are correct anti-aliasing in software should not be difficult under these circumstances. One should merely require a number of input values to be equal(ish) before taking the result to be a 1/2 count. The duty cycle of the data pulse won't be 50%. It will likely be more like 20% or so, but your point still remains valid.
> There is nothing magic about 1kHz.

No, of course not. As long as the modulation rate is high compared to the pulse period, everything should work. If we take a very conservative pulse period of 3ms, a 1KHz modulation will probably not be quite good enough (at least not for me - I'm pretty paranoid about such things). A modulation rate of 5 - 10 KHz should be fine, however, allowing 15 - 30 timing pulses over the length of the mark transition. Of course the space length will be something like 100 - 300 pulses.

> It could be a bit higher. I just ran my software task of a 1kHz timer interrupt and it was more than fast enough. One version I made serves two TCRT5000L sensors with the same processor.

As I say, I'm pretty paranoid about such things. I always like to have an extreme margin of safety, unless cost or other considerations make it unreasonable. Upping the modulation rate a bit costs nothing.

> > > An analog signal goes into the MCU, pulses come out.
> > How is the analog signal not a set of pulses? The amplitude of the signal is changing due to pulses sent to the LED and due to sharply changing reflectivity. Admittedly, the pulses are probably not anything like rail to rail, nor are they particularly clean. That's why I added the Schmitt Trigger.
> The Schmitt tigger will be in software

Pretty neat isn't it? Emulating hardware using digital signal processing, I mean.

> so it can have an adaptive threshold. I would give a small amount of capacitative filtering on the input, that's all.

That (or inductive filtering) is always a good idea, whether the circuit is analog or digital, and whether low speed or high speed.

> The Arduino is a good choice, I did my initial development on an Arduino as proof of concept and for ease of software development.

Yeah, exactly. If this were to be a production item, then I would definitely look to using a less expensive MCU, but for a one-time use, the difference of two or three dollars isn't much of a hit. Not only that but the Arduino Pro Micro (and others, as well) has a built-in USB port both for power and programming. That tends to offset the slightly higher purchase cost. Connectors are outrageously expensive.
> The standard Arduino toolset comes with a driver for the TM1637 displays. I have used a different 4 digit display to that 6-digit one but they use the same driver.

Thanks. I found it. Some individuals have reported issues when using the library with 6 digit displays, but that was a couple of years ago. Hopefully those issues hav e been resolved.
> Ok, the 74LS90 is about 15 years younger but those older parts require much more wiring and board space.

At $5 per square inch, board space is indeed a real issue. The wiring not so much. They are just traces, after all.

> Although you say you don't have much ambient light that does reduce contrast. Agreed LED lights have less infra-red than incandescents

A WHOLE lot less. Close to 80% of a standard incandescent bulb's output is IR. The LED is closer to 5 - 10%.

> but it is not zero.

Well, there is zero and then there is Zero. Of course the LED does produce some IR. Anything carrying electrical current does. In this instance, I am fairly confidant the level of IR won't be significant.

> I can saturate my solution with an LED flashlight.

Oh, well, of course. I sell a 100 Watt (600 Watt equivalent) LED flashlight that can burn one's hand.

> I found it useful to shield the photodetector so it does not pickup light from anywhere other than the moving part - light from the emitter that gets reflected from other parts of the machine will reduce contrast. Although there is some directivity with both the emitter and photodetector I did have issues with light being reflected from other fixed parts of my system. Painting them black helped as did putting a black tube over the detector that finished close to the object being sensed.

The case will do that to a significant extent. It will surround the sensor, blocking off ambient light, although with a 30 degree acceptance window for the phototransistor, it may not make all that much difference, actually.. Perhaps more significantly, the entire case is going to put the shaft into a shadow, the lights being behind the bench. If need be, I could simply take a tube and surround the entire shaft where the sensor will lie. A hole cut in the tube could admit the case, attaching the case to the tube. 'Not a bad way of mounting the counter, actually.

> Have you read this app note? https://www.vishay.com/docs/80107/80107.pdf

I have now. 'No big surprises. Aluminum is an excellent reflector, so the shaft will be made of Aluminum (usually - it may vary depending on the project). The "hot spot" will be a mirror polished flat on the shaft. The rest of the surface will be knurled and maybe dyed. Blue layout fluid might work well, although one can neve be sure how reflecive a colored dye is in infrared. I also have some Black 2.0 that might work exceedingly well.

Re: Optimize a TCRT5000L

<60b4c1d3$0$22709$e4fe514c@news.xs4all.nl>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64195&group=sci.electronics.design#64195

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Newsgroups: sci.electronics.design
Subject: Re: Optimize a TCRT5000L
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com> <56808485-99e0-44d7-8287-94c3c2325b0cn@googlegroups.com> <1d23db6e-ce1b-4fbd-bc60-08d5a5160b02n@googlegroups.com>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Date: 31 May 2021 11:00:35 GMT
Lines: 16
Message-ID: <60b4c1d3$0$22709$e4fe514c@news.xs4all.nl>
NNTP-Posting-Host: ee88d1cf.news.xs4all.nl
X-Trace: G=QXG6kuRU,C=U2FsdGVkX1/MPa2ILM4P2fjJteBRXdplsPWvJYS6N8isSSedVjcgiyHFCJo84s99J0AXrB6g/dgyAJmJRFzhQCHVvIGwJhVxzUQ33IRRTMw1pPpa8HmoOgDl8X9cqfTA
X-Complaints-To: abuse@xs4all.nl
 by: none - Mon, 31 May 2021 11:00 UTC

In article <1d23db6e-ce1b-4fbd-bc60-08d5a5160b02n@googlegroups.com>,
rhor...@gmail.com <rhorerles@gmail.com> wrote:
>>
>>
>https://www.aliexpress.com/item/1005001471048548.html?albpd=en1005001471048548&acnt=708-803-3821&aff_platform=aaf&albpg=743612850914&netw=u&albcp=1582410664&sk=UneMJZVf&trgt=743612850914&terminal_id=1bb4c0df3b9842ed8636cbd7c9ccf18d&tmLog=new_Detail&needSmbHouyi=false&albbt=Google_7_shopping&src=google&crea=en1005001471048548&aff_fcid=573c48c596a849fa8da8fda56beea4e6-1622340593353-04022-UneMJZVf&gclid=CjwKCAjwzMeFBhBwEiwAzwS8zNFYeu6XHhZcCPKB7hYTJtjmeV3J_vrAestW9bUXLm6IdIIZAqyM_BoCLjUQAvD_BwE&albag=59754279756&aff_fsk=UneMJZVf&albch=shopping&albagn=888888&isSmbAutoCall=false&aff_trace_key=573c48c596a849fa8da8fda56beea4e6-1622340593353-04022-UneMJZVf&device=c&gclsrc=aw.ds

6 digit 7 segment LED display for around one euro.
This is quite enough url, thank you.
https://www.aliexpress.com/item/1005001471048548.html

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: Optimize a TCRT5000L

<aefa6192-c6af-478d-a35b-aea84c75b929n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64267&group=sci.electronics.design#64267

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:620a:806:: with SMTP id s6mr8795918qks.68.1622503587882;
Mon, 31 May 2021 16:26:27 -0700 (PDT)
X-Received: by 2002:a0c:a483:: with SMTP id x3mr19403655qvx.28.1622503587716;
Mon, 31 May 2021 16:26:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Mon, 31 May 2021 16:26:27 -0700 (PDT)
In-Reply-To: <fd9f710d-76cd-4605-aaa2-a7cdac1328c0n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=209.221.140.126; posting-account=vKQm_QoAAADOaDCYsqOFDAW8NJ8sFHoE
NNTP-Posting-Host: 209.221.140.126
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
<65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>
<s8vcae$vt$1@dont-email.me> <fd9f710d-76cd-4605-aaa2-a7cdac1328c0n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aefa6192-c6af-478d-a35b-aea84c75b929n@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: whit...@gmail.com (whit3rd)
Injection-Date: Mon, 31 May 2021 23:26:27 +0000
Content-Type: text/plain; charset="UTF-8"
 by: whit3rd - Mon, 31 May 2021 23:26 UTC

On Sunday, May 30, 2021 at 6:41:19 AM UTC-7, rhor...@gmail.com wrote:

> This is for a transformer winder.

Then you don't want a single sensor; it won't know forward from
backward, and if it ever stops near a transition, it could count
many transitions, you'd never know.

Instead, do what old mice did; use two sensors, in quadrature, to sense steps in
forward and/or backward direction. Maybe, too, you could count partial rotations. Ten
steps per revolution would be useful sometimes, like for ensuring entry/exit on the same
side of a pot core for a given winding.

Rather than reflective, slotted wheel with transmissive sensors are the common approach here.
The light intensity is independent of wheel offset, and you KNOW the transparency of
a hole or slot.

Re: Optimize a TCRT5000L

<b96abbe5-99ea-452e-8a70-444055c4359an@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64322&group=sci.electronics.design#64322

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ac8:5fd5:: with SMTP id k21mr22380349qta.231.1622597002812;
Tue, 01 Jun 2021 18:23:22 -0700 (PDT)
X-Received: by 2002:a37:670b:: with SMTP id b11mr6673885qkc.406.1622597002672;
Tue, 01 Jun 2021 18:23:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Tue, 1 Jun 2021 18:23:22 -0700 (PDT)
In-Reply-To: <aefa6192-c6af-478d-a35b-aea84c75b929n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea;
posting-account=cinlnAoAAABWWFgc_siC56jRtRTjUix2
NNTP-Posting-Host: 2600:1700:eb1:5520:e8f1:9ebe:1f0e:27ea
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com>
<65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com>
<s8vcae$vt$1@dont-email.me> <fd9f710d-76cd-4605-aaa2-a7cdac1328c0n@googlegroups.com>
<aefa6192-c6af-478d-a35b-aea84c75b929n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b96abbe5-99ea-452e-8a70-444055c4359an@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: rhorer...@gmail.com (rhor...@gmail.com)
Injection-Date: Wed, 02 Jun 2021 01:23:22 +0000
Content-Type: text/plain; charset="UTF-8"
 by: rhor...@gmail.com - Wed, 2 Jun 2021 01:23 UTC

On Monday, May 31, 2021 at 6:26:30 PM UTC-5, whit3rd wrote:
> On Sunday, May 30, 2021 at 6:41:19 AM UTC-7, rhor...@gmail.com wrote:
>
> > This is for a transformer winder.
> Then you don't want a single sensor; it won't know forward from
> backward, and if it ever stops near a transition, it could count
> many transitions, you'd never know.

'Good point.
> Instead, do what old mice did; use two sensors, in quadrature, to sense steps in
> forward and/or backward direction. Maybe, too, you could count partial rotations. Ten
> steps per revolution would be useful sometimes, like for ensuring entry/exit on the same
> side of a pot core for a given winding.
>
> Rather than reflective, slotted wheel with transmissive sensors are the common approach here.
> The light intensity is independent of wheel offset, and you KNOW the transparency of
> a hole or slot.

'Also a good point. It's a bit harder to implement, however, and less flexible in terms of the target.

Re: Optimize a TCRT5000L

<bfca9dbd-61c5-42a5-b71c-d06f3b27ac76n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=64325&group=sci.electronics.design#64325

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ad4:4447:: with SMTP id l7mr11164158qvt.36.1622598805695; Tue, 01 Jun 2021 18:53:25 -0700 (PDT)
X-Received: by 2002:a05:622a:44:: with SMTP id y4mr22630873qtw.258.1622598805521; Tue, 01 Jun 2021 18:53:25 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr3.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Tue, 1 Jun 2021 18:53:25 -0700 (PDT)
In-Reply-To: <b96abbe5-99ea-452e-8a70-444055c4359an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=209.221.140.126; posting-account=vKQm_QoAAADOaDCYsqOFDAW8NJ8sFHoE
NNTP-Posting-Host: 209.221.140.126
References: <a89dba02-501d-4c2f-94e5-33a9e5d27801n@googlegroups.com> <65ec3c41-70f7-4d67-a8e9-c6b2c35ff28an@googlegroups.com> <52049357-3862-4ac7-9577-00742f93e9fen@googlegroups.com> <s8vcae$vt$1@dont-email.me> <fd9f710d-76cd-4605-aaa2-a7cdac1328c0n@googlegroups.com> <aefa6192-c6af-478d-a35b-aea84c75b929n@googlegroups.com> <b96abbe5-99ea-452e-8a70-444055c4359an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bfca9dbd-61c5-42a5-b71c-d06f3b27ac76n@googlegroups.com>
Subject: Re: Optimize a TCRT5000L
From: whit...@gmail.com (whit3rd)
Injection-Date: Wed, 02 Jun 2021 01:53:25 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 14
 by: whit3rd - Wed, 2 Jun 2021 01:53 UTC

On Tuesday, June 1, 2021 at 6:23:25 PM UTC-7, rhor...@gmail.com wrote:
> On Monday, May 31, 2021 at 6:26:30 PM UTC-5, whit3rd wrote:

> >...do what old mice did; use two sensors, in quadrature, to sense steps in
> > forward and/or backward direction.

> > Rather than reflective, slotted wheel with transmissive sensors are the common approach here.

>'Also a good point. It's a bit harder to implement, however, and less flexible in terms of the target.

If you could ensure the target (presumably a rotating cylinder) was , say, 1" diameter,
you could blacken it and apply a 1/4" strip of aluminum tape for the mark. It should
be possible to get quadrature with two sensors at 1/8" shift in the circumferential
direction. The coil winders I've used had a Jacobs chuck for a holder,
and such chucks have a cylindrical girth available.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor