Questions tagged [mcp3008]

35 questions
2
votes
3 answers

Rpi Reading MCP3008 10 bit ADC Result Problem

I want to measure some battery voltage in a range 0V-4.2V with MCP3008(VDD=VREF=3.3V). I used a voltage divider with R1=2.7MOhm and R2=8.2MOhm, but it didn't return correct value, I used resistors too high? How I calculate the resistors value to…
SB3NDER
  • 23
  • 3
2
votes
1 answer

ECG monitoring using ADS8232 and MCP3008 noise problem

I am making a project of Real-time ECG monitoring device using Raspberry Pi 3B+, Heart monitor AD8232 sensor by Keyes, MCP3008 ADC and 7" HDMI LCD. I am giving supply to RPi using 5V DC charger connected to power supply of 220V AC. The code and…
Umer Farooq
  • 29
  • 1
  • 5
2
votes
1 answer

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

I am reading an MCP3008 ADC using pigpio, I've abstracted the script below. I have also found a slightly different construction or parsing of the three SPI command bytes and reconstruction of the ADC values in this Adafruit_MCP3008 script. In my…
uhoh
  • 562
  • 6
  • 21
2
votes
0 answers

MCP3008 only returns 0 values

I have a MCP3008 that is connected to 2 LDRs, one on CH0 one on CH7, the other 6 CH are grounded. When running the simpletest.py of the Adafruit MCP library I get back 0 from every pin. I measured CH0 and CH7 with a Osci and know they do get values.…
Quibsel
  • 21
  • 1
2
votes
0 answers

Multiple SPI reads on Pi Pico requires reinitialisation

I'm playing around with reading in analogue inputs from an MCP3208 ADC via SPI. However, reading multiple inputs seems to cause a seg fault unless I reinitialise the SPI on each read/write. I've attached my 3208 interface code (which is heavily…
user151296
  • 29
  • 1
2
votes
0 answers

Interpreting voltage output on ADC with rated AC current sensor

I know I have asked similar questions before, but I have switched sensors and encountered interesting results that I do not understand. Purpose: I intend to use an AC current sensor to measure electrical current flow running through a simple table…
1
vote
2 answers

Rpi seemed fried by wrongly connected DHT11 temperature sensor

I'm doing a project for a school assignment and have some issue with my circuit. When I connected the breadboard to pi and to power, everything was working, I could read data from sensors and looked fine. However, after 30-50minutes my pi stopped…
pisar
  • 13
  • 2
1
vote
1 answer

MCP3008 and Raspberry Pi Zero

Can I use MCP3008 to input analog signals to Raspberry Pi Zero? If not, Which is the cheapest version of Raspberry Pi?
1
vote
1 answer

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

Pi model: Pi 3 A+ Os: Raspbian GNU/Linux 9 (stretch) <- it's stretch lite SPI: On Loop back test: spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF…
user3017869
  • 121
  • 2
1
vote
2 answers

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: 546 Channel 0 minus 1: 531 Channel 0 minus 1:…
1
vote
3 answers

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

I am using Raspberry pi 4 and I want to connect three MCP3008 ic. I am a little bit confused about how to SPI MISO and SPI MOSI and chip select of Raspberry pi to Dout Din and CS of each of the three MCP3008 ic's Note: I need to read from the ics at…
Omar Alaa
  • 21
  • 3
1
vote
2 answers

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

I'm pretty newbie to C++. I'm trying to write a simple, workable code for interfacing my potentiometer and MCP3008 with my raspberry pi. I've written this python script which works nicely. However I also read that writing code in C/C++ makes the…
1
vote
2 answers

Raspberry PI noise reduction on analogue sensors

I am trying to reduce noise on an analogue sensor. I have scanned many forums for answers and spent multiple hours / days on finding the optimum solution. I am using ACS712-based sensors and the need is for accurate readings in milliVolt. This is…
1
vote
1 answer

Ruby Gem pi_piper crashing with bcm2835_init: gpio mmap failed: Cannot allocate memory, anyone else seen this?

I am running ruby 3.0.3 on Raspbian 11 on raspberry pi 4b and I am trying to use adc mcp3008 using pi_piper gem and whenever I initialize a pin clock = PiPiper::Pin.new :pin => 18, :direction => :out I get bcm2835_init: gpio mmap failed: Cannot…
Phil
  • 119
  • 3
1
vote
0 answers

MCP23008 Python Input Handler

How do I declare a Python callback handler method on a MCP23008 input pin? This Adafruit tutorial, which uses CircuitPython shows how to read input from the extended GPIO pin on the MCP23008, but does not appear to have a callback/interrupt handler…
JJ Zabkar
  • 111
  • 3
1
2 3