Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Day/date/time onto cassette ... ??

Status
Not open for further replies.

john1

Active Member
Hi,

I'm looking for a way to put signal(s) on to a cassette tape,
to represent day/date/time.

Such signals would have to give the day/date /time when they
get read and displayed.

So far i have not had much success in trying to think of a
way to generate such signal(s) to go onto a cassette.

If anyone could offer any suggestions as to how i might make
such a signal(s), please suggest away !

I don't mind how curious or weird such a suggestion might be.

Cheers, John :)
 
I should have mentioned ...
i intend to read the cassette on a fairly standard Win98se desktop PC.
 
To do this you need to convert the digital data into audio tones, use one tone for a '0' and another tone for '1', on playback convert the tones back to 0's and 1's. Basically a simple modem.

There used to be standards for this, I seems to remember it was called CUTS - Cassette User Tape System?.

It does seem a rather bizarre thing to be doing in the 21th century, more 1970's than anthing else :lol:

Is there a specific reason for wanting to do it this way?, particularly as PC's don't have tape interfaces.
 
Hi Nigel,

Thanks for responding.
I will try to find out more about 'Cuts'.
If i do use existing methods then i would like to stick to the
standard way that it is usually done, rather than trying to
come up with some home made code.

Yes you are quite correct, i would need to convert the date/time
into a signal to go on to the tape, then convert back on playback.

I was going to make a small circuit-board to do such a conversion
from audio tones (i was considering clicks) back to noughts and
ones for the PC to read.

Your mentioning that the audio to digital is a simple modem has
altered my take on this.

I don't know if you meant to suggest using a modem, probably not.
But the modem could possibly be used to read the audio signals
from the cassette player, directly into the computers system.

My knowledge of the 'Haynes' coding is minimal, but i feel that
the 'Haynes' switch codes should be able to cover this.

So the playback end of this might not be too difficult to set up.

Which takes me back to the recording end of this.

Well this is a method i had not considered up to now, but it might
be very much easier than some of the things that i had seriously
considered. Although i still have not thought of a way to generate
the date/time. This is such a universal requirement that i think
i must be missing something obvious. Maybe cannibalising the clock
assembly from a Video Cassette Recorder or from a Microwave
Cooker might be a way to get the date/time on demand.

If i can get the audio cassette unit to record the date/time when
told to do so, in a way that can be read later on my PC, i will
consider that a big step forward.

I am willing to sacrifice a modem for this if that is necessary.

********************

You seem to think that this is possibly not the best way to go
about this. Maybe it isn't. There may well be a much better way
to log unattended events. If there is something i have missed
or haven't thought of that might be a better way to do this i
would be very interested.

One possibility that comes to mind is a floppy drive unit and a
custom built processor assembly. But i haven't given that much
thought. The write cycle may actually take longer than an audio
cassette, not that speed is important for this anyway.

John :)
 
john1 said:
You seem to think that this is possibly not the best way to go
about this. Maybe it isn't. There may well be a much better way
to log unattended events. If there is something i have missed
or haven't thought of that might be a better way to do this i
would be very interested.

Yes, it doesn't sound the best way to me - it sounds complicated and like hard work :lol:

How many samples, over what time period, are you wanting to store?.

If you look at my PIC tutorials at http://www.winpicprog.co.uk under the I2C tutorials, I use a battery backed CMOS clock chip (which gives day and time information) in one tutorial, and a 24C256 - 32KB EEPROM in another, which can store 32,767 8 bit samples.

You've never mentioned what you are actually wanting to sample, but using a PIC with A2D built-in (like a 16F876), the CMOS clock (PCF8583), an EEPROM (24C256 - add more for more storage), and a serial interface (MAX232 or simple resistor) - you have a fairly competent data logging system, using just 3 or 4 chips (and no moving parts). Other clock chips are available, Dallas make popular ones - with a similar sort of specification.

If you want to investigate tape systems, I still have my old manuals which gives software and hardware for a CUTS tape system, using 6502 - I could try and dig them out!.
 
You cod sacrefice a tape recorder. Yust Conect the write/read heed to mic and the delete head to the speacer out.Wean you want to read/write to the tape push REC on the tape recorder.The else is up to the software.

PS:
He didn't ment the internet modem.He meant a device that wod covert the "bep bep bep" from the catete in "10110" for the computer(Which is a modem of some kind)
 
Hi Nigel,

Ive spent some time going over your site, sites as there seem to
be two. And yes, i am beginning to think that you are right, using
tape cassettes may not be the best way to deal with this project.

You also mention that i wasn't clear about what it is that i am
intending to sample. Thats true, so i will try to set out what i
want to do in general terms.

Around my home i have placed a few sensors over the years, some
years ago the water pipes froze in my attic during a very cold
spell and split open a couple of joints.
I was very fortunate on that instance as the situation could have
easily been much worse. The freeze up must have happened during
the night, and when i got up later on, the attic pipes were still
frozen, but the water feed downstairs was ok, so all seemed well
and i didn't notice anything amiss. Until i washed up some dishes,
the hot water from the tap was not coming out at its usual rate,
and seemed to be reducing. After a short while it was down to a
dribble, yet the rising main was fine and normal. So i checked it
out, and found that the attic water tank that feeds the hot water
system was empty, with a layer of ice across the top where the
water surface is usually, holding the ball-co ck closed, sitting
there like a sheet of glass with the ball-co ck embedded in it.
Well i didn't just break the ice, and hope all would be well, as i
have met this sort of thing before.
I had a good look around at the pipes, and the fittings, and soon
saw that a couple of joints were damaged.
This annoyed me cos i knew that as soon as things warmed up during
the day, they would become fountains of water unless i turned the
water feed to the house off.
So i had to turn off the water feed to the house.
The burst sections were soon dealt with and i fitted an additional
in-line tap in the attic where the rising main feeds the tanks,
so that in future i could keep the water feed to the rest of the
house. Almost no water was spilt into my attic, and i consider
that a bonus, as i keep lots of bits and pieces up there.
So i fitted the first of my 'sensors' into the attic, by the water
tanks. If the temp dropped to almost freezing, a light comes on in
my front room, and also in my bedroom, to let me know.
The following year i fitted up a small fan heater in my attic just
to come on with that sensor, it has only come on once this winter,
and only briefly.
Later i fitted a sensor by my front door, to ring a little bell up
the end of the garden, cos often people would go to the front door
and i didn't always hear the knocker, so if i was in the garden i
would sometimes miss them. That also works a little light in my
front room.
Over the years i have added to the various sensors, and for a while
i have been thinking of making some sort of logging for them.
Such logging need only be pretty basic, if a fairy were to make
notes for me, they only need to be something like this:

02 on 14:25 11/1/04
04 on 17:00 11/1/04
04 off 17:00 11/1/04

and so on, just a list of numbers and date/times with on or off.
Since i have box-loads of cassette tapes, i was thinking of using
them as logging records thinking that maybe a year would probably
fit on to each cassette.
However since reading some of your stuff about making a CMOS clock
and building a system using a Programmable Controller, and EEPROMs
which i think means Electrically Erasable Programmable Read Only
Memories, i realise that it can of course be done completely using
chips, and probably also a small display to set things like clock.
But what would i keep the log records on ?
Maybe i could transfer them to PC, keep them on a floppy ?
One of the things with using cassettes is that they aren't the usual
PC media, well not for years anyway, and they are very unlikely to
be used for anything else, they can sit there on a shelf with dates
on and not get disturbed.
Still maybe for those few bytes per instance, a floppy might hold
many years worth so that would be easy enough to keep safe.
No i am not dead set on using tape cassettes, or floppies, or any
particular method.
At one stage i looked into using a dot matrix printer, cut down to
use a roll of paper about an inch and a half wide, like a till-roll
so that the printer would print a line each time a sensor gave out
a signal, the paper roll would be the record, and the PC would not
be part of such a system. This method still appeals to me, but if
there are easier or cheaper ways then of course i would like to
know.
I hope i have put enough information to illustrate adequately the
intention of this project.

*******************
*******************

Hi Someone Electro,

Thank you for your input, i do have many tape recorders of many types
and yes i had considered using a tape cassette unit for this project.
If i went down that route, it would probably mean leaving the unit
in the record position and switching it on and off by its supply. So
long as the pinch wheel is not unreasonably tight, some of them are,
then the tape does not get damaged in my experience. I would allow
between a half and a full second to reach running speed, and i would
reckon about a second to about one and a half seconds to record the
bleeps (signal).
I had intended that the tape could be read into a Windows PC using a
normal cassette unit and a lead made to fit between the two, i was
guessing that a bat file could copy to a text file for perusal.
I have not done any of this yet, i am still looking at possibilities.
As for the modem comment,
it occurred to me that if the audio signals from the tape,
were the same as the audio signals that come down the phone line,
then the modem on the PC might be able to deal with them easily.
That was what i meant.
However, it might be much easier to put together a different system
entirely, it might be possible to make a unit that will record the
signal information directly on to a floppy disc.
This could easily be read on a PC, without any special arrangements.
I am quite happy to use a spare floppy drive for this if need be.

Thank you both for you interest and suggestions,
Which way to you think i should go from here ?

John :)
 
Right, so your data storage requirements are pretty low, so a 32KB EEPROM (and you were right what it stands for) could store plenty for you.

Almost everything you need is in my tutorials, you can use the I2C clock for your timing information, you can store the data in the I2C 32KB EEPROM, you can use the LCD to display the information locally, you can use the HEX Keypad to enter local information (such as telling it to do a download, or scroll through the stored data), and you can use the RS232 to transfer the data to your PC (where you could do whatever you wanted with it, print graphics, or just store it as tables).

Assuming your sensors provide analogue information, you could use a 16F876 or 16F877 to read the analogue sensors, and connect all the other bits together - most of the programming required is simply interconnecting the code from the tutorials (you'll notice that quite a few of my tutorials already do so) - I've tried to construct a series of easy to use, general purpose routines.

There's been a lot of questions asked over the years about using floppy drives with PIC's, the general consensus is that it's very, very difficult - and probably not worth doing.
 
Hi Nigel,

Thank you very much for your speedy reply.
Could you tell me a bit more about the clock you mention.

Cheers, John :)
 
Hi Nigel,

No there are no analogue sensors for this they are mostly alarms
and alerts. I will be including a battery charger indicator from
the garage, and maybe heating system tank level indicator, but
thats in the future.

Cheers, John :)
 
Hi Nigel,

I found the 'Pic-prog' forums,
and ive been reading up a bit.
I will check that my low voltage
supply which is strung around various places in my home,
is at least 12 volts,
and i will look into making it around 12 and a half volts.

Cheers, John :)
 
Hi TPS,

thanks for the suggestion, but that seems to be a computer
program of some sort.
What i'm after is a sort of stand-alone device.

*******************
*******************

Hi Nigel,

I have had a look for the tutorials you speak of, but i
seem to have missed them somewhere, and i cant find this
CMOS clock, maybe i'm looking in the wrong place ??

John :)
 
Just a thought. How about using the coded radio signals used for clocks. In the UK, Rugby puts these out at 60KHz.
 
john1 said:
Hi Nigel,

I found the 'Pic-prog' forums,
and ive been reading up a bit.
I will check that my low voltage
supply which is strung around various places in my home,
is at least 12 volts,
and i will look into making it around 12 and a half volts.

Hi John,

I think you're getting a little confused, the 12.5V bit refers to programming a PIC (to switch it to programming mode) in a programmer, not to actually use it.
 
Hi Nigel,

Ok, right, i did sort of skip through most of those bits, i
was really looking for that clock. I didn't realise that
referred only to the programming of the P.I.C.

I have never done anything with PICs before, so this will
be new territory for me.

The construction of that clock as shown is certainly within my resources, so long as the parts don't cost too much.
Although i don't really see how to read it, i know they cram
a lot into chips, but is this made to give the date/time
info as a serial stream from one of the legs ?
There doesn't seem to be enough legs for a straight parallel
output.

I am assuming that a Programmable Controller would be
needed to do what i want ?

I am also leaning toward using a print-roll output from
this unit, as it would be almost impossible to cheat it,
but to do that i would like it to type words as well as
numbers, single words would do, like,

GATE 16:00 13/01/04
DOOR 16:01 13/01/04
GATE 16:01 13/01/04

Having a socket to run the log into a laptop would be nice
and from what you said before, i think that is how you
envisaged using it anyway.

However first things first, your web page doesn't self-size
so reading it means panning left and right each sentence,
but i don't mind. (i copied to notepad after a while)

This taken from:
**broken link removed**

Appears to show that the chip would be ok up to six volts,
I have a small 3-pack of rechargeable cells, Ni-MH, i don't
know what Ni-MH is but the three give 3.9 volts, if i take
across only two i get 2.6 volts, so i am guessing that the
chip would be ok at 3.9 volts. I am assuming that the bat
in that diagram is kept up by leakage through the diode
that only comes into conduction if the supply fails, namely
the D2 diode 1N4148.
These batteries are out of an old mobile phone and may well
require a little more effort to keep them alive than the
reverse leakage from a 1N4148 so i would ask if there is
any reason why i shouldn't bridge that diode with a resistor
such as to give maybe a milliamp or so ?
( i don't have a battery like the one shown )

I have downloaded a PDF about that clock chip, it certainly
looks good enough for what i want.
One thing that i noticed is that it carries a section of
free ram for user use.

I can't quite make out how much. Surely it's not just 8
bytes ?

In fact i'm still struggling to see how to read the time
with it. Maybe it will all come clear soon ! And i'm still
trying to find the price !

Maybe the free ram could be used to make the words i want?
maybe not ... 8 bytes isn't much.

Cheers, John :)
 
I've just been looking through that PDF, the eight bytes mentioned are
in addition to 240 bytes of free ram space.

I feel that 240 bytes should cover any words i may want to use
as prefixes for the date/time signal.

Exactly how to do that i dont know yet ...

John :)
 
john1 said:
The construction of that clock as shown is certainly within my resources, so long as the parts don't cost too much.
Although i don't really see how to read it, i know they cram
a lot into chips, but is this made to give the date/time
info as a serial stream from one of the legs ?
There doesn't seem to be enough legs for a straight parallel
output.

It's an I2C chip, all communication is done over the I2C bus.

I am assuming that a Programmable Controller would be
needed to do what i want ?

Yes, it's needed to set things up and tie everything together.

I am also leaning toward using a print-roll output from
this unit, as it would be almost impossible to cheat it,
but to do that i would like it to type words as well as
numbers, single words would do, like,

GATE 16:00 13/01/04
DOOR 16:01 13/01/04
GATE 16:01 13/01/04

You could interface a printer directly to a PIC if needed.

Having a socket to run the log into a laptop would be nice
and from what you said before, i think that is how you
envisaged using it anyway.

Yes, it's very easy to transfer the data via RS232.

However first things first, your web page doesn't self-size
so reading it means panning left and right each sentence,
but i don't mind. (i copied to notepad after a while)

I wasn't aware of that!, I've just checked and the hardware pages don't self-size - I must have 'messed up' somewhere :lol:

This taken from:
**broken link removed**

Appears to show that the chip would be ok up to six volts,
I have a small 3-pack of rechargeable cells, Ni-MH, i don't
know what Ni-MH is but the three give 3.9 volts, if i take
across only two i get 2.6 volts, so i am guessing that the
chip would be ok at 3.9 volts. I am assuming that the bat
in that diagram is kept up by leakage through the diode
that only comes into conduction if the supply fails, namely
the D2 diode 1N4148.
These batteries are out of an old mobile phone and may well
require a little more effort to keep them alive than the
reverse leakage from a 1N4148 so i would ask if there is
any reason why i shouldn't bridge that diode with a resistor
such as to give maybe a milliamp or so ?
( i don't have a battery like the one shown )

The battery I used isn't rechargeable, it's a lithium cell - for these purposes a lithium cell will last longer than a rechargeable cell. I think all manufacturers have now dropped rechargeables in favour of lithium due to poor reliability and corrosion damage.

I have downloaded a PDF about that clock chip, it certainly
looks good enough for what i want.
One thing that i noticed is that it carries a section of
free ram for user use.

I can't quite make out how much. Surely it's not just 8
bytes ?

In fact i'm still struggling to see how to read the time
with it. Maybe it will all come clear soon ! And i'm still
trying to find the price !

Maybe the free ram could be used to make the words i want?
maybe not ... 8 bytes isn't much.

Cheers, John :)

There's no actual RAM, what there is is EEPROM, the clock registers act like the first 8 bytes of it, and the rest is available for your own use.

For storing the words you require, you would normally use a table in PIC program memory (see my LCD tutorials for how that's done). You could store them in EEPROM, and a good reason for doing that would be to make them changeable from a local keyboard - storing them back to the EEPROM afterwards - for a commercial product that would be a good idea.
 
Hi Nigel,

Well,
i found out a bit about 12C,
apparently its a sort of double serial two wire feed.
First ive ever heard of it.
still, live and learn.

I'm guessing that there will be a chip to convert to
seven segment displays, and as needed for the months
and days, if wanted. i only actually want numbers,
but its nice to think that days or months could be
words if i wanted.

If the battery is likely to be a problem, i will mount
it off the circuitwork and make it easily remove-able.

The other thing is the crystal. I will have to go
through my collection and check just in case i have
one.

I could use a printer i suppose, but its not what i
have in mind, but it would be ok to get things going.
I have in mind one of those little till roll types.

Yes you're right, its not ram, its rom. Erasable rom
actually, i just called it that because thats what they
called it, i have no idea why they called it that.

I will try to find your LCD pages, but i never found
that clock until you gave me the page ....

Looks like i have a lot to learn, so i better get on
with it. This is only a one-off, just for my own use,
its not a commercial product.
You mention changing or setting the words brought up by
the incoming signals using a local keyboard, could this
be the same laptop used to download the log on 232 ?
Not that i am certain what 232 is, but i think its the
standard 8 bit interface usually using ascii coded
characters, it might also mean the whole hex range
ascii or not. I think its what they used to call
assembler, but i could easily be wrong.

First i spose i better get a PIC running, cos i can't
read that 12C clock without it. Unless you would
suggest a starting point?

The incoming signals are all 12 volt positive logic.
There are only six at the moment but another six are
in the pipeline.


Maybe that should be a starting point, maybe the six
incoming signals that i have should be converted to
a binary number and a KP (key-pressed) signal.

I will make a start on this by trying to fix up a
multiplexer chip to take on the incoming lines and
give a binary code for each. I am assuming that the
PIC chip will want the inputs in this manner, i hope
i am correct in that.

Many thanks, John :)
 
john1 said:
i found out a bit about 12C,
apparently its a sort of double serial two wire feed.
First ive ever heard of it.
still, live and learn.

Perhaps you've never heard of it, but you use it every day :lol:

It's a standard invented by Philips Components for communication between I/C's in electronic products - your TV, VCR, and many items use it.

I'm guessing that there will be a chip to convert to
seven segment displays, and as needed for the months
and days, if wanted. i only actually want numbers,
but its nice to think that days or months could be
words if i wanted.

You can get I/C's to do that, or you can drive them directly from a PIC - but it uses a lot of I/O pins. It's probably much easier to use an LCD text module - you can then have days and months in text.

If the battery is likely to be a problem, i will mount
it off the circuitwork and make it easily remove-able.

The other thing is the crystal. I will have to go
through my collection and check just in case i have
one.

The crystal is a standard clock one, they are freely available, most digital watches and clocks (and VCR's) will have one as well.

I could use a printer i suppose, but its not what i
have in mind, but it would be ok to get things going.
I have in mind one of those little till roll types.

You can connect those if you wanted to, full details are usually provided on the data sheets (if you buy them new) - if you rip one out of an existing product you may have to experiment some what. Although a data sheet for a new one will probably help.

Yes you're right, its not ram, its rom. Erasable rom
actually, i just called it that because thats what they
called it, i have no idea why they called it that.

I will try to find your LCD pages, but i never found
that clock until you gave me the page ....

They are all listed in a table on the index page at .

You mention changing or setting the words brought up by
the incoming signals using a local keyboard, could this
be the same laptop used to download the log on 232 ?
Not that i am certain what 232 is, but i think its the
standard 8 bit interface usually using ascii coded
characters, it might also mean the whole hex range
ascii or not. I think its what they used to call
assembler, but i could easily be wrong.

I was suggesting a hex keypad, permanently interfaced to the PIC, there's a tutorial for that as well!.

Although you could easily do it from your laptop via RS232 as well.

RS232 is a serial interface, most PC's have them, it's an easy way to get data between the circuit and your computer - again, I give a tutorial for it.

First i spose i better get a PIC running, cos i can't
read that 12C clock without it. Unless you would
suggest a starting point?

I would suggest building some of the tutorial parts, it's all simply made on veroboard and plugs together with Molex connectors, details of the boards are given in the hardware pages.

The incoming signals are all 12 volt positive logic.
There are only six at the moment but another six are
in the pipeline.

PIC's have internal diodes, from I/O pins to ground and Vcc, so you can simply feed a 12V logic signal in via a series resistor (to limit the current), the diodes will clamp the signal to 5V.

Maybe that should be a starting point, maybe the six
incoming signals that i have should be converted to
a binary number and a KP (key-pressed) signal.

I will make a start on this by trying to fix up a
multiplexer chip to take on the incoming lines and
give a binary code for each. I am assuming that the
PIC chip will want the inputs in this manner, i hope
i am correct in that.

If you can allocate a pin for each input, all you need to do is check them for going high (or low, whichever way they work) - check the simple switch tutorials.

If you need more pins than available, you could always use multiplexer chips (as you suggested) or even another PIC, dedicated to checking the inputs, and communicating the data back to the main unit via a single serial connection (like RS232 - but without needing the +12V -12V swing).[/url]
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top