The pupose of this project is to control a linear actuator for automatic gear selection in a car. As the use is in a family car, the coding needs to be solid, and reliable from someone with good Arduino experience.
I'm driving the Actutor using a Pololu JRK motor controller: [url removed, login to view]
PDF including serial: [url removed, login to view]
I'm currently using the analogue input mode through the testing phase. This has allowed me to install and calibrate the 5 positions required. The Pololu software has allowed me to record these 5 positions as values - these can be set using either analogue, TTL or PWM modes. I'm now looking to control the positions using 5 push switches, introducing some logic for driving safety.
For the TTL control, I've bought an Arduino Uno.
Each time you press a switch, the Arduino will send the corresponding TTL stream to the Pololu JRK TTL input.
The switches are functionally: Park, Reverse, Neutral, Drive, Sport.
I would like to introduce logic for driving safety:
1) A digital input of Arduino to be used for footbrake signal. The footbrake needs to be on to select Park or Reverse. If no signal, a button push for either Park or Reverse is ignored. No TTL sent.
2) The Park or Reverse switches need to be pushed for >500ms to activate TTL code. All other buttons to be pushed for >200ms to prevent stray signals or contact bounce etc. This time period should be clearly labelled in the coding in case the timings need alteration.
Essentially then, I'm looking for 5 * switch triggered TTL pulses, with some simple logic.
I would like the code to identify the 5 positions, such that the positional values (which translate to actuator position) can be altered if required.
Any other ideas or enhancements to safety and driving simplicity greatly received.
I'm an old-school hardware guy, so your assistance on this small piece of programming would be very welcome...