12V submarine pump Vixen

XxFriction

New member
Hello there,
I want to control a 12v DC water pump using an Arduino board and Vixen 3,
I have a Mosfet (IRFZ44N) that I tried to use for speed control in normal Arduino,
but now I want to do this from Vixen 3, can't figure out how to do it,
here is the code I used to control the DC pump speed:
Code:
int PWM_PIN = 6;
int pwmval = 0;

void setup() {
  Serial.begin(9600);
  pinMode(PWM_PIN,OUTPUT);
}

void loop() {
  if (Serial.available() > 1) {
      pwmval =  Serial.parseInt();
      Serial.print("Speed: ");
      Serial.println(pwmval);
      analogWrite(PWM_PIN, pwmval);
  }
}
I wonder if someone knows a way or could point me to how to adjust this code and enable controlling the pump from Vixen 3.

Thank you in advance.
 
Last edited:
On Vixen
Configure a generic serial output.
Patch a single output channel to it.
Assign the channel a color.
Create a sequence and set an intensity on the pump channel. Intensities 0-100% are sent out as a value 0-255
Connect the serial output of the PC to the Arduino.
 
I did these steps but I don't know what code to use on the board, the code where it is supposed to get the value from vixen to the Arduino board.
 
the code you have should work. that code is set up for 9600 baud so you need to set up the serial controller on vixen to send at 9600bps
 
Looks fine - make sure you only have one channel in your output data, otherwise you will need to add a header (and adjust the sketch). If you still have issues maybe post an image of your Vixen controller config and the serial config. Make sure the vixen baud rate is 9600 and the com port matches. You won't be able to have the Arduino IDE open at the same time as Vixen since the COM port can't be shared. I mention this since you have some debug lines to Serial.print the channel value, which suggest you have another application running. Vixen obviously will ignore any data you are 'writing' back.

If you want to check the values you are outputting from Vixen, you can also add a 'debugging' controller to show the channel values. It's possible to patch a display element to more than one controller (you need to select the 'use all available patch points' option)
 
Last edited:
Back
Top