How to send signal from potentiometer to ras pi?

Thread Starter

-live wire-

Joined Dec 22, 2017
956
Hi so basically I’m making a robotics thing with a motor and potentiometers. I have a raspberry pi 4 which i think only has digital inputs. Obviously a potentiometer is analogue and needs an ADC of some Sort.

Since I want to use like proportional control or something with the pots and the motors I need the ADC to be pretty quick to change, probably 10-50 milliseconds max. I also plan to use a 360 degree pot so I probably want at least 10 bits of resolution on it. The potentiometer that I’ll attach to the axel is pictured below.

I would really like to not have to go out and buy an ADC circuit, or try to get an arduino nano to communicate with a pi. I have some 555 ICs and a bunch of other RC components.

So how can I make a good ADC circuit with the 555? I’ve looked online and a lot of them only work between certain voltages, which would be annoying to find resistors and step up the voltage for. Like this circuit.

I also haven’t done a lot of electrical stuff recently so I forgot how to do some stuff.
 

Attachments

rt694157

Joined Dec 15, 2019
78
Hi so basically I’m making a robotics thing with a motor and potentiometers. I have a raspberry pi 4 which i think only has digital inputs. Obviously a potentiometer is analogue and needs an ADC of some Sort.
Raspberry Pi doesn't have inbuilt ADC. If you want to read analog signal you will need ADC. I will recommand ADC 1115. look at tlink https://learn.adafruit.com/raspberry-pi-analog-to-digital-converters/ads1015-slash-ads1115 . I hope this link helps you
 

trebla

Joined Jun 29, 2019
487
In the very old days when MCU-s with ADC were'nt widely available, was one approach to connect a small capacitor in series with potentiometer to digital GPIO. When making GPIO pin to output and pulling high for short time, the cap charged via pot to certain voltage value. Then switcing same GPIO to input and measuring time until GPIO falls to zero. Unfortunately i have'nt any example design files left from this old times. I remember, the capacitor was 100nF, pot was 5k and a good idea is put a 1k-2k protection resistor in series to cap and pot (one end of pot is going to cap and other to ground). You must find correct time for cap charging, otherwise the cap will be allways with same charge or without significant charge.
 
Top