Results 1 to 5 of 5

Thread: 12V submarine pump Vixen

  1. #1
    Join Date
    Jan 2023
    Posts
    4
    Post Thanks / Like

    Default 12V submarine pump Vixen

    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 by XxFriction; 01-24-2023 at 05:50 PM.

  2. #2
    Join Date
    Dec 2012
    Location
    Newtown CT
    Posts
    6,137
    Post Thanks / Like

    Default Re: 12V submarine pump Vixen

    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.


    2022 - Not sure yet. At least two new songs.
    2021 New Tune-to sign. New 40x27 matrix at the house. Retiring the Strip based matrix. Updating some of the old window frames to the new house. Adding two new songs.
    2020 Full sized show reworked for the new location. Only adding (famous last words) 13 RBLs that I finally got converted to using pixels
    2019 - Just moved into a new home (yet another change of plans). Will be dim but not dark. Too much to do at the new place to leave time for a show. Dim show (3000 pixels) had regular visits most nights.
    https://www.youtube.com/user/MartinMueller2003

  3. #3
    Join Date
    Jan 2023
    Posts
    4
    Post Thanks / Like

    Default Re: 12V submarine pump Vixen

    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.

  4. #4
    Join Date
    Dec 2012
    Location
    Newtown CT
    Posts
    6,137
    Post Thanks / Like

    Default Re: 12V submarine pump Vixen

    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


    2022 - Not sure yet. At least two new songs.
    2021 New Tune-to sign. New 40x27 matrix at the house. Retiring the Strip based matrix. Updating some of the old window frames to the new house. Adding two new songs.
    2020 Full sized show reworked for the new location. Only adding (famous last words) 13 RBLs that I finally got converted to using pixels
    2019 - Just moved into a new home (yet another change of plans). Will be dim but not dark. Too much to do at the new place to leave time for a show. Dim show (3000 pixels) had regular visits most nights.
    https://www.youtube.com/user/MartinMueller2003

  5. #5
    Join Date
    Jul 2019
    Location
    United Kingdom
    Posts
    262
    Post Thanks / Like

    Default Re: 12V submarine pump Vixen

    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 by RichieNorthcott; 01-29-2023 at 07:15 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •