Arduino Module Programming?
#11
It appears if you use 50 ohm resistors you will have the following # of closed switches vs. input reference voltage values:
# closed switches ref volts
0 5V
1 2.5V
2 1.7V
3 1.25V
4 1V
5 0.83V
One problem with this design is that you won't know which switch is closed, only how many (for example, how will the controller know when the downshift switch is pressed vs. the upshift switch). If you had each switch wired individually, you could just use each on a seperate digital input pin (I believe you can use the analog pins as digital pins as well) and the program logic would be very easy.
# closed switches ref volts
0 5V
1 2.5V
2 1.7V
3 1.25V
4 1V
5 0.83V
One problem with this design is that you won't know which switch is closed, only how many (for example, how will the controller know when the downshift switch is pressed vs. the upshift switch). If you had each switch wired individually, you could just use each on a seperate digital input pin (I believe you can use the analog pins as digital pins as well) and the program logic would be very easy.
#12
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes
on
109 Posts
i went through this conundrum too. the problem is i only have one wire coming though to the steering wheel (horn wire) otherwise i would need to buy a new expensive clockspring
the only way i could see doing it with the stock button steering wheel is to use the existing resistor network. i will need to setup a 5 volt power supply and check the voltages as i dont know the values of the resisters in the buttons, and it appears that there may be some diodes in there somewhere as my meter doesn't seem to read it right.
i believe the resistors are of different values so as to not confuse which button is being pressed, ie: if two buttons where to be pushed then the value does not add up to the value of another button.
the way it is set up is that the buttons are under a rocker mechanism so upshift and downshift cant be pressed at the same time.
i will take a photo of the buttons to see if that helps to explain it better
thanks Jason
---AutoMerged DoublePost---
another question: can this board except 12~14 (or higher with limiting resistors) volts as an input or only up to 5 volts?
asking because the solenoids monitored to determine which gear it is in are at the line voltage of the transmision
the only way i could see doing it with the stock button steering wheel is to use the existing resistor network. i will need to setup a 5 volt power supply and check the voltages as i dont know the values of the resisters in the buttons, and it appears that there may be some diodes in there somewhere as my meter doesn't seem to read it right.
i believe the resistors are of different values so as to not confuse which button is being pressed, ie: if two buttons where to be pushed then the value does not add up to the value of another button.
the way it is set up is that the buttons are under a rocker mechanism so upshift and downshift cant be pressed at the same time.
i will take a photo of the buttons to see if that helps to explain it better
thanks Jason
---AutoMerged DoublePost---
another question: can this board except 12~14 (or higher with limiting resistors) volts as an input or only up to 5 volts?
asking because the solenoids monitored to determine which gear it is in are at the line voltage of the transmision
Last edited by 2004LB7; 04-18-2012 at 07:50 PM. Reason: Automerged Doublepost
#13
the only way i could see doing it with the stock button steering wheel is to use the existing resistor network. i will need to setup a 5 volt power supply and check the voltages as i dont know the values of the resisters in the buttons, and it appears that there may be some diodes in there somewhere as my meter doesn't seem to read it right.
i believe the resistors are of different values so as to not confuse which button is being pressed, ie: if two buttons where to be pushed then the value does not add up to the value of another button.
the way it is set up is that the buttons are under a rocker mechanism so upshift and downshift cant be pressed at the same time.
i believe the resistors are of different values so as to not confuse which button is being pressed, ie: if two buttons where to be pushed then the value does not add up to the value of another button.
the way it is set up is that the buttons are under a rocker mechanism so upshift and downshift cant be pressed at the same time.
another question: can this board except 12~14 (or higher with limiting resistors) volts as an input or only up to 5 volts?
#14
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes
on
109 Posts
The arduino uno's recommended input is 7-12V, but I think it will take up to 20V.
this is so if you turn on the tap shift function while driving it wont jump from say 4th gear to 1st when starting out. this can also be used for normal use too. say the transmission happens to not shift (sometimes happens when pushing HP/towing, etc) the programmed counter does not get out of sinc with the transmission
1st gear = pin #2 & 4 hot
2nd gear = Pin #2, 3 & 4 hot
3rd gear = Pin #3 & 4 hot
4th gear = Pin#3 hot
5th gear = Pin#2 & 3 hot
since the only way (other then the can bus) to switch between 4th and 5th gear is the overdrive lockout function. this would be a separate relay wired in parallel with the O/D LO button on the shift lever.
one pin wired to this relay and another wired to the O/D LO light to monitor when it is on or off - if it is off pulse relay to turn it on (disable 5th gear when in 4th or lower) when in 4th pulse it to turn the lockout function off to enable 5th gear
attached is an update to the drawing. i added the TCC control via a relay and mosfet. the relay is used to trick the TCM and the mosfet is used with PWM to ramp on the TCC - hope that is not too much to ask. if it doesn't get ramped on you have the potential if braking hard parts so ether leave this part out or make it ramp on (we can start slow, 2 seconds, and test it till it feels like smooth but quick by shortening the ramp time)
#15
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes
on
109 Posts
ok, so i found a power supply at 5.30 volts (will retest again with a 5.00V one later)
tested it with R1 being at 10K ohm and here are the readings:
upshift = 2.15 volts
downshift = 3.05 volts
TCC on/off = 1.25 volts
tapshift on/off = 1.60 volts
what would be easier to program? one button that when pushed would turn on and when pushed again would turn off
or one button for on and another button for off?
i have 6 buttons to work with if the latter is easier
for a 6 button setup
upshift = 2.15 volts
downshift = 3.05 volts
TCC on = 1.25 volts
TCC off = 1.60 volts
tapshift on = 0.60 volts
tapshift off = 0.75 volts
tested it with R1 being at 10K ohm and here are the readings:
upshift = 2.15 volts
downshift = 3.05 volts
TCC on/off = 1.25 volts
tapshift on/off = 1.60 volts
what would be easier to program? one button that when pushed would turn on and when pushed again would turn off
or one button for on and another button for off?
i have 6 buttons to work with if the latter is easier
for a 6 button setup
upshift = 2.15 volts
downshift = 3.05 volts
TCC on = 1.25 volts
TCC off = 1.60 volts
tapshift on = 0.60 volts
tapshift off = 0.75 volts
#16
Brilliant idea to use resistors for having control on a single wire.
Basically you will use only one analog input on the module and 4 buttons are plenty.
Pulse 2 for 1 sec means keeping pin 2 on high for 1 second ?
What kind of PWM duty cycle do you need on pin 5 ?
What about turning manual mode on/off ? What output on what pin do you need for that ?
At this point I am not at home so I don't have access to my PC to actually test it but it should be close.
The Uno should work with up to 20v. I personally would use an LM317 to keep the voltage around 10v, just to be on the save side.
Basically you will use only one analog input on the module and 4 buttons are plenty.
Pulse 2 for 1 sec means keeping pin 2 on high for 1 second ?
What kind of PWM duty cycle do you need on pin 5 ?
What about turning manual mode on/off ? What output on what pin do you need for that ?
At this point I am not at home so I don't have access to my PC to actually test it but it should be close.
The Uno should work with up to 20v. I personally would use an LM317 to keep the voltage around 10v, just to be on the save side.
Last edited by AdrianD; 04-20-2012 at 03:06 AM.
#17
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes
on
109 Posts
Brilliant idea to use resistors for having control on a single wire.
Basically you will use only one analog input on the module and 4 buttons are plenty
with one button for locking and another for unlocking then you can push the lock button several times and still know what you will be commanding it to do
same for the TAP control functions. one button to enable another to disable it.
Pulse 2 for 1 sec means keeping pin 2 on high for 1 second ?
What kind of PWM duty cycle do you need on pin 5 ?
What about turning manual mode on/off ? What output on what pin do you need for that ?
The Uno should work with up to 20v. I personally would use an LM317 to keep the voltage around 10v, just to be on the save side.
thanks Jason
#18
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes
on
109 Posts
lets see if i could type up a flow chart for this
1. push Tap-shift-on button. 5 volts reference drops to 0.60 volts
1a. arduino board checks pins: 2, 3 & 4 to determine which gear the transmission is currently in and make pin #6 go high
1st gear = pin #2 & 4 hot
2nd gear = Pin #2, 3 & 4 hot
3rd gear = Pin #3 & 4 hot
4th gear = Pin#3 hot
5th gear = Pin#2 & 3 hot
1b. the arduino board activates relays 3, 4 & 5 and pulses pin #8 as needed to match the current gear
1st gear - relays 3 & 5
2nd gear - relays 3 & 4
3rd gear - relays 3, 4 & 5 all off
4th gear - relays 4 & 5 and if overdrive lockout indicator light is off (pin #7 = high) pulse pin #8 to turn on O/D LO
5th gear - relays 4 & 5 and if overdrive lockout indicator light is on (pin #7 = high) pulse pin #8 to turn off O/D LO
1c. the arduino board turns on pin #13 to activate relay #1
2. (run as a loop?) if 5 volts reference drops to 0.75 volts on pin #A0, turn off pin #13 to give gear selection control back over to the TCM for running as an automatic transmission, and make pin #6 go low
3. (run as a loop?) if 5 volts reference drops to 2.15 volts on pin #A0,
preform an upshift
ie: if in 3rd gear (relays 3, 4 & 5 all off) turn on relays 4 & 5 and if overdrive lockout indicator light is off (pin #7 = high) pulse pin #8 to turn on O/D LO
4. (run as a loop?) if 5 volts reference drops to 3.05 volts on pin #A0,
preform a downshift
ie: if in 4th gear (relays 4 & 5 and pin#7 high) turn off relays #3, 4 & 5
5. (run as a loop?) if 5 volts reference drops to 1.25 volts on pin #A0,
lock torque converter (turn on PWM on pin #5)
6. (run as a loop?) if 5 volts reference drops to 1.60 volts on pin #A0,
unlock torque converter (turn off PWM on pin #5)
attached is the latest drawing
Thanks Jason
1. push Tap-shift-on button. 5 volts reference drops to 0.60 volts
1a. arduino board checks pins: 2, 3 & 4 to determine which gear the transmission is currently in and make pin #6 go high
1st gear = pin #2 & 4 hot
2nd gear = Pin #2, 3 & 4 hot
3rd gear = Pin #3 & 4 hot
4th gear = Pin#3 hot
5th gear = Pin#2 & 3 hot
1b. the arduino board activates relays 3, 4 & 5 and pulses pin #8 as needed to match the current gear
1st gear - relays 3 & 5
2nd gear - relays 3 & 4
3rd gear - relays 3, 4 & 5 all off
4th gear - relays 4 & 5 and if overdrive lockout indicator light is off (pin #7 = high) pulse pin #8 to turn on O/D LO
5th gear - relays 4 & 5 and if overdrive lockout indicator light is on (pin #7 = high) pulse pin #8 to turn off O/D LO
1c. the arduino board turns on pin #13 to activate relay #1
2. (run as a loop?) if 5 volts reference drops to 0.75 volts on pin #A0, turn off pin #13 to give gear selection control back over to the TCM for running as an automatic transmission, and make pin #6 go low
3. (run as a loop?) if 5 volts reference drops to 2.15 volts on pin #A0,
preform an upshift
ie: if in 3rd gear (relays 3, 4 & 5 all off) turn on relays 4 & 5 and if overdrive lockout indicator light is off (pin #7 = high) pulse pin #8 to turn on O/D LO
4. (run as a loop?) if 5 volts reference drops to 3.05 volts on pin #A0,
preform a downshift
ie: if in 4th gear (relays 4 & 5 and pin#7 high) turn off relays #3, 4 & 5
5. (run as a loop?) if 5 volts reference drops to 1.25 volts on pin #A0,
lock torque converter (turn on PWM on pin #5)
6. (run as a loop?) if 5 volts reference drops to 1.60 volts on pin #A0,
unlock torque converter (turn off PWM on pin #5)
attached is the latest drawing
Thanks Jason
Last edited by 2004LB7; 04-21-2012 at 01:33 AM.
#19
Sorry I did not get back to you sooner, the whole work thing gets in the way. It looks like you have the electrical logic figured out. Now you just need some code - it sounds like AdrianD is helping you out on that front. This is a cool project, now I need to figure out how to do this on my PSD...
BTW, I saw in your sig you have water injection - how do you like it? What type of system do you have? Do you notice any power gains from running just water?
BTW, I saw in your sig you have water injection - how do you like it? What type of system do you have? Do you notice any power gains from running just water?
#20
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes
on
109 Posts
the whole work thing gets in the way
I need to figure out how to do this on my PSD
as for my water injection, its all home brew
https://www.dieselbombers.com/altern...-6-0-mods.html
check out post #22
dont notice any HP from it (butt dyno). run it to help with exhaust temps and to keep things nice and clean in side. i dont have a pyro gauge so it works mostly on faith