Pages: [1]   Go Down
Author Topic: Hacking the Info Globe  (Read 890 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Interactive automation burn time.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i picked up an Info Globe , and the board that sends the communications to the rotor via IR LED communication has died, the rotor still spins and im assuming gets power. This seems like the only info on hacking these devices available online... http://www.linux-hacker.net/InfoGlobe/ hes using this code: http://linux-hacker.net/InfoGlobe/Infoglobe_hack.asm and a PIC16F84 with 4.0 MHz resonator master oscillator. Is there anyway to convert this code for arduino to process it and output code via LED IR to communcate with the infoglobe? or should i obtain one of these  PIC16F84 and go from there? oh and im new, whats a  4.0 MHz resonator master oscillator?
Logged

Burn it. )'(

Offline Offline
Newbie
*
Karma: 0
Posts: 18
Interactive automation burn time.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.lima.com.tr/BasicTiger/Applications/PDF/appn_071e_The%20magic%20globe.PDF or is there anyway to emulate page 8 of that pdf through arduino?
Logged

Burn it. )'(

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 437
Posts: 23660
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Technically, anything is possible.
Might be tricky converting PIC assembly into AVR assembly, different registers & such, but not impossible.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Rochester, NY USA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've used both AVRs and PICs. I like them both. If you're just starting out and have no preference, I'd go with the PIC. Same low cost hobbyist tools and there are free C compilers I'd recommend using unless you want to use assembly. And you might be able to use his code as a better reference if you're using a PIC. If you have any specific questions feel free to PM me or ask here. Alan
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 18
Interactive automation burn time.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've used both AVRs and PICs. I like them both. If you're just starting out and have no preference, I'd go with the PIC. Same low cost hobbyist tools and there are free C compilers I'd recommend using unless you want to use assembly. And you might be able to use his code as a better reference if you're using a PIC. If you have any specific questions feel free to PM me or ask here. Alan

Would love to know how you did it.. I had a universal power supply i connected to it with the wrong polarity set (so stupid). So I think i fried the board. I dont think i fried the rotor, but its possible, the thing still spins and illuminates the red battery light when batteries are not isntalled, when i first powered it on it worked, then started to display garbled characters.. anyway my end game its to emulate the board and send signals to the LED IR, is there any way to at least send a message to the rotor to just turn on the leds via arduino and a LED IR?
Logged

Burn it. )'(

Rochester, NY USA
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would love to know how you did it..

My development process? I didn't actually do this same process. I'm referring to PIC and AVR based projects using my own custom PCBs. I could explain more of the embedded development process I use if you're interested. I just recommended a PIC for you because that's what the guy used in your first post. Using a PIC would alleviate replicating his code elsewhere.

Alan
Logged

U of A, Tucson, AZ
Offline Offline
Full Member
***
Karma: 0
Posts: 164
Hello World
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I gave this a try about a year ago, working off the same PIC based tutorial you found. I managed to get a little further than you. I was able to send it basic letters most of the time, but never anything very long and I'd say that only about 70% of the characters got transmitted correctly. I chalked it up to not really understanding all the timings, and sort of figured that what I really needed was a scope measuring the signals as they went back and forth so that I could adjust my timings.

For what its worth, here's my hacked up working sketch. I'll see if I can find the globe still and maybe take a picture of my base IR short and my replacement IR setup.


Code:
int ir_pin = 8; //Sensor pin 1 wired through a 220 ohm resistor
int led_pin = 12;    //"Ready to Receive" flag, not needed but nice
int debug = 1;    //Serial connection must be started to debug
int start_bit = 2400; //Start bit threshold (Microseconds)
int bin_1 = 0;    //Binary 1 threshold (Microseconds)
int bin_0_start = 760;      //Binary 0 threshold (Microseconds)
int bin_0 = bin_0_start;      //Binary 0 threshold (Microseconds)
int bin_0_tweak = 0;      //Binary 0 threshold (Microseconds)
int searchSize = 30;
int dataOut = 0;
int guardTime = 0;
int loopCount = 0;

int switchPin = 10;
bool lastSwitchState;
bool currentSwitchState;
bool ledState;

void setup() {
 pinMode(led_pin, OUTPUT); //This shows when we're ready to recieve
 pinMode(ir_pin, OUTPUT);
 digitalWrite(led_pin, LOW); //not ready yet
 digitalWrite(ir_pin, LOW);   //not ready yet
 Serial.begin(9600);
 
 pinMode(switchPin, INPUT);
 lastSwitchState = digitalRead(switchPin);
 ledState = LOW;
}

void loop() {

   checkButton();

}


int sendIRKey(int dataOut) {

  int data[8];
 digitalWrite(led_pin, HIGH);     //Ok, i'm ready to send
 for (int i=0; i<8; i++)
   //data[i] = dataOut >> (i & B1);   //encode data as '1' or '0'
   if (dataOut & (B1<<i)) {
     data[i] = 1;
   } else {
     data[i] = 0;
   }

 // send startbit
 // oscillationWrite(ir_pin, start_bit);
 // send separation bit
 //digitalWrite(ir_pin, HIGH);
 //delayMicroseconds(guardTime);
 
// startTime = millis();
 
 // send the whole string of data
 for (int i=7; i>=0; i--) {
   //digitalWrite(ir_pin, LOW);
   //if (data[i] == 0) delayMicroseconds(bin_0);
   //else delayMicroseconds(bin_1);
   if (data[i] == 0) {
      oscillationWrite(ir_pin, bin_0);
   } else {
     // oscillationWrite(ir_pin, bin_1);
     digitalWrite(ir_pin, LOW);
     delayMicroseconds(1010 - bin_1);
   }
   
   // Serial.print(data[i]);

   // send separation bit
   // digitalWrite(ir_pin, HIGH);
   // delayMicroseconds(guardTime);
 }
 
 /*
 endTime = millis();
 duration = endTime - startTime;
 Serial.print(' ');
 Serial.print(duration);
 Serial.println();
 */

 digitalWrite(led_pin, LOW);     //done sending
 // return dataOut;     //Return key number
}

// this will write an oscillation at 38KHz for a certain time in useconds
void oscillationWrite(int pin, int time) {
 for(int i = 0; i <= time/26; i++) {
   digitalWrite(pin, HIGH);
   delayMicroseconds(13);
   digitalWrite(pin, LOW);
   delayMicroseconds(13);
 }
}

void checkButton() {
  currentSwitchState = digitalRead(switchPin);
  Serial.println(currentSwitchState);
  if (currentSwitchState != lastSwitchState) {
    if (currentSwitchState == LOW) {
      // button depressed
      sendSignal();
    }
    delay(50);
  }
 
  lastSwitchState = currentSwitchState;
}

void sendSignal() {
   sendIRKey(0x01);
   //sendIRKey(0x48); // H
   //sendIRKey(0x49); // I
   
   /*
   sendIRKey(0x48); // H
   sendIRKey(0x45); // E
   sendIRKey(0x4C); // L
   sendIRKey(0x4C); // L
   sendIRKey(0x4F); // O
   sendIRKey(0x20); //
   sendIRKey(0x57); // W
   sendIRKey(0x4F); // O
   sendIRKey(0x52); // R
   sendIRKey(0x4C); // L
   sendIRKey(0x44); // D
   */
 
  /*
  bin_0_tweak++;
  if (bin_0_tweak > searchSize) {
    bin_1++;
    if (bin_1 > searchSize) {
      bin_1 = 0;
    }
    bin_0_tweak = 0;
  }
  bin_0 = bin_0_start - bin_0_tweak;
 
  Serial.print("bin_0: ");
  Serial.print(bin_0); 
  Serial.print("   bin_1: ");
  Serial.println(bin_1); 
  */
 
  delay(100);
}
Logged

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

just an idea - wouldn't be easier to take the circuit from the globe out and build your own circuit around an atmega328 which will control the leds and the motor smiley ?
Logged


Pages: [1]   Go Up
Jump to: