This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1256 reducing noise

Part Number: ADS1256
Other Parts Discussed in Thread: REF5025, OPA350, REF6025, ADS1255

Hi!

I look all answers related to ADS1256 oise but still I do not find a solution for my problem. So, here I am asking on my way: is this level of noise acceptable for my configuration or not.

I think it is still too big....

1.) For the start I bought this ADS 1256 board: www.aliexpress.com/item/2046677415.html

I am using this module in combination with Arduino Mega2560.

After almost one week I managed to operate with this moduel and I am getting approximately correct results.

2.) After that I made my own dev board with ADS1256, to be sure that I know hot to manage with this chip. After few repairings, my module works,too.

But now, I am testing the performance of my board and the module I bought from internet anbd I found out, that according to my opinion, the nosie level is too big,

at the bought module and on my own.... The results are very similar:

Register settings on both modules are the same:

PGA=1, buffer =Off, sampling speed I changed: 500SPS, 1000SPS and 30000SPS. I am using only signal from 0 to 5V, single ended measurement. The 5V signal I generate with precise 5V calibrator, battery power supplied. AINCOM I have connected to the AGND. Analog and digital ground are separated, connected together only in one small point under the ADS1256 chip...

Here are the results @5V DC input signal. I memorized the minimum and the maximum value:

5V @500spsp:

My module: MIn=7827738, MAX=7831099, difference=3361

Bought module: MIn=7819528, MAX=7822641, difference=3113

5V @1000spsp:

My module: MIn=7826321, MAX=7830670, difference=4349

Bought module: MIn=7816679, MAX=7820689, difference=4010

5V@30000sps

My module: MIn=8343959, MAX=8352881, difference=8922

Bought module: MIn=8334841, MAX=8344354, difference=9513

So the results are logical, less sps I have , the difference etween the min and max value at the same voltage is smaller. But I think this difference is still too big....

For example the difference  @500sps is app 3000, comparing to full 23 bit value=8388607 this represents 0.035%.

Is this according to expected? I expect less than 0.01% oe am I wrong? Did I miss something?

Thank you for your help and best regards!

  • Hi Frank,

    Have you tried shorting the ADC inputs together and take a reading to measure the noise of your system? You might try this on both boards just to set a baseline noise figure.

    What reference voltage are you using? A precision VREF such as REF5025? If your reference voltage is not clean and stable you could very well see issues like this. The fact that your code ranges are so different for the different sample rates suggests something might be going on with the VREF. You should be getting close to the same result each time if you are sampling the same signal. If you have a schematic to share that would help so I can see what your signal conditioning circuitry looks like.

    We also generally recommend against split ground planes, instead suggesting one solid ground plane. I am not sure this is the issue you are seeing, but just something else to consider.

    -Bryan

  • Hello, thank you for your answer.

    I want to use Ref5025A, but unfortunately I bought 5pcs and all of them generates 2.2V It takes 2 additional days to figure out that it is not my mistake but the problem in reference chip. Fortunately I had one ADR431 and now I am using ADR431  2.5Volts reference.

    It is my first time on this forum and i can not  find a way how to paste a high resolution image of my schematis. Now I am puttung here only a copy of screen

    And here are the results from the board I bought on the internet (this board use the same reference: ADR431)

    AIN0 connected directly to GND:

    @500sps MIN=24063 MAX=24250 DIFF=187

    @1000sps MIN=24020 MAX=24114 DIFF=94

    @30000sps MIN=25313 MAX=25732 DIFF=419

    My ADS1256 board:

    AIN0 connected directly to GND:

    @500sps MIN=7396 MAX=8135 DIFF=739

    @1000sps MIN=7086 MAX=8120 DIFF=1034

    @30000sps MIN=7467 MAX=9458 DIFF=1991

  • And here are results, all Inputs connected together:

    My board

    @500sps MIN=1837510 MAX=1864279 DIFF=26769

    @1000sps MIN=1859570 MAX=1865665 DIFF=6095

    @30000sps MIN=1985856 MAX=1991406 DIFF=5550

    Board from the internet:

    @500sps MIN=1837208 MAX=1839028 DIFF=1820

    @1000sps MIN=1837201 MAX=1838736 DIFF=1535

    @30000sps MIN=1959737 MAX=1962334 DIFF=2597

    Hmm, here I see a difference. My board produces much more noise than board from the ternet. But, why?

    And even the board from the Internet produce much more noise than I am expecting.... Isn't it'

  • Hi Frank,

    What are the values of the resistors at the input to your ADC in the schematic? Is that 301 ohm?

    And you are shorting the inputs together at JP1, correct?

    Can you post the output codes you are getting from your device for each data rate and the different boards? The difference between the largest and smallest code is not really relevant, since one of those values could be an outlier. For example, if you took 100 samples and 99 of them were 1,837,208 and the other one was 8,388,608, this does not mean your noise is 6,551,400 codes. ADC noise generally has a Gaussian distribution, so your noise should theoretically follow this model. From this you can determine the noise of the system.

    -Bryan

  • Hi!

    JP1 is not for analog input. Becouse it is my dev board I made tihs jumper to switch 2.5REF directol to ADS1256 or through OPA350. I want to know if I need OPA350 for the future. Similar is for testing purpose JP6. To switch reset directly to GND or to choose software option bthrough ArduinoMega2560. Just for testing...

    Regarding the results I've got, I agree. I will try to make a noise diagram. Give me some time.

    Yes, the resistors are 301 ohm.

  • I 3 times checked strange noise diagram at 1000sps fom the board from the internet. Alll three times the sam strange noise diagram...

  • I would like to mention that i take and print a vlaue from ADS1256 every 100ms.

  • Hi Frank,

    If you calculate the standard deviation of your codes, this should give you the RMS noise value that you can compare to the noise tables for example. Please note that the values in the ADS1256's datasheet noise tables are taken with inputs shorted (i.e. 0 V), not with an applied signal. If you also want to send me a list of your codes (in hex, preferably) I can calculate as well.

    It looks like you are applying a 1.1V input based on the codes you are getting - is that accurate? I recall you mentioning a 5V input and a shorted input previously, so I am not sure where this value came from. I just want to make sure what your intent is.

    I am not sure the problem you had with the REF5025, but you want to have a buffered reference. The REF5025 likely would have been sufficient, but you can also take a look at REF6025.

    -Bryan

  • Hi!
    I need some tame to make a application to take the numbers out...

    The diagrams I sent was all generated in the way that I only connect all inputs together. Not to GND not to any other higher signal.

    I understand your proposal in this way to detect the noise of the sistem.

    What about the ADR431 voltage reference I am using now instead REF5025A?

  • Hi!

    I hope I understand you correctly...

    I made three log files. Each time I connect only  ANIN0 to GND and measure noise.

    I test at three different sampling speed: 500sps, 1000sps and 30000sps. All numbers I converted from decimal into HEX. The test measurement lasts app. 60 seconds.

    ***********************************************************************************************

    500 sampling per seconds:

    22AE
    22B9
    22CD
    2151
    221B
    218D
    220B
    21D2
    2150
    2198
    2115
    2293
    230B
    20A6
    231D
    210E
    2299
    20DB
    2167
    21C2
    20E5
    2175
    20CF
    20F3
    2307
    210F
    2151
    2234
    21F6
    21F6
    2240
    2258
    223E
    214E
    20C8
    20EB
    20FE
    20CD
    2127
    21E0
    20F4
    231C
    20C2
    2215
    218C
    2261
    22EB
    22CF
    2103
    2126
    21AC
    2119
    2262
    22A8
    232A
    2166
    216B
    2220
    20CD
    2137
    2354
    221F
    2298
    219A
    21DC
    2191
    21EC
    223A
    215A
    2266
    20D5
    2118
    20E5
    2304
    237F
    232A
    20DD
    20E1
    2130
    20CA
    20D0
    2139
    230D
    20FC
    22C7
    2261
    2170
    2154
    2128
    2152
    2160
    22C6
    212E
    2339
    232A
    22FC
    2331
    22F7
    2154
    212E
    2152
    2116
    22F8
    22E7
    234E
    20CC
    20DF
    2171
    211F
    2172
    21D7
    2250
    21EA
    2124
    2269
    2132
    20FF
    20ED
    2167
    2345
    22A9
    2264
    210F
    21CA
    21B1
    22B8
    2366
    22F4
    2247
    21CE
    218F
    2157
    22F1
    2108
    232B
    2110
    20FC
    2162
    21FA
    22B5
    211C
    2131
    221B
    217A
    214A
    230A
    20D2
    20AA
    2272
    217E
    2283
    22D1
    22E5
    225D
    2150
    2115
    22D1
    2284
    21BF
    20EB
    20B3
    22F1
    22A1
    213D
    21A7
    2284
    2328
    22FD
    20D3
    2184
    2275
    2117
    233B
    213B
    21BA
    2266
    2136
    22C6
    2102
    219B
    2275
    2325
    22A3
    224F
    21B8
    2125
    20C7
    2178
    215B
    227E
    2136
    225A
    21C7
    22A0
    20A1
    20FC
    2155
    22E8
    20C4
    2264
    21F6
    2311
    229F
    2185
    20D3
    22D4
    218C
    22FF
    2270
    21BC
    231C
    2107
    2136
    230D
    216C
    2139
    20F6
    213B
    2115
    22E4
    21C0
    229C
    22C0
    2113
    226E
    22E8
    2122
    227A
    230A
    2233
    2144
    230E
    20BB
    2166
    22ED
    218E
    21A3
    2141
    2277
    2157
    230D
    222C
    2134
    20EF
    2239
    21DC
    2319
    2100
    2153
    2306
    2133
    2152
    2142
    2133
    22A4
    21A0
    22B2
    22F2
    2110
    2178
    2353
    20B7
    21F6
    2282
    2319
    222C
    222D
    22C9
    2281
    21D7
    20EA
    211A
    2121
    2313
    229E
    211A
    22E8
    2158
    20BC
    211B
    2128
    2254
    212E
    20BA
    2171
    22EC
    2291
    213E
    208F
    2175
    22C4
    22A7
    217C
    214D
    21CD
    22B3
    2107
    2118
    22A5
    2210
    210D
    21C6
    20C3
    21AB
    22BC
    21B7
    20B8
    213F
    213C
    21A5
    2145
    2127
    2280
    22DA
    212E
    22B4
    216C
    2121
    219F
    212F
    21AC
    2321
    2104
    22BA
    2192
    235A
    2165
    20CA
    225A
    2255
    2316
    2174
    20E7
    2137
    20C9
    216E
    22E7
    2225
    2261
    2135
    212B
    228F
    228E
    2107
    20FF
    20F8
    213F
    22E5
    216C
    2347
    219C
    210D
    2203
    20B7
    218B
    22AB
    2125
    22B4
    227D
    227D
    2120
    2245
    22F2
    2109
    20D1
    2171
    20D4
    2197
    2284
    22D7
    2125
    20DE
    21B7
    210D
    21DD
    229F
    214F
    20C0
    22FC
    2171
    232A
    21C9
    20FC
    2144
    224F
    20D7
    21C7
    2276
    2281
    215D
    2304
    227F
    213A
    216C
    237C
    2142
    21B9
    22C5
    22A2
    2136
    20CE
    2266
    22CE
    2167
    20FA
    212E
    2118
    21BA
    20CE
    210C
    22A7
    2175
    20F6
    2125
    2227
    2264
    2322
    2117
    21A8
    2305
    2272
    20F5
    20C7
    214D
    2168
    2262
    20C9
    2251
    2203
    20DE
    227F
    21B1
    22D3
    22A8
    21B5
    2235
    2334
    2215
    20DF
    20AA
    229B
    2193
    2110
    2357
    229F
    21D4
    22BE
    20BD
    214C
    20F1
    22E7
    20E7
    2239
    2146
    2312
    2358
    211D
    2173
    210D
    22B5
    20BE
    2119
    2136
    2206
    21E6
    22C3
    20E5
    2250
    2203
    2143
    2211

    **************************************************************************

    1000 samling per seconds

    23E0
    239C
    226E
    21B8
    2408
    2184
    2346
    2412
    22AF
    21AD
    21C8
    2218
    221F
    2245
    213D
    2223
    2396
    23B2
    2230
    2218
    2204
    22DE
    21F8
    216E
    2313
    23C9
    2179
    23DB
    212B
    222D
    226D
    21AD
    229B
    2262
    2245
    21CB
    233A
    2211
    2344
    234E
    23B8
    2237
    24D8
    228E
    2185
    21E7
    21BA
    2482
    2238
    236C
    21E5
    225E
    2498
    21A1
    225E
    21F9
    21CF
    2401
    21B1
    2437
    216C
    217D
    2193
    218E
    2181
    21CC
    2175
    2311
    23B8
    2352
    2145
    2228
    21D5
    2198
    21DD
    2310
    22D6
    23C6
    22BB
    21A3
    22E2
    239D
    23B2
    222E
    219E
    2146
    22DF
    240E
    2318
    236D
    23A0
    21C2
    215C
    2208
    21E9
    2111
    240B
    224B
    21CF
    2209
    21D6
    2339
    2255
    211B
    21D6
    237F
    234B
    21D8
    244F
    213F
    216C
    21D5
    22DE
    244B
    2218
    23F6
    21A8
    2178
    240D
    21F8
    23D4
    23B1
    22A9
    2213
    2211
    2140
    23C2
    22A5
    23C8
    215F
    227B
    2161
    21D7
    21FE
    218E
    2410
    227B
    21F3
    2237
    22C4
    21C2
    21F7
    221E
    238D
    242F
    230C
    22BD
    2215
    238F
    2289
    21E4
    21C2
    21D6
    2166
    219D
    219A
    23BA
    2337
    21E0
    23E1
    2159
    23A5
    2437
    2201
    2220
    23C7
    2236
    2416
    22D9
    215F
    23F8
    226B
    23C9
    2347
    2191
    21B7
    2355
    21E1
    239C
    21BB
    2265
    240A
    21F7
    21EE
    2413
    2267
    21A3
    21BD
    21B7
    218C
    23CD
    21E4
    23EB
    2191
    2336
    236C
    2307
    2421
    224F
    21FD
    2325
    21DE
    21FA
    2174
    21FD
    225D
    23C0
    2168
    2227
    2133
    21DD
    242C
    220B
    21F2
    21AB
    2174
    240D
    21E0
    23B5
    2364
    216C
    21C2
    21B2
    237E
    21D7
    2144
    21BB
    20E9
    2156
    2146
    223A
    23E3
    21E4
    21F0
    221C
    23A3
    2111
    21BB
    2417
    2206
    2365
    2220
    21B1
    2447
    21FA
    21F1
    21C3
    21B5
    218F
    21C7
    2213
    2315
    21F4
    21A2
    2193
    222C
    2192
    2210
    2242
    23C8
    2260
    221B
    23E7
    21B8
    21E7
    23DD
    224B
    20EC
    23CF
    21D7
    2254
    21D6
    2258
    21D3
    23F3
    23B6
    21C6
    2306
    2188
    21C7
    2257
    23FB
    21C8
    21BE
    2182
    2164
    2424
    21EC
    22BF
    223B
    2199
    245E
    2380
    21DD
    21D5
    2368
    21DA
    21C9
    22BE
    23EB
    217C
    213A
    22AB
    21D9
    242F
    21E1
    2192
    2349
    216D
    2395
    21EC
    218E
    23FE
    23F6
    22B0
    21C2
    21C2
    2174
    2468
    21C6
    2261
    21AE
    216E
    23BD
    21F1
    22A7
    2321
    2180
    23D4
    21CA
    21D6
    23CC
    213B
    21E2
    216A
    2440
    21DC
    217F
    2366
    23E4
    22DE
    21C5
    2206
    23EC
    2137
    21F3
    21B4
    2423
    22A8
    2148
    2378
    21B7
    21EA
    2183
    21E8
    241E
    21D0
    2196
    21B7
    23CF
    240D
    21A2
    21EF
    2341
    2379
    2159
    21AE

    **************************************************

    30000 sampling per second

    264C
    25DD
    2573
    231C
    23BF
    240D
    24DB
    26AA
    259C
    2324
    2517
    268A
    24F0
    26AE
    26B5
    266F
    2325
    210F
    250A
    2483
    267D
    268A
    26BD
    272F
    23E9
    24EF
    267D
    258A
    23C9
    2510
    24B0
    2621
    24DC
    2982
    232C
    23CF
    24CE
    2528
    2455
    2644
    237C
    2660
    268C
    2445
    2392
    2463
    2356
    24B5
    2634
    25A0
    2470
    2495
    26B6
    26AD
    237B
    22B0
    247A
    26E9
    242A
    24DE
    2475
    244B
    257B
    24B5
    2421
    243F
    24E0
    24DB
    2460
    2463
    246E
    25E8
    2733
    238B
    2616
    2247
    25F0
    255D
    24F1
    22FF
    2429
    2625
    2688
    297F
    23DC
    2697
    262D
    2317
    2430
    234F
    2481
    2572
    268F
    2397
    2693
    23D7
    2672
    22BF
    241E
    2634
    250D
    236F
    2688
    2550
    24A5
    256A
    25F9
    24B9
    2550
    256E
    2675
    2459
    245D
    2393
    252A
    2549
    253F
    2412
    2660
    24CE
    23AD
    26BD
    2402
    25B9
    23CA
    2423
    250F
    23D4
    27C0
    21D5
    2413
    23BC
    2375
    242C
    2349
    21E8
    228C
    26EE
    2416
    26A9
    23CC
    224D
    250A
    245E
    2679
    2454
    2664
    24A5
    24AE
    24C6
    2384
    23E5
    255F
    22FD
    2357
    264D
    2386
    2179
    2757
    2660
    23E0
    27C1
    23FF
    24FC
    21A1
    2472
    23D3
    2309
    2547
    2457
    238D
    2522
    2390
    2519
    25E2
    2413
    2537
    26F7
    25A3
    27C6
    2535
    2452
    2569
    2515
    268B
    247D
    2426
    24A3
    26E7
    23E8
    24D8
    247F
    246F
    24ED
    25E9
    2745
    253A
    2559
    2451
    2420
    24AE
    26A5
    22F5
    2362
    2651
    247E
    2602
    2404
    279E
    2338
    239A
    2625
    229C
    2435
    25B5
    251C
    2415
    2613
    24CB
    23CD
    26AE
    2320
    2455
    2637
    23C8
    24AD
    23D0
    26BA
    272B
    2508
    2687
    26F1
    2504
    2610
    2656
    2729
    248D
    23D1
    27D1
    25EE
    260C
    2465
    25F6
    2425
    24A5
    23B0
    23B1
    2397
    247F
    2442
    22C8
    255F
    287D
    2600
    27B5
    2596
    23B3
    2408
    25E9
    2425
    26C0
    2510
    24BD
    267E
    22B8
    2472
    23E7
    250D
    2484
    23D6
    2380
    2635
    26E9
    25CD
    23E9
    2322
    2587
    25D3
    2410
    264A
    2390
    24D1
    247B
    2419
    2768
    24BA
    232B
    25AB
    23AB
    24F0
    24A4
    271B
    2358
    2662
    271F
    22A2
    23C5
    2411
    237F
    270A
    23D6
    23C0
    2560
    24FC
    24F4
    2542
    2777
    23A6
    2421
    26DE
    23A5
    2612
    24F6
    24EB
    2535
    2412
    24B2
    2364
    24A3
    26D7
    245F
    22F4
    2736
    245B
    2385
    24BC
    24CC
    263B
    26CD
    234E
    252D
    2707
    252C
    2486
    25F4
    26F2
    238C
    24A9
    26BA
    2614
    2496
    2564
    26DA
    22F4
    2459
    266D
    2672
    260F
    252A
    2496
    2681
    240B
    2452
    244C
    26DD
    240D
    23C8
    257D
    25AD
    2342
    27AD
    244E
    2677
    21BE
    249C
    2559
    23D2
    24BF
    270A
    2359
    23AF
    23A1
    248A
    272B
    2690
    2087
    25B9
    2498
    22A4
    23CF
    27C0
    261F
    26D4
    2659
    25D3
    2669
    263A
    23D2
    24A4
    23E3
    2425
    2592
    24C2
    23B2
    2640
    2443
    28C8
    22E4
    254B
    24F9
    26F2
    2497
    264D
    251F
    2484
    241F
    2713
    2912
    2426
    2702
    2309
    259E
    257B
    25EB
    2415
    27A9
    24C6
    23D8
    228E
    220A
    249D
    260F
    2731
    26A7
    2373
    22A7
    23F8
    22E5
    24EB
    26B1
    2709
    2AD1
    23C6
    250F
    24A4
    259C
    2778
    276B
    2759
    25DF
    240F
    237E
    2450
    2719
    2384
    24BC
    2614
    26BE
    25DE
    2483
    23E7
    2511
    26C3
    2793
    246D
    2491
    24C0
    2652
    23AA
    22E6
    2522
    2401
    26BE
    280D
    255D
    21C6
    242D
    2345
    2672
    2656
    28C1
    23BE
    2658
    25F9
    22F4
    22D2
    26EF
    26D1
    255B
    24EA
    23B4
    26A1
    265A
    2716
    23E1
    2499
    251E
    27E8
    2621
    251D
    23D2
    242E
    26DD
    26C8
    2742
    283F
    26C9
    2546
    265B
    251A
    2273
    2479
    24FD
    22E3
    2541
    2495
    2421
    25C0
    24BC
    24A0
    2416
    26D9
    2371
    24CD
    2388
    247F
    256B
    2456
    2368
    2659
    2505
    2494
    254C
    23D7
    25B1
    254F
    2722
    2443
    245D
    259D
    26CB
    2658
    24F5
    25D7
    2648
    2386
    2390
    26CE
    22E6
    26C3
    2699
    22E2
    2422
    22F7
    26A3
    2641
    2537
    23C1
    23EB
    2414
    250A
    23B1
    2459
    2365
    2616
    23ED
    22D6
    240A
    26C3
    24AE
    2296
    248C
    2457
    22BB
    2618
    23DA
    2682
    24F9
    2500
    266F
    23DC
    245F
    246C
    2487
    239A
    27D9
    2477
    22AE
    2472
    243E
    26D4
    2389
    25C4
    23C9
    27A8
    2471
    2477
    260A
    24F5
    247F
    253D
    2560
    249F
    24A7
    2312
    2622
    243F
    274A
    254C
    24D4
    2590
    232F
    24F2
    2276
    2400
    272C
    25C2
    2629
    23A3
    24D4
    26E8
    2241
    21C6
    23CB
    24C7
    2355
    27D4
    2474
    2429
    262F
    242E
    2425
    249E
    26AA
    2295
    25A0
    245C
    2641
    2575
    26CB
    22FE
    24D5
    2404
    2444
    245F
    2529
    230E
    2387
    244E
    271F
    2441
    22DE
    2259
    256F
    23C7
    2740
    2233
    237A
    238B
    2514
    2399
    22D8
    24A3
    2508
    23A7
    2890
    2324
    23E8
    2494
    283F
    2494
    261C

  • Hi Frank,

    Given the codes you provided, I calculated 121uVRMS of noise for the 500 SPS data rate. This seems pretty high.

    However, it seemed odd that you only have a few hundred samples when you are sampling so fast and for so long (60 sec). Even at 500 SPS, you should be getting ~30000 samples in 60 seconds, but your dataset only showed 662. You also mentioned that you are printing an output every 100 ms. It is possible that you are getting corrupted data if you are trying to print to a console, since this function takes a lot of time and resources to execute. Are you able to dump all of output data to memory in real time then send to notepad/Excel?

    I would also suggest the following: internal to the ADS1256, you can select the same input for both channels via the MUX register. So if you select AIN0, this internally shorts these inputs together so you can determine the internal noise of the ADC. If you can try this, you should be able to compare this noise to the noise specified in the ADC's datasheet. This gives you a baseline to determine where the source of the noise might be: if this noise is the same as the datasheet noise, noise is getting into your system from the front-end circuitry; if the noise is much higher, you probably have a supply, grounding, or layout issue.

    I will also reiterate that we recommend against have a split ground plane as you currently have in your system. Here are some tips and tricks related to grounding and layout that you can try: https://e2e.ti.com/support/data-converters/f/73/t/755516?tisearch=e2e-sitesearch&keymatch=faq%3Atrue

    Hopefully some of these suggestions will you help you narrow down the source of your issues.

    -Bryan

  • Hi, Bryan!

    Thank you for your answer!

    I am travelling arround this days so I can not make practical tests again.

    I will do this when I willl be back in my workshop. I thing the first thing will be to join splitted grounds.

    Regards!

  • Hi Frank,

    I would first try shorting the ADC inputs internally as I mentioned in my last post just to see if you are getting good performance out of the ADC by itself. This will be the simplest troubleshooting step to try, requiring no design changes on your part.

    Using a single ground plane might make sense as a second step, but certainly for your final product.

    -Bryan

  • Bryan, thanks.

    Now I am starting to thing if I did everythin OK for my type of measuring....?

    I need 8 analog inputs, 0 to 5V. Is my schematics OK for this purpose?

    And what are register settings for this? Maybe I do not have all registers included in my ADS1256 initialisation or maybe I did something wrong.

    Unfortunately I have not have my working computer here so I can not write which registers I already used and which values I put into them. I will do this as fast I can do  this.

    p.s.

    Which values should I put into MUX register for the purpose you suggest?

    Regards!

  • Hi Bryan!

    I am sorry for late answser. I was on business trip.

    I didn't manage to make a test on a MUX register as you propose. Meanwhile I would like to show how I initialise ADS1256 and how to take a measurement.

    Maybe I make mistake here...

    I found something strange, if I want to go lower than 500sps I've got strange ADS1256 behavior...

    See a label: byte drate few rows lower...

    ADS1256 initialisation:

      SPI.transfer(0x50);// 1st command byte 0101 0000 = 0x00h STATUS register
      SPI.transfer(0x00);   // 2nd command byte, write one register only
      SPI.transfer(0x00);   //write the databyte 000000000 to the register, BUFFER disabled
      delay(1);


      SPI.transfer(0x52);// 1st command byte 0101 0010 = 0x02h ADCON
      SPI.transfer(0x00);   // 2nd command byte, write one register only
      SPI.transfer(0x20);   //  0 01 00 000 => Clock Out Frequency = fCLKIN, Sensor Detect OFF, gain 1
     byte drate_data = 0x92; // 1001 0010 =>  500 SPS


      delay(1);
      SPI.transfer(0x53);// 1st command byte 0101 0011 = 0x03h DRATE register
      SPI.transfer(0x00);// 2nd command byte,0000 0000 write one byte
      SPI.transfer(drate_data);   // write the databyte 010100001 to the register
      delay(1);

    READING THE ADS VALUE:

    byte channel,data;
    unsigned long adc_val;
    kanal1=0,kanal2=0,kanal3=0,kanal4=0,kanal5=0,kanal6=0,kanal7=0,kanal8=0;

     for (byte i = 0; i <= 7; i++) {
      adc_val =0; // store reading
      channel=i;
      // digitalWrite(cs, LOW);
      SPI.beginTransaction(SPISettings(SPISPEED, MSBFIRST, SPI_MODE1)); // start SPI
      delayMicroseconds(10);
      //The most efficient way to cycle through the inputs is to
      //change the multiplexer setting (using a WREG command
      //to the multiplexer register MUX) immediately after DRDY
      //goes low. Then, after changing the multiplexer, restart the
      //conversion process by issuing the SYNC and WAKEUP
      //commands, and retrieve the data with the RDATA
      //command.
      for (byte k = 0; k <= 1; k++) {//moramo dvakrat narediti na istem kanalu, drugace prihajajo vrednosti z zamikom
      while (digitalRead(rdy)) {} ;

     // byte channel = 0;//kanali od 0 do 4
      data = (channel << 4) | (1 << 3); //AIN-channel and AINCOM

      SPI.transfer(0x50 | 1); // MUX register
      SPI.transfer(0x00);   // 2nd command byte, write one register only
      SPI.transfer(data);   // write the databyte to the register
      delayMicroseconds(10);

      //SYNC command 1111 1100
      SPI.transfer(0xFC);
      delayMicroseconds(10);
     
      //WAKEUP 0000 0000
      SPI.transfer(0x00);
      delayMicroseconds(10);
       
      SPI.transfer(0x01); // Read Data 0000  0001 (01h)
      delayMicroseconds(10);
     
     
      adc_val = SPI.transfer(0);
      adc_val <<= 8; //shift to left
      adc_val |= SPI.transfer(0);
      adc_val <<= 8;
      adc_val |= SPI.transfer(0);
     
      delayMicroseconds(10);
     
      SPI.endTransaction();
      }

      //The ADS1255/6 output 24 bits of data in Binary Two's
      //Complement format. The LSB has a weight of
      //2VREF/(PGA(223 − 1)). A positive full-scale input produces
      //an output code of 7FFFFFh and the negative full-scale
      //input produces an output code of 800000h.
      if(adc_val > 0x7fffff){ //if MSB == 1
        adc_val = (16777215ul - adc_val) + 1; //do 2's complement
      }
      if (channel==0){
        kanal1=adc_val;
        if (adc_val<min_value) {
          min_value=adc_val;
        }
        if (adc_val>max_value) {
          max_value=adc_val;
        }   
      }
      if (channel==1) kanal2=adc_val;
      if (channel==2) kanal3=adc_val;
      if (channel==3) kanal4=adc_val;
      if (channel==4) kanal5=adc_val;
      if (channel==5) kanal6=adc_val;
      if (channel==6) kanal7=adc_val;
      if (channel==7) kanal8=adc_val;

  • Hi Frank,

    How much delay time is "delay(1)"? And are you using a 7.686 MHz clock?

    You can short the ADC inputs together using something like the following:

    SPI.transfer(0x51);   // write to MUX register
    SPI.transfer(0x00);   // write one register only
    SPI.transfer(0x00);   // select AIN0 for both AINP and AINN

    You sent me your code, but it seems like we have lost focus on the original problem related to noise. From your original post, you were able to get data out of the device, so I would guess for now your code is working. Please verify the output noise with inputs shorted and report back.

    You also have not yet provided feedback on why there were so few data points when are you are sampling at high speeds for 60sec?

    -Bryan

  • Hi, Brayan!

    1.) Delay(1) means delay 1 milisecond.

    2.) Thank you for MUX register instructions. I will test this.

    3.) I sent you my code to check if I maybe make something wrong with initialisation or something else, and the noise comes from this source.

    4.) The reason why I am not getting 500sps is that I determine in my code to show only 100sps. I simply "ignore" first 4 results and show only every 5th result (If I set 500sps).

    The other thing I realised is that I can not use register settings lower than 500sps. If I try this, then I not get data out anymore. From this reason I sent you my code, too.

  • Hi, Bryan, today I have a little progress.

    I made a mistake in my prevoius code so this was the reason that I didn't get SPS lower than 100sps.

    Now I can.

    But, still instead 5 SPS now I have in reallity 3SPS. At one minute I've got 150 samples. I caluclate standard deviation for this 150 samples and the result is 12.64.

    At 100sps in one minute I've got 2998 samples instead 6000.

    Standard deviation at this point is now : 35,48.

    Standard deviation was calulated in Excell, with Excell formula.

    And I clear my code as much as I know....

  • Hi, Bryan.

    I think I found the source of my trouble with Ads1256noise...

    In my code I sent print data in for loop for reading from ADS.

    Now, I first read all 8 channels and after for loop I print value from ads. It look very good.

    Standard deviation now is app 35.

    I found this becouse you focused me to the fact that number of sampels was low.

    And I find another item.

    If I set ADS1256 to 100sps and read all 8 channels then I've got only 62 samples in 10 seconds for channel 1.

    If I set for loop to read only one channel, then I've got app 500 in 10 seconds. This is app 50 sps.

    Still 50% less than expected. I will search in my code again. Maybe I will find something that breaks the speed...

    Regarding the noise. I believe the problem was in wrong print position in the code.

    EDIT:

    I've found the mistake in a software that makes me lovew sampling speed. It was again somekinf for loop for two steps....

    Probably I inserted in a past to try to reduce noise.....

    So I think this topic issolved!

    Thank you for all your help and best regards!