I've already invested to much time to quit now. All i'm trying to do is connect two wires together remotely. Unfortunately i'm no Electrical Engineer, so i am trying to learn more about electricity and circuits as i go. The input pin is connected to 5V with a 220 ohm resistor. Then when you touch the input wire to any grounded part of the mill it causes the pin to change state. The problem with getting this to work with the IR TX/RX circuits, has been getting the voltage to go below 3.0V and stay there until the machine moves back the other direction. When i press the button on the switch it activates the TX but only momentarily, So it just blinks the RX and not makes it stay on until released. I have tried several different circuits found online, with similar results. Some didn't have any results at all.
What worked the best so far is connecting the ground wire to the emitter of an NPN Transistor and the input pin to the Collector, then connecting the output of the TSOP4838 to the base. The problem with that is that i have to pull the resistor from the base to get the circuit to work then place it back in when i want to simulate the other direction. Something like the image below. The only difference is there is no R2, and R1 is 4.7K. The other problem is it never really sinks the voltage below a few volts from 5V to between 2-3.4V. I really need it to go as close to 0V as possible. Transmitter is similar to th e one below. The other thing i need to do is invert the switch for the trigger of the transmitter, as it is normally closed and the transmitter will only trigger on the down state of the switch not the up state.
What worked the best so far is connecting the ground wire to the emitter of an NPN Transistor and the input pin to the Collector, then connecting the output of the TSOP4838 to the base. The problem with that is that i have to pull the resistor from the base to get the circuit to work then place it back in when i want to simulate the other direction. Something like the image below. The only difference is there is no R2, and R1 is 4.7K. The other problem is it never really sinks the voltage below a few volts from 5V to between 2-3.4V. I really need it to go as close to 0V as possible. Transmitter is similar to th e one below. The other thing i need to do is invert the switch for the trigger of the transmitter, as it is normally closed and the transmitter will only trigger on the down state of the switch not the up state.