6 votes

Rpi Reading MCP3008 10 bit ADC Result Problem

Those resistors are in fact too high. Section 4.1 "Analog Inputs" (p. 17) and figures 4-1 and 4-2 (p. 18) of the datasheet are of special interest: For the A/D converter to meet specification, the ...
Ghanima's user avatar
  • 15.9k
6 votes
Accepted

MCP3008 and Raspberry Pi Zero

Yes, you can. There's no difference in the GPIO/SPI capabilities of any Pi models. Here's a guide which includes wiring, enabling hardware SPI and reading analog input signals with Python (though you ...
ben_nuttall's user avatar
  • 2,451
5 votes
Accepted

Rpi Reading MCP3008 10 bit ADC Result Problem

Question Use MCP3008 to measure voltage of range 0V to 4.2V. Use a voltage divider with 2.7MΩ / 8.2MΩ to step down value for Rpi but not working. Resistor values too high? How to ...
tlfong01's user avatar
  • 4,675
4 votes
Accepted

How do I wire an MCP3004 to the pi?

Generally the abbreviation N/C or NC on a chip pinout means no connection or not connected. You wire the MCP3004 as for the MCP3008, they share a datasheet. Just wire the corresponding pins.
joan's user avatar
  • 71.1k
3 votes

Two data parsing frames for SPI reads of MCP3008 ADC, any advantages or disadvantages of either one?

The difference is whether you put the padding on the left or the right side of the data. The Adafruit implementation seems to start sending data immediately, which leaves the last 7 bits as padding, ...
btharper's user avatar
  • 119
2 votes

Get different values from potentiometer even not touching

You seem to have noise in your signal, and you should find out where that noise comes from. The first thing I would check is whether you actually need diff mode, since that picks up noise on two ...
Dmitry Grigoryev's user avatar
2 votes

Rpi seemed fried by wrongly connected DHT11 temperature sensor

There is no practical limit to the number of digital and analog connections you can make. There are some logical limits, such as having enough chip selects for SPI, enough addresses for I2C and enough ...
Heath Raftery's user avatar
2 votes

ECG monitoring using ADS8232 and MCP3008 noise problem

Question 1. How can I discharge my body? 2. I have also tried power bank, ... Short Answer Ah, you body acts like an antenna (sort of radio set antenna) picking up the mains electromagnetic wave ...
tlfong01's user avatar
  • 4,675
2 votes

MCP3008 with photoresistor, analog to digital, noisy readings

You've got one channel connected and the rest of the pins floating. Those pins that are floating are, well, floating, and there's not reason to think they should have any value in particular nor that ...
Brick's user avatar
  • 1,377
2 votes

Does Controlling a Servo Motor using a Potentiometer and a Raspberry Pi need an MCP 3800 or can it be done without it?

This Question is somewhat misguided, and seems to assume there is some special relationship between the input and output devices. The problem can be broken down into 2 parts:- How do you control the ...
Milliways's user avatar
  • 60k
2 votes
Accepted

Interpreting 10-bit ADC output

In general, if your ADC is 10-bit with a 0-1023 return range, this value indicates a voltage that is proportional to the V_REF (reference voltage) input on your ADC. If your V_REF was 5 V, then a ...
Fred's user avatar
  • 4,552
2 votes

Why does connection between raspi and potentiometer via SPI fail after one time running code?

Try to pin-point the problem. Software or hardware. I suggest you try the following (with my pigs utility). sudo pigpiod # start the pigpio daemon pigs spio 0 50000 0 # open spi 0.0 at 50 kbs pigs ...
joan's user avatar
  • 71.1k
2 votes
Accepted

Simultaneous Question: How to connect three mcp3008 ic's to one Raspberry pi

If you just need all 3 ADCs to sample at the same time, you can do this by connecting all the clock signals together on one Pi O/P pin, all the MOSI signals together to another O/P pin, and all the CS ...
jayben's user avatar
  • 585
1 vote

Porting a python script to C/C++ (potentiometer, MCP3008, pi-zero-w-2)

Your premise is wrong. Rewriting the Python code in C++ will not make the code run significantly faster. All the Python functions you call are probably actually written in C. All that will speed up ...
joan's user avatar
  • 71.1k
1 vote

Raspberry PI noise reduction on analogue sensors

Don't try to get to the perfect solution in one step. Instead, build a simple prototype that works and check how good your measurements are. There's a chance you don't need a separate voltage ...
Dmitry Grigoryev's user avatar
1 vote

Raspberry PI noise reduction on analogue sensors

You have specified insufficient information e.g. sensor specifications, distance (or evidence of a problem) for any meaningful answer. This is NOT a Pi specific question as the solution would be the ...
Milliways's user avatar
  • 60k
1 vote

Etape liquid level measurement not working as expected

The data sheet says this is a 4-terminal part, with the inner 2 pins being a variable resistor that varies with water pressure, and the outer 2 being a fixed resistor. Unfortunately your circuit ...
jayben's user avatar
  • 585
1 vote
Accepted

Using WiringPi with more than two chip selects and MCP3008

If you want to use the Device Tree configuration options you MUST use the kernel SPI driver, not WiringPi. Incidentally pins 27,28 are RESERVED and used for HAT (and probably other undocumented system ...
Milliways's user avatar
  • 60k
1 vote

Why does connection between raspi and potentiometer via SPI fail after one time running code?

I see the class you're using has a close function. Perhaps you should call it at the end of your code.
Dmitry Grigoryev's user avatar
1 vote
Accepted

MCP3008 with photoresistor, analog to digital, noisy readings

Question How come my LDR fluctuates so wildly, even my light is "stable"? Answer Update2019sep20hkt1701 Your LDR's Resistance vs Illumination is NOT linear, but exponential, therefore a slight ...
tlfong01's user avatar
  • 4,675
1 vote
Accepted

I try to read analog signal with "AD8232" but it suddenly stopped working

I found a problem. It was noise from the grid. When I powered raspberry pi from laptop the sensor started working again. It's weird because earlier sensor was working even when I was powering it from ...
mixnix's user avatar
  • 121
1 vote
Accepted

How to increase sampling rate on MCP3008 in python

It's not clear if you are bit banging SPI or not (i.e. using software SPI). If you are then stop doing that and use hardware SPI via the Python spidev module. You have the constant 50000 in your ...
joan's user avatar
  • 71.1k
1 vote

Python for turbidity sensor

Question Convert Arduino C++ turbidity measurement program to Rpi python Answer See Appendix A below. Appendices Appendix A - Buggy Answer V0.1 # printTurbidityMeasurement python program V0....
tlfong01's user avatar
  • 4,675
1 vote

Rpi Reading MCP3008 10 bit ADC Result Problem

I can't find a clear statement in the MCP3008 spec regarding input current. Personally I suggest trying 27k, 82k and going up from there if it works.
joan's user avatar
  • 71.1k
1 vote
Accepted

Rpi seemed fried by wrongly connected DHT11 temperature sensor

Question Why Rpi burnt? Circuit: Serial LCD, DHT11, MCP3008, ... After 30-50 minutes pi stopped working, green LED dead. have burnt my new pi. if there's a limit to wired sensors/...
tlfong01's user avatar
  • 4,675
1 vote

spi/mcp3008 trouble with getting a reading from chip, all channels read 0 (zero)

Solved it. MISO and MOSI were wired wrong. Also the SPI package I used was a bit old. Rewrote the code using this package "github.com/stianeikeland/go-rpio" Here is the new working code: package ...
user3017869's user avatar
1 vote

Get different values from potentiometer even not touching

This is normal - analog devices are not precise, you can expect some variance even when still. However you can deal with this in software. I'd recommend using the gpiozero library which has an ...
ben_nuttall's user avatar
  • 2,451
1 vote
Accepted

Noise while reading analogue signal with an MCP3008

I would start by adding a decoupling cap on the screen board (the source of the noise) and on the sensor supply line. Adding diodes in the way you describe can only do harm: it's unlikely to have any ...
Dmitry Grigoryev's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible