Crumar D9U: Slip slidin’ (day 2)

Today I completed most of the remaining assembly of the Crumar D9U Drawbar Controller. The work entailed:

  1. Combining the Arduino control board and the main PCB.
  2. Installing the drawbar slide pots on the bottom of the chassis.
  3. Soldering the main PCB to the slide pots and soldering the DIL connections to the Arduino control board.
  4. Installing colored plastic caps on the drawbars.

Overall, the work went well. Here’s a few observations and tips.

  • When the instructions say make the DIL flat and straight on the control board, they really mean it! The receiving holes on the main PCB are quite small and if that DIL isn’t straight, good luck. Even with a straight DIL, it took some finagling to pass the pins through the holes.
  • The control board and main PCB are joined by two long-ish bolts with spacers between the boards. The nuts are really tight. You will not be able to hold the nuts in place with fingers alone. I used needle nose pliers to hold the nuts while turning the bolts. Be careful not to damage the Arduino when using the pliers. I did bend a pin.
  • Experience with the main PCB and the slider pins was similar although these holes are larger and more accommodating. Gently straighten any bent pins.
  • Speaking of large holes, crimp the pot leads against the main PCB pads to make good electrical contact. These holes eat solder like crazy. You should rely on the solder to maintain electrical contact, not to be the electrical bridge itself.
  • The colored caps fit OK, but you will need to use a far bit of force to drive the screws into the caps for a firm result. The white knobs still have a tiny amount of play, but I was afraid to over-tighten the screws and strip the plastic.

The D9U is built like a warship although the tight fit of nuts and screws makes for a slightly stressful assembly job.

I forget to suggest one tip in yesterday’s blog post. If you have a breadboard available, it makes a nice jig for installing DILs and other components that you need to keep straight. Push the DIL into the breadboard, lay the board on top, and then solder away. I usually try to tack one or two corners first and then check for straightness, etc. If the DIL ain’t straight, it’s a lot easier to remove the tack from two pins (using a solder sucker or braided copper tape) than to remove solder from all 16 pins!

See my first blog post about the D9U for pictures of the pieces and parts in the kit.

Slider test sketch

Here is the code for a quick slider test. It prints the slider values to the Arduino IDE’s Serial Monitor. This sketch is already earning its keep — the second drawbar slider is not changing. The other eight sliders are changing just fine. I have some hardware debugging to do!

/*
 * SliderTest.ino: Crumar D9U initial test
 */

/*
 * Author:  P.J. Drongowski
 * Address: http://sandsoftwaresound.net/
 * Date:    7 December 2018
 * Version: 1.0
 *
 * This test reads the current slider values. If there is a
 * change, it prints the current slider values to the Arduino
 * serial port. Watch the values change in the IDE's Serial
 * Monitor.
 */

// Pin definitions
#define LED_RED    15
#define LED_GREEN  16
#define BUTTON     5

// Analog pin map
#define NUMBER_OF_SLIDERS 9
int AnalogPinMap[NUMBER_OF_SLIDERS] = {
  A0, A1, A2, A3, A6, A7, A8, A9, A10
} ;

// Global variables
int colorMode = 0 ;
int sliders[NUMBER_OF_SLIDERS] ;

void changeColors() {
  if (colorMode) {
    digitalWrite(LED_RED, LOW) ;
    digitalWrite(LED_GREEN, HIGH) ;
  } else {
    digitalWrite(LED_RED, HIGH) ;
    digitalWrite(LED_GREEN, LOW) ;
  }
}

void printSliders() {
  for (int i = 0 ; i < NUMBER_OF_SLIDERS ; i++) {
    Serial.print(sliders[i]) ;
    Serial.print(" ") ;
  }
  Serial.println("") ;
}

void checkSliders() {
  int changeFlag = 0 ;
  int newValue = 0 ;
  for (int i = 0 ; i < NUMBER_OF_SLIDERS ; i++) {
    newValue = analogRead(AnalogPinMap[i]) / 128 ;
    if (sliders[i] != newValue) {
      changeFlag = 1 ; 
      sliders[i] = newValue ;
    }
  }
  if (changeFlag != 0) {
    // If a change was made, print current slider values
    printSliders() ;
  }
}
 
void setup() {
  // Set up pins
  pinMode(BUTTON, INPUT_PULLUP) ;
  pinMode(LED_RED, OUTPUT) ;
  pinMode(LED_GREEN, OUTPUT) ;

  colorMode = 0 ;

  for (int i = 0 ; i < NUMBER_OF_SLIDERS ; i++) {
    sliders[i] = -1 ;
  }
}

void loop() {
  if (digitalRead(BUTTON) == LOW)
  {
    colorMode = 0 ;
  } else {
    colorMode = 1 ;
  }

  delay(100) ;
  changeColors() ;
  checkSliders() ;
}

Copyright © 2018 Paul J. Drongowski