I recently bought this "car camera" as a cheesy way to get a decent sized display at a cheaper price. Most searches for displays for IoT/making end up in touch enabled puny screens, which are 3-10x the price of this entire unit. I don't care for touch, so I was happy to just "salvage" the display from this combo & the camera just becomes a bonus.
However, giving it a try, I found out that it's a rather nice unit that works beautifully with minimal configuration as a closed circuit camera system, and it's pretty cheap for that purpose. I'm actually considering getting a few of them, and set up a full monitoring system.
I'm just day dreaming about it in peace & quiet, meanwhile dad saw it & passed a comment: "Oh, is it a CCTV? does it record?"
*Thanks dad, thanks a lot!* I thought... but "yeah, you can just use a DVR (and 'repurpose' the monitor muhaha)" is what I said.
But it immediately hit me... can I build something simple that takes the video information, processes it for future retrieval & saves it on an SD card? Preferably with an MCU like a Raspberry Pi Pico or an ESP32?
Why not? I thought. It's a dumb RCA cable, carrying some low-def video... what's so fancy that I can't bruteforce with >200MHz sampling rate, how complicated can it be that I won't be able to handle with multiple ADC channels anyway? Like a FOOL!
So, I looked up the composite video signaling and timing
information.
Aside from the fact that it's a fucking old tech, that 40's researchers took straight to the grave before it was properly uploaded to the modern Internet, whatever information is publicly available, is quite incoherent & fragmented across multiple sources.
But eventually I understood how things work.
BTW, the inherent strength of multi-bit representation with level shift can't be denied, and it's going to start showing up in high speed digital data communications... like DDR5 or PCIe 5.0 starting to use PAM4.
Approach 1: wack 10, ease 10
- Use ADC to read the levels for an entire scanline as an array
- Fill with some special character for no change in values in next pixel
-
Ignore phase/hue (ain't nobody got time for measuring phase
shifts)
- Send as character bytestream to SD card storage over SPI
Approach 2: wack 5, ease 1
- Use or emulate something like MAX9526 to convert the analog composite stream to RGB or YCbCr (digital) framebuffer by taking both the interleaved frames
- Running some simple deinterlace filter
- Then convert the I-frame into a bitmap
-
Consider using a hardware codec to compress the image to
acceptable size
-
Alternatively, use a hardware codec to create a video directly
from the buffers
- Save the media over to the SD card
- Go to next frame(s) and repeat.
Approach 3: wack 3, ease 7
- Use a composite capture card with USB interface
- Read USB data signal with a Pico & broadcast it through an nRF24
-
Capture it with another nRF24, and pass it to another Pi
Pico over SPI
- Connect the Pico to a computer, posing as capture card through its TinyUSB stack
Comments
Post a Comment