Two Potentiometers on One Digital Input V2
Two Potentiometers on One Digital Input Version 2 with only 6 components including both potentiometers. Using an single Schmitt-Trigger inverter gate type SN74AHCT1G14-Q1. This makes the design not only very compact but also cheap.
In the Elektor Circuit Special 2023 I read the article 'Two Potentiometers on One Digital Input' by Clemens Valens. This immediately served as inspiration for me to realize more potentiometers on 1 digital input. However, I soon ended up with an ADC for such a setup. The fun is to realize something like this with a few simple and cheap components. That's why the article appealed to me!
By the way, I strongly suspected that it should be simpler. I made a few sketches that same afternoon, but didn't do anything with them anymore. Until last month I read the call to create a new project for the Elektor Circuit Special 2024 in which the circuit of the two potentiometers was included. That made me enthusiastic about it again and I scribbled a simpler version on a piece of paper.
To read one or two potentiometers with a microcontroller on a digital input, only 6 components are needed, including the potentiometers. When using only one potentiometer, a resistor with a fixed value can be used. This single Schmitt-Trigger inverter gate SN74AHCT1G14-Q1 is available in various housings including SOT25/SOT353 which fits on a standard 2.54mm experimental board.
The value of the potentiometers R1 and R2, as well as the value C1, have no value (*) and must be selected further. The lower C1 is selected, the higher the frequency becomes when the potentiometers are in the low range. If necessary, an additional resistor can be included in series with the potentiometers and diodes to limit very high frequencies at a low value of C1. Depending on the chosen microcontroller and the written software, you can choose a high or low frequency that the whole generates.
The capacitor is charged from the output of the Schmitt trigger inverter via R1 and D1. Depending on the position of potentiometer R1, this takes a certain time. The software can measure the time of a positive period. Then capacitor C1 discharges via D2 and R2. For potentiometer R2, the duration of the negative period is measured, because the output is then low. The frequency is not important, although it does say something about the position of both potentiometers. The working voltage is 5V.
Remark:
Article was changed on 08-05-2024.The non-inverting buffer, 74LVC1G17, has been replaced by the inverting gate type SN74AHCT1G14-Q1.
This text has been translated from Dutch using Google translate.
The images used are copyright-free or created by the author.
By the way, I strongly suspected that it should be simpler. I made a few sketches that same afternoon, but didn't do anything with them anymore. Until last month I read the call to create a new project for the Elektor Circuit Special 2024 in which the circuit of the two potentiometers was included. That made me enthusiastic about it again and I scribbled a simpler version on a piece of paper.
To read one or two potentiometers with a microcontroller on a digital input, only 6 components are needed, including the potentiometers. When using only one potentiometer, a resistor with a fixed value can be used. This single Schmitt-Trigger inverter gate SN74AHCT1G14-Q1 is available in various housings including SOT25/SOT353 which fits on a standard 2.54mm experimental board.
The value of the potentiometers R1 and R2, as well as the value C1, have no value (*) and must be selected further. The lower C1 is selected, the higher the frequency becomes when the potentiometers are in the low range. If necessary, an additional resistor can be included in series with the potentiometers and diodes to limit very high frequencies at a low value of C1. Depending on the chosen microcontroller and the written software, you can choose a high or low frequency that the whole generates.
The capacitor is charged from the output of the Schmitt trigger inverter via R1 and D1. Depending on the position of potentiometer R1, this takes a certain time. The software can measure the time of a positive period. Then capacitor C1 discharges via D2 and R2. For potentiometer R2, the duration of the negative period is measured, because the output is then low. The frequency is not important, although it does say something about the position of both potentiometers. The working voltage is 5V.
Remark:
Article was changed on 08-05-2024.The non-inverting buffer, 74LVC1G17, has been replaced by the inverting gate type SN74AHCT1G14-Q1.
This text has been translated from Dutch using Google translate.
The images used are copyright-free or created by the author.
Discussion (1 commentaire(s))