Maker Pro
Maker Pro

Recording digital data to analog tape... revisited

  • Thread starter Lewin A.R.W. Edwards
  • Start date
D

Dave VanHorn

You need at least NINE kHz. There is no second harmonic in a square
wave, but there is every odd harmonic. Preserving the third and fifth
gets you a fair approximation to a square wave, but the phase-shift in a
cassette recorder makes the 15 kHz response (if any) of little
advantage.

We don't particularly need a good reproduction of the waveform, so I think
less is adequate.
 
J

John Woodgate

I read in sci.electronics.design that Dave VanHorn <[email protected]>
wrote (in said:
We don't particularly need a good reproduction of the waveform, so I think
less is adequate.

You should get to 9 kHz OK. That's what your waveform looks like - a
typical bent sine wave.
 
J

John Woodgate

I read in sci.electronics.design that Dave VanHorn <[email protected]>
wrote (in said:
You heard me..

The screw was holding a transistor and it's heat sink, to the PCB.
It was supposed to be installed pointing up, with the nut on top, so that
the extra length pointed up into the heat sink area.. They installed it
pointing down, because it was easier to handle. This made the screw contact
the can of an electrolytic.

I'd call that a 'reverse-oriented' screw or a 'screw inserted in the
wrong direction'.
Now, the can is insulated from the cap terminals, > 10Mohms

Why did this cause the reg to go up in flames?
Only you can tell.
 
D

Dave VanHorn

I'd call that a 'reverse-oriented' screw or a 'screw inserted in the
wrong direction'.

I suppose, but it sounds funnier this way :)
Only you can tell.

Well, remember I said it was a switcher? This is the two-transistor type
flyback that runs VFD displays, -30V, -10V, and 7VAC output.

Connecting the collector of the switching transistor to ground through about
3300pF capacitance through the cap case, caused the oscillation frequency to
drop drastically, to where the inductor would be way into saturation, and it
was pretty much down hill from there.

Everyone saw the mechanical problem, everyone checked for short to ground
(which would have flamed the transformer) and everyone saw that the case of
the cap was floating. Our (at that time) new VP of engineering from Sperry
who at one time took on the problem as his personal project, attribuited it
to "insufficient noise current, and failure to start"..
 
R

Rich Grise

Hi Dave,


Hmm. Coincidences:

My wife (not an electronics person) rolls her eyes when she sees the
stacks of equipment I need. She said "Don't most people have just one
oscilloscope?" (See part of my "electronics workspace" at home
<http://www.larwe.com/workspace.jpg>). The problem is, I actually need
at least one more scope - I'd like a HP 54645D like I use at work -
because I need something with deep memory. The 16-channel
mini-logic-analyzer is very useful too.

Where would you put it? For that matter, where do you put the DUT?

;-)
Rich
 
R

Rich Grise

Many years ago at a satellite engineering company I walked past a VMEbus
crate some softies had just switched off and saying "whoops, that burning
smell isn't a good sign". I sniffed and said "I think a couple of tantalum
caps have caught fire, have a look in the corners next to the bus
connectors".

They looked quietly impressed, and no I didn't sabotage it! :)

When you open a pressurized HV power supply with a blown selenium stack or
two, it literally clears the room!

Cheers!
Rich
 
R

Rich Grise

We don't particularly need a good reproduction of the waveform, so I think
less is adequate.
--

Well, how do they get 56KBPS(Kbps?) down a 3KHz channel? Wouldn't that work
on a cheap tape recorder? Or 9600, for that matter.

Thanks,
Rich
 
J

John Woodgate

I read in sci.electronics.design that Dave VanHorn <[email protected]>
wrote (in said:
I suppose, but it sounds funnier this way :)

OK, for me that is the perfect excuse. I often use it.
Well, remember I said it was a switcher? This is the two-transistor type
flyback that runs VFD displays, -30V, -10V, and 7VAC output.

Connecting the collector of the switching transistor to ground through about
3300pF capacitance through the cap case, caused the oscillation frequency to
drop drastically, to where the inductor would be way into saturation, and it
was pretty much down hill from there.

Everyone saw the mechanical problem, everyone checked for short to ground
(which would have flamed the transformer) and everyone saw that the case of
the cap was floating. Our (at that time) new VP of engineering from Sperry
who at one time took on the problem as his personal project, attribuited it
to "insufficient noise current, and failure to start"..
[Rude noise.]

People, the more elevated the more likely, get caught out by relatively
naive observers because they 'see what they expect to see'. I recall
some senior people in the lab I'd just joined marvelling at the fact
that the fault in a piece of important test gear had been causally
diagnosed by a passing quality technician, (who also happened to be a
Pakistani, and this was in 1955). What did they expect? He was
accustomed to see fried resistors while they were accustomed to 'see'
excessive differential phase-shift, or something similar.

An improvement to the method of assembly of a module containing a
transformer was introduced at one of our factories by a 15 year old
trainee.
 
J

John Woodgate

I read in sci.electronics.design that Lewin A.R.W. Edwards
ink.net>) about 'Recording digital data to analog tape... revisited', on
Sun, 3 Oct 2004:
My wife (not an electronics person) rolls her eyes when she sees the
stacks of equipment I need. She said "Don't most people have just one
oscilloscope?"

Believe it or not, this has been seriously discussed at one of the IEC
EMC committees. I threw in a passing remark about it, as a caution
against inadvertently introducing requirements that would lead to
creating ludicrous situations.

Most people don't have ANY oscilloscopes. The fact that I have five (and
up to three might be in operation simultaneously) doesn't create a
situation that affects the harmonic levels on the UK supply system to a
detectable extent!
 
D

Dave VanHorn

I'd call that a 'reverse-oriented' screw or a 'screw inserted in the
OK, for me that is the perfect excuse. I often use it.

Well, maybe I should have said "more memorable".
 
J

John Woodgate

I read in sci.electronics.design that Dave VanHorn <[email protected]>
wrote (in said:
Well, maybe I should have said "more memorable".
You're a man after my own heart (but you can't have it!). I put
outrageously colourful phrases in dry-as-dust texts on standards, so
that people remember what I wrote, while they forget the others.
 
H

H. Peter Anvin

Followup to: <[email protected]>
By author: [email protected]
In newsgroup: comp.arch.embedded
How did you handle the final bit, especially if zero? Either you
create a final clock pulse to shift it out, or you need to specify
that the recording is terminated with an extra 0 bit, as I see it.
That way you use the clocking edge to set the detection window,
while shifting out the previous bit.

There was a preamble and a postamble; the data was also subdivided
into blocks. The preamble was, among other things, used to establish
the proper position of the byte boundaries.

However, it's not really necessary, at least in theory; for a terminal
zero bit it would look like:

| | | | <- bit times

+------------------------------------------ etc
|
------+

(no transition in the detection window, followed by nothing.)

.... for a terminal one bit it looks like:

| | | | <- bit times

+-----+
| |
------+ +------------------------------------- etc

(transition in detection window, followed by nothing.)

Typically, though, you'd finish with a CRC or checksum and then have a
postable (usually of some number of zero bits.)

-hpa
 
H

H. Peter Anvin

Followup to: <[email protected]>
By author: "Dave VanHorn said:
This is kind of like "The best way to ski, is to use skis, but I want to use
a bathtub"..

Using a cassette tape in 2004 is already using a bathtub.

Think about it: a MultiMediaCard requires only a handful of wires and
resistors to interface with, and can store 128 MB on a tiny device
costing $17.97 retail. A CompactFlash needs more wires, but 128 MB
costs $9.99 retail and the interface is a lot simpler. (FWIW, both
are current prices from tigerdirect.com.)

At 3125 bits per second, 128 MB is 5461 minutes (91 hours) of storage
even using "disk drive maker's megabytes." Given that, it seems
downright ridiculous to build a device using a cassette tape for data
storage except in downright bizarre circumstances.

-hpa
 
L

Lewin A.R.W. Edwards

even using "disk drive maker's megabytes." Given that, it seems
downright ridiculous to build a device using a cassette tape for data
storage except in downright bizarre circumstances.

Partial contents of a destroyed cassette tape can be recovered in
fragments using nothing more than a home workbench and patience. A
damaged flash chip is gone forever.

Cassettes and tape players are cheap, standardized and readily available
around the world. Flash media are not as readily available, are
balkanized, and it's at least 2x, more like 3x the cost to put in a
flash device as it would be to put in a cassette recorder mechanism
(~$7) and tape (~$0.50).

Note also that this project is an _extension_ of an existing project.
I'm simply making it more general-purpose. The original project was to
record a running telemetry stream on the audio track of a camcorder, so
that an external box next to the TV set could decode the telemetry and
display it while the video was being played back. The requirement was
not to modify the camcorder at all.
 
D

Dave VanHorn

Ah CAMCORDER! Now I understand the reluctance to modify.
You may have said that before, I've been rather under the weather this
weekend, I may have missed it.
 
L

Lewin A.R.W. Edwards

Ah CAMCORDER! Now I understand the reluctance to modify.
You may have said that before, I've been rather under the weather this
weekend, I may have missed it.

This is why the subject line said "revisited". I asked some questions
about this project in its initial incarnation a while ago. At that time
it was purely for camcorder use.

The original project - and it's going up on my web site soon, I promise-
was either:

a) to store telemetry data on the audio track of a camcorder,
synchronized with the image, or

b) to devise some reasonably solid method for putting sync marks onto
the videotape, so that a (flash or HDD-based) log could be
cross-referenced to the video stream.

The design restriction is: minimum possible reverse-engineering of the
cameras in use. It's acceptable to put a few patch wires into the
switches and buttons so they can be controlled remotely. It's NOT
acceptable to reverse-engineer any part of the analog or digital signal
paths inside the device and tap in anywhere, since there's no guarantee
that any particular tap-point will be available in a different model of
camera.

The circuit controls either a camcorder or a digital still camera (DSC)
over either async serial or SPI. For example, in powerdown mode it
disconnects the main power input to the camcorder. When the vehicle's
main controller requests it to start recording, it:

* applies power to the camcorder's battery terminals
* activates outputs that set the camera's mode switch to "record"
* "presses" the record button
* monitors the REC LED and signals back to the host if that LED goes out
(which signifies end-of-tape).

It can do similar tricks with a DSC. Someone pointed out to me that the
DSC control functions would be even more useful if there was a way of
recording the telemetry stream (since it's being sent out anyway, may as
well use it). Audio cassettes are by far the best and easiest way of
doing this. So that's why I'm looking at the problem. Seems like I have
it almost solved.
 
R

Robert Gush

Lewin A.R.W. Edwards said:
Hi Lewin,

You are using Manchester coding (biphase'M' I think).
The problem is that the cassette recorder introduces a lot of phase
shift.
If you put an all-pass filter after it with a pot to adjust the
turnover frequency (I can't remember if you need lead or lag) you
should be able to get the waveform a lot better.

With the Spectrum I wrote routines that used a similar coding scheme
to record at 4800 baud. The nice thing about this coing scheme is that
it is self clocking.

The only difference in the method I used was that I sent a lot of
zeroes (the low frequency) so that the clock edge sync occurred as
quickly as possible and then sent a '1' to indicate start of data.

I used to regularly save & load up to 48k of data error free.

Good luck

Robert
 
H

H. Peter Anvin

Followup to: <[email protected]>
By author: "Lewin A.R.W. Edwards said:
Is this not _exactly_ what I described? :) (Serious question. I can't
see the difference between what you just wrote and what I described as
being the actual encoding system in use).

Looks indeed what you described. There was a whole bunch of
discussion about Manchester coding in between, which is polarity
dependent and therefore not appropriate. I went back in the thread
and what you describe is indeed exactly MFM.
That's exactly what I do. I calculate the average bit cell during the
sync acquisition phase. There are several sources of clock instability -
tape fluctuation is one, but also both the encoder and decoder are
implemented on AVR micros using the internal RC oscillator, and the
encoder at least can be subjected to temperature extremes. So I thought
it best to adapt the decoder dynamically, since the signal clock rate
will be drifting around more or less constantly.

Sounds good. If you want to use your bandwidth a little more
efficiently you can use RLL, but if your tape deck/camcorder is of
decent quality you shouldn't have to.

Another option is to issue a sync signal on one of the stereo
channels, and the data signal on the other.

-hpa
 
R

Rich Grise

The circuit controls either a camcorder or a digital still camera (DSC)
over either async serial or SPI. For example, in powerdown mode it
disconnects the main power input to the camcorder. When the vehicle's
main controller requests it to start recording, it:

* applies power to the camcorder's battery terminals
* activates outputs that set the camera's mode switch to "record"
* "presses" the record button
* monitors the REC LED and signals back to the host if that LED goes out
(which signifies end-of-tape).

It can do similar tricks with a DSC. Someone pointed out to me that the
DSC control functions would be even more useful if there was a way of
recording the telemetry stream (since it's being sent out anyway, may as
well use it). Audio cassettes are by far the best and easiest way of
doing this. So that's why I'm looking at the problem. Seems like I have
it almost solved.

Is there any possibility of injecting a video signal? Like a video out/
video in, where you could or-in some titles or VBI data or something?
That'd be the obvious choice if there's a lot of digital data. I've seen
pro-grade video decks, and they have a time track, that you could
probably stuff some data on, but that all requires getting to the video
stream before it hits the tape.

Good Luck!
Rich
 
Top