Move-E-Stor MkI

Forum for discussion of electronic television. Generally, stuff to do with CRTs and not using mechanical displays.

Move-E-Stor MkI

Postby Steve Anderson » Sat Dec 18, 2021 1:19 pm

A new thread to continue the 'FotoStor' thread which split off into a a full NBTV record/playback device...here's where it left off...

Here's a quick look at the two waveforms from a WAV file during creation. Track 1 is the usual NBTV signal at 400Hz, Track 2 is the audio at 1kHz at nominal maximum, -6dbFS. The sampling rate is 32kHz, 80 samples per line including syncs. It is planned to add 24kHz and 48kHz. The 'Front Porch' will vanish in the final version, though I may leave it as an option, along with a similar 'Back Porch'. Maybe 0.5 Gamma encoding too for linear signals as below, decoding also where needed.

Initial Waveform 01.gif


The prototype may use a 40-pin DIL/DIP device, but I'm hoping to squeeze it into a 28-pin version in due course.

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

Re: Recording & Playback of NBTV, DC-coupled v2.0.

Postby Steve Anderson » Sat Dec 18, 2021 2:53 pm

The WAV file format is reasonably easy to understand, the bit you need to concentrate on is the header, and that's just a few small parts of it. There is no 'footer', the file just ends on the last sample.

wave-bytes.gif
wave-bytes.gif (14.49 KiB) Viewed 7802 times


For two tracks of 16-bits there are only 16 bytes out of these first 44 that need altering depending on the sampling rate (24, 32, and 48kHz in this case), the Sample Rate and the Byte Rate (each 4 bytes). Also the Subchunk2Size and the ChunkSize (also 4 Bytes each). Subchunk2Size is the number of bytes in total for all the audio data that follows it. The ChunkSize is Subchunk2Size+36 (0x24). It may seem a little awkward/confusing but the micro will sort it out for you, this is just background information if interested. All the others stay unchanged from above.

For a fuller explanation see here:-

http://soundfile.sapp.org/doc/WaveFormat/

The next issue I need to sort out is file storage. SD cards seem a good option and I did make a start some years ago with them, certainly large enough in capacity and easy to use. But not the easiest to write code for and using the no-license-required SPI mode may restrict their speed...time will tell.

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

Re: Recording & Playback of NBTV, DC-coupled v2.0.

Postby Steve Anderson » Sun Dec 19, 2021 12:43 am

A note on SD cards and formatting...

This applies in general to all uses of SD cards, not just this application...from the SD Association....

The SD Memory Card Formatter formats SD Memory Card, SDHC Memory Card and SDXC Memory Card (respectively SD/SDHC/SDXC Cards) complying with the SD File System Specification created by the SD Association (SDA).

It is strongly recommended to use the SD Memory Card Formatter to format SD/SDHC/SDXC Cards rather than using formatting tools provided with individual operating systems. In general, formatting tools provided with operating systems can format various storage media including SD/SDHC/SDXC Cards, but it may not be optimized for SD/SDHC/SDXC Cards and it may result in lower performance.

The SD Association provides freely-downloadable SD Formatter software to overcome these problems for Windows and Mac OS X.


It's a quick and simple install...

https://www.sdcard.org/downloads/formatter/

There's also a users guide further down the page.

Steve A.

Later: When I started writing code for SD cards the original SDSC (standard capacity) cards were still available, it seems not any more. The next iteration is the SDHC cards (high capacity) of 4, 8, 16 & 32GB. These are still plentiful, fast and cheap. But use/buy decent ones, SanDisk or Kingston. I'll have to massage the code to suit.

Though I get the feeling I may have to do a similar exercise when the SDHC versions are made no more and force migration to SDXC cards (eXtended Capacity of 32GB plus).

Speed, it appears, shouldn't be a problem with these more recent cards, both SDHC and SDXC,
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Recording & Playback of NBTV, DC-coupled v2.0.

Postby Steve Anderson » Sun Dec 19, 2021 1:24 pm

Next issue, designing the anti-aliasing filter(s) for the input A-Ds. If using analogue filters, Bessel for the video, Butterworth for the audio. Or jump straight in and use FIR versions. The advantage of FIR filters is that by simply changing the clock frequency the pass-band and stop-band are readjusted for the new sampling frequency, plus they're linear-phase, a bonus for video. With analogue filters you'd need three versions for the three sample rates proposed, and one per channel, a total of six.

So, more to be considered...

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

The Move-E-Stor MkI

Postby Steve Anderson » Mon Dec 20, 2021 1:38 pm

A quick note just to say I've given this device a name in a similar theme to the FotoStor, that device being primarily used only for stills. This is for full-motion NBTV video plus sound, the Move-E-Stor.

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

Re: Recording & Playback of NBTV, DC-coupled v2.0.

Postby smeezekitty » Mon Dec 20, 2021 3:24 pm

Steve Anderson wrote:A note on SD cards and formatting...

This applies in general to all uses of SD cards, not just this application...from the SD Association....

The SD Memory Card Formatter formats SD Memory Card, SDHC Memory Card and SDXC Memory Card (respectively SD/SDHC/SDXC Cards) complying with the SD File System Specification created by the SD Association (SDA).

It is strongly recommended to use the SD Memory Card Formatter to format SD/SDHC/SDXC Cards rather than using formatting tools provided with individual operating systems. In general, formatting tools provided with operating systems can format various storage media including SD/SDHC/SDXC Cards, but it may not be optimized for SD/SDHC/SDXC Cards and it may result in lower performance.

The SD Association provides freely-downloadable SD Formatter software to overcome these problems for Windows and Mac OS X.


It's a quick and simple install...

https://www.sdcard.org/downloads/formatter/

There's also a users guide further down the page.

Steve A.

Later: When I started writing code for SD cards the original SDSC (standard capacity) cards were still available, it seems not any more. The next iteration is the SDHC cards (high capacity) of 4, 8, 16 & 32GB. These are still plentiful, fast and cheap. But use/buy decent ones, SanDisk or Kingston. I'll have to massage the code to suit.

Though I get the feeling I may have to do a similar exercise when the SDHC versions are made no more and force migration to SDXC cards (eXtended Capacity of 32GB plus).

Speed, it appears, shouldn't be a problem with these more recent cards, both SDHC and SDXC,

At audio frequencies, I can't imagine SD card formatting would make a bit of difference. At high-bit-rate HD video, sure I could see it but an SD card is chilling when playing .wav files
smeezekitty
Just nod and pretend you understand me
 
Posts: 229
Joined: Fri Jan 29, 2010 11:42 am
Location: USA

Re: Recording & Playback of NBTV, DC-coupled v2.0.

Postby Steve Anderson » Mon Dec 20, 2021 10:01 pm

smeezekitty wrote:At audio frequencies, I can't imagine SD card formatting would make a bit of difference. At high-bit-rate HD video, sure I could see it but an SD card is chilling when playing .wav files

You're probably more than right, but I mentioned it as few seem to know about this, and it may make a difference in some situations, as you mention. Put it this way - it can't do any harm!. ...unless really overdone perhaps...

Just remember, you are FORMATTING the card! So save anything valuable on it elsewhere first! It's not the same as defragmenting a drive which hopefully preserves everything on it as it does so...though there is little reason to defragment a drive these days...

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

Re: Move-E-Stor MkI

Postby Steve Anderson » Mon Dec 20, 2021 10:34 pm

I've done quite a bit of design work on this "Move-E-Stor" today, suffice to say that I won't be needing to use a 40-pin device for the initial prototype, I'll go straight in with a 28-pin device. Probably a PIC18F25K20 which as it, the SD card and D-A are 3v3 devices will make all the additional glue-logic (not much, if any) 3v3 also.

I'm also hoping to make the analogue sections +/-5V in addition, but no guarantees at this stage.

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

Re: Move-E-Stor MkI

Postby Steve Anderson » Tue Dec 21, 2021 12:02 am

An initial design concept of the "Move-E-Stor MkI"...analogue externals to be added later...

Steve A.

The final schematic versions will be in higher resolution.

The next day...I have deleted the attached drawing as I realised it was the wrong version. The correct and updated version will be uploaded soon.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Move-E-Stor MkI

Postby Steve Anderson » Tue Dec 21, 2021 12:35 am

Here's a quick way to find the value of the BRG (baud rate generator) you wish to use for a PIC16/18 micro...

An error of +/-3% seems to be OK for PICs, though I try to aim for +/-1%. I wish they'd put a real definition on what is an acceptable error figure!

Steve A.

PIC BRG CALCULATOR 1.xlsx
(10.25 KiB) Downloaded 189 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Move-E-Stor MkI

Postby Steve Anderson » Wed Dec 22, 2021 4:34 pm

Updated and correct version of the main circuit diagram attached...click image for higher-res version, use 'BACK' to return here...

Steve A.

Move-E-Stor Main 1v1.gif
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Move-E-Stor MkI

Postby Harry Dalek » Wed Dec 22, 2021 5:02 pm

Hi Steve sounds like the correct way to go but where does the stylus go ? :lol:
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: 5364
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: Move-E-Stor MkI

Postby Steve Anderson » Wed Dec 22, 2021 6:29 pm

Good question Harry, something I've not thought about...

I punched a few buttons on the calculator and came up with these storage figures...

For two channels (audio and video) both sampled at 48kHz, 16-bit = 11.52MB/min, or 691.2MB/hr.

For two channels (audio and video) both sampled at 32kHz, 16-bit = 7.68MB/min, or 460.8MB/hr.

For two channels (audio and video) both sampled at 24kHz, 16-bit = 5.76MB/min, or 345.6MB/hr.

Note that not all bits in each sample are used, but they have to be included.

With that, even just using SDHC cards of 4, 8, 16 or 32GB capacity, you end up with quite a bit of recording/playback time. Once this is done I may look into using SDXC cards with their even greater capacity.

However, perhaps someone could check my figures?

Steve A.

Before anyone asks, no, I'm not going to include 44.1kHz or any derivative of it. I know why we have it, but it's just such an awkward number.

https://en.wikipedia.org/wiki/44,100_Hz
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Move-E-Stor MkI

Postby Steve Anderson » Thu Dec 23, 2021 2:25 pm

Updated schematic from yesterday. As I suspected the micro has had to go to a 40-pin device for the prototype due to the manual 'transport controls'. But I hope to replace it with a 28-pin device later.

Ignore notes in magenta...click image as before for higher-res version, 'BACK' to return.

Steve A.

I've just noticed a slight mishap in the capacitor idents, corrected in master.

Move-E-Stor Main 1v2.gif
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Move-E-Stor MkI

Postby Steve Anderson » Thu Dec 23, 2021 2:33 pm

The tables mentioned above...

Steve A.

Move-E-Stor Main Tables 1v2.gif
Move-E-Stor Main Tables 1v2.gif (11.18 KiB) Viewed 7665 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Next

Return to Electronic NBTV

Who is online

Users browsing this forum: No registered users and 11 guests