Audio Equipment/Electrical Discussions Based on Automotive Stereo Equipment Such As Amps , Head Units & Speakers Including Installation and System Set Up Information. Electrical or wiring issues on anything that requires wiring.

Arduino Module Programming?

Thread Tools
 
Search this Thread
 
  #11  
Old 04-18-2012, 06:46 PM
PSDGuy's Avatar
Diesel Fan
Join Date: Apr 2012
Location: Oregon
Posts: 13
Likes: 0
Received 0 Likes on 0 Posts
Default

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.
 
  #12  
Old 04-18-2012, 07:50 PM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

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
 

Last edited by 2004LB7; 04-18-2012 at 07:50 PM. Reason: Automerged Doublepost
  #13  
Old 04-18-2012, 09:27 PM
PSDGuy's Avatar
Diesel Fan
Join Date: Apr 2012
Location: Oregon
Posts: 13
Likes: 0
Received 0 Likes on 0 Posts
Default

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.
Okay, this makes sense. Now you just need to get your 5V source set up and you can just probe the reference node while pressing the buttons to see the corresponding voltage values.

another question: can this board except 12~14 (or higher with limiting resistors) volts as an input or only up to 5 volts?
The arduino uno's recommended input is 7-12V, but I think it will take up to 20V.
 
  #14  
Old 04-18-2012, 11:44 PM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

The arduino uno's recommended input is 7-12V, but I think it will take up to 20V.
so it should be fine to tap into the solenoid power wires to monitor which ones are live right?

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)
 
Attached Files
File Type: zip
Tap shift circuit update 1.zip (104.4 KB, 13 views)
  #15  
Old 04-19-2012, 12:35 AM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

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
 
  #16  
Old 04-20-2012, 02:50 AM
AdrianD's Avatar
Diesel Enthusiast
Join Date: Aug 2010
Location: Transylvania
Posts: 98
Received 10 Likes on 9 Posts
Default

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.
 

Last edited by AdrianD; 04-20-2012 at 03:06 AM.
  #17  
Old 04-21-2012, 12:18 AM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

Brilliant idea to use resistors for having control on a single wire.
thanks. needed to come up with a way to use the one wire that i had coming into the steering wheel to operate multiple controls. not all my idea though. it has been used before through out electronics. when i was trying to learn about the input monitoring for the arduino board i came up with the idea for this

Basically you will use only one analog input on the module and 4 buttons are plenty
well i was hoping to use the 6 button (actually 7 as i need one for the horn) setup as it seems to be less error prone. say you push the button for locking the torque converter and push it again to unlock it, if for some reason you cant tell if its locking or it wont lock and you push it again trying to get it to lock well you would now be giving the command to unlock.

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 ?
yes. the overdrive lockout function needed to switch between 5th and 4th gear is activated by holding down the tow/haul button for approximately 1 or more second

What kind of PWM duty cycle do you need on pin 5 ?
this will have to be experimented with. i am thinking ramping from0% to 98% in about 1.5 seconds. the time is what we will need to play with

What about turning manual mode on/off ? What output on what pin do you need for that ?
one button for turning it on and one for turning it off. the output pin is 13 but any free pin used to activate relay #1 will work. relay #1 is used to transfer the wires going down to the NSBU switch (the column shifter for gears 1, 2, 3 & D activates the NSBU switch) to relay #3, 4 & 5 which is used to trick the transmission into thinking the column shifter is being changed

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.
i will use a voltage regulator to provide a steady voltage to run the board. i was wondering what the max voltage the input sensing pins can handle. the solenoids that need to be monitored are run at the vehicle voltage. otherwise relays or maybe a string of diodes to drop the voltage down to a safe level for the input pins will be used

thanks Jason
 
  #18  
Old 04-21-2012, 01:23 AM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

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
 
Attached Files
File Type: zip
Tap shift circuit update 2.zip (106.2 KB, 11 views)

Last edited by 2004LB7; 04-21-2012 at 01:33 AM.
  #19  
Old 04-23-2012, 12:15 PM
PSDGuy's Avatar
Diesel Fan
Join Date: Apr 2012
Location: Oregon
Posts: 13
Likes: 0
Received 0 Likes on 0 Posts
Default

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?
 
  #20  
Old 04-23-2012, 06:16 PM
2004LB7's Avatar
Diesel Bomber
Thread Starter
Join Date: Dec 2010
Location: Fool's Golden State
Posts: 1,190
Likes: 0
Received 113 Likes on 109 Posts
Default

the whole work thing gets in the way
i hear you, lately I've been having to work on the weekends, not really complaining though - work is work

I need to figure out how to do this on my PSD
do you have the wiring diagram/schematic for your truck? maybe i can help. wires are wires. don't know much about Fords & not having the truck in front of me will make it that much more difficult. but i will still give it a try if you are interested

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
 


Quick Reply: Arduino Module Programming?



All times are GMT -5. The time now is 08:21 PM.