Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [analog-to-digital]

For questions pertaining to signal conversion, either through hardware or software.

0
votes
2answers
26 views

Get different values from potentiometer even not touching

I have a potentiometer that is used to adjust volume level along with MCP3008 but even if I don't touch it, its values are going and coming as following. Press Ctrl-C to quit... Channel 0 minus 1: ...
1
vote
2answers
376 views

MCP3008 analogue digital converter… how can I use it for the complete opposite of what it was made for?

I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it. Now I have 7 ...
3
votes
2answers
55 views

How the fluctuation in MPC3008 ADC unused channels is explained?

I am using mpc3008 in order to convert the analogue signal of two sensors, for a rpi3. The sensors are, the SEN0189 turbidity sensor and the SEN0244 TDS sensor. The code I am using is the ...
-1
votes
0answers
37 views

Raspberry Pi ADC Adafruit_ADS1x15 IOError python 3

I'm trying to find the input from Adafruit's ADC (analog -> digital converter) and when I use: signal = adc.read_adc(0, gain = GAIN) I get: Traceback (most recent call last): ... File "/home/pi/...
0
votes
0answers
26 views

Digital weight scale callibration

I have built a digital scale, similar to the one explained here, using four 50Kg load cells forming the Wheatstone bridge. The following two steps give experiments give me different output which I do ...
0
votes
1answer
153 views

Raspberry Pi AD/DA converter

I am currently working on sensors and I'd like to read the sensor data into my Raspberry Pi. However, I have some difficulties with the Waveshare High-Precision-Board which I'm using. I just don't ...
0
votes
1answer
102 views

Raspberry Pi GPIO & Analog Sensors

I am fairly new to Raspberry and Coding/electro-engineering in general but wanna get it done anyways. I've some questions regarding reading data from analog sensors. Background: I got an AD/DA-high-...
1
vote
2answers
106 views

pi4j implementation for SPI communications with MCP3008 reading zeros

I have hardwired a MCP3008 IC into the SPI input on a Raspberry Pi3. MCP3008 is wired as follows: pin 10 (CS) to Pi GPIO_10 (pin 24) this is CE0 pin 11 (Din) to Pi GPIO_12 (pin 19) this is MOSI ...
0
votes
0answers
63 views

Running the Waveshare DAC with Python

I've been working on setting up and using the Waveshare High Precision AD/DA. I have it set up but I can't seem to figure out how to use it with Python as it seems to be rather poorly documented. (It ...
1
vote
1answer
151 views

Correct wiring for multiple analogue sensors?

I’ve recently embarked upon a project that I’ve wanted to do for a while. My overall plan is to have 3 planting shelves; each will have its own soil moisture sensor, water pipe and LED lighting. The ...
0
votes
0answers
589 views

Reading data from MCP3551 via SPI

I am trying to read data via SPI from an ozone sensor that I have connected to the Raspberry Pi's GPIO. This set up uses a Mikro Pi click shield and Mikro Ozone 2 click sensor. The output of the ...
-1
votes
1answer
139 views

Force Sensing Resistor with Raspberry Pi

I have a school project where I have to make a car park with a fully functional parking lot checking system. The FSRs job is to detect any weight and send a signal to the raspberry pi that the ...
1
vote
1answer
289 views

Reading values using MCP3002

I'm trying to use MCP3002 for the first time, and can't seem to get the basics to work I've been following this guide and am pretty certain that all my connections are right (updated photo below). ...
0
votes
2answers
333 views

problem with adc mcp3008 & ads1115

My raspberry 3Bs seem to have problems with their I2C and SPI bus. a. I tried MCP3008 using SPI connected with light sensor and temp sensor, the output on channel 0 &1 is only outputting zeros ...
0
votes
0answers
223 views

ADC for the raspberry pi zero w

Does anyone know of an ADC that I can use for a joystick to connect to the raspberry pi zero w? I have the adafruit pitft plus 2.8 resistive touch screen installed and it uses all the SPI pins I think....
0
votes
0answers
58 views

ADC Hat with 8 differential channels and 24 bit resolution for 100 - 200 SPS (Hz)

I'm sorry if there's a similar post, I could not find it (them). As the title implies, I'm looking for an ADC hat for the Rapspberry Pi 3 Model B with 8 differential channels to sample up to 200 SPS (...
0
votes
1answer
166 views

Interface AD7193 with Raspberry Pi

I have been trying to interface an ADC with raspberry Pi namely AD7193 via SPI . For that I have enabled my SPI and installed spidev on my pi. but i dont know what to do next in order to get the ...
0
votes
2answers
962 views

How to achieve a high sampling speed using an ADC with Raspberry Pi?

So, I am using the LTC 2366, 3 MSPS ADC and using the code given below, was able to achieve a sampling rate of about 380 KSPS. #include <stdio.h> #include <time.h> #include <bcm2835.h&...
0
votes
0answers
303 views

soil moisture sensor analog output is 0

I'm a newbie to pi and using it for my final year project to display moisture value of soil using the soil moisture sensor. I have followed this tutorial website for the connection and code and ...
0
votes
0answers
132 views

How to connect sensor to Raspi via poor man’s a/d converter?

TL/DR: I’m using this and there are things I don’t understand about this circuit. Ultimately I’d like to read data from this sensor, but all I get is gibberish. Please, help. I have set up “poor man’...
0
votes
1answer
213 views

combining sound card and ADC (I2C)

Am thinking of using an Audio Injector sound card, which apparently has a two-channel high-precision ADC. In addition I will be needing to read two different variable resistances. One of these has two ...
0
votes
1answer
156 views

Trouble with Flex Sensor and MCP3008

I'm working on a project currently, though things aren't quite working so I would like whoever's advice. So, to put it briefly, I'm using a Sparkfun Flex Sensor and an MCP3008 hooked up via a ...
1
vote
0answers
816 views

Measure ac power with invasive ct sensor 30A

I am measuring power(watt) with a non invasive sensor SF-SEN-11005 30A. After calibrating on 150 watt it works fine. When I disconnect the sensor I expect a zero value, which is not the case. The ...
0
votes
1answer
72 views

How to connect PCF8951 with Raspberry Pi

I want to connect PCF8951 with Raspberry Pi I'm following: 1: https://www.sunfounder.com/learn/sensor-kit-v2-0-for-raspberry-pi-b-plus/lesson-13-pcf8591-sensor-kit-v2-0-for-b-plus.html But when ...
0
votes
1answer
56 views

MC3008 vs. Justboom amp

I just ordered the Justboom AMP Zero pHAT. My project needs reading analog signals, too. So I also ordered a MCP3008 in order to convert from analog to digital. My question: is it possible to connect ...
2
votes
1answer
66 views

Odd results when measuring timing

Some introduction to my case: I have an ADC (MCP3008) connected to my RasPi with SPI. To that ADC I have connected 2 multiplexers (4051 dip-chips, I plan on connecting 8 multiplexers eventually). So ...
0
votes
1answer
497 views

No values from mcp3008

I can't get the mcp3008 to work. I have the wiring as in the pictures (hardware wiring), and I've re-checked it a few times, can't find any mistakes there. The left side of the mcp3008 on the picture ...
2
votes
1answer
83 views

Using a 28-Channel PIC microcontroller with the RP3

TL;DR: I have virtually no knowledge of electrical engineering and I want to know if I can connect this ADC to a Raspberry Pi 3 and be able to read 15+ piezoelectric sensors at a very low latency (≤ ...
1
vote
1answer
211 views

How to use the LTC2365 ADC with the BCM2835 library?

When I used the library with MCP3008 ADC, this is the code that I used: #include <stdio.h> #include <time.h> #include <bcm2835.h> int main(int argc, char **argv) { float seconds; ...
1
vote
2answers
48 views

How can I use the raspberry pi to read analog voltages

I have a device that puts out 0-5v based on what it's doing. How can I use the raspberry pi to read those voltages? I would then have scripts do whatever is needed or maybe display via a webpage. I ...
0
votes
1answer
444 views

Measuring 0-5 V DC with a good accuracy (~10 mV) using a Raspberry Pi

I'm totally new to Raspberry Pi and I want to use it for an important school project. My aim is to build a laser-seismograph using a laser pointer and 4 photodiodes which basically measure the laser'...
4
votes
2answers
1k views

Why can't I return value from python script to PHP script when trying to use GPIO

I have spent two days on this and have tried nearly everything I could find. I am using an apache server (2.4.10). I have two files in a folder called testPythonPHP that is located in the root ...
1
vote
2answers
209 views

Does the Sense HAT have an ADC?

I want to use analog signals with a Pi via the Sense HAT. Does the sense hat have an analog to digital converter (ADC)?
1
vote
1answer
295 views

Plotting information from analog-to-digital conversion

I am reading an analog signal in volts (0 - 1 V) using an adafruit ADA1115 chip. I want to save the data with at least 100 sps and plot it real time at the same time (plotting can be done at 1-10 Hz). ...
0
votes
1answer
322 views

Pi for control 20 analog outputs

We need 20 analog outputs with adjustable voltage (0-20 volts), frequency (0-150 Hz), as well as adjustable maximum current, and also the ability to measure current, frequency and voltage. How can ...
0
votes
1answer
2k views

What is the actual maximum sampling rate of MCP3008?

In the datasheet, the maximum clock frequency (when the ADC is powered with maximum voltage of 5V) is 3.6 MHz. Each read takes about 24 clock cycles which gives us a maximum sampling rate of about 150 ...
2
votes
1answer
126 views

Why is the `spi device` library faster than the Adafruit's MCP3008 library?

I was reading some values from a function generator using the MCP3008 ADC, however, I got 5 times as many samples with the spi device library than I did with Adafruit's MCP3008. Why is that the case? ...
-1
votes
1answer
2k views

Reading all channels MCP3008

I have a problem with reading data from adc convertor MCP3008 10bit. I found a python script from adafruit that give data value from all channels (CHO TO CH7). I added a picture with my results and ...
0
votes
1answer
280 views

Logic Behind MQx Sensors Calibration

Would you please explain the logic behind this snippet of code which is taken from here for calibrating MQx Sensor(s): def MQResistanceCalculation(self, raw_adc): return float(self.RL_VALUE*(...
0
votes
0answers
658 views

Analog Microphone with Raspberry PI [duplicate]

I have an analog microphone like this one : Is there a way to record audio from GPIOs and convert it to readable format, such as .mp3 or .wav ? I searched on Google, but I didn't find what i want .....
1
vote
3answers
841 views

A/D Converter Solution

We are working on developing an industrial refrigeration system. The RPi seemed like a good choice based on its ability to run Python and the number of I/Os. We need a fairly large number of sensors ...
0
votes
0answers
260 views

Analog & Digital Vibration Sensor - Cannot Read Values

I am trying to read in the values or the voltage of the SE040 Iduino vibration sensor. This sensor has both analog and digital outputs. I have the sensor connected to an MCP3008 ADC on my breadboard ...
0
votes
0answers
791 views

What is the code to read the analog values of the Sharp Distance Sensor

I want to code a script on the Raspberry Pi that would read the analog values from the Sharp Distance Sensor (GP2Y0A21YK0F), the Sharp Distance Sensor is interfaced to the MCP3002 ADC chip and the ...
0
votes
1answer
87 views

I am having trouble executing the code on the raspberry pi to read from the MCP3002 ADC

Hi I am writing a python script to code the raspberry pi to read from the MCP3002 ADC. This is the code that I typed in onto the raspberry pi nano script import spidev import time def readAnalog(...
0
votes
1answer
2k views

Raspberry Pi with MQ-2 Gas Sensor

I'm new here and wondering if anyone has set up an MQ-2 Gas Senson with a Raspberry Pi? I was following this article. I was able to get the SPI module loaded/working, but when I go to run the Python ...
0
votes
1answer
402 views

How to install wiringPi in Matlab Simulink for interface Raspberry Pi with ADC?

I like to use IC MCP3008 to change analogue signal to digital signal for Raspberry Pi interface with Matlab Simulink. But I getting the error missing file wiringPi.h and wiringPi.c. May I know how can ...
1
vote
1answer
161 views

Simultaneous using of Touchscreean LCD and MCP3008 on Raspberry Pi 3

I want to use a touchscreen LCD (3.5" TFT) and a MPC3008 ADC at the same time to monitor data fast and continuously in my project. And I know the data interface of each three parts (LCD, touch, and ...
0
votes
1answer
260 views

connect two mcp3002 IC to raspberry pi3 model B

I need use 4 sensor with analog output in raspberry pi3 . in my country we have only mcp3002. I can not get mcp3004. how I can connect two mcp3002 to raspberry pi3 for read data from 4 analog sensor??...
0
votes
1answer
299 views

Strange readings when connecting an FSR to Pi using MCP3008

1I have connected a square Adafruit Force Sensitive Resistor 406 up to a Raspberry Pi following the instructions given here: Using an FSR with a Raspberry Pi I have wired everything up exactly as ...
3
votes
2answers
831 views

Hardware for reading a large number of analog inputs?

I need to read a total of 64 analog voltages for a project I'm working on. This is a learning project and I'm starting from scratch, so I'm a bit lost. I've considered a 64-channel analog to digital ...