i need to control the two solenoids on a transmission i,m building. the transmission work by turning on/off the solenoids. using the simple button code i am able to turn on a led that represents the solenoid. i attempted to write a code to toggle both solenoids/led when i press a upshot button or a down shift button. could some one help me with the code?
solenoid 1-solenoid 2
1st - on - off
2nd- on - on
3rd- off - on
4th- off - off
//Paddle shift transmition controler
int button = 2; // upshit
int button1 = 4; // down shift
int soleniod1 = 10;
int soleniod2 = 11;
int pressCount = 0;
int count = 0;
int buttonstate1=0;
int buttonstate2=0;
You need to do debouncing to that buttons. (you have one example for that in your IDE)
You need to reset the counters (when they reach maximum and/or minimum), or don't let they go further.
I don't think luissilva's advice is all that useful. You do NOT want to be counting when the switch IS pressed. You need to count only when the switch BECOMES pressed.
Start with the state change detection example.
Edit: Not yet, anyway. You will need to debounce the switches, if that proves necessary. It depends on what happens after you detect a state change.
Are there any safety concerns if the transmission shifts up or down unexpectedly? For example, if this is a vehicle transmission there may be concerns about over-revving the engine, or causing excessive engine braking leading to loss of control.
Another Newbie with an Electronic Transmission Controller need.
For a Mercedes/Chrysler/Jeep. 722.6 5 speed
Im not sure is previous answers would work for my application.
Hi guys, I am a huge fan of Arduino and big day dreamer who is tired of day dreaming, so I finally bought a Mega 2560 to bring my dreams to reality.
Problem is I've never programmed before.
Did Electronics/Mechanical engineering in school but that was before Arduinos.
If this topic has been covered before and I can be pointed into the right direction I would appreciate it.
I have a 5 speed automatic transmission I'd like to control also with possible paddle shift mode.
It has a total of 6 solenoids.
3 solenoids to shift 1st to 5th and back to 1st (1st-2nd/4th-5th uses the same solenoid) #4 solenoid is for Torque Converter Clutch #5 solenoid is for Modulated Pressure Control #6 solenoid is the Shift Pressure Control
(Solenoids here are not in any articular order)
I have played around with some sketches and has basic understanding on it but I'm still learning other language aspect of the sketches.
The shift pattern of this transmission is as follows
GEAR | 40% duty cycle| 33%duty cycle
SHIFTS | 1-2/4-4 | 2-3 | 3-4 | MOD PC #5 | SHIFT PC #6 | TCC |
1ST --- OFF -- OFF - OFF - PWM OFF OFF
SHIFT --- ON -- OFF - OFF - PWM PWM OFF
2ND --- OFF -- OFF - OFF - PWM OFF PWM
SHIFT --- OFF -- ON - OFF - PWM PWM PWM
3RD --- OFF -- OFF - OFF - PWM OFF PWM
SHIFT --- OFF -- OFF - ON - PWM PWM PWM
4TH --- OFF -- OFF - OFF - PWM OFF PWM
SHIFT --- ON -- OFF - OFF - PWM PWM PWM
5TH --- OFF -- OFF - OFF - PWM OFF PWM
I am known to over engineer things. Did I make this too complicated?