Go Down

Topic: Simulate push button with arduino (Read 9161 times) previous topic - next topic

dc42

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.
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.

Carlcox89

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

sirbow2

#47
Feb 16, 2012, 11:05 pm Last Edit: Feb 17, 2012, 04:11 am by sirbow2 Reason: 1
i got bored and wanted to control a RC car with arduino. i got it working easily :)

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: [Select]
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 :)

i made a blog post, are these right: http://dduino.blogspot.com/2012/02/trigger-buttons-with-arduino.html ?
http://dduino.blogspot.com all my Arduino/electronic projects!!!

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

tvcsantos

After a year let's revive this thread :P

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


AWOL

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.
"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.

tvcsantos


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 :(

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 :(

Thanks for your suggestion

Cheers,
Tiago

AWOL

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.
"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.

tvcsantos

#52
May 17, 2013, 12:40 pm Last Edit: May 17, 2013, 12:44 pm by tvcsantos Reason: 1

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

sirbow2

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.
http://dduino.blogspot.com all my Arduino/electronic projects!!!

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

tvcsantos


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?!

sirbow2

#55
May 17, 2013, 09:32 pm Last Edit: May 17, 2013, 09:34 pm by sirbow2 Reason: 1
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:
http://dduino.blogspot.com all my Arduino/electronic projects!!!

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

tvcsantos

#56
May 17, 2013, 11:40 pm Last Edit: May 17, 2013, 11:46 pm by tvcsantos Reason: 1

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

sirbow2

yes! dont you love it when things go to together like that :)
http://dduino.blogspot.com all my Arduino/electronic projects!!!

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

tvcsantos

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

sirbow2

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.
http://dduino.blogspot.com all my Arduino/electronic projects!!!

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

Go Up