TellyMate Shield - TV output for Arduino

How about the pocket TVs, like this one?
http://www.amazon.com/Casio-TV-880-Portable-Handheld-Color/dp/B00005EBGN/ref=sr_1_6?ie=UTF8&s=electronics&qid=1245776085&sr=8-6
US$25 on ebay.

Also, some video cameras (my old Sony, for example) have A/V inputs.

You have just reminded me that at the bottom of a cupboard drawer I have an old Casio 970D Pocket TV with an AV input!! Cool.

For one I would like to have an overlay board.

I searched the 'net a found some others that have simple designs. They don't use the LM1881 or LMH1980 sync separator.

This one uses a microchip PIC.

(Scroll down to the bottom to see the You tube video for a quick demo)

http://www.micro-examples.com/public/microex-navig/doc/081-pic-osd-superimposer.html

PAL version with no inputs (demo code only)

Quote from the article

To superimpose text to a PAL video signal, we need to control timing with precision to get a stable picture.
We have to deal with vertical synchronization, which tell us when a new frame starts, and with horizontal synchronization, which tell us when a new line starts.

Usually, and external circuit is used to extract both vertical and horizontal synchronization pulses from the PAL video signal, the LM1881 integrated circuit does it very well for example.

Since I wanted to have a very simple circuit, I had to find a way to make the PIC do this job.

First, we must be able to know when a video line starts : we will use the PIC internal comparator module to do it. The internal voltage reference module will be programmed with a voltage clip level, the comparator will then trigger an interrupt each time the input voltage will become lower or higher than the clip level. This will be our horizontal sync separator.

Second, we must be able to know when a frame starts do get vertical sync : PAL signal uses special sync pulses to announce a new frame. We have to detect a 28 µs low level pulse, there are five of them in the vertical sync and none elsewhere. The internal timer module of the PIC will be used to count time of low level pulses.

This done, we must be able to know what to superimpose to the video signal. A bitmap representation of the text to be displayed is built in RAM from a 5x7 fonts table. On each new line interrupt, we check if we are in display time window for adding pixels or not.

To add a pixel to the video signal, we change output pin from high Z state to output, the output then imposes +Vcc or 0V to display either a white or a black pixel. The result is a superimposed text on transparent background .

NTSC version using the Mega8 and a couple of parts

http://www.viennawireless.org/balloon/hardware/overlay/index.php

Note: NMEA is just a serial standard used on boats for communication between GPS, Radar, Chartplotter etc.


Non overlay PAL PIC library:

Guy who used this library and added a serial input with non overlay (aka tele mate)
http://elec.tkjweb.dk/blog/pic-projects/serial-tv/

So I have given you

  1. PAL design
  2. NTSC design on a Mega8
  3. PAL library with serial input option.

Note these use the same connector for video in and out. So the existing board could be used with the cable split in two for two leads. (Of couse the extra components would need to be fitted, but this could be done with stripboard or breadband to start)

So I challenge someone to use this to make an arduino version of a text overlay unit.
If you do let me know.

I'll be expecting the next version of telemate to have a jumper J7 for text overlay on/off!

Dan

Has anyone had a problem with the output from the Tellymate doing a continual vertical roll?

I've got this with one particular miniature LCD display with an AV input.
It's one of the "2 AV Input 3.5" Reversing Color LCD Car Backup DVR VCR" that are all over eBay for around $30-35.

However, when used with the Tellymate, the display "rolls" vertically.

I tested the LCD with the composite-video output from my Popcorn Hour network media player - and it works fine with no rolling.

I tested the Tellymate with the 32" LCD TV in my living room. It works fine as expected.

I tried both a Duemilanove w/mega328, and a Seeduino w/mega168. Same result on both (using the "Hello World" and random-characters examples).

Am I out of luck, or is there any way to adjust/tweak the NTSC video timing that's being output?

Thanks alot for the work on this! I wouldn't have had any idea where to start... even after reading about the shield on your website.. still wasn't really sure where to start! :smiley:

I got it working on a bread board.. took 15 minutes of setup.. and a day of debugging.. (turns out, I uploaded the wrong .hex.. and I had the diode 1 pin space off on the breadboard) But now it works great! I've got an old CRT TV, was going to use it for a "debug station" if you will, but good lord! Even sitting about 8 feet away, the TV is still giving me a headache.

How did we ever stand sitting near this... old contraption we used to call a "television"? ;D

But yeah, I just used one of my old Atmega8 chips, with crystal, diodes and the resistors (I was extremely lucky.. I've never purchased those diodes in particular, but they came with a Electronics Startup Kit, woot!:))

Gee-whiz, now I'll be able to plug my Arduino into random TV's and pretend like I'm taking over the world! Muahaha.

Okay, I might have over exaggerated, but this is awesome regardless! It's almost like the Matrix with the Random Characters. Would be a nice "screen-saver" if I could leave my TV on for more than 5 minutes.

Again, thanks for all the hard work, very thankful! I have a few too many Atmega8's that need a home.. I feel like a board-less shelter over here!

I have a few too many Atmega8's that need a home

You should really consider running 168 or better chip. There are now alternate character sets that can be uploaded to give more capabilities.

Lefty

I've got a single 168 as well, but help me understand this, if you don't mind. :smiley:

I thought that when you'd want to use a new character set, no matter which chip you were using, you would have to upload the new characters? Or when you try to use certain chars in a certain way, do they appear as the other character set?

The fontbanks, I noticed they're named differently.. but how do I go about including a different one with a .hex file?

Guess I'm really curious to, if I upload the extra fontbanks, can I use them separately? Say, one day, use it to debug characters and such. Then the next day, play the game of Life, with the different character bank, without uploading it. Or am I missing something here?

:slight_smile:

I forget all the gory details, but I was able to figure it out from the products site, download page and some of the example programs.

For example, to get the game of life to work I needed to have a alternate font set loaded and that's when I saw what's going on. A 168 memory size can hold up to four font sets. You do have to run a seperate program on your standard Arduino board, four seperate times, loading a different character set each run until all four are loaded into the telly board, if you want all four. Then you can cause font page switches via control codes sent to the telly board from your Arduino board's sketch.

As I said it's a bit fuzzy as it's been awhile, but it wasn't that hard once I read some of the comments in the various programs listed at the telly site.

Lefty

@Retro, I get it now! Just took some reading.. (and paying attention!:D) Haha, I'm just having too much fun with this!

I know it's not all that "cool" if you will, but I've been using a 433MHz RF kit to make it a wireless setup. It's really simple too! You can just use the VirtualWire examples, and edit the Receiver take away the spaces that are added, and make sure it's not outputting HEX values. Also, you can take away the "Got:" because that's just annoying when it prints everytime. :slight_smile:

Transmitter:

// transmitter.pde
//
// Simple example of how to use VirtualWire to transmit messages
// Implements a simplex (one-way) transmitter with an TX-C1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: transmitter.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $
#include <Button.h>
#include <VirtualWire.h>

// \x1B is the CHAR_ESC(basically a command character) in TellyMate, not used because I need command chars
// and text, without any spaces in between, easier to include as a command.
// 
#define CHAR_ESC "\x1B"   


char buffer[32];
unsigned long int runTime;
long myVal;


const char *CLR = "\x1B""E";  // this will clear the screen
const char *bigText = "\x1B""_2""HELLO WORLD!";  // 1st part of bigText
const char *bigText2 = "\x1B""_3""HELLO WORLD!"; // 2nd part, needs 2 for big text, top/bottom
const char *STAT = "\x1B""Q"; // this will display the jumper stats

Button b1 = Button(9, PULLUP);
Button b2 = Button(8, PULLUP);
Button b3 = Button(7, PULLUP);
Button b4 = Button(6, PULLUP);

void setup()
{
  Serial.begin(9600);        // Debugging only
  Serial.println("setup");

  // Initialise the IO and ISR
  vw_set_ptt_inverted(true); // Required for DR3100
  vw_setup(2000);       // Bits per sec
}

void loop()
{


  if(b1.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    myVal = analogRead(0);
    sprintf(buffer,"\x1B""_1""analogValue = %u", myVal); // _1 = single heighth, double width text

    vw_send((uint8_t *)buffer, strlen(buffer));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
  }

  if(b2.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)CLR, strlen(CLR));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
  }
  
  if(b3.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)bigText, strlen(bigText));
    vw_wait_tx();
    vw_send((uint8_t *)bigText2, strlen(bigText2));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
  }
  
  if(b4.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)STAT, strlen(STAT));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
    delay(500);
  }

}

Here's the receiving End.. it's the Receiver Example for VirtualWire, minus just a couple lines of code:

// receiver.pde
//
// Simple example of how to use VirtualWire to receive messages
// Implements a simplex (one-way) receiver with an Rx-B1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: receiver.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $

#include <VirtualWire.h>

void setup()
{
    Serial.begin(57600);      // 57600 for TellyMate baud.
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);       // Bits per sec

    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
      int i;

        digitalWrite(13, true); // Flash a light to show received good message
      // Message with a good checksum received, dump it.
      
      for (i = 0; i < buflen; i++)
      {
          Serial.print(buf[i]);
      }
      Serial.println("");
        digitalWrite(13, false);
    }
}

Got my Tellymate today!! ;D

Now to get a PS for my LCD display.

Some of this coupled with a bit of coding could work a treat for a PUSH N900 submission... ;D

Sorry, but im still in favour of MicroVGA-TEXT, 16 Colours 80x25 characters

Matt: the N900 already has video output; connecting by BT to an arduino to get similarly poor (NTSC) video seems overly complex; can the N900 video out be manipulated directly by N900 firmware, or is it tightly coupled to some sort of video/picture playback hardware?

(I think it'd be a neat hack to throw up some sort of hackable interface (BASIC, FORTH, BitLash, C64 emulator, whatever) on a big NTSC screen from the N900, but OTOH that pretty much has significantly lower resolution than the LCD, so perhaps not.)

Sorry, but im still in favour of MicroVGA-TEXT, 16 Colours 80x25 characters

That's a very nice product, I hope to get one some day. With all the extra keyboards and monitors I have stashed away, it's a pretty good value for what it does.
Keep in mind if using the NTSC or PAL TV output, that only black and white is supported.

Lefty

@westfw - I meant in terms of a submission for the PUSH N900 competition, running the TV output through an Arduino an N900 and making it do something different and cool.

Check out blogs.nokia.com/pushn900/usa

As for modification of the playback, I'm not entirely sure, I think it can be, just have to rewrite an application to manage how it's displayed.
Could be a nice submission and put you in with a chance to win $10,000 an a trip to Vegas. :sunglasses:

I'm waiting for my TellyMate to arrive from LittleBird!

Can't wait!

I've written a LOT of VT52 games over the years, I still have a working VT-100 and a VT-132, so I'm pretty familiar with the escape codes.

Arduino Star Trek and Lunar Lander here we come!

:slight_smile:

Wonder if i can use it for displaying back my data from wether sensors.

Wonder if i can use it for displaying back my data from wether sensors.

Well it is hardwired to utilize the hardware serial on pins 0 & 1, but other then that no reason you couldn't use it as your weather data display.

Lefty

yes, good idea for me. i can use it and fix it by myself. :slight_smile: