Hi there,
I recently came across this tutorial (https://www.sparkfun.com/tutorials/139) on how to read out the x and y coordinates of a touch on a 4 wire analog resistive touchscreen. I understand that in order to read the coordinates the touchscreen controller switches the meaning of the wires between 5V/ADC and floating/GND, and that this is not really a problem because the touch screen essentially acts as a voltage divider. However, I was wondering if it would be possible to build a circuit that acts as if it were a 4 wire analog touchscreen, and that could work with the same controller.
Given my limited knowledge of electronics, here's what I've come up with so far.
The left of the schematic shows the input pins, including variable voltages representing the X and Y coordinates, and a 5V source, separate from the one provided by the controller. The right of the schematic shows 4 pins corresponding to the wires of the touchscreen that the circuit is trying to replace. Each pin is marked A/B, where A is the function of the pin when the controller is reading the x coordinate, and B the function when the controller is reading the y coordinate.
My thought process when developing this circuit was as follows. I use pull-up resistors on the floating/ground pins to determine whether or not the PNP transistor should be open or closed to let the signals corresponding to the X and Y values through. Then, I use diodes to ensure no current flows into the transistor when pins SV2.1 and SV2.3 are in their 5V state.
Assuming the controller is reading the x coordinate the circuit works as follows (in my head). SV2.2 is floating, which means it will be pulled up to 5V, and T7 remains open, because SV2.1 = 5V. Additionally, SV2.4 = GND, which means T6 closes and SV1.3 is connected to SV3.3 (the ADC).
Now my question, is it possible for this circuit to work, or am I way off? I have not built it yet, because for now it's more of a though excercise, rather than something I intend to build (I also do not have the components). Also, I was wondering whether or not it is necessary to connect the grounds of SV1 and SV2 for it to work. However, how does one do this when the meaning of SV2's pins keep changing? My first thought would be to connect SV1.4 to FL/GND and GND/FL, because those are either always floating or ground. However, since my circuit uses the GND/FL pins to determine whether to open or close the transistors, I expect it to no longer work, if it already would have in the first place.
I recently came across this tutorial (https://www.sparkfun.com/tutorials/139) on how to read out the x and y coordinates of a touch on a 4 wire analog resistive touchscreen. I understand that in order to read the coordinates the touchscreen controller switches the meaning of the wires between 5V/ADC and floating/GND, and that this is not really a problem because the touch screen essentially acts as a voltage divider. However, I was wondering if it would be possible to build a circuit that acts as if it were a 4 wire analog touchscreen, and that could work with the same controller.
Given my limited knowledge of electronics, here's what I've come up with so far.

The left of the schematic shows the input pins, including variable voltages representing the X and Y coordinates, and a 5V source, separate from the one provided by the controller. The right of the schematic shows 4 pins corresponding to the wires of the touchscreen that the circuit is trying to replace. Each pin is marked A/B, where A is the function of the pin when the controller is reading the x coordinate, and B the function when the controller is reading the y coordinate.
My thought process when developing this circuit was as follows. I use pull-up resistors on the floating/ground pins to determine whether or not the PNP transistor should be open or closed to let the signals corresponding to the X and Y values through. Then, I use diodes to ensure no current flows into the transistor when pins SV2.1 and SV2.3 are in their 5V state.
Assuming the controller is reading the x coordinate the circuit works as follows (in my head). SV2.2 is floating, which means it will be pulled up to 5V, and T7 remains open, because SV2.1 = 5V. Additionally, SV2.4 = GND, which means T6 closes and SV1.3 is connected to SV3.3 (the ADC).
Now my question, is it possible for this circuit to work, or am I way off? I have not built it yet, because for now it's more of a though excercise, rather than something I intend to build (I also do not have the components). Also, I was wondering whether or not it is necessary to connect the grounds of SV1 and SV2 for it to work. However, how does one do this when the meaning of SV2's pins keep changing? My first thought would be to connect SV1.4 to FL/GND and GND/FL, because those are either always floating or ground. However, since my circuit uses the GND/FL pins to determine whether to open or close the transistors, I expect it to no longer work, if it already would have in the first place.