So looking to make my own hand held soft top controller. The car is a Mercedes clk 320. Here is the data I have come up with so far. The hydraulic pump has 7 solenoid valves. Each valve is opened with 12v DC. The pump motor is operated with a 20-40amp relay. I can turn the pump on by jumping two pins in the relay box. The pump must be on and the chosen valve open to move that part of the soft top. Here is the steps I need to perform to open the soft top and put it into the trunk.
Note. When valves are triggered pump must be running!
-
Unlock rear deck and window hatch - solenoid #5
-
Rear window forward (Moves the back window forward enough to raise the deck that covers the opening to the front half of the trunk that the top sleeps in solenoid #4
-
Raise rear deck solenoid #? (Will have it figured out by end of today)
-
Rear window back and since the deck is now up, It will keep going back into the trunk along with the top of the roof. solenoid #3
-
Lower deck covering the top and making the car look 10x better solenoid #7
-
Lock deck solenoid #6
-
close rear window hatch so when you put the top back up it simply clicks into the hatch and locks (this is done by turning the pump on with no open valves( It will also lock the deck hatch and put pressure behind the closed system locking it all into place))
Might be a little complicated to make this work. If I have to use 6 buttons with a relay to the pump that is fine. If there is a better way, thats why I am here asking for input. And I am not willing to make the factory one work again. They have more sensors on this car then a 777 aircraft.
I was hoping to next count the time it took to do each step, then writing a program to automatically trigger the next solenoid valve accordingly to the value put into the code. Then have a kill switch just in case some unforeseen event comes about, or simply taking you finger off the button will stop the process. But then having the controller knowing where to pick back up the process is past my knowledge of coding.
Thanks a lot guys and enjoy the rest of your day.
Here what I have so far
/*
Soft Top Controller 1.0
*/
const int PushButton_0 = 0; //Drive Pump w/o open valves / valve #-
const int PushButton_1 = 1; //Rear Window Back or Top into Trunk / valve #3
const int PushButton_2 = 2; //Rear Window Forward or Top up / valve #4
const int PushButton_3 = 3; //Deck Lid & Window Latch unlock / valve #5
const int PushButton_4 = 4; //Deck Lid Lock / valve #6
const int PushButton_5 = 5; //Deck Lid Close / valve #7
const int Mosfet_0 = 6; //Push Button 0 to Mosfet gate pump relay
const int Mosfet_1 = 7; //Push Button 1 to Mosfet Gate #3
const int Mosfet_2 = 8; //Push Button 2 to Mosfet Gate #4
const int Mosfet_3 = 9; //Push Button 3 to Mosfet Gate #5
const int Mosfet_4 = 10; //Push Button 4 to Mosfet Gate #6
const int Mosfet_5 = 11; //Push Button 5 to Mosfet Gate #7
// int PushButtonCounter = 0; // Counter for the number of push button presses.
int buttonState = 0; // Current state of the push button.
// int LastButtonState = 0; // Previous state of the push button.
// unsigned long ButtonPressed;
void setup()
{
pinMode(PushButton_0, INPUT);
pinMode(PushButton_1, INPUT);
pinMode(PushButton_2, INPUT);
pinMode(PushButton_3, INPUT);
pinMode(PushButton_4, INPUT);
pinMode(PushButton_5, INPUT);
pinMode(Mosfet_0, OUTPUT);
pinMode(Mosfet_1, OUTPUT);
pinMode(Mosfet_2, OUTPUT);
pinMode(Mosfet_3, OUTPUT);
pinMode(Mosfet_4, OUTPUT);
pinMode(Mosfet_5, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(PushButton_0) == HIGH)
{
digitalWrite(Mosfet_0, HIGH);
}
else
{
digitalWrite(Mosfet_0, LOW);
}
if (digitalRead(PushButton_1) == HIGH)
{
digitalWrite(Mosfet_0, HIGH);
digitalWrite(Mosfet_1, HIGH);
}
else
{
digitalWrite(Mosfet_0, LOW);
digitalWrite(Mosfet_1, LOW);
}
if (digitalRead(PushButton_2) == HIGH)
{
digitalWrite(Mosfet_0, HIGH);
digitalWrite(Mosfet_2, HIGH);
}
else
{
digitalWrite(Mosfet_0, LOW);
digitalWrite(Mosfet_2, LOW);
}
if (digitalRead(PushButton_3) == HIGH)
{
digitalWrite(Mosfet_0, HIGH);
digitalWrite(Mosfet_3, HIGH);
}
else
{
digitalWrite(Mosfet_0, LOW);
digitalWrite(Mosfet_3, LOW);
}
if (digitalRead(PushButton_4) == HIGH)
{
digitalWrite(Mosfet_0, HIGH);
digitalWrite(Mosfet_4, HIGH);
}
else
{
digitalWrite(Mosfet_0, LOW);
digitalWrite(Mosfet_4, LOW);
}
if (digitalRead(PushButton_5) == HIGH)
{
digitalWrite(Mosfet_0, HIGH);
digitalWrite(Mosfet_5, HIGH);
}
else
{
digitalWrite(Mosfet_0, LOW);
digitalWrite(Mosfet_5, LOW);
}
}