Simulating a CRT corner frequency with an LED

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

I'm attempting to do what I can with an AVR clocked at 12MHz to turn on an LED and back off simulating that of a CRT tv.
 

 

I have a device here that was designed to look for this characteristic. The band-pass filter in the above graph has a corner frequency at around 15kHz ( the horizontal refresh rate for CRTs in the 1980s ). I had a great deal of luck with flashing an LED on and off. No reason behind the numbers. 

 

 

for (char i=0;i<5;i++)
            {
                PORTD &= ~0x20;
                _delay_us(.2);
                PORTD |= 0x20;
                _delay_us(.2);
            }

and this works pretty well....But I want to try and see if I an get the right duration here and simulate this.

 

I found a write up where a university attempted to change this corner frequency. It explains in detail what is going on with the device and how it works.

http://www1.cs.columbia.edu/~sed...

 

In the shortest sense, the device reads light coming from the CRT and makes an attempt to distinguish it from other light. The light it is after is a bright square that is drawn on a frame. That frame in this case is 8ms but I'm sure the phosphor does not persist for that long. From what I can tell the device is looking for that sharp point where the light is most prevalent to its vanishing point. If I read that chart right that is about 15KHz (66 us) if my math was right. 

 

Using a quick flash like

			PORTD &= ~0x20;
			_delay_us(66);
			PORTD |= 0x20;

Does not work at all. I'm guessing because the LED itself has a persisting value. Had better luck with the guess work above. I may need to get a specific LED if I can find details on this data.

 

Am I going at this wrong?

 

 

 

 

 

 

 

 

 

 

 

Last Edited: Thu. Jun 4, 2020 - 02:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Remember, don't confuse the bode plot (freq response) with timing.  You can only generalize.

 

Be sure to hook a scope to your detector circuit to see what it is seeing...then you have some hope.

 

and this works pretty well.

You say nothing, what works well & how well?   Also, how do you know the leds have the proper brightness  1 mcd or 5000 mcd???

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:

I'm guessing because the LED itself has a persisting value.

 

An LED that doesn't rely on phosphor, so most LEDs that aren't white, will switch on in under 10ns and off in a bit more than that. LEDs that use phosphors take longer, up to a couple of hundred nanoseconds.

 

So that's not your problem.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What you are looking for is called "visual persistence" or, more popularly, "persistence of vision" (POV).

 

The graph you included does not show actual brightness, but brightness as perceived by the eye. Thus, anything you do to measure this by instruments will not show that response curve. 

 

A CRT, on the other hand, DOES have phosphor persistence (that is, it continues to emit light for a short time after the electron beam is turned off). An LED will NOT simulate this (very well); the only kind of LED that comes anywhere close is a white LED that uses a phosphor to convert long ultra-violet (UV) light into broad spectrum white light. However, the phosphor used in these LEDs has a short persistence, and will, in the end, not give you much behavior like a CRT. 

 

In short, you CAN use an LED to show you visual persistence of your eye. But, this will NOT show you phosphor persistence that was common for TV picture tubes. They are two totally independent mechanisms. They were used together, however, especially at UK's 50Hz interlaced refresh rates. 

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You say nothing, what works well & how well?   

Because the ending result is working, in other words, the device thinks it saw light (%75-%80 of the time). 

 

Also, how do you know the leds have the proper brightness  1 mcd or 5000 mcd???

 

I do not know, merely guess work at this point. 

 

 

 

 

Ok, thx for the info, so now I'm left to not necessarily simulate the CRT but to satisfy the photo diode in the device. Evidently I'm doing it, just not well enough (7 out of 10 tries work i'd say), can I make it better using any sort of math/science or is this guess work my only hope I guess is the question. From the electronic point of view a photo diode is going to have some sort of light tolerance and it works in tangent with the resister value to look for a burst of light (my understanding). Since the LED has no persistence, turning on the LED that produces enough light should trigger the photo diode, I think? This can be tested to some extent by putting a scope/analyzer on the photo diode and comparing the two i'd guess.

 

 

 

 

Last Edited: Thu. Jun 4, 2020 - 11:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

can I make it better using any sort of math/science or is this guess work my only hope I guess is the question

You can try to ensure the detector and photodiode are at least wavelength compatible...look up the photodiode datasheet.   You could cobble up some diode/RC combo to supply led led, so it fades in/out rather than click on/off.

Use the scope to see what is going on, it will tell you more than we can.

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you trying to emulate a light pen, or a "gun" from an old arcade shooting game?

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can try to ensure the detector and photodiode are at least wavelength compatible...look up the photodiode datasheet.   You could cobble up some diode/RC combo to supply led led, so it fades in/out rather than click on/off.

Use the scope to see what is going on, it will tell you more than we can.

 

 

Yup, that is the next plan... thx.

 

 

 

 Are you trying to emulate a light pen, or a "gun" from an old arcade shooting game?

Yeah kind of,  I'm designing an adapter that reads light and sends light.

[gun]-[my adapter]-[light source.]

Aside from the timing I plan to essentially make the light gun work on other TVs.  A good example would be the old CRT VGA. The timing should be correct but clearly the flashing light is not recognized %100. As per that link above, you can alter the Band pass filter and make it work. I'm attempting to do it with a photo diode and LED. I can read the CRT with no issue but flashing the LED to mimic what the light gun wants to see is the tricky part.

 

 

Last Edited: Fri. Jun 5, 2020 - 01:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ka7ehk wrote:
A CRT, on the other hand, DOES have phosphor persistence (that is, it continues to emit light for a short time after the electron beam is turned off).
VERY short time.

https://www.youtube.com/watch?v=2nQ_gEJ6B4A

Close examination of that video (frame by frame) shows a very rapid decay of several stop within 100 µs, and effectively complete decay within 500 µs.

 

So:

S_K_U_N_X wrote:
That frame in this case is 8ms but I'm sure the phosphor does not persist for that long. From what I can tell the device is looking for that sharp point where the light is most prevalent to its vanishing point. If I read that chart right that is about 15KHz (66 us) if my math was right.
... would seem to be about right.

 

EDIT:  Even more impressive:

https://www.youtube.com/watch?v=3BJU2drrtCM

From:

https://arstechnica.com/gadgets/2018/01/video-demonstrates-the-marvel-of-crt-displays-at-380000-frames-per-second/

 

EDIT2:  If only I had $8K for LG's 77" OLED!

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Fri. Jun 5, 2020 - 03:30 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 If I read that chart right that is about 15KHz (66 us) if my math was right.

Do a slow freq sweep with your led & monitor the circuit with the scope.  You will soon see what freq gives the peak response.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!