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 ...
  • 15.7k
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 ...
  • 2,682
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.
  • 68.8k
6 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 ...
  • 68.8k
5 votes
Accepted

Soil moisture sensor compatibility

The link you give is to the soil sensor which is not an Arduino. Did you mean to ask whether you could use the soil sensor with the Pi? Yes you can but to get analogue results you'd need to add an ...
  • 68.8k
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/...
  • 68.8k
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 ...
  • 4,489
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 ...
  • 19.6k
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 ...
4 votes
Accepted

ADC to capture speech (8khz, 16bit)

Whether you can sample with 16 bit precision is down to your skills as a electronics engineer. I believe there is more to that than simply putting a 16-bit ADC into a circuit and hoping for the best. ...
  • 68.8k
4 votes
Accepted

What happens if I try to read an analog pin's value?

As long as the analog voltage is between 0V and 3.3V you won't damage anything. The gpis will be damaged by voltages less than zero or greater than 3.3V. The severity of the damage will depend on ...
  • 68.8k
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 ...
  • 68.8k
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 ...
  • 68.8k
3 votes

How do I read a car turn indicator is on using GPIO

A simple voltage divider would do just fine here. Lets assume that the turn signal is exactly 12 volts. (usually my car runs at 13 or 14). Looking at the resistor divider on wikipedia: http://en....
  • 401
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 ...
  • 17.2k
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 ...
  • 68.8k
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 ...
  • 57.2k
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-...
  • 5,013
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 ...
  • 15.7k
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 ...
  • 68.8k
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. ...
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 "...
  • 4,489
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 ...
  • 68.8k
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 ...
  • 6,450
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, [...
  • 68.8k
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 ...
  • 68.8k
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. ...
  • 11.8k
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.
  • 68.8k
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 ...

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