Hello,
I am trying to control a sprinkler remote using an arduino. But I cant figure out how to control the button pushes. Picture of button matrix thing I figured which wires to short for each button, but I cant figure out how to do this with an arduino.
I have tried using a transistor to connect two wires, but that doesnt activate the right button. (ex, I connect wires J7 and J3, which should press button 5, but instead it presses button 4.)
The only solution I can think of is using two servos to control which two wires are touching.
The only way to control it is to use a relay N/O contact across each individual switch. These panels are usually wired as a matrix so a transistor will not just operate one switch.
OK, you do not need a relay; you use a 74HC4066 quad analog switch.
Each switch can connect two wires for one button function when that switch input is pulled HIGH. We are presuming the remote operates from a battery voltage less than the Arduino, and you need to connect either the two negatives or the two positives together. If it happens to use three cells for 4.5V, you can power the Arduino from the same battery or power supply.
Paul__B:
OK, you do not need a relay; you use a 74HC4066 quad analog switch.
Each switch can connect two wires for one button function when that switch input is pulled HIGH. We are presuming the remote operates from a battery voltage less than the Arduino, and you need to connect either the two negatives or the two positives together. If it happens to use three cells for 4.5V, you can power the Arduino from the same battery or power supply.
Whats the difference between this and a few transistors?
That is a simple 4x3 keypad. There are examples of the keypad library. I would use that as a basis and then use some relays for the control.
The Keypad uses 7 pins on the arduino. It's a matrix so 4 rows x 3 columns. The keypad will not handle much current so only use it as an input device. Then use some simple relays to carry your load.
Paul__B:
Fewer components, smaller and simpler to use.
The transistor failed to activate the correct button, how would this be different? diagram
If I connect the wires J7 and J3 it presses button 5. However, if I use a transistor the button that gets pressed ends up being 4. Attemping to press 4 with the transistor will press 4, attempting 6 will press 4, 2 will press 1, 3 will press 1, ect.
samecr:
The transistor failed to activate the correct button, how would this be different? diagram
If I connect the wires J7 and J3 it presses button 5. However, if I use a transistor the button that gets pressed ends up being 4. Attemping to press 4 with the transistor will press 4, attempting 6 will press 4, 2 will press 1, 3 will press 1, ect.
that is because a transistor is not a switch.
show us how you wired your transistors..
samecr:
The transistor failed to activate the correct button, how would this be different? diagram
If I connect the wires J7 and J3 it presses button 5. However, if I use a transistor the button that gets pressed ends up being 4. Attemping to press 4 with the transistor will press 4, attempting 6 will press 4, 2 will press 1, 3 will press 1, ect.
A transistor requires base current to work. This requires some connection to Gnd for the base.
You need a voltage free closure of a switch. Using relay contacts simulates the existing switch.