I am trying to simulate button presses on a cell phone by using the Arduino to complete the button circuit thus simulating a button press. I figured out I have to use a transistor but I can't get it to work.
4 Answers
Here's a test I would do before I tried to replace the button with a transistor: check to see whether the closing of the circuit pulls the joined contacts high or low. Once you know that, you can design the right replacement circuit.
To explain a little more: when the button is not pressed, one terminal will be high (3.3 V, maybe?) and the other will be low (0 V). When you press the button, does the low one get pulled up to 3.3 V, or does the high one get pulled to 0 V?
If you're trying to pull a terminal low when you should actually be pulling the other terminal high, I don't think the circuit will behave like you want.
-
\$\begingroup\$ That approach assumes that the button is connected directly to a pin somewhere in the phone. If the button is part of a scanned grid (like many keyboards), tying the line high or low could give you some pretty crazy results. A mosfet would make more sense in that situation. \$\endgroup\$– phookyCommented May 12, 2010 at 3:41
-
\$\begingroup\$ @phooky: Right-- the scanned grid is a likely implementation, and a MOSFET is the right tool for the job. I'll add more detail if jason11 comes back with some answers, or you can. Know a good N-channel / P-channel MOSFET pair? \$\endgroup\$ Commented May 12, 2010 at 12:54
What phone are you using?
I took a look at this over the weekend. It seems (unsurprisingly) that there is more than one button mechanism.
An old Verizon/Samsung phone I pulled apart had separate buttons which looked like discretes. Endolith/Pingswept seem to be on the right track with testing.
Analogue switches like those in the 74HC4066 are often used in situations like that.
I've used these 5V DIL relays before, with great results. They are low-current reed relays that can be driven directly from the Arduino. Using these would negate the need to work out whether the terminal goes high or low - just connect the relay pins across the button's contacts.
Also, the link is to Jaycar Electronics in Australia, who I can highly recommend.