I want to control some external hardwares on off buttons using arduino, like mobile phones numerical buttons, and camera on off buttons. I can do this with relay, but always relays causing chatter problem.
When I measure these button's two points It showing 2.72 volts, but in button pressed condition voltage level is zero. So is there anything possible for using common transistors like BC547, 2n2222.
Actually what is happening while pressing the button why this is goes zero.
I can do this with relay, but always relays causing chatter problem.
No they don't.
When I measure these button's two points It showing 2.72 volts
Is this across the button's two connectors?
but in button pressed condition voltage level is zero.
Well no surprise here if two points are at the same potential then the voltage measured between these two points will be zero.
You need to measure the voltage between the ground of the circuit and the two sides of the button. You could see one side being ground and the other being a voltage. Although that is only if the circuit in the thing you are measuring is a simple one.
There are lots of ways these buttons could be wired up, for example they could be in a scanning matrix.
The fool profs way to simulate the button press is to us an optically isolated FET. If you use a transistor you have to make a common ground between the two circuits.
yes, I measured each points of the buttons between Ground. When I measure the input point with reference to ground It is the same 2.72 volt, the output point and ground zero but in button pressed condition each point of the buttons are zero. Can you please elaborate how to use optically Isolated fets, with circuit diagram.
Grumpy_Mike:
No they don't.
Is this across the button's two connectors?
No I did it with relay actually I've connected both two input and out pin of the buttons with relay's common and normally opened pin, when I give a signal using arduino relays are giving button press connection to the external hardware. But's for long button press sometimes it's causing chatter.
but tell me how to use optically isolated fet pls.
Grumpy_Mike:
What do you mean by chatter?
You wire the FET output across your button and you wire the LED input like you would wire any other LED with a series resistor.
Chatter means it is relay bouncing the common port is on and off randomly.
so if led blinks the fet will switch on the button is it
Chatter means it is relay bouncing the common port is on and off randomly.
Yes but that doesn't square with what you said before:-
But's for long button press sometimes it's causing chatter.
If it is only contact bounce then that would not be worse on long presses, it would make no difference, that is why I don't think bounce is the problem. The other device should have contact debouncing built in.
You could try a small capacitor across the relay contacts 0.1uF if you have to ask the value.
and tell me I asked these question to many technical people near around me everybody said make it with transistor even though they can't give me transistor circuit.
How you know about these stuffs, and can you refer me how to get practical knowledge very well.
one more probs in LDR.
in ordinary button program in arduino samples I tried to LDR instead of push button. But it's not working.
but it only working for below 3 volt. Is there anyway to solve this.
I have been doing electronics since 1965, you pick up a few things you know.
and also i tried pullup resistor, hysteresis everything.
I am not sure what you mean by hysteresis, I am also sure that you do not know what this means either.
in ordinary button program in arduino samples I tried to LDR instead of push button. But it's not working.
but it only working for below 3 volt. Is there anyway to solve this.
Yes there is a way to solve this but only if you describe exactly what you are doing. That means posting a schematic of what you are doing along with the code you are doing it with.
and tell me I asked these question to many technical people near around me everybody said make it with transistor even though they can't give me transistor circuit.
I don't believe that. Attached is a diagram of how to use a transistor.
This is the example program which I'm working on. I need to use some thing instead of push button.
/*
Button
Turns on and off a light emitting diode(LED) connected to digital
pin 13, when pressing a pushbutton attached to pin 2.
The circuit:
LED attached from pin 13 to ground
pushbutton attached to pin 2 from +5V
10K resistor attached to pin 2 from ground
Note: on most Arduinos there is already an LED on the board
attached to pin 13.
created 2005
by DojoDave http://www.0j0.org
modified 28 Oct 2010
by Tom Igoe
This example code is in the public domain.
*/
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
OHHH ok sir anyway that problem solved Right now I have new problem, I'm currently doing DTMF decoder chip 8870 for that we have to input via Headphone but at the same time I need to disconnect it whenever i want, I can do this with relay, I'll connect one of the pin directly to the DTMF pin and another one to the relay common and relay n/o to circuit. So that I can de activate it when never I want using arduino.
is it possible to do it with anything without relay. pls help me.