VMA400 and Raspberry Pi

Hi,

I was wondering if it is possible to use a VMA400 with a Raspberry Pi instead of an Adruino? If so, what is the correct way to get it working with a Raspberry Pi?

Regards,

Erik

Hello,

Yes, you could connect thee VMA400 to a Raspberry Pi (onto the GPIO pins of Raspberry Pi).
also you need a software program like: Python or C to interact with the hardware.

Here You can find tutorials.

https://www.trafex.nl/2014/08/25/connect-a-relay-board-to-your-raspberry-pi/

https://www.youtube.com/watch?v=oaf_zQcrg7g

Regards,

Velleman Support

Hi,

Thank you for your reply and links to the tutorials. I am running into the following problem with the VMA400: It seems like the GPIO pins (from the Arduino or the RPi) do not supply enough voltage to the relays to get them working.

I have connected the Arduino to the VMA400 as described in the manual (and also as shown in the tutorials), but the LED that shows if the relay is on/off barely lights up. When I connect one of the relay IN pins to the 3,3V pin directly it does light up and the relay makes the familiar “clicking” sound. I know I shouldn’t connect the 3,3V tot the IN1 directly, I found this out by accident, I made a wiring error. Due to this wiring error my conclusion is that the GPIO pins of either device don’t supply enough voltage when set to HIGH or the VMA400 IN pin requires a higher voltage than both devices can supply. (I can replicate the wiring error and the relay still works).

Any thoughts on this?

Regards,

Erik

Dear,

3 or 3,3V is not enough voltage to get the relays working.

You should connect the VCC pin of VMA400 (relay card) to 5V DC pin of arduino board.
The control input voltage is min. 5V DC. And the relay coil voltage is also 5V.

Normally it will work when You connect VCC to 5V. same for Arduino as Rasberry Pi as well.

An example code i’ve tested with VMA400 and arduino uno, can you find below:

/*

*****************
VMA400 test code: 
*****************

Wiring up the relay card with Arduino:
**************************************

VCC ==> 5V DC  ==> 5V pin Arduino board.
IN1 ==> PIN 2 Arduino board.
IN2 ==> PIN 4 Arduino board.
IN3 ==> PIN 7 Arduino board.
IN4 ==> PIN 8 Arduino board.

*** Don't forget to place the jumper on COM pin and Ground pin of the relay card board.

***************************************************************************************

*/

int IN1 = 2;
int IN2 = 4;
int IN3 = 7;
int IN4 = 8;

// the setup function runs once when you press reset or power on the board
void setup() {
  // initialize digital pins: 2,4,7&8 as outputs.
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(IN1, HIGH);   // switch on relay 1 (HIGH is the voltage level (5V)).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN2, HIGH);   // switch on relay 2 (HIGH is the voltage level (5V)).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN3, HIGH);   // switch on relay 3 (HIGH is the voltage level (5V)).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN4, HIGH);   // switch on relay 4 (HIGH is the voltage level (5V)).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN4, LOW);    // switch off relay 4 by making the voltage LOW (0V).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN3, LOW);    // switch off relay 3 by making the voltage LOW (0v).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN2, LOW);    // switch off relay 2 by making the voltage LOW (0V).
  delay(500);  // wait for 500 miliseconds.
  digitalWrite(IN1, LOW);    // switch off relay 1 by making the voltage LOW (0V).
  delay(1000); // wait for a second
}

Best regards,
Velleman Support.