Pages: 1 2 3 [4] 5   Go Down
Author Topic: Simulate push button with arduino  (Read 8047 times)
0 Members and 1 Guest are viewing this topic.
United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

2n2222 is intended for switching a much higher current than in this application, so its hfe (current gain) is rather low at the collector current used here. However, it should work nevertheless.

If you bought a spare 2N7000 then you could also use that, connecting it to the Arduino pin in the same way as the other 2N7000.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Full Member
***
Karma: 0
Posts: 143
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got the power button working smiley controlled by arduino.
Now i just have to test the mode button
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 486
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i got bored and wanted to control a RC car with arduino. i got it working easily smiley

the pin for "forward" on the TX IC in the transmitter is at 3v when open, 0 when pressed on. so i put a diode from the IC pin to a arduino digital pin and used:
Code:
digitalWrite(powerButton, LOW);
  pinMode(powerButton, OUTPUT);  // Pull the signal low to activate the power button
  delay(500);  // Wait half a second
  pinMode(powerButton, INPUT);  // Release the power button.
  delay(500);  // Wait half a second

works awesome, if anyone wanted feedback smiley

i made a blog post, are these right: http://dduino.blogspot.com/2012/02/trigger-buttons-with-arduino.html ?
« Last Edit: February 16, 2012, 10:11:13 pm by sirbow2 » Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After a year let's revive this thread smiley-razz

So I'm pretty new at this Arduino stuff, and I only have basic knowledge of electronics.

I started building a project, where I need to simulate pressing a button. I have the following circuit:



This circuit contains 3 sets of pads, each composed of an outer ring, and a centre contact. Over each pad a metal dome held down with an adhesive pad is placed, and the dome, when pressed, makes contact between the outer ring and the central pad.

So I need to simulate this behavior of connecting the centre contact with the outer ring.

Your help would be appreciated

Thanks,
Tiago

Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26326
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Simplest (if you don't have any more details of the existing hardware) would be a simple reed relay wired across the contacts.
Some can even be driven directly by an I/O pin, but don't forget a diode across the coil.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Simplest (if you don't have any more details of the existing hardware) would be a simple reed relay wired across the contacts.
Some can even be driven directly by an I/O pin, but don't forget a diode across the coil.

Yes I only know that I have to connect the inner centre to the outer circle smiley-sad

Can't I use a transistor or something? Relays occupy a lot o space, and since I have 3 pads I would need 3 relays. I would prefer to have something smaller, because I kind of have space constrains on what I'm working smiley-sad

Thanks for your suggestion

Cheers,
Tiago
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26326
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could use a 4066 analogue switch, ut I don't know what you're switching.
Reed relays come in DIL packages, and relay or transistor, you'd still need three of them - you never mentioned space constraints.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could use a 4066 analogue switch, ut I don't know what you're switching.
Reed relays come in DIL packages, and relay or transistor, you'd still need three of them - you never mentioned space constraints.


Hum ok, what do you mean by

... I don't know what you're switching.

Sorry if am not understanding, and yes sorry about not mentioning the space constrains.

I'll try do explain better so I want to use Arduino, for example using digital outputs such that when I send a HIGH it will connect the inner centre to the outer circle and when it is LOW then there is no connection between them.

EDIT: This circuit board that I've shown is the board of apple headphone controlers

http://david.carne.ca/shuffle_hax/shuffle_remote.html

Thanks,
Tiago
« Last Edit: May 17, 2013, 05:44:55 am by tvcsantos » Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 486
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

turn on the device and measure voltage: one probe on ground, one on the center pad measure that voltage, then measure the outer ring. now, change to continuity test mode on your voltage meter. if the outer pads are connected (~1 ohm resitance, or your meter beeps) then the the center pad needs to be switched by the arduino and have a pull down/up resistor to the outer pad.
Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

turn on the device and measure voltage: one probe on ground, one on the center pad measure that voltage, then measure the outer ring. now, change to continuity test mode on your voltage meter. if the outer pads are connected (~1 ohm resitance, or your meter beeps) then the the center pad needs to be switched by the arduino and have a pull down/up resistor to the outer pad.

Ok I'll do that, but what do you mean by

... then the the center pad needs to be switched by the arduino and have a pull down/up resistor to the outer pad.

switched with what?!
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 486
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i suck at explaining, dont i hah. here is my blog post might make more sense: http://dduino.blogspot.com/2012/02/trigger-buttons-with-arduino.html

specifically this:
« Last Edit: May 17, 2013, 02:34:37 pm by sirbow2 » Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i suck at explaining, dont i hah. here is my blog post might make more sense: http://dduino.blogspot.com/2012/02/trigger-buttons-with-arduino.html

specifically this:

Hum ok, I think your page is starting to make sense. Tomorrow I'll measure the voltage of the remote control. Other thing you say that you have a +3v circuit, but arduino outputs +5v on digital output, isn't that a problem?

EDIT: Ahh OK, I guess I'm understanding, there is not the problem that I've mentioned before, becuase you are not giving +5v to your circuit. In the first one you are all pulling to ground, so OK. In the second one you are driving the PNP with the digital ouput, but actually the current that is flowing is +3v, so OK agian. That's it, isn't it? I guess things are starting to make sense
« Last Edit: May 17, 2013, 04:46:58 pm by tvcsantos » Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 486
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes! dont you love it when things go to together like that smiley
Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok i had some time and measured the voltage. So the outer rings are all connected to GND. The middle centre pad is 2.34V when open and 0V closed. The other centre pads, left and right are 0.06V open and 0V closed.

I have read the previous posts, so this is a pull down to gnd. I only have available bs170, 2n2222A, IN4001, and several resitances, do you think I can simulate pressing the buttons with this parts.

Your help would be appreciated,
Thanks
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 486
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the first one is pulled up to ~2.3v so that when gnd is connected to that center pad, the MCU senses gnd, and the 2.3v goes to gnd through the resistor (so it doesn't create a short to ground). thats really strange for the other pads. .6v shouldnt be enough for a mcu to sense.

so for the center, you just need a diode. please check the other two again.
Logged

http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:
[url]http://ar

Pages: 1 2 3 [4] 5   Go Up
Jump to: