Author Topic: Paddle Shift Setup Diary (Automatic Transmission)  (Read 22189 times)

Fieroking

  • Trade Count: (+3)
  • Full Member
  • ***
  • Posts: 63
  • Liked: 14
  • Member Rating Points: +1/-0
    • Fieroking Customs
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #62 on: October 17, 2012, 11:20:26 AM »
Thank you for sharing your work. You save me a lot of time.

Joe Sokol
Joe Sokol
sokolja@roadrunner.com
WWW.FIEROKING.COM

Tallon

  • Trade Count: (+4)
  • Hero Member
  • *****
  • Posts: 1268
  • Liked: 186
  • Member Rating Points: +18/-5
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #61 on: October 17, 2012, 06:55:53 AM »
Oh sorry I meant because I'm not using the paddleshift stuff just egear I'm using audi trans. I just made mine with 3 buttons.

jb1

  • Trade Count: (+2)
  • Full Member
  • ***
  • Posts: 80
  • Liked: 0
  • Member Rating Points: +0/-0
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #60 on: October 17, 2012, 01:07:16 AM »
Thanks Dustin!  ::angel
are there parts to the breadboard wiring I don't need?
Do not needbread board,  solder all connections ,  you ca buy  break away pins at pololu  to connect at  arduino

usmc_butler

  • Lambo Mafia
  • Administrator
  • Trade Count: (+11)
  • Hero Member
  • *****
  • Posts: 1677
  • Liked: 418
  • Member Rating Points: +33/-0
  • Mafia Productions
    • Lambo Mafia
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #59 on: October 16, 2012, 10:15:20 AM »
Here is a resource link explaining the use of the 10K ohm resistors and why the are needed.


http://arduino.cc/en/Tutorial/Button

http://www.arduino.cc/en/Tutorial/Switch

jb1

  • Trade Count: (+2)
  • Full Member
  • ***
  • Posts: 80
  • Liked: 0
  • Member Rating Points: +0/-0
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #58 on: October 16, 2012, 09:28:10 AM »
thanks Dustin,  your code is about half  as long as what I was working with,  Great work!

usmc_butler

  • Lambo Mafia
  • Administrator
  • Trade Count: (+11)
  • Hero Member
  • *****
  • Posts: 1677
  • Liked: 418
  • Member Rating Points: +33/-0
  • Mafia Productions
    • Lambo Mafia
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #57 on: October 16, 2012, 09:10:44 AM »
You will not need to last 2 buttons, they are for the paddles and you are using the triptronic function. Everything else you will need.


You don't need the little LED I just put that there to verify power...
« Last Edit: October 16, 2012, 09:33:33 AM by usmc_butler »

Tallon

  • Trade Count: (+4)
  • Hero Member
  • *****
  • Posts: 1268
  • Liked: 186
  • Member Rating Points: +18/-5
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #56 on: October 16, 2012, 09:02:14 AM »
Thanks Dustin!  ::angel
are there parts to the breadboard wiring I don't need?
« Last Edit: October 16, 2012, 09:11:58 AM by Tallon »

usmc_butler

  • Lambo Mafia
  • Administrator
  • Trade Count: (+11)
  • Hero Member
  • *****
  • Posts: 1677
  • Liked: 418
  • Member Rating Points: +33/-0
  • Mafia Productions
    • Lambo Mafia
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #55 on: October 16, 2012, 08:47:20 AM »
And here is the CODE! Remember use at your own risk this is NOT advised to use on any automobile on or off road and I take NO liability for ANY damages that may occur ::beers



/*
This code is to used to move an actuator to 7 different positions.
This code is provided as is with no warranty.
*/

#include <SoftwareSerial.h>
#define rxPin 3 // pin 3 connects to SMC TX
#define txPin 4 // pin 4 connects to SMC RX
#define resetPin 5 // pin 5 connects to SMC nRST
#define errPin 6   // pin 6 connects to SMC ERR
SoftwareSerial smcSerial = SoftwareSerial(rxPin, txPin);

// some variable IDs
#define ERROR_STATUS 0

// define our stop points
#define pos7 3900
#define pos6 3300
#define pos5 2800
#define pos4 2300
#define pos3 1900
#define pos2 1600
#define pos1 1400

int currentPos = 5;

void setup() {
  Serial.begin(9600);    // for debugging (optional)
  smcSerial.begin(9600);

  //On first power move the selected value.
  changePosition(currentPos);

  // clear the safe-start violation and let the motor run
  exitSafeStart();

  //Setup our digital pins for input mode.
  pinMode(22, INPUT);
  pinMode(26, INPUT);
  pinMode(30, INPUT);
  pinMode(34, INPUT);
  pinMode(38, INPUT);
  pinMode(42, INPUT);
}

void loop() {
  // Debuging code for looping through the digital ports.
  //for (int i = 0; i < 50; i++) {

      //place actuator in position 7
        if (digitalRead(22) == 1) {
          currentPos = 7;
          changePosition(currentPos);
          delay(1000);
         // break;
        }
        //place actuator in position 6
        if (digitalRead(26) == 1) {
          currentPos = 6;
          changePosition(currentPos);
          delay(1000);
          //break;
        }
        //place actuator in position 5
        if (digitalRead(30) == 1) {
         currentPos = 5;
         changePosition(currentPos);
         delay(1000);
         //break;
        }
        //place actuator in position 4
        if (digitalRead(34) == 1) {
          currentPos = 4;
          changePosition(currentPos);
          delay(1000);
          //break;
        }
        if (currentPos <= 4) {
          //move up
          if (digitalRead(38) == 1 && currentPos < 4) {
            Serial.println("Move up");
            currentPos = currentPos + 1;
            changePosition(currentPos);
            delay(1000);
            //break;
          }
          //move down
          if (digitalRead(42) == 1 && currentPos > 1) {
            Serial.println("Move down");
            currentPos = currentPos - 1;
            changePosition(currentPos);
            delay(1000);
            //break;
          }
        }

    /*
    //Debugging code to read digital ports. Used with the for loop above. 
        Serial.print("Digital port: ");
        Serial.print(i);
        Serial.print(":");
        Serial.println(digitalRead(i));
        delay(10);
    }
    */
 
    /*
    Serial.print("Current Position: ");
    Serial.println(currentPos);
    Serial.println("--------------------");
    */
 
   //Pause the loop for a moment.
    delay(100);
 
 //check for any errors on the error pin.
  if (digitalRead(errPin) == HIGH)
  {
    Serial.print("Error Status: 0x");
    Serial.println(getVariable(ERROR_STATUS), HEX);
    // once all other errors have been fixed,
    // this lets the motors run again
    exitSafeStart();
  }
}

//moveMotor based on number.
void changePosition(int positionNum) {
 switch (positionNum) {
   case 7:
     moveMotor(pos7);
     break;
   case 6:
     moveMotor(pos6);
     break;
   case 5:
     moveMotor(pos5);
     break;
   case 4:
     moveMotor(pos4);
     break;
   case 3:
     moveMotor(pos3);
     break;
   case 2:
     moveMotor(pos2);
     break;
    case 1:
     moveMotor(pos1);
     break;
  }
}

// returns the specified variable as an unsigned integer.
// if the requested variable is signed, the value returned by this function
// should be typecast as an int.
unsigned int getVariable(unsigned char variableID){
  smcSerial.write(0xA1);
  smcSerial.write(variableID);
  return readByte() + 256 * readByte();
}

// required to allow motors to move
// must be called when controller restarts and after any error
void exitSafeStart(){
  smcSerial.write(0x83);
}

// read a serial byte (returns -1 if nothing received after the timeout expires)
int readByte(){
  char c;
  if(smcSerial.readBytes(&c, 1) == 0){ return -1; }
  return (byte)c;
}

//Move the actuator to a target value
void moveMotor(int motorTarget) {
  word target = motorTarget;
  smcSerial.write(0xAA);
  smcSerial.write(0x0B);
  smcSerial.write(0xC0 + (target & 0x1F));
  smcSerial.write((target >> 5) & 0x7F);
}

usmc_butler

  • Lambo Mafia
  • Administrator
  • Trade Count: (+11)
  • Hero Member
  • *****
  • Posts: 1677
  • Liked: 418
  • Member Rating Points: +33/-0
  • Mafia Productions
    • Lambo Mafia
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #54 on: October 16, 2012, 08:43:24 AM »
Here is what everyone is waiting for this is the wiring diagram::thumbup


Some stuff is kind of confusing the top right picture is your car battery or 12 volt power supply. The motor simulates the Actuator with feedback (the diagram I used didn't have a actuator). Make sure your communication (tx & rx) between the two are reversed so there is communication between the Arduino and the JRK.
« Last Edit: October 16, 2012, 09:32:02 AM by usmc_butler »

usmc_butler

  • Lambo Mafia
  • Administrator
  • Trade Count: (+11)
  • Hero Member
  • *****
  • Posts: 1677
  • Liked: 418
  • Member Rating Points: +33/-0
  • Mafia Productions
    • Lambo Mafia
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #53 on: October 15, 2012, 08:13:23 AM »
Batwings and temp is easy, just hook your actuator to your fan relay so when your fans come on your wings rise. The only 1/2 tricky part is at around 80 the wings need to come down so they don't get ripped off from the wind speed  ::beers

jb1

  • Trade Count: (+2)
  • Full Member
  • ***
  • Posts: 80
  • Liked: 0
  • Member Rating Points: +0/-0
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #52 on: October 15, 2012, 01:30:47 AM »
I am working on a factory style odometer with trip meter,
 I am using a basic  black on green lcd ,  trying to find one green on black like factory but programming should be same...  from looks of it  , it might not be to bad at all to make the wings function based on speed, not looked to much into temp but probably would not be  hard either.  which would be preferred  bat wings based on speed or temp?

No Bull

  • Administrator
  • Trade Count: (+25)
  • Hero Member
  • *****
  • Posts: 1108
  • Liked: 299
  • Member Rating Points: +21/-0
  • Replication is the sincerest form of flattery
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #51 on: October 12, 2012, 09:20:43 PM »
Getting the speed in there is as simple as adding a GPS module and writing the code to look at the speed and trigger actuator position based on the GPS data.

Example:

1. 0 - 5mph @ 3 seconds = Home (down) position
2. 6 - 30mph = position 1 (1/4 way)
3. 31 - 60mph = position 2 (1/2 way)
4. 61 - 200mph = position full up (no 3/4 position because someone behind you wouldn't notice it)

GPS modules typically put out a series of standard strings of information, under something called the National Marine Electronics Association (NMEA) protocol. More information on NMEA standard data strings can be found at this site

The tutorial code at the bottom of this page demonstrates how to decode and display the most common string, called $GPRMC. If all you need is date, time and position, you can to skip reading this, and just run the code below.

While you can write software to serially request other strings from the Parallax module, the following strings are automatically transmitted when the "/RAW" pin is pulled low.

    $GPGGA: Global Positioning System Fix Data
    $GPGSV: GPS satellites in view
    $GPGSA: GPS DOP and active satellites
    $GPRMC: Recommended minimum specific GPS/Transit data

Each of these sentences contains a wealth of data. For example, here are a few instances of the $GPRMC string, aka the "Recommended minimum specific GPS/Transit data" string:

 eg1. $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62
 eg2. $GPRMC,225446,A,4916.45,N,12311.12,W,000.5,054.7,191194,020.3,E*68

           225446       Time of fix 22:54:46 UTC
           A            Navigation receiver warning A = Valid position, V = Warning
           4916.45,N    Latitude 49 deg. 16.45 min. North
           12311.12,W   Longitude 123 deg. 11.12 min. West
           000.5        Speed over ground, Knots
           054.7        Course Made Good, degrees true
           191194       UTC Date of fix, 19 November 1994
           020.3,E      Magnetic variation, 20.3 deg. East
           *68          mandatory checksum

 eg3. $GPRMC,220516,A,5133.82,N,00042.24,W,173.8,231.8,130694,004.2,W*70
              1    2    3    4    5     6    7    8      9     10  11 12

      1   220516     Time Stamp
      2   A          validity - A-ok, V-invalid
      3   5133.82    current Latitude
      4   N          North/South
      5   00042.24   current Longitude
      6   W          East/West
      7   173.8      Speed in knots
      8   231.8      True course
      9   130694     Date Stamp
      10  004.2      Variation
      11  W          East/West
      12  *70        checksum

Chris

No Bull

  • Administrator
  • Trade Count: (+25)
  • Hero Member
  • *****
  • Posts: 1108
  • Liked: 299
  • Member Rating Points: +21/-0
  • Replication is the sincerest form of flattery
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #50 on: October 12, 2012, 08:14:58 PM »
I'm impressed!

Anyone up to taking on a challenge?

http://lamboclone.com/index.php?topic=343.msg4357#msg4357   ::headbang


Chris

Fieroking

  • Trade Count: (+3)
  • Full Member
  • ***
  • Posts: 63
  • Liked: 14
  • Member Rating Points: +1/-0
    • Fieroking Customs
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #49 on: October 12, 2012, 01:24:10 PM »
Great work! Any chance of a wiring diagram to show how the 2 computer and the motor controller are connected together and the switches are tied into the system.
Thanks for sharing your work.

Thanks
Joe Sokol
www.fieroking.com
Joe Sokol
sokolja@roadrunner.com
WWW.FIEROKING.COM

usmc_butler

  • Lambo Mafia
  • Administrator
  • Trade Count: (+11)
  • Hero Member
  • *****
  • Posts: 1677
  • Liked: 418
  • Member Rating Points: +33/-0
  • Mafia Productions
    • Lambo Mafia
Re: Paddle Shift Setup Diary (Automatic Transmission)
« Reply #48 on: October 10, 2012, 12:34:42 PM »
The "VIN" and "GND" on the JRK actuator control unit will be a 12 volt power supply from your battery. If the actuator wont move that may be the problem.