connecting an Arduino to devices with an Earth pin?

I've never connected my Arduino Uno to anything that uses a 3 wire power cord before and was wondering about the Earth pin.

I've made a sketch that outputs 4 bit Gray Code on PORTD so I can connect it to the 4 Wind Direction inputs on an old Heathkit ID-4001 Weather Computer. http://www.eham.net/data/classifieds/images/313266.jpg

I've connected 4 toggle switches to the screw terminals and the 5V output of the ID-4001 and I can send Gary Code to it manually just fine making the 16 wind direction LEDs light up accordingly.

Question:
The ground points on this thing are all connected to the chassis and it's connected to the green Earth wire to the middle prong on the plug. Considering the Arduino is being powered by USB or a regular 2 prong 9V wallwart is there anything I should be wary of when connecting an Arduino to something like this?

The wind direction terminals are connected to a 10k resistor then to the base of an NPN and another 10K resistor the ground.

I guess I'm just be extra cautious because I'm not sure about this kind of electrical stuff.

First of all the green EARTH pin (and the ground prong on a 3-prong power cord) are user safety protection on the AC input of AC powered devices. The secondary side (the output of the AC/DC rectifier circuit) may or may not have it's ground wire connected to EARTH. (It is a simple matter of using an ohm-meter to ascertain this)
Whether or not the dc side is earth grounded makes no difference to the arduino power because it only sees a two wire circuit (the dc) , be it input to Vin , or output of the onboard regulator (5V). The fact that you are using USB power is irrelevant.
As soon as you connect your dc circuit ground (from the arduino) to the dc circuit ground of your Heathkit, your arduino will share a common ground and there should be no issues. Ground related issues generally are caused by an absence of ground, rather than the presence of ground. This typically occurs when you try to send a control signal to an external device that is not common grounded with the arduino.
This results in no return path for the control signal and hence no result.

Well, I just tried it and nothing blew up :slight_smile:
The Earth pin on the plug IS connected to the ground terminal (this device has screw terminals on the bottom with all the inputs and outputs for the sensors) but like you said it doesn't matter.

It was a good educational experiment for me as a beginner with microcontrollers.
I wrote a sketch that reads to voltage from a pot set as a voltage divider connected to A0 then it's divided into 16 steps which controls the Gray Code coming out of PORTD.

As I turn the pot the wind direction LEDs turn accordingly.

const byte greyCode[] = {B000011, B000111, B001111, B001011, B011011, B011111, B010111, B010011,
B110011, B110111, B111111, B111011, B101011, B101111, B100111, B100011 };
//avoiding pins 0 and 1 by adding 11 after the 4 bits (which later becomes 00 using ~)

void setup()  
{  
  pinMode(2,OUTPUT);   //declare LED pins as output pins  
  pinMode(3,OUTPUT);  
  pinMode(4,OUTPUT);  
  pinMode(5,OUTPUT);
  Serial.begin(9600);
} 

void loop()
{
	// read the input on analog pin 0:
	int potValue = analogRead(A0);
	// Convert the analog reading (which goes from 0 - 1023) to a value (0 - 15):
	int windDirection = potValue * (15 / 1023.0);
	// print out the value you read:
	Serial.println(windDirection);
        //NOT bitwise operator ~ to invert the logic for the Heathkit ID-4001 circuit
	PORTD = ~greyCode[windDirection]; 
	delay (5);	
}

There's not many people around who remember Heathkit. I worked at a Heathkit store when I first started in electronics (1979). Gene Roddenbury came in to pick up his HW101 Ham Transceiver one day.

Did you ever hear Fran Blanche's story about the Heathkit someone assembled using white glue instead of solder?

Here's a video of a pot moving the LEDs on the Heathkit ID-4001.
http://1drv.ms/1G0IZxA
You have to click the DOWNLOAD link because it won't play directly in the browser.

No but I worked at a Hospital Bedside Patient Monitor OEM testing and troubleshooting CPU boards (PCBs) . It was a 15" square 6-layer board with one core uP and two peripheral uPs. (touchscreen & video). The core was an 80186 in a heatsinked socket ( heatsink snaps on with clips).
I was probinv the CPU pins with scope probe and the entire corner of the socket came off with some pins on it. It took me a minute to discover the socket had been broken and glued back on with crazy glue in the Assembly department. I reported
it but had to go through special channels to get around some people who were trying to cover it up.
Apparently the assembler who did it was a good friend of the dept. manager . It seems she didn't
know crazy gkue doesn't conduct. (electricity)