| Electronics > Projects, Designs, and Technical Stuff |
| Digitally controlling resistance between GPIO pins |
| (1/2) > >> |
| imagiko:
I am looking to electrically control the resistance between two points that will each be connected to a GPIO pin. I also want to have the option of keeping the points "open". My idea to achieve this is to use a digital rheostat such as this one from AD: https://www.analog.com/media/en/technical-documentation/data-sheets/ad5241_5242.pdf To keep the points open, I think I should use a MOSFET as a switch (one on each GPIO line) to bring the resistance in and out between the GPIOs. Although I am not entirely sure if I should use a p or n channel MOSFET here. Is this a decent way to achieve an open circuit and a finite, digitally controlled resistance between two GPIOs? Thanks! |
| ejeffrey:
Yes, a digital pot is a perfectly good way to do this. To open circuit use an analog switch instead of a single mosfet. |
| imagiko:
I want to use two MOSFETs, one on each terminal as I want to electronically bring the resistance in and out |
| mvs:
--- Quote from: imagiko on October 21, 2018, 08:10:52 pm ---I am looking to electrically control the resistance between two points that will each be connected to a GPIO pin. I also want to have the option of keeping the points "open". --- End quote --- It sounds a bit odd. May i ask, why do you need programmable resistance between two digital pins? --- Quote ---To keep the points open, I think I should use a MOSFET as a switch (one on each GPIO line) to bring the resistance in and out between the GPIOs. Although I am not entirely sure if I should use a p or n channel MOSFET here. --- End quote --- Source of the MOSFETs will be floating between rails of GPIOs. How do you plan to controll this MOSFETs (apply gate-source voltage)? Isolated control circuit with own power supply? Analog switch (74HC4066) is IMHO a better solution here. --- Quote ---Is this a decent way to achieve an open circuit and a finite, digitally controlled resistance between two GPIOs? --- End quote --- There are always some leakage and capacitance in semiconductors... You need to define "open circuit". |
| SiliconWizard:
Yeah. Tell us what exactly you want to achieve, so we can tell you how you can do without it. ;D |
| Navigation |
| Message Index |
| Next page |