I posted this on "dodgeforum" but it might be useful here as well
I was thinking about adding manual switch to and I did but the problem is sooner or later you will forget to turn it off before stop . So after it happened to me few times I decided to do something.
After googling for a while I only cold find 2 solutions expensive buy control or cheap switch.
I didn't like both of them and made 3 one. It cost me about $20+time.
#1 List of materials
1. Arduino UNO. (eBay)
2. Arduino relay (eBay) or just 5V relay from scrap electronics....
3. Power supply for my old usb handsfree. (12v-5v)
4. op-amp amplifier. I found one in old bread maker AZ358
http://junwellcorp.com/Attachment.ph...rp.com.cn/pdf/
#4 can be LM128 or LM358 or probably many other op-amps.
5. Some wires.
#2 My truck
My truck is Ram 1998.5 5.9 24v diesel.
1. I found how to add manual switch here:
http://www.tstproducts.com/Torque%20...p%20Switch.pdf
2. I used speed sensor which is located on top of rear differential. The 2 wires come straight to ABS module in engine bay. (will post colors later).
The signal from speed sensor is low voltage, so I used op-amp amplifier to boost it.
#3 Wiring what where how
First and the most complicated part is op-amp. Here in this pdf find page #2 "Pin Configuration"
http://junwellcorp.com/Attachment.ph...rp.com.cn/pdf/
pin 1 output goes to pin #5 on Arduino board
pin 2 and pin 3 are 2 wires from speed sensor doesn't matter + or -
pin 4 ground goes to pin ground Arduino
pin 5,6,7 nothing
pin 8 +5 v from Arduino
Power supply can be any 5V USB car charger. I just soldered + and - to Arduino board.
I bought relay for Arduino but 5V relay can be found just about anywhere. I used pin #8 on Arduino board to turn relay ON/OFF.
I still have manual switch which can turn off TC lock manually even if Arduino keeps it locked. Here is handy for heavy towing.....
I also added LED which shows TC status Locked-ON Unlocked-Off
#4 Software
Just google Arduino and see what you need to install to make it work. Arduino soft is open source and FREE.
Also you need to read this if you like:
http://interface.khm.de/index.php/la...unter-library/
I used their code and just changed few things....
You need to Download >FreqCounter Library:
http://interface.khm.de/wp-content/u...unter_1_12.zip
You need to add this Library to make code work. Here what to do:
Arduino - Libraries
#5 Code
//====================================
#include <FreqCounter.h>
const int relayPin = 8;
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(57600);
Serial.println("Frequency Counter");
pinMode(relayPin, OUTPUT);
}
int torqLock=1875;
int torqUnlock=1700;
long int rpm;
void loop() {
FreqCounter::f_comp=12; // Set compensation to 12
FreqCounter::start(1000); // Start counting with gatetime of 100ms
while (FreqCounter::f_ready == 0) // wait until counter ready
rpm=FreqCounter::f_freq-FreqCounter::f_freq/500; // read result
Serial.println(rpm); // print result
//delay(1);
if (rpm < torqUnlock) {
// Unlock Relay off: HIGH
digitalWrite(relayPin, HIGH);
}
else if (rpm > torqLock) {
// Lock Relay on: LOW
digitalWrite(relayPin, LOW);
}
}
//========================================
#6 Code comments
In code you can see this 2 lines:
int torqLock=1875;
int torqUnlock=1700;
1875 is frequency from speed sensor @ 65 KMH (Canada)
1700 is frequency from speed sensor @ 59 KMH
This are your 2 parameters for Lock/Unlock.
How I found them? Easy.... When truck is running (I used 2 jacks to lift it up)
in Arduino tools-serial monitor pop up window will show frequency. I ran truck at 65 kmh and found frequency... the same for unlock...
#7 How it works???
1. Speed sensor sends signal to op amp amplifier
2. Amplifier amplifies it and sends it to Arduino pin #5
3. Arduino keeps checking frequency from amplifier pin #5. As soon as frequency is higher than 1875 (different trucks can be different) it sends signal to pin#8.
4. Pin #8 connected to relay which Locks/Unlocks TC (just like manual switch)
5. Relay is kept Locked until frequency doesn't fall to 1700.
6. When frequency is 1700 Arduino unlocks relay and TC is unlocked.
Please post your comments about this solution. It is not perfect but much better than manual switch and cost only about $20+ time to build it.
I still use manual switch to override Arduino some times. Here is scenario when I use manual switch. I drive uphill in traffic or just hill is steep. As soon as I reach 65kmh TC locks but load is too high for this slow speed. I will turn switch off. The Arduino keeps locking TC but I manually broke the circuit with switch.
I use Arduino auto lock when I drive on flat surface empty or with light load.
Later I will add button or POT to make speed Lock adjustable on the fly.
Enjoy