razor7877 / SpectroPi

A project about creating a cheap and simple UV-VIS spectrophotometer using a Raspberry Pi
0 stars 0 forks source link

Get analog to digital converter working with the Pi #5

Closed razor7877 closed 6 months ago

razor7877 commented 7 months ago

The Raspberry Pi GPIO pins are only digital pins, which means the photoresistor cannot directly be used with it. Therefore, I am trying to use an Adafruit ADS1115 ADC to get a digital signal.

razor7877 commented 7 months ago

Here is documentation for using the ADS1115 with CircuitPython: https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/python-circuitpython

razor7877 commented 7 months ago

Install the required library with pip using sudo pip3 install adafruit-circuitpython-ads1x15

razor7877 commented 7 months ago

IMG20240307110105

razor7877 commented 7 months ago

I2C interface needs to be manually enabled on the Raspberry Pi 3B using sudo raspi-config before it can be used

razor7877 commented 6 months ago

A multimeter was used to test the voltage of the different pins. Both 3.3V and 5.0V input voltages have been tried. The VDD, ADR, SCA and SDL pins are at the correct voltages. A brand new ADS1115 was used and didn't work either. The GPIO pins of the Raspberry Pi were tested using gpiotest & pigpio and all work correctly. The ADS1115 is still not detected using i2cdetect. The I2C bus was already enabled using raspi-config. An Arduino Uno R3 will be used instead as it already contains analog inputs.