Hello,
I want to control a 4 pin momentary button like this with an arduino.
The circuit with the button is powered with a 9V block. I don’t want to share the ground with the arduino.
In the circuit ( attached velleman k171) button pins 1 and 3 are connected to the ground plane and
the other one 2 and 4 are connected to the IC HT8950 to control TGU and TGD.
When the button is open the pins 1/2 plus 3/4 are steadily connected.
when its closed it changes to the pairs 1/3 plus 2/4 as also described in the link. What i´m missing in the explanation in the link is that when the button is closed pins 1/3 plus 2/4 are additionally connected to 1/2 and 3/4 right? If not where would be the ground then...?
What happens by hand when I connect pins 1, 2 and 4 for a moment it triggers TGD as I would like to control externally.
How could I do this automatically?
So FIRST I tried:
- connected pin pair 1/2 to the collector of a 2N2222, so that the collector leg is in the middle of the to pins
- connected pin 4 to the emitter
- connected a 1k resistor to the base and sent a slow PWM between 0 and 5V from the Arduino
—> what happened is that the pitch changed but NOT in the frequency of my arduino PWM. it changes about every 300ms.
why and how can that happen? where does that frequency come from?
I guess that a problem could be that the threshold of the 2N2222´s base is 10 V and I just had 5V?
NEXT
I tried it with a MOSFET IRF540N because if I read correctly in the datasheet it has a Gate-Treshold Voltage of 2V.
I have basically the same routing with the pins as in the first attempt except that I put a voltage divider in front of the MOSFET´s gate because the max. threshold level is 4V.
But nothing changed there is still that unknown frequency.
What am I missing?
Thanks in advance
I want to control a 4 pin momentary button like this with an arduino.
The circuit with the button is powered with a 9V block. I don’t want to share the ground with the arduino.
In the circuit ( attached velleman k171) button pins 1 and 3 are connected to the ground plane and
the other one 2 and 4 are connected to the IC HT8950 to control TGU and TGD.
When the button is open the pins 1/2 plus 3/4 are steadily connected.
when its closed it changes to the pairs 1/3 plus 2/4 as also described in the link. What i´m missing in the explanation in the link is that when the button is closed pins 1/3 plus 2/4 are additionally connected to 1/2 and 3/4 right? If not where would be the ground then...?
What happens by hand when I connect pins 1, 2 and 4 for a moment it triggers TGD as I would like to control externally.
How could I do this automatically?
So FIRST I tried:
- connected pin pair 1/2 to the collector of a 2N2222, so that the collector leg is in the middle of the to pins
- connected pin 4 to the emitter
- connected a 1k resistor to the base and sent a slow PWM between 0 and 5V from the Arduino
—> what happened is that the pitch changed but NOT in the frequency of my arduino PWM. it changes about every 300ms.
why and how can that happen? where does that frequency come from?
I guess that a problem could be that the threshold of the 2N2222´s base is 10 V and I just had 5V?
NEXT
I tried it with a MOSFET IRF540N because if I read correctly in the datasheet it has a Gate-Treshold Voltage of 2V.
I have basically the same routing with the pins as in the first attempt except that I put a voltage divider in front of the MOSFET´s gate because the max. threshold level is 4V.
But nothing changed there is still that unknown frequency.
What am I missing?
Thanks in advance