Snowplow Forums banner

1 - 1 of 1 Posts

·
Registered
Joined
·
1 Posts
Discussion Starter #1
Hey guys,

A little back story for ya. My dad got a free Sno Way plow from a guy. Don't know the model but it is clear plastic... The truck it was normally on was apparently totaled by his daughter.

As a result of that, there were no electronics remaining. As far as the controller is concerned. The only thing we don't have working at the point is Down Pressure and I am assuming that is because it is binding.

Here is how I did it.

In order to build this you will need to understand Arduino or be willing to jump in to it.


Lets first start with the parts.

Adafruit Pro Trinket - 5V 16MHz
DC to DC Voltage Regulator
8 Channel Relay Board
2 Axis Joystick W/ Button

You'll also need some minor parts such as a small on-off switch to power the unit up or down.

As for a case for the joystick, you can be creative. I had the idea of using an old Nintendo Wii Nun-chuck controller and modifying it to work. But I just placed my joystick into a small black project box.




The DC to DC converter (Power Supply), Pro Trinket (Brains), and relay board are to be located in a waterproof case inside of the plastic valve housing.

A single Cat-5 cable can be ran from this enclosure into the cab of the truck.

The cat-5 cable then goes into the controller case to the joystick breakout.


The wiring is as follows: (I recommend drawing this out on paper until you understand it.)

Power (12V DC from Vehicle) goes into the DC to DC converter.

The DC to DC converter then needs to be adjusted to read 5V DC on the output side. This can be done by using a small flat blade screw driver on the potentiometer on the DC to DC board.

Once the converter reads 5C DC on the output, feed the output into the brown pair of CAT-5. Where Brown is Ground and White-Brown is Power.

This CAT-5 goes into the cab of the vehicle to feed the power switch.

The power wire (White-Brown) goes to your small switch.

The switch feeds the Joystick VCC pin with a small jumper wire.

The ground wire (Brown) goes to Joystick GND.

Use the Orange wire to go to X

Use the Blue wire to go to Y.

Use the Green wire to go to "Sel" or the button.

The White-Orange wire goes to the Joystick "VCC"

We are in essence taking 5V from the power supply, into the cab to a switch, then feeding it to the joystick and then back into the main box to power the rest of the equipment.

This does work well at the moment. Too much snow to change it around now.



From there we have this wire arrangement in the main box.

Brown | Ground
White-Brown | Power
Orange | Joystick X
White-Orange | Switched power
Blue | Joystick Y
White-Blue | NOT USED
Green | Select Button
White-Green | NOT USED

We are now ready to feed the power (White-Orange) into the Pro Trinket (Pin 5V) and Relay board (VCC).

This should be pretty self explanatory.

The ground for the Trinket (Pin G) and relay board (GND) can come straight off of the power converter output.

The pin hookup is as follows:

Joystick X | Pin A0
Joystick Y | Pin A1
Joystick Button | Pin 10

Now for the relay output.

Relay1 | Pin 11
Relay2 | Pin 12
Relay3 | Pin 3
Relay4 | Pin 4
Relay5 | Pin 8
Relay6 | Pin 5
Relay7 | Pin 6
Relay8 | Pin 9

Now for the code:

Code:
//Define Coils

//Coil A Right
const int Relay1 = 11;
//Coil B Float/Down Pressure
const int Relay2 = 12;
//Coil C Raise
const int Relay3 = 3;
//Coil D Left
const int Relay4 = 4;
//Coil E Down Pressure
const int Relay5 = 8;
//Coil F Float/Raise
const int Relay6 = 5;

//Define Solenoids

//Solenoid A Motor
const int Relay7 = 6;

//Spare Relay (Possible strobe conrol.)
//Empty Relay
const int Relay8 = 9;

//User Input

//Button for Down Pressure
const int Button1 = 10;

//Joystick pins.
//JoystickX
int JoystickX = A0;
//JoystickY
int JoystickY = A1;

//Joystick Button (Button1)
int buttonState = 0;

//Joystick Value
int XVal;
int YVal;

//motorFlag
boolean motorFlag;

//Setup (Run Once)

void setup() {
  
  //Begin Serial Output
  Serial.begin(9600);
  //Joystick1 X
  pinMode(JoystickX, INPUT);
  //Joystick1 Y
  pinMode(JoystickY, INPUT);
  //Joystick Button
  pinMode(Button1, INPUT_PULLUP);
  
  //Relay 1 Coil A
  pinMode (Relay1, OUTPUT);
  digitalWrite(Relay1,LOW);
  //Relay 2 Coil B
  pinMode (Relay2, OUTPUT);
  digitalWrite(Relay2,LOW);
  //Relay 3 Coil c
  pinMode (Relay3, OUTPUT);
  digitalWrite(Relay3,LOW);
  //Relay 4 Coil D
  pinMode (Relay4, OUTPUT);
  digitalWrite(Relay4,LOW);
  //Relay 5 Coil E
  pinMode (Relay5, OUTPUT);
  digitalWrite(Relay5,LOW);
  //Relay 6 Coil F
  pinMode (Relay6, OUTPUT);
  digitalWrite(Relay6,LOW);
  //Relay 7 Solenoid A
  pinMode (Relay7, OUTPUT);
  digitalWrite(Relay7,LOW);
  //Relay 8 Spare
  pinMode (Relay8, OUTPUT);
  digitalWrite(Relay8,LOW);
**


//Code loop

void loop() {

XVal = analogRead(A0);
YVal = analogRead(A1);
buttonState = digitalRead(Button1);


if (buttonState == LOW){
    //Run DP Sequence
    digitalWrite(Relay2,HIGH);
    digitalWrite(Relay5,HIGH);
    digitalWrite(Relay8,HIGH);
  ** else {
    digitalWrite(Relay2,LOW);
    digitalWrite(Relay5,LOW);
    digitalWrite(Relay8,LOW);
  **

motorFlag = LOW;     //clear motor flag
if (XVal < 10) {   //Up position
  digitalWrite(Relay3, HIGH);
  digitalWrite(Relay6, HIGH);
  motorFlag = HIGH;
**
else if (XVal > 1000) {   //Dn position
  digitalWrite(Relay2, HIGH);
  digitalWrite(Relay6, HIGH);
**
else {                    //Neutral X position
  digitalWrite(Relay2, LOW);
  digitalWrite(Relay3, LOW);
  digitalWrite(Relay6, LOW);
**

if (YVal < 10) {          //Right position
  digitalWrite(Relay1, HIGH);
  motorFlag = HIGH;
**
else if (YVal > 1000) {     //Left position
  digitalWrite(Relay4, HIGH);
  motorFlag = HIGH; 
**
else {
  digitalWrite(Relay1, LOW);        //Neutral Y position
  digitalWrite(Relay4, LOW);
**

digitalWrite(Relay7, motorFlag);    //set motor relay
**
This works like a charm so far.

If your relays are turning on and staying on when powering up make sure you reverse all of the relay HIGH and LOW entries in the code.

The relay output is ground switched. So supply ground to all of the relays.

The connect the solenoids and motor / Pressure switch accordingly

See Activations.jpg and Wiring.png attachments.

Your setup may be different than this for color code or solenoid activation sequences. So adjust accordingly.
 

Attachments

1 - 1 of 1 Posts
Top