Opel TID Display

@gorgeus
the line

mydisplay.display_message("SCROLLING MONKEY5!",500);

contains an error: the speed value must be between 1 and 255 (it's specified in the tid.h file). My guess is that a value of 500 causes your project to hang. Try lowering this value and see if at lest the led blinks.

hope this helps

Thanks for the response. I've corrected the line, but still nothing happend.

Meanwhile I have loaded the Blink Sketch and evaluated the power supply. 12V= to VIN causes RX TX to light, L doesnt blink. When I increase the current to 15V=, L starts to blink. I don't understand this behaviour, since VIN is specified to 6-12V.
I am not sure, how to power the Arduino in the car. When the battery is not charged I have 14,5V and 13,8V when charged. How can I get 15V in the car? Or other suggestions? Or is my Arduino kind of buggy?

BTW: the TID in my Corsa is the same like in the Astra G, dandymon has shown a picture of it.

BTW: the TID in my Corsa is the same like in the Astra G, dandymon has shown a picture of it.

yup, i made a bit of confusion between the various display models, so i edited my post

on the power supply matter, to get 12 v as you said in your firts post, what kind of power supply you used?

I am using an adjustable power supply that provides 0-16V= at 500mA. I have placed a measuring device inbetween while powering my Arduino for viewing the current under load. When the current exceeds 15V, the Blink Sketch starts to blink the LED.

by your description (and please don't take offense) i'm guessing electronics is not your strong suit :slight_smile:

when the power supply is set to 12V and the measuring device (looks like this?) is removed and disconnected, the simple blink sketch works properly?

I don't feel offended. I am indeed familiar with electronics, what I dont know for sure are the english terms since I am not a native speaker. If you want a circuit diagram, I can provide one.

Yes I am using a so called Multimeter. But I have to disappoint you, it doesn't matter if with or without, the Blink Sketch starts only with 15V=. Or if I am connecting the USB cable to the 5V recharger of my mobile phone. Setting the power supply to 5V= and connecting it to the special "5V" pin for stabilized input, the sketch isn't starting either.

what I dont know for sure are the english terms since I am not a native speaker

neither am i, but wathever the language, current is in amperes, not volts, so i thought you were putting an high resistance between the power supply and the supply input of your nano by emploing the DMM in the wrong manner

if you have another suitable dc power supply, please try it. Maybe is just the one that you are using that is faulty (maybe the capacitor inside of it is gone bad, the voltage output is just a rectified sine, and the multimeters still reads 15V because does internal averaging, or something like that), the fact that with the usb power supply everything works fine makes me think that.

If you don't have another power supply, for now please keep running your test with the phone charger or the arduino plugged to your computer, so you can focus on the code and exclude that the sketch isn't working because of supply issues.

You are right, I confused the word current with voltage, I am sorry. Please replace every "current" in my posting with "voltage".

if you have another suitable dc power supply

I have ordered a new power supply with fixed steps of the output voltage. And also a breadboard for more serious experimenting :smiley:

Now away from the supply: the TID expects 12V on a pin called DIS for switching from calendar date to "incoming" String. It is the red/gray wire (same for 8 and 10 letters display). Right now I have connected this pin directly to VCC. In my car I would connect it to ... I dont know how that wire is called - not the positive pole from the battery but the one from the dynamo. Or should this be managed from the Arduino, too?

Or should this be managed from the Arduino, too?

well, this is up to you: you can keep the date/time function if you control that line with arduino, or forget about it and connect the line to permanent +12V (i'm pretty sure you can't choose between alternator or battery, it's automatic)

I've done some scanning of my Haynes manual because I thought this might help a few people.

You don't have to access the TID from the wiring loom as you can get to it from the ISO connector behind the radio.

[gorgeous] I too have a nano and power it from the usb connector which plugs into a USB cigarette charger adapter. When i've made a final product, i'll buy a cheap usb charger and wire it into the loom behind the console, and attach a (very short) USB to mini-USB adapter.

I didn't mention in the PDF that the arrow J> is the Red/White connector ('gorgeous' put red/grey) that tells the display to display the date or the text string. This wire is just the antenna-power wire given out by the radio that is meant for electric aerials, which tells them to rise or drop when the radio is switched on/off.

My radio for example, turns this off when I listen to CD or AUX, leaving the display to return back to the date, and tells the TID to expect a string when it's powered on (because it would be receiving an RDS station name).

###Potential BUG with the arduino###
My nano is a bit of a pain if the power isn't steady. If it loses power or has a power ripple, you need to turn the arduino off for a couple of seconds before turning back on. There appear to be some capacitors holding charge that don't quite let the arduino power down and boot up properly, unless it loses power for a good 2 seconds. This might be why the blink program isn't even working sometimes, the bootloader doesn't load properly, causing all sorts of blkinking lights, but not the correct program to run.

Dan

astra radio and triple info display.pdf (759 KB)

Back in town with some news. I've got a new power supply, and I bought an 8 Letters TID from an Astra F. I switched back to Basic_Functions.ino, which worked pretty good, I can display any text up to eight Letters on this TID. Using the library doesnt work properly. Displaying a short text results in flickering the display, 1 second text, 1 second empty, and so on. I cant judge the scrolling, there is scrolling something, but there is the same flickering. A speed of '4' seems to be the right for me, with 128 the TID isnt quick enough to display letters readable.

Now using my 10 Letters TID: with Basic_Functions.ino, text ist beeing displayed for 4 seconds, 62 seconds blank, 4 seconds text, and after further 75 seconds I gave up waiting. The library isnt working at all.

I didn't mention in the PDF that the arrow J> is the Red/White connector ('gorgeous' put red/grey) that tells the display to display the date or the text string. This wire is just the antenna-power wire given out by the radio that is meant for electric aerials, which tells them to rise or drop when the radio is switched on/off.

My radio always powers this pin, regardless of radio or not, TP or not. In my car, the Pin 5 in the ISO is connected to the antenna amplifier and also to the red/white wire to the TID. Cutting the red/white wire lets the TID always display the date. Cutting the thicker wire on the radio disables the antenna amplifier.

I have made another discovery. Inbetween stop_tid() and start_tid(), a delay of maximum 30ms is allowed, otherwise the display clears the screen. I am using some code like this

    char light[12];
for ( int i = 0; i < 70; i++ )
    {
        start_tid();
        tid_address(0x94);
        tid_data(0);
        tid_data(0);
        //tid_data(0);            // delete if 8 Letters

        //tid_data(light[1]);     // delete if 8 Letters
        tid_data(light[2]);
        tid_data(light[3]);
        tid_data(light[4]);
        tid_data(light[5]);
        tid_data(light[6]);
        tid_data(light[7]);
        tid_data(light[8]);
        tid_data(light[9]);
        //tid_data(light[10]);    // delete if 8 Letters

        stop_tid();

        */delay(30)

a delay of 30ms works at the 8 Letter TID, more than 30ms not.

i'm curious about the 8 letters astra F display, could you please post the connections scheme used and the sketch you wrote using the library (wich version btw?)?

TID 1.1 from page 2

Connection on the 8 Letters TID:
1: 12V (permanent)
3: GND
5: 12V (switched)
8: 12V (Auto Antenna)
9: SCL
10: SDA
11: MRQ

Sketch:

#include <TID.h>

TID myTID (7,5,6);//SDA, SCL, MRQ

void setup()
{
}

void loop()
{
  myTID.display_message("CORSA C",4);
}

Using a scroll speed of 64 stopps the flickering and displays a short text permanently, but leaves the scrolling completely unusable.


BTW, the connection of the 10 Letters TID:
1: 12V (switched)
2: 12V (Auto Antenna)
3: 12V (permanent)
6: GND
10: SCL
11: SDA
12: MRQ

i never noticed this 30ms issue between stop and new start, but since i am using a mega maybe this never came up.
perhaps the issue can be traced to the display_sub_message function in tid.cpp

void TID::display_sub_message(String message, byte roll_speed,byte start,byte stop) {
	
	int upd_delay = 1000 / roll_speed;
	if ((millis() - _timestamp) > upd_delay) {
			
			for (int i=start; i<=min(stop,(start-1+message.length())) ; i++) {
				_ad = i + (_incr * (message.length()>(stop-start+1))) - start;
				if (_ad >= message.length()) {
					_ad = _ad-message.length();
				};
				_display[i] = message.charAt(_ad);
			};
			if (message.length()>(stop-start+1)) {
				_incr++;
			};
			if (_incr >= message.length()) {
				_incr=0;
			};
		
		cycle();
		_timestamp = millis();
	};

}

adding a cycle() call at the very beginning of it could prevent exceeding the 30ms max between start and stop, without making the text scroll too fast. Could you please tell me what happens if you add the text

cycle();

at line 140 of TID.cpp, save the file and recompile, reload the sketch you posted above?

by the way, what happens when pin 5 is switched from +12 to gnd? (on my setup, +12v on pin5 makes all charachters disappear from the display)

Adding cycle() hat line 140 works. Scrolling is a bit bumby, sometimes the text gets stuck for one unit, then the letters are shifted for two positions. Example?
"SCROLLING " is displayed as "SCROLLIN", next one is "ROLLING "

I have added a cycle in the library for the 10 Letters TID, but nothing is happening on the TID10

Disconneting Pin 5 on the TID8 doesnt change anything. Disconnecting also Pin8 switches the TID8 off. And connecting only Pin 5 lets the TID8 display the date.

Adding cycle() hat line 140 works

that's good news :slight_smile:

Scrolling is a bit bumby, sometimes the text gets stuck for one unit, then the letters are shifted for two positions. Example?
"SCROLLING " is displayed as "SCROLLIN", next one is "ROLLING "

different rolling speeds yelds different results?

Different rolling speeds dont solve the bumpes. The slower it scrolls, the fewer the bumps appear.

Any ideas about the 10 Letters TID?

gorgeous:
Any ideas about the 10 Letters TID?

none, sorry.

as for the issue with nano, i can breadboard the circuitry, since i have an atmega328 in dip28 package, and make some more test; hopefully i'll get some results.

Something new to report.
Using TID8 works fine, TID10 not. I have added some serial communication to observe the calls of the function. I am using this code:

void loop () {
  start = millis();
  start_tid();
  tid_address(0x9B);  //this is the address for the 8 letters, for the 10 use 0x9B instead
  tid_data(0);  //first symbols byte
  tid_data(0);  //second  symbols byte
  tid_data(0);
  
  tid_data('C');    //first letter
  tid_data('o');
  tid_data('r');
  tid_data('s');
  tid_data('a');
  tid_data(0);
  tid_data('C');
  tid_data(0);    //8th letter
  tid_data(0);
  tid_data(0);
  stop_tid();   
  
  end = millis();
  time = end - start;
  Serial.println(time);
}

Using this (with eight letters) with the TID8 gives about 50ms of duration, which works fine, the text is beeing displayed. With the TID10 it takes about 60ms, but the text appears only sporadical. I dont have any clue why or how to solve this.
I have no idea, what I can do further.

FINALLY, IT WORKS!

I took a closer look at the procotoll specified here:

I implemented the mentioned timings, and ended up with the following code:

#define tid_delay 150  //this is a working timing value, if you change this, TID can stop working 180
#define delay_300 150
#define delay_100 100

void tid_byte(byte data) {
  pinMode(scl, OUTPUT);
    for (uint8_t m = 0X80; m != 0; m >>= 1) { //2 lines from
    digitalWrite(sda, m & data);              //William Greiman's I2cMaster Library
    delayMicroseconds(5);
    digitalWrite(scl, HIGH);
    delayMicroseconds(50);
    digitalWrite(scl, LOW);
    delayMicroseconds(50);
    }
  delayMicroseconds(delay_300);
  pinMode(sda,INPUT);     //3
  delayMicroseconds(tid_delay);
  pinMode(scl,INPUT);     //4
  delayMicroseconds(delay_100);
  while(digitalRead(scl)==0);   //6
  delayMicroseconds(delay_300);
  pinMode(scl,OUTPUT);
  digitalWrite(scl, LOW);   //7
  while(digitalRead(sda)==0);   //8
  pinMode(sda,OUTPUT);
  }

void start_tid() {
  pinMode(sda,INPUT);
  digitalWrite(mrq, LOW);
  delayMicroseconds(100);
  while(digitalRead(sda)==1);
  digitalWrite(mrq, HIGH);
  delayMicroseconds(100);
  while(digitalRead(sda)==0);
  pinMode(sda,OUTPUT);
  pinMode(scl,OUTPUT);
  digitalWrite(sda, LOW);
  delayMicroseconds(100);
  digitalWrite(scl, LOW);
  delayMicroseconds(100);
  }
  
void stop_tid() {
  digitalWrite(sda, LOW);
  delayMicroseconds(100);
  digitalWrite(mrq, HIGH);
  delayMicroseconds(500);
  digitalWrite(scl, HIGH);
  delayMicroseconds(100);
  digitalWrite(sda, HIGH);
  delayMicroseconds(100);
  }

Now I can display any text I want :smiley: