Skip to main content
9 votes

Using 5 volts on an mcp3008

First, lets check the characteristics of the MCP3008 again: Single supply operation: V_dd = 2.7V to 5.5V All Inputs and Outputs < V_dd + 0.6V (this should include V_ref) 200 ksps max. sampling ...
Ghanima's user avatar
  • 15.9k
7 votes

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

You will have to use a Pull-Up resistor to get clean difference between the two desired states. This way you will have no floating input but either VCC (3.3V) or GND (0.0V) at the input of your ...
kwasmich's user avatar
  • 2,702
7 votes
Accepted

How many analog pins does a Pi model B + have?

The Raspberry Pi has NO analogue GPIO. All the GPIO are digital only. Perhaps you are being confused by some Arduino terminology. If a digital GPIO is used to generate PWM they often incorrectly ...
joan's user avatar
  • 71.3k
6 votes

Analog to Digital Converter (ADC)

The Raspberry Pi has no analogue GPIO. Therefore you need to buy an ADC. You need to research the best ADC for yourself but I find it unlikely you will manage 1 Msps on the Pi.
joan's user avatar
  • 71.3k
5 votes

connect two mcp3002 IC to raspberry pi3 model B

SPI is a bus. Use the same connections between the Pi and the chips for Vcc, ground, MOSI, MISO, and SCLK. Use CE0 for one chip and CE1 for the other. The software uses the slave select line (CE0/...
joan's user avatar
  • 71.3k
5 votes

How to use Rpi python to control PCM1802 24-bit HiFi stereo ADC and MAX4466 microphone amplifier

Answer Introduction I am a PCM1802 24-bit ADC newbie, never used it before. It is a complicated device and its operation needs a long explanation. For now, I am only trying to give quick and dirty ...
tlfong01's user avatar
  • 4,735
5 votes

Voltage monitoring of battery pack (i.e. before voltage regulation)

The PiCheckVoltage project may be stale for a reason. It strikes me as a bit over-complicated for the situation you've described. However, parts of the code may be useful. Here are some alternatives ...
Seamus's user avatar
  • 22.4k
5 votes

Voltage monitoring of battery pack (i.e. before voltage regulation)

In my Raspberry Pi tablet, I use very low frequency PWM to measure the battery voltage. One half of a dual voltage comparator was set up as a sawtooth oscillator operating at approximately 100Hz. The ...
Stefan Vorkoetter's user avatar
4 votes

How the fluctuation in MPC3008 ADC unused channels is explained?

I assume you have not connected anything to those inputs. The inputs will therefore be floating and return random results. It's probably simplest to connect unused inputs to ground if you do not ...
joan's user avatar
  • 71.3k
3 votes
Accepted

Hardware for reading a large number of analog inputs?

There is a little more to know than "need to read a total of 64 analog voltages" to make an educated guess here. Those are especially the resolution and the sampling rate. Related with the sampling ...
Ghanima's user avatar
  • 15.9k
3 votes

Hardware for reading a large number of analog inputs?

Even though this question is better asked on Electronics.StackExchange.com, here are some thoughts: You could get nine 8:1 Multiplexers/Demultiplexers like this one: http://www.digikey.com/product-...
Phil B.'s user avatar
  • 5,043
3 votes
Accepted

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

The SPI library uses the SPI hardware. I suspect the Adafruit code was written before the SPI library was written and uses a technique called bit banging to access the MCP3008. Bit banging will be ...
joan's user avatar
  • 71.3k
3 votes

Can I do anything with a pre-wired photo resistor and no additional A/D converter?

I won't claim this is a very complete answer, but here goes: I tried simply connecting my module... The capacitor in that Adafruit demo plays a vital role; it's what creates a fluctuating high/low ...
goldilocks's user avatar
  • 59.4k
3 votes

Force Sensing Resistor with Raspberry Pi

The easiest way is to pick a number (actually 2) between 0 and 1023. A value > x == occupied. A value < y == unoccupied. x should by high enough to ignore someone walking over the parking space. ...
Bill Leddy's user avatar
3 votes
Accepted

Rpi Current Sensing Using ACS712 and INA219

########## The Question ########## Cheap Solution for Rpi ACS712 Current Sensing/Logging Problem I've been searching through multiple forums, and gone to different links online trying to find a "...
tlfong01's user avatar
  • 4,735
3 votes

5V-3.3V Sensors Confusion

There is only one thing to bear in mind. Only feed between 0 and 3.3V to a Pi GPIO. Anything outside that range will eventually damage the GPIO and then the Pi. You have to consider each device you ...
joan's user avatar
  • 71.3k
3 votes

Voltage monitoring of battery pack (i.e. before voltage regulation)

One option would be to use an MCP3002 ADC (2 channel analogue to digital converter). Use a voltage divider circuit (2 resistors) to convert your battery voltage to a voltage range upto 3.3V. Feed this ...
CoderMike's user avatar
  • 6,997
3 votes
Accepted

Full duplex SPI communication with an ADC using the pigpio library

If you want to send 8 NOP bits send a byte containing 0xFF. count, rx_data = spi_xfer(handle, [0xff]) If you want to send 16 NOP bits send two bytes containing 0xFF. count, rx_data = spi_xfer(handle, [...
joan's user avatar
  • 71.3k
3 votes

Real time + High frequency ADC data reading with Raspberry Pi 4

Linux is not a real-time operating system. You will not be able to achieve consistent sampling times using the standard Linux environment. I have used DMA bit banging to get accurately timed SPI ...
joan's user avatar
  • 71.3k
2 votes
Accepted

Easiest way to listen to analog connection?

Being a complete noob here when it comes to electrical engineering, what I needed was an "Analog to Digital Converter" abbreviated as ADC. https://en.wikipedia.org/wiki/Analog-to-digital_converter ...
dalanmiller's user avatar
2 votes
Accepted

Pi for control 20 analog outputs

From my knowledge there is no ready to buy solution. I would recommend to use a I2C bus with the required converters connected to it. D/A converters example LTC2637 is a 8-Channel, 12-Bit Digital to ...
MatsK's user avatar
  • 2,807
2 votes
Accepted

How can I use the raspberry pi to read analog voltages

You need an ADC (Analogue to Digital Converter). Google MCP3008 (a popular 10-bit 8 channel ADC) as an example.
joan's user avatar
  • 71.3k
2 votes

Analog to Digital Converter (ADC)

As per previous answers, RPi's do not have an ADC. There are a number of ways that it can be done, but they all involve an external module or add-on circuit of some kind. What needs to be implemented ...
Derek's user avatar
  • 21
2 votes

Does the Sense HAT have an ADC?

The SenseHAT does not have any analog inputs. The ideal solution is to remove the standard GPIO header and fit an extra long, stacking one through the holes. You can then look at wiring up, for ...
recantha's user avatar
  • 4,479
2 votes
Accepted

No values from mcp3008

The wiring appears to be wrong. The MCP3008 SCLK appears to be connected to ground. I haven't looked any further. MCP3008 8 ch 10-bit ADC CH0 1 o o 16 V+ CH1 2 o o 15 Vref CH2 3 o o 14 ...
joan's user avatar
  • 71.3k
2 votes

problem with adc mcp3008 & ads1115

A possible solution that has worked for me was adding the following line after the spi.open() statement: spi.max_speed_hz = 1350000 There seems to have been some changes in recent Raspbian Systems, ...
frranz's user avatar
  • 21
2 votes

Raspberry Pi GPIO & Analog Sensors

I'll take a shot at this. You can test this with the on board variable resister (ADJ) or the onboard photocell (LDR). First, remove all normal sensors. Second, short the ADJ and AD0 pins of the ...
NomadMaker's user avatar
  • 1,560
2 votes
Accepted

Raspberry Pi AD/DA converter

I don't have one of these boards, but I've looked at the documentation. Yes, you will have to learn to use SPI. I would strongly suggest at least one of the following tutorials: [PDF]SpiDev I SPI ...
NomadMaker's user avatar
  • 1,560
2 votes
Accepted

How the fluctuation in MPC3008 ADC unused channels is explained?

This is normal. ADC inputs are made very sensitive on purpose, and will work as antennas picking up all kinds of noise when not connected to anything. Periodic noise can usually be traced to your ...
Dmitry Grigoryev's user avatar

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