Pages: [1]   Go Down
Author Topic: Realizing an SMPTE TimeCode reader/generator with arduino.  (Read 5339 times)
0 Members and 1 Guest are viewing this topic.
France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to use an arduino to do either an reader or an smpte time code genrator.

to explain what is an smpte linear timecode, it's very simple :

http://en.wikipedia.org/wiki/Linear_timecode

in fact this is just an 80 bits message that is sent (european broadcast) 25 time per seconds. It works on the biphase coded way, it's just an square signal with 2 frequencies.

here is an sample of one packet :



If we are considering an 48khz audio signal (broadcast frequency). it means  :

1 seconds is 25 SMPTE packet of 80bits each, that mean a total of 2000 bits for 48000 samples.

So from 1 bit needs 24 samples length.

In the smpte biphase coded way an '0' is an half of period and an '1' is one period as you can see in the following picture :



How would I be able to translate an 80bit packet to an audio signal with arduino ?

I suppose pwm can help me but I don't know how to gnenerate a mix of 1khz and 2khz signal ?

(1 khz = 80bits with '0' and 2khz = 80bits of '1', but the result is a mixing of '0' and '1').

In the second way, I would like to get an smpte audio signal into the arduino (I need only the positive of the signal) to count the pulses and their duration to decode it into an time code value as HH:MM:SS:FF (hours, minutes, seconds and frames).

If people are interesting by smpte linear timecode, they can read this site :  http://www.philrees.co.uk/articles/timecode.htm#smpte

thanks if you can give me some way of doing it. I know to program in C without trouble, and I know some bases of electronic.

Best regards.
« Last Edit: October 11, 2012, 05:31:17 am by Grag38 » Logged

France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok, seems not interesting few people...

I try to reduce some questions...

the one I would try get an answer is :

"How can I generate a square signal with only 2 different kind of frequences, one will be 1khz and the other 2khz ?"

to do it very simple, I think about :

Considering one string of char like '010001111101101110011100...."

each '0' will be generated by an half period of 1khz (|___| or |---|) and the '1' will be generated by a full period (|_|-| or |-|_|) ?

For reading time code, after looking for this forum, I know I just  have to use puleIn() fonction from arduino. So from I looking for at begining a very simple way of (for my basic tests) 'translating' audio signal from -2V +2V into 0-5V. After I will use OPAMP to do it.

If you just can help me of generating this square signal, it will gives me the bases of doing it.

Best regards.
Logged

Nice, France
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe this posting about a SMPTE timecode decoder is helpful. Or this blogpost about generating it.
Logged

France
Offline Offline
Sr. Member
****
Karma: 2
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Thanks a lot ! I'll try it this week.

I'll try also the generator version !!!!

I'll be back on this post to give you some comments !

Great, this forum is marvellous !
« Last Edit: October 13, 2012, 07:42:55 am by Grag38 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


note that there is an error in that old post's code, the bit for the drop-frame is the wrong one.
You can replace with:

drop_frame_flag = (tc[1]&0x04)!=0;
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How precise would such a smpte generator be?
1 frame/h, 1frame per 10hours?

thanks
klaus
Logged

Pages: [1]   Go Up
Jump to: