How do we connect this?

Hi there!

We are trying to control a very strong 12v motor with Arduino. We just need to control direction and turn ON/OFF.

Our dear mentor made us this sketch below and provided us the parts.
1 Crydom SSR D2W202F
2 Relay boards

Being good newbie's we started to solder and connect the parts.
But we realize that we really don't understand how to hook it up.

Here some questions:

  1. We are not sure how to connect the grounds as we have +/- of the 12V battery and the ground of the arduino board.
  2. Anything what is connected wrong?

Perhaps this helps understanding the pictures:

  • red wire = 12V
  • yellow on the left = Arduino Pin
  • yellow on the right = to the motor (com)
  • blue on the left = ground (Arduino or 12V battery?)
  • blue on the right = to the motor (com)
  • white wire = 12 V
  • grey = goes to the SSR

Sketch of the circuit:

Picture of the two relay boards:

The relay borad:

The SSR:

thanks a lot,
team sparky

The blue ground wire on the left needs to be connected to the Arduino ground.

BTW, I think you could have the motor control you want without the SSR.
If you separated the yellow wires on the left and take them to two Arduino pins, turning one of the relays on will power the motor in one direction or the other depending on which relay is on, both off (or both on!) will turn the motor off. In this configuration, the gray wire from the relay outputs goes directly to the 12v ground. The ard on/off wire is replaced by the second yellow wire.

If you wired it without the SSR, your arduino code would look something like this:
void motorOn(boolean direction){
// turn one relay on and the other off
digitalWrite(pinM1, direction);
digitalWrite(pinM2, ! direction); // set pinM2 to the opposite of the value given in the direction argument
}

void motorOff(){
digitalWrite(pinM1, LOW);
digitalWrite(pinM2, LOW);
}

I hope that helps.