TIFF to SSTV MkI

Forum for discussion of SSTV topics. Slow Scan television (SSTV) is a picture transmission method used mainly by amateur radio operators, to transmit and receive static pictures via radio in monochrome or colour.

Moderators: Dave Moll, Andrew Davie, Steve Anderson

TIFF to SSTV MkI

Postby Steve Anderson » Sun Feb 25, 2024 5:05 pm

As mentioned recently (somewhere), here's an initial go at generating SSTV audio files from JPGs, GIFs and many other image formats. The results should be better than those generated from 625/525 video sources.

This has yet to be built and the software written but I've done it before, though using different hardware.

The first diagram below is the where the bulk of the signal manipulation/conversion is done. There is some work to be done by a human prior to this, a 256x256 monochrome TIFF file needs to be generated, this could be the 'artistic' part. Re-framing/cropping/re-sizing the original to 256x256, converting to monochrome, and saving as a TIFF file. The output is a Cop McDonald standard SSTV subcarrier signal (128-line, 128 pixel) which can be recorded via (say) Audacity and the like. There is room for expansion here. Currently 4 chips with the optional flash memory, one 20-pin and three 8-pin.
TIFF to SSTV 1A.gif

The second diagram is a filter to clean up the final output to a large degree...
TIFF to SSTV 2A.gif
TIFF to SSTV 2A.gif (8.96 KiB) Viewed 423 times


For those that cannot program the micro I'm willing to do it for you (when we get to that stage), though there are some in the UK who may volunteer.

There is more to come....
Steve A.

There already been some minor changes to the above, so the above drawings are not valid. They just give you an idea of the scope of the project.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5390
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: TIFF to SSTV MkI

Postby Harry Dalek » Sun Feb 25, 2024 9:55 pm

Watching Steve and hope it gos ok might be something i can build also in the future if it works out .
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5377
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: TIFF to SSTV MkI

Postby Steve Anderson » Mon Feb 26, 2024 1:28 pm

...nice to know someone's interested! I'll get on with this in the coming week, though I'll have to find and fire up my SSTV-to-625 Up-converter, otherwise I'll be guilty of not being able to show screen-shots as well. I'm sure it's here somewhere! Though it too could do with a re-design and simplification.

There's two reasons I've chosen the PIC18F14K50 for the processor, 1) I have quite a few in stock for some reason, 2) It has an USB 'Engine' which would allow direct and fast PC-to-Micro communication. But if anyone has even glanced at the USB specification/protocol, it's a minefield! I haven't tried hard, but I hope to find some reliable code for this function somewhere 'out there'...

If USB turns out to be a no-go for some reason an almost identical micro less the USB part is the PIC18F14K22. USB is a 'nice to have' item, but a good old UART is quite OK here, even RS232! The circuit above takes that route, but allows for USB use in the future.

I use a FTDI 'cable' as they call them, a USB connector on one end, and bare wires on the other. I fit a 9-pin D-type with a similar layout to RS232, but the voltage levels are either 3.3V or 5V depending on which one you choose. They go up to 3M baud if you need that! Datasheet attached. Distributor link at the end.

Or you can use 'true' RS232, +/-12V (or so) signals by adding a MAX3232 chip for 3.3V, NOT a MAX232 which is designed for a 5V supply. That's if your PC has true RS232 I/O, very few (none?) these days do.

If you really want to get to grips with USB, one starting point might be here...good bedtime reading!

https://www.beyondlogic.org/usbnutshell/usb1.shtml

One of the more onerous tasks associated with this SSTV image generation method may be the preparation of the TIFF file which is then converted into the SSTV wave file by this unit. This does require human effort, but once you get into the rhythm of it, it's not so bad.

Steve A.

I originally uploaded the wrong file, this one is correct. I use either the TTL-234X-5V-WE (5V signals), or TTL-234X-3V3-WE (3.3V signals). Here we need the 3.3V version.

You must make sure that if you put a 9-pin D-type on the cable end, you DO NOT plug it into a true RS232 port, hence the 'TTL' within the part numbers...or use some form of unique connector so there's no mix-ups...

DS_TTL234X-SERIES-RANGE-OF-CABLES.pdf
(587.68 KiB) Downloaded 19 times


https://ftdichip.com/sales-network/global-suppliers/
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5390
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: TIFF to SSTV MkI

Postby Harry Dalek » Mon Feb 26, 2024 5:06 pm

I am Sure Steve others are also but just very quietly !
I can just watch as its a bit over my head apart from solder this to that ! :)
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5377
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: TIFF to SSTV MkI

Postby Steve Anderson » Mon Feb 26, 2024 7:16 pm

Well, as you can see it's a lot simpler than the one you're working on at the moment, and probably uses far less power.

This could be adapted to capture 625 video frames, and that would add a few simple chips, maybe something to do later. I would also need to find or borrow a source of 625 video. The only source I might have is if our set-top box outputs 625. But of course I have no control over the picture content. We don't have a VCR, camcorder or DVD player anymore, they were never used in recent years and simply failed. Probably the electrolytics drying out or mechanical stuff rotting or perishing, belts, pinch rollers etc. No point in fixing them if not used.

Anyway, there is still the issue of replacing the CA3306, sources are drying up and it's only 6-bit, though two can be 'cascaded' to make a 7-bit version...if you have some or can get them.

Steve A.

But what we do have which has replaced the VCR is an external SATA drive attached to the set-top box. Although the start/stop times can be set, there's no way to change channels at set times, so it too is pretty useless.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5390
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: TIFF to SSTV MkI

Postby Harry Dalek » Wed Feb 28, 2024 4:28 pm

Steve Anderson wrote:Well, as you can see it's a lot simpler than the one you're working on at the moment, and probably uses far less power.

This could be adapted to capture 625 video frames, and that would add a few simple chips, maybe something to do later. I would also need to find or borrow a source of 625 video. The only source I might have is if our set-top box outputs 625. But of course I have no control over the picture content. We don't have a VCR, camcorder or DVD player anymore, they were never used in recent years and simply failed. Probably the electrolytics drying out or mechanical stuff rotting or perishing, belts, pinch rollers etc. No point in fixing them if not used.

Anyway, there is still the issue of replacing the CA3306, sources are drying up and it's only 6-bit, though two can be 'cascaded' to make a 7-bit version...if you have some or can get them.

Steve A.

But what we do have which has replaced the VCR is an external SATA drive attached to the set-top box. Although the start/stop times can be set, there's no way to change channels at set times, so it too is pretty useless.


When i get back to my monitor i was building and rudely interrupted by the SSTV project the PC video card will be programmed with modeline if need be can output 625 line easy or what ever but what i am getting at is there have been vga video cards that can also output 625 line infact i think i have one of those still also bit limiting to what my gaming video card can do now but no programming needed it outputs vga and 625 line ....why ? i suppose for those that wanted their TV to be a poor pc monitor
I think if you have an interest to do this you really need something handy when needed ,i know you don't want junk laying around but if your pc video card can do it when needed its there am you could then display what you want . If not that there must be a small something that does it these days .

On the A/D converter ic i think i have another i will track it down again if its any good .

It looks of cause a lot less than the TTL project but i think its pretty complex in side but a lot less wiring problems i suppose tacking on ic to ic
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5377
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: TIFF to SSTV MkI

Postby Harry Dalek » Fri Mar 01, 2024 7:06 am

I came across the other ADC ic its a ADC0820CCN but mine says B9130 above that
Texas_Instruments-ADC0820CCN_NOPB-datasheet.pdf
(503.87 KiB) Downloaded 17 times
Attachments
s-l1600.jpg
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5377
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: TIFF to SSTV MkI

Postby Steve Anderson » Fri Mar 01, 2024 12:49 pm

Well, the ADC0820 looks OK with one exception - it's too slow. Depending on which mode it's set to, the conversion time is either 1.5 or 2.5us. way too slow for converting 525/625, even only monochrome, forget composite colour.
It's a shame as for some reason I have a few kicking around here....no idea why I have them!

1.5us yields a sample rate of 666.6kHz, a bandwidth of maybe(?) 300kHz, about ten times too slow. The 2.5us sample time = 400kHz, a bandwidth of 200kHz maximum. In practise maybe 150kHz.

It might just do conversion 625-NBTV 32 lines, the only reason being the NBTV lines are vertical.

Back to the drawing board!

For SSTV with a 1:1 square aspect ratio and the active 625 line time of 52us you end up with about 39us of video that needs sampling 128 times/pixels, =39/128=0.305us/sample, = a sample rate of 3.28MHz. That's assuming the whole of the 625 active frame is used vertically.

The expression 'active video' means the part of the line or frame that has actual video information, not blanking or syncs, likewise vertically.

This is the reason the CA3306 is so popular for this application. It may only be 6-bit but it's sample rate can be 10MHz, some to 15MHz. The 8-bit version, the CA3308 is similar in speed, but I've never seem any that are available. If they were, they would be at a hideous cost! I'm tempted to try the 'Dual Version CA3306 Cascaded 7-bit A-D' as shown in some datasheets, not as many bits as we might like, but it's a step in the right direction.

But as I mentioned previously converting 625/525 to SSTV usually results in a less-than-ideal outcome.

Calculations are approximate, but close enough to outline the requirements.

Steve A.

The TIFF-to-SSTV method may require more human input, but from my own results it's worth the effort. You only need do it once and slowly build up a library of SSTV frames.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5390
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: TIFF to SSTV MkI

Postby Harry Dalek » Fri Mar 01, 2024 9:58 pm

Steve Anderson wrote:Well, the ADC0820 looks OK with one exception - it's too slow. Depending on which mode it's set to, the conversion time is either 1.5 or 2.5us. way too slow for converting 525/625, even only monochrome, forget composite colour.
It's a shame as for some reason I have a few kicking around here....no idea why I have them!


Oh i see ,i am the same i would have no clue why i have it or when i got it ,might of pulled it out of some thing but looks pretty clean if its old ,least i know not to bother with it

I can see why the other ADC CA3306 is used if there is no real replacement these days or much need ? so i suppose stringing 2 together twice as much work .
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5377
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: TIFF to SSTV MkI

Postby Steve Anderson » Wed Mar 06, 2024 11:45 am

For 525/625-to-SSTV there are plenty of 8-bit A-to-Ds 'out there' that will convert at well over the 3MHz I mentioned. The headache for us is the packaging, not hobbyist friendly. Basically few or none in DIL/DIP packaging. SOIC I can cope with, but a smaller pin-pitch than 1.27mm, half the usual 0.1"/2.54mm, is a no-go for me.

A more determined search is called for! Hopefully I'll find something in current production and will be for at least a few years to come. That's yet another problem, chips go obsolete very rapidly these days. They don't have the longevity they used to.

Steve A.

As I mentioned before, I don't think video-to-SSTV is as useful as it might first appear. Once you've captured yourself, your family, your cat/dog/car/house etc. it begins to become a pain to find good and interesting subjects. Whereas stills from a camera, the 'net or scanned printed material is endless.

Technically it doesn't require the fast A-D which video does. Plus if the source is composite PAL/NTSC separating out the colour subcarrier cleanly is a challenge. It's for these and other reasons I perfer going the TIFF-file to SSTV route. Each SSTV frame requires a bit more work than video-to-SSTV, but I feel the results are worth it. But that's just my opinion.

I'm working on such a device now, but it's still at the design stage. Hardware construction is a litlle while away, but the preliminary drawings I've posted show the probable extent of it.

Plus I'll have to do a new SSTV-to-625 up-converter, I simply can't find where the old/first one has vanished to! A while back I did make a start on a revision, but somehow it got stalled. It's well due for an update! Using serial RAM should cut down on the large amount of wiring or PCB tracks required. A single processor rather than two, if possible, also helps, though that might be quite a task!
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5390
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: TIFF to SSTV MkI

Postby Steve Anderson » Fri Mar 08, 2024 6:56 pm

I've created an alternate version of this TIFF-to-SSTV conveter using a PIC18F25K20 which is in a 28-pin DIL/DIP package, which provides a lot more I/O but no USB 'engine'. Though I'll probably try the 20-pin PIC18F14K50 version first, and if possible with a functioning USB I/O. No guarantees on the USB though, all new to me.

So until I get the USB working, if ever, I'll withold posting circuits or other stuff, though I will continue with the UART system.

Just remembered there is a 28-pin USB version, the PIC18F2550. It's been around for years, so there must be code somewhere I can 'borrow'. But to speed things up for now I'll leave the USB part for later and stick with a good old UART at first, they're fast enough for this application. So for now it is the 20-pin PIC18F14K50.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5390
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand


Return to SSTV

Who is online

Users browsing this forum: No registered users and 2 guests