in this thread I tried to minimize the number of components for a video caputre.
The sync separation level can be adjusted with a poti. It was possible to trigger reliably on the frame change sync pulse, but to detect the line syncs reliably was not so well working.
Some people statet that a LM1881 would be necessary for a good sync separator.
But I developed another diskrete solution some years ago whch works quite stable with my C-MOS camara.
During my experiments with the propeller sync separation I had the impression that the switching level of the propeller inputs may not be as stable as expected but I'm not so sure. Probably other people can contribute some information about the input characteristics of the digital propeller pins.
Chris: Your circuit looks AC coupled, which I think is required for general purpose use. I think some kind of trim pot, like you have, is going to be required to bias right above threshold... I'll try out your circuit if I get a chance.
But, I'm really just doing a proof of principle (AKA having fun!) right now and mine works well enough, although it only works with Prop generated video (and isn't entirely stable)...
The reason your circuit works with the Prop and not other sources is that the Prop's output is DC coupled and ground-referenced. Therefore, fluctuations in amplitude from the Prop will not shift the sync tip level. Most video sources are AC-coupled, which means the signal will vary, centered on its average value. This implies that the higher the amplitude, the lower the sync tips will be. Chris's circuit includes a DC restorer (clamp) ahead of the first stage, which guarantees that the sync tips will be at a fixed level. This is necessary for reliable sync detection and also for consistent analog-to-digital conversion.
Phil: I think you're right. On the other hand though, I think the only practicle application for this is to allow the easy use of those cheap, tiny video cameras with the Prop... I don't know, and haven't tested, but my guess is that they are also DC coupled...
PS:· As a side note, I initially presumed (as I think deSilva did) that Perry's code only captured one horizontal line per vertical sync, meaning that it would take several frames to complete an image.· But, that is not the case, it captures and entire frame at a time...
Here's a circuit that will provide a stable sync signal to the Prop:
The 75R termination resistor is necessary, since some video sources (including the Prop with the usual D/A resistors) provide an incorrect source impedance. What this means is that from video source to video source, the unterminated P-P voltage can vary from 2V (the correct value) all the way up to 5V. The resistor is there to give a consistent 1V P-P. The pot sets the bias point for the sync tips and needs to be adjusted for the best separation. The setting is dependent upon the Prop's logic threshold, which can vary from part to part. The 220K resistor is there to apply a gentle bias current to the cap to make sure that the signal eventually causes the diode to conduct and clamp the sync tips.
The output from this circuit should have a low enough impedance that it can also be used as the input to a delta-sigma ADC without further amplification.
Phil: Looks good. I think it's similar to Chris's circuit. I think it'd be nice to also send that signal the ADC. But, doesn't the diode affect the shape of the video signal?
No. All the diode does is clamp the sync tips to a known voltage. As a consequence the entire video signal shifts up or down, but the shape does not change.
I think there's a slight bug with the first pixel in each row... For some reason, it is out of bounds of the 6-bit resolution. I think maybe the phase tracker isn't being initialized correctly.
The video capture code tries to capture one byte each line before saving the line data to fix this, perhaps two bytes might be better.
When testing the synchronization circuit, check both mostly white and mostly black screens, simple circuits like these move the sync point slightly because of the video content.
Perry
P.S.
I see your PSM is nearly ready for shipment, Any ideas of price yet?
Perry: I intend to offer an initial price of $95 (a bit lower at the expo...). That's really the best I can do. If it were mass produced, I imagine it could be a lot less, but I'm working in small volumes. The price will probably increase later...
I have done a lot of work to this project lately and want to give an update of it's status.
There is a new set of schematics in the first post, learning from the propeller backpack and input from Phil Pilgrim on this thread.
The inputs are now AC coupled.
I have made a significant change to the sync separator. There is a 75 ohm termination on the input circuit, even the LM1881 and it's clones do not work well without this resistor. It now uses two diodes and two extra pins at high and low output to bias the input pin to its best detection point. I rarely have sync problems with this new circuit.
I plan to publish the new code, but it needs some more cleanup.
The present code captures and plays 64x192 video with 17500 Hz audio and writes that to a SD card at 30 frames per second in real time.
I am convinced that is possible to add color to this project, and am pursuing two options for that now.
a simple SD video recorder/player at 30 fps an 17500 Hz 8bit audio
trying to control is via an infra red remote has been difficult
Compile 8bc_video.spin as player, recorder or viewer
SHOW display real time
PLAY play recorded video VIDEO0.POP
RECORD increase name of VIDEO?.POP and records some video
Still a work in progress
Cogs used
0 this one for control
1 infra_red input
2 tv display
3 audio in adc
4 audio out duty DAC
5 video in adc and 15750 khz audio buffer fill
6 fsrw/safe_spi
Ray
Color capture is still a dream
may have to move SD from 0,1,2,3 though
grayscale ?
PLAY play recorded video VIDEO0.POP with 8bc_Video.bin in play mode
any standard video at say 12,13,14 see old man with way too much time on his hands
sorry Phil
I use winRAR it works for zip's too
This is such a finicky program, I just had to update before making changes
Ok, I see your new circuit is it the top post, right?
It looks like you now have two pins for sync seperation. What's going on there?
There are actually three pins needed for the sink separation now.
Two are used to establish a bias voltage for the third as an input.
an 147K resistor also goes from the input pin to ground.
The two extra pins used are held at output high and output low.
A resistor diode resistor are placed between those pins to establish a
bias voltage just above the voltage of the propellers input threshold.
Negative pulses from standard video signals is suplied through
another diode and a capacitor.
I have uploaded my latest copy of what I now call "Amazing Video" to the first post on this thread, it now contains a lengthy clip of the "Flintstones".
This project does not have any difficult construction problems. The ADC circuits are built with standard 5% resistors, I just bend one lead of a resistor and solder the short end to the sigma delta output and the longer end to the input pin on the proto board. I then solder the input resistor of the ADC circuit to the upper end of the first resistor.
If you don't like the InfraRed remote control I can easily make a keyboard option.
The latest version does not use LM1881 but I have added a LED to show that the system in "Show" or "Record" mode (OOP's better update the schematics). If you have no video input it also works a a nice audio recorder.
OK now the rant.
I believe that I can do color with not much more circuitry, but no one has called me on this assertion, or asked how it might be done. My proto board is getting shopworn, after changing the audio input to make room for what might be the color inputs it seems there is some short between the audio/video inputs. I just spent two days trying to clean it up, but the sun is down now.( I really can't see those little parts that well without full sunlight. I have cleaned up the the interference pretty well but still have some. Will try again tomorrow.
Take a look at my proto board now, if there were electronic rats it would make a nice home.
Comments
in this thread I tried to minimize the number of components for a video caputre.
The sync separation level can be adjusted with a poti. It was possible to trigger reliably on the frame change sync pulse, but to detect the line syncs reliably was not so well working.
Some people statet that a LM1881 would be necessary for a good sync separator.
But I developed another diskrete solution some years ago whch works quite stable with my C-MOS camara.
During my experiments with the propeller sync separation I had the impression that the switching level of the propeller inputs may not be as stable as expected but I'm not so sure. Probably other people can contribute some information about the input characteristics of the digital propeller pins.
chris
But, I'm really just doing a proof of principle (AKA having fun!) right now and mine works well enough, although it only works with Prop generated video (and isn't entirely stable)...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
The reason your circuit works with the Prop and not other sources is that the Prop's output is DC coupled and ground-referenced. Therefore, fluctuations in amplitude from the Prop will not shift the sync tip level. Most video sources are AC-coupled, which means the signal will vary, centered on its average value. This implies that the higher the amplitude, the lower the sync tips will be. Chris's circuit includes a DC restorer (clamp) ahead of the first stage, which guarantees that the sync tips will be at a fixed level. This is necessary for reliable sync detection and also for consistent analog-to-digital conversion.
-Phil
PS:· As a side note, I initially presumed (as I think deSilva did) that Perry's code only captured one horizontal line per vertical sync, meaning that it would take several frames to complete an image.· But, that is not the case, it captures and entire frame at a time...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Post Edited (Rayman) : 6/15/2009 3:32:14 PM GMT
The 75R termination resistor is necessary, since some video sources (including the Prop with the usual D/A resistors) provide an incorrect source impedance. What this means is that from video source to video source, the unterminated P-P voltage can vary from 2V (the correct value) all the way up to 5V. The resistor is there to give a consistent 1V P-P. The pot sets the bias point for the sync tips and needs to be adjusted for the best separation. The setting is dependent upon the Prop's logic threshold, which can vary from part to part. The 220K resistor is there to apply a gentle bias current to the cap to make sure that the signal eventually causes the diode to conduct and clamp the sync tips.
The output from this circuit should have a low enough impedance that it can also be used as the input to a delta-sigma ADC without further amplification.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
It is the same as my circuit. The value of the parts are varied.
Rayman, do you trigger only on the frame sync or do you also trigger on each line?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Nice to see some activity oon this project.
The video capture code tries to capture one byte each line before saving the line data to fix this, perhaps two bytes might be better.
When testing the synchronization circuit, check both mostly white and mostly black screens, simple circuits like these move the sync point slightly because of the video content.
Perry
P.S.
I see your PSM is nearly ready for shipment, Any ideas of price yet?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
There is a new set of schematics in the first post, learning from the propeller backpack and input from Phil Pilgrim on this thread.
The inputs are now AC coupled.
I have made a significant change to the sync separator. There is a 75 ohm termination on the input circuit, even the LM1881 and it's clones do not work well without this resistor. It now uses two diodes and two extra pins at high and low output to bias the input pin to its best detection point. I rarely have sync problems with this new circuit.
I plan to publish the new code, but it needs some more cleanup.
The present code captures and plays 64x192 video with 17500 Hz audio and writes that to a SD card at 30 frames per second in real time.
I am convinced that is possible to add color to this project, and am pursuing two options for that now.
Perry
Amazing Video Capture
a simple SD video recorder/player at 30 fps an 17500 Hz 8bit audio
trying to control is via an infra red remote has been difficult
Compile 8bc_video.spin as player, recorder or viewer
SHOW display real time
PLAY play recorded video VIDEO0.POP
RECORD increase name of VIDEO?.POP and records some video
Still a work in progress
Cogs used
0 this one for control
1 infra_red input
2 tv display
3 audio in adc
4 audio out duty DAC
5 video in adc and 15750 khz audio buffer fill
6 fsrw/safe_spi
Bill
Hope people can use RAR extensions.
Does the color capture work at all?
Is the grayscale capture improved now?
I'd also love to see a photo of the TV screen...
-Phil
Color capture is still a dream
may have to move SD from 0,1,2,3 though
grayscale ?
PLAY play recorded video VIDEO0.POP with 8bc_Video.bin in play mode
any standard video at say 12,13,14 see old man with way too much time on his hands
sorry Phil
I use winRAR it works for zip's too
This is such a finicky program, I just had to update before making changes
At one time I had the IR control working.
Using the TV output of a PSB, I just changed TV pins to %001_0000 (toward bottom of program) and SD base pin to 4 (towards top of program).
I see your using my Propeller video player... Just when I thought that was underappreciated...
PS: I think you need shave!
The low resolution gray scale is actually perfect for "On Prop" video processing (such as for a robot).
Thanks for watching.
Found my pesky problem with infraRed decoder (old solder joint came loose)
It looks like you now have two pins for sync seperation. What's going on there?
There are actually three pins needed for the sink separation now.
Two are used to establish a bias voltage for the third as an input.
an 147K resistor also goes from the input pin to ground.
The two extra pins used are held at output high and output low.
A resistor diode resistor are placed between those pins to establish a
bias voltage just above the voltage of the propellers input threshold.
Negative pulses from standard video signals is suplied through
another diode and a capacitor.
Thanks for the clarification. Can you just use Vdd and Gnd instead of using Prop pins if those 2 are always held in low or high?
No, that's how the former version was done. This new way is taken from the propeller backpack manual, with the addition of the diodes.
This is a challenge and a bit of a rant!
I have uploaded my latest copy of what I now call "Amazing Video" to the first post on this thread, it now contains a lengthy clip of the "Flintstones".
This project does not have any difficult construction problems. The ADC circuits are built with standard 5% resistors, I just bend one lead of a resistor and solder the short end to the sigma delta output and the longer end to the input pin on the proto board. I then solder the input resistor of the ADC circuit to the upper end of the first resistor.
If you don't like the InfraRed remote control I can easily make a keyboard option.
The latest version does not use LM1881 but I have added a LED to show that the system in "Show" or "Record" mode (OOP's better update the schematics). If you have no video input it also works a a nice audio recorder.
OK now the rant.
I believe that I can do color with not much more circuitry, but no one has called me on this assertion, or asked how it might be done. My proto board is getting shopworn, after changing the audio input to make room for what might be the color inputs it seems there is some short between the audio/video inputs. I just spent two days trying to clean it up, but the sun is down now.( I really can't see those little parts that well without full sunlight. I have cleaned up the the interference pretty well but still have some. Will try again tomorrow.
Take a look at my proto board now, if there were electronic rats it would make a nice home.
Thanks for your indulgence.
Perry