Ground color

I always though ground was black!?

In the below tutorial, is ground, green?

Residential AC mains wiring in the US uses black or red for hot, white for neutral, and bare copper or green for ground. So yes, quite a difference as compared to typical electronics usage.

The green wire is the return wire for the GFCI circuit. Don't confuse mains wiring with electronic wiring. They are different. And as far as color of the ground return wire, sometimes it is just a bare copper wire.

command_z, Green is ground the world around (mostly) in A/C circuits. As the tutorial states you should test each wire with a multimeter before hooking up. As stated, black is "Hot" in A/C circuits, white neutral. It scares me that you are thinking of messing with high voltage when you don't know which wire is which and don't know how to test them. If you need a 110V outlet controlled by an Arduino you should probably get a pre-made one such as Retired electrician, among other things, TomJ

Thanks all,

I'll definitely test it with a multimeter.

OK, I got it working. I definitely did a lot of continuity testing before plugging it in, and it's working fine.

I do have another question. Do you think this relay will have any electrical issues running the code below for 2 weeks?

Thanks so much!

//plug in at 6pm

#define SECOND 1000UL
#define MINUTE (SECOND * 60UL)
#define HOUR (MINUTE * 60UL)

void setup() {                
  pinMode(13, OUTPUT);   

void loop() {
                                          //6pm- Plug in
  digitalWrite(13, HIGH);  
  delay(SECOND*45);                       // on for 45 Seconds              
  digitalWrite(13, LOW);    
  delay((HOUR*14)-(SECOND*45));           //8am
  digitalWrite(13, HIGH);  
  delay(SECOND*45);                       // on for 45 Seconds              
  digitalWrite(13, LOW);    
  delay((HOUR*10)-(SECOND*45));           //6pm

Shorten up the time delays and test it and when you have that part working start putting the right times back and test until it all works...


Thanks. I tested the relay last night with a lamp (1 minute on, 5 off) for 4 hours.

Soon, I go away for 2 weeks and I need the relay to be switching on and off a water pump twice a day for 45 seconds.

If the relay has tested fine with the lamp, can I assume that there should be no issues running for 2 weeks? I know there's no guarantee, I'm just getting nervous about running the relay for 2 weeks while I'm gone.


Have you tested with the actual water pump?

Have you tested with the actual water pump?

kd7eir is right, you really need to test the integrated system before you leave it running for two weeks.

I have tested it with the water pump but not for long. I'll start it today and leave it running until I leave next week.

Thanks all for the advice.