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.8k
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
  • 70.6k
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
  • 70.6k
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
  • 70.6k
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,645
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
  • 21.2k
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
Accepted

Raspberry Pi, LM35 and MCP3008

You can power the sensors from 5V and also power the MCP3008 from 5V. You need to use a voltage divider on the MISO (Master In Slave Out) line from the ADC to the Pi so that the 5V ADC digital signal ...
joan's user avatar
  • 70.6k
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
  • 70.6k
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.8k
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,033
3 votes
Accepted

Rasberry Pi 2 analog inputs

You can use the Raspberry Pi for the webserver. You have a variety of programming lanugauges you could use, like Python, C/C++ even C# (in Linux using Mono) or Windows IoT. It would be allot easier ...
Piotr Kula's user avatar
  • 17.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
  • 58.5k
3 votes
Accepted

how to change read channels on PCF8591

You control the device by sending it two bytes. The first is the command code. The second is the byte to write to the digital to analogue converter. The command byte is structured as follows. 7 6 ...
joan's user avatar
  • 70.6k
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
  • 70.6k
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,645
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
  • 70.6k
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,847
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
  • 70.6k
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
  • 70.6k
2 votes
Accepted

Data logging during power loss

My question is, how can I make sure the data is saved to the file even if there is power loss? The short answer is "you can't". RAM is a volatile storage medium, once it loses power, it loses data. ...
Jacobm001's user avatar
  • 11.9k
2 votes
Accepted

How fast can I read two analogue sensors using MCP3008 ADC?

The standard Pi Linux SPI driver can execute about 20 thousand transactions per second. So to read two channels from a MCP3008 should take about 0.1 milliseconds.
joan's user avatar
  • 70.6k
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

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
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,726
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,499
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
  • 70.6k

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