Go Down

Topic: remote start channel expander (Read 1 time) previous topic - next topic


i would like to know how to make the arduino count button presses within a certain amount of time to control accessories
the way i want it to work is when you push the auxiliary channel button on the remote it will count the number of button presses and trigger a corresponding digital output
so if i were to push the button once it would turn on digital output 9 and then wait a preset time around 5 seconds before resetting the counter and turning the out put on
and if i were to push the button two times after tuning digital output 9 on it would turn on digital output 10 so both 9 and 10 would be on
i would like to do this with six outputs


Is the 'remote' an Arduino, or are you going to use an existing IR remote device? For the latter, you'd need an IR receiver and software to receive and decode button presses.

You would need a simple state machine in the Arduino to handle the button presses and the timed events. The state machine would have three states - idle, counting and outputting. Initially would be in the idle state. At the first button press it goes into the counting state and records the start time for the input sequence. At subsequent button presses it increments a 'button press count' variable. When the interval since the start time exceeds your threshold it would go into the outputting state and set the output pin states. When your output interval has elapsed, it would go back to the idle state. I imagine that if the aux channel button was pressed again during the output state you would want the input sequence to begin immediately.


the transmitter is a remote start unit with about 3500 feet of range when you push the auxiliary button it outputs a pulse for 1 second every time the button is pressed
and yes i would like it to immetietly start responding to the input afterwards while keeping other inputs that i have previously turned on to stay on
untill i press the remote 8 times or until I press a second button on the arduino


So you would have an existing hand-held IR transmitter, talking to an existing IR receiver in the vehicle. The IR receiver has an 'auxiliary' output (triggered by a corresponding button on the transmitter) which can be triggered to pulse on for about a second at a time. You want to connect an Arduino to this so that it can read the pulse as an input, count the pulses, and turn the corresponding output on. Each output turned out would stay on until you explicitly turned off all outputs by sending command 'eight' (eight pulses) or pressing a button on the Arduino. Is that the idea?

I guess the IR receiver is outputting 12V so you would need a voltage divider to bring this down into the 0-5V range that the Arduino can handle. Assuming you want the outputs to be 12V, you would also need either a transistor per output, or a transistor+relay, to switch a 12V supply from the Arduino's 5V outputs.

The software side would be very simple and I'd approach it as a state machine as outlined previously.

Go Up