Git Product home page Git Product logo

protocentral_ads1220's People

Contributors

aentinger avatar dottored avatar protocentralashwin avatar subinmat avatar tommz9 avatar venkateshbhat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protocentral_ads1220's Issues

Trying to use this with Geophone SM-24

I am trying to use the ADS1220 with the Geophone SM-24, originally as part of this tutorial:
https://create.arduino.cc/projecthub/team-protocentral/measuring-seismic-activity-using-protocentral-openpressure-702324

Here is the link of a signal I get when I wire it up: https://i.imgur.com/hNdHcuM.png
Do you know what the issue could be? It seems squarish, with lots of 0 values.

The ADC seems to saturate when pick up and shake the geophone gently. Is this normal? Anyone know what could be causing this?

Startup problem with battery

Hi,

Hardware:
Adafruit Feather Sense
ProtoCentral ADS1220
3.7v Lipo 300mAh / 600mAh

If i start with USB connected the ADS library returns valid values.
If i start with battery only, the ADS library returns nan .
If i start with USB connected, disconnect USB (the adafruit are now powered by battery) the lib returns valid values.
The values are send over ble.

Is there an inrush problem ?

Best regards
Andreas

MOSI, MISO, and SCLK pins

The documentation states that MOSI, MISO and SCLK pins should be connected to Arduino pins 11, 12, and 13. However, I can see no reference anywhere to these pins on the code. Are these pins being used?

Add software SPI support

Sometimes the hardware SPI port is already taken from another and incompatible SPI device, so adding software "bit-banging" SPI support to this library would be a nice feature.

Running multiple SPI devices CAN give some issues.

Hello.

I've been struggling with figuring out why the heck my ILI9340 and ADS1220 wouldn't go nice together. It took A LONG time to figure it out but i realized that the ILI9340 runs with another clock divider so the clock speed is much fast er than allowed on the ADS1220. In a nutshell.. IT WONT WORK.

A solution is redoing the library transfer parts to use this kind of transfer which sets the MSB, spi mode and clock for each transaction to ensure it is ok. I am going to do this myself right now so it shouldn't be hard.
https://www.arduino.cc/en/Tutorial/SPITransaction

Bad NewDataAvailable test in example/Basic

There is an issue in Protocentral_ADS1220/Libraries/examples/Basic/Protocentral_ADS1220.ino
which causes values to be output as "new" samples when they are not new.

Currently line 54 is:
if(ADS1220.NewDataAvailable = true)

This is not actually a test, it just assigns the ADS1220.NewDataAvailable flag to true. As such, this test statement always evaluates as true and a value is taken from the pointer and output to the screen as if it were a fresh ADC conversion.

This line should be
if(ADS1220.NewDataAvailable == true)

You can see this problem if you setup continuous sampling using the default 20pps and then try to sample faster than that. For example, replace the delay(300) with delay (10).

Sampling not sincronized

Hello, I am using this library but I have some problems with the sincronization of the data-rate coming from the ADS1220 and the reading-rete of my Arduino UNO.
Basically the Arduino loop is executed too fast in comparison than the data-rate and therefore I get a lot of samples that are 0.00 mV between one "real" sample and the other. See the attached picture:

ADS1220

It look like that the execution do not wait new data coming from the ADS1220.

Here is the code I'm using.

`//////////////////////////////////////////////////////////////////////////////////////////
//
// Demo code for the ADS1220 24-bit ADC breakout board
//
// Author: Ashwin Whitchurch
// Copyright (c) 2018 ProtoCentral
//
// This example gives differential voltage across the AN0 and AN1 pins in mVolts
//
// Arduino connections:
//
// |ADS1220 pin label| Pin Function |Arduino Connection|
// |-----------------|:--------------------:|-----------------:|
// | DRDY | Data ready Output pin| D6 |
// | MISO | Slave Out | D12 |
// | MOSI | Slave In | D11 |
// | SCLK | Serial Clock | D13 |
// | CS | Chip Select | D7 |
// | DVDD | Digital VDD | +5V |
// | DGND | Digital Gnd | Gnd |
// | AN0-AN3 | Analog Input | Analog Input |
// | AVDD | Analog VDD | - |
// | AGND | Analog Gnd | - |
//
// This software is licensed under the MIT License(http://opensource.org/licenses/MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
// NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// For information on how to use, visit https://github.com/Protocentral/Protocentral_ADS1220
//
/////////////////////////////////////////////////////////////////////////////////////////

#include "Protocentral_ADS1220.h"
#include <SPI.h>

#define PGA 1 // Programmable Gain = 1
#define VREF 3.300 // Internal reference of 2.048V
#define VFSR VREF/PGA
#define FSR (((long int)1<<23)-1)

#define ADS1220_CS_PIN 7
#define ADS1220_DRDY_PIN 6

Protocentral_ADS1220 pc_ads1220;
int32_t adc_data;

void setup(){
Serial.begin(115200);

pc_ads1220.begin(ADS1220_CS_PIN,ADS1220_DRDY_PIN);

pc_ads1220.set_data_rate(DR_20SPS);
pc_ads1220.set_pga_gain(PGA_GAIN_1);
pc_ads1220.select_mux_channels(MUX_AIN0_AIN1);  //Configure for differential measurement between AIN0 and AIN1
pc_ads1220.set_conv_mode_continuous();
pc_ads1220.writeRegister(0x02, 0xD0);             // Register #2 (11 = analog supply reference,
                                                  //              01 = Simultaneous 50-Hz and 60-Hz rejection.
                                                  //               0 = Switch is always open (default)
                                                  //              000 = IDAC current setting Off (default)
pc_ads1220.Start_Conv();  //Start continuous conversion mode

}

void loop(){
while(true){
adc_data=pc_ads1220.Read_WaitForData();
float Vout = (float)((adc_data * VFSR * 1000)/FSR); //In mV
Serial.print("t = ");Serial.print(millis());Serial.print(" ms, V = ");Serial.print(Vout);Serial.println(" mV");
}
}`

am I drawing too much current on analog inputs?

I have a pressure sensor hooked up and want to ensure it does not draw too much current.

The ADS1220 datasheet lists current sources as 10-1500 microamps. If I understand this correctly, A+/A- can only source 1.5mA to the wheatstone bridge?

image

image

My A+/A- has a resistance across of ~300 Ohms.

With nominal voltages (5v, 3.3v, etc), will my pressure sensor over-draw?

Question about unprecise messurment

I recently bought a ads1220 module and tested it connected to an ESP32 (Heltec Wifi Kit32)
As an input i used a 100k potentiometer between VDD and GND where the output is connected to Ain0.
Using the default example compared to a precise Benchtop Multimeter i have a quite large difference between the messurment of the ADC and the Multimeter:
50mV (Multimeter: 50.34mV - ADC: 49.06mV) ~ -1.5mv difference
100mV (Multimeter: 100.36mV - ADC; 97.90mV) ~ -2.5mv difference
200mV (Multimeter; 200.15mV - ADC: 195.03mV) ~ -5-6mv diffenrece
500mV (Multimeter: 501.52mv - ADC: 489.11mV) ~ -11-12mv difference
1000mV (Multimeter; 1000.67mV - ADC 977.05mV) ~ -23-24mv diffenrece
With rising Voltage the difference between the ADC and Multimeter gets bigger, wihle the ADC show a to low voltage.

The ADC uses the +3.3V and GND of the ESP32 as supplyvoltage.
I think for a 24Bit ADC this diffenrence is a quite high between the messurments of the ADC and the Multimeter with an accuracy of 4 1/2 Digit 20000 Count +/-0.03% +3
Even the 16Bit ADS1115 giving me a more accurate reading then the 24Bit ADS1220.
Anyone alreay noticed something similar or am i doing something wrong or did i even might got a fake chip?

Few more issues in library

  • Do not use Serial in your library without a debug boolean set to false, anyone using the serial for something else, might get the unexpected data.
  • Hard coding ADS1220_CS_PIN and ADS1220_DRDY_PIN is not a good idea. Use constructor to get these pin values.
  • There is no way to read single pin input.

Struggling with getting it to work...

Hello.
I have a PCB that i have designed myself where the \DRDY pin is not used as i use the Data out\DRDY function.
If i modify the m_config_reg3 default setting it should in theory
m_config_reg3 = 0x02;
Notes: Microcontroller is ATMega328p with 8MHz crystal (normal 16MHz) but i do have other SPI things that work on it so this should also work
Current pinout:
CS on 8
MOSI on 11
MISO/DRDY on 12
SCK on 13

Do you have any idea why this is not working?
When printing all the config registers they all are "FF" so it seems like it doesn't really work..

Unable to add library in arduino 1.6.12

While adding zip library from
Sketch>>Include library>> Add .ZIP library

following error prompt
Specified folder/zip file does not contain a valid library

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.