Timeline for How can Rpi4B python read negative result values of the SPI ADS1256 24 bit ADC?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 4, 2020 at 17:40 | comment | added | Amritpal singh sodhi | @Dmitry Grigoryev, I tired by adding capacitor in parallel with resistors but it did not improve signal, same delay in its falling edge. | |
Mar 4, 2020 at 11:37 | comment | added | Dmitry Grigoryev | @Amritpalsinghsodhi Try adding small capacitors (20 pF?) in parallel with resistors. The amplifiers also have input capacitance, so you'll have a similar problem if you use one. If you really need fast measurements, get an ADC which can cover your entire voltage range. | |
Mar 4, 2020 at 11:22 | comment | added | Amritpal singh sodhi | Thanks all for your suggestion. currently i am using two register voltage divider method but i am not getting properly output. The problem is that the ADS has a small input capacity and together with the resistors i build an RC time constant that causes the delay in its falling edge. If i decrease the value of the resistors, i can solve this problem, but then the current becomes too large, so that i have too many losses in the resistors of the voltage sources.One solution is to use an operational amplifier. I want to know which IC i can use for summing non inverting amplifier. | |
Feb 29, 2020 at 2:38 | comment | added | tlfong01 | Anyway I used the online converter to verify my python converter function. Now of course you can verify if my converter is correct, AND IF YOUR TWO REGISTER APPROACH IS ALSO CORRECT (I doubt it). Sorry for my blunt comments, but you are doing 24 bit high precision perhaps life critical medical or military applications, you need to verify every step of your design. I won't be so strict/severe if you are doing Micky Mouse hobbyist projects using the amateurish MCP3008. | |
Feb 29, 2020 at 2:35 | comment | added | tlfong01 | Actually I did rerfresh my memory on 2's compliment represention and did mental checking using my studpid brain, with questions like below, on 8 bits only. (1) How can 8 bits donote +3? OK, it 00000011, so my function should give "+" and 00000011. (2) How to denote -4 then? Well, I know the mechanical procedure is first find one'c complement, then add one. Of course I cheated and asked help on line (exploringbinary.com/twos-complement-converter). / to continue, ... | |
Feb 29, 2020 at 2:35 | comment | added | tlfong01 | I input pos and neg values, middle and boundaries, one to three bytes long, compare the function output with an online 2C to decimal converter. I found everything OK, before I decided to use it. My penzu program listing contains my conversion function with sample output. So you can use python to input different values to my converter and print out the results to verify. I have not yet looked at your do analog to digital conversion and convert 2C to decimal funtion, because you combined two things in one function, and I don't wish to spend time splitting it and separate test one of them. | |
Feb 29, 2020 at 2:34 | comment | added | tlfong01 | Oh my goodness. So you are not using #Dmitry's classic two register voltage divider method. Instead, you are using a "two register" divider approach, which I found wierd. As I said earlier, my accelerometer output is 2's complement covering postive and negative values. I am using 2's compliment converting to signed decimal function I borrowed form StackOverflow or elsewhere I forgot. As almost always, I did verify if the convering function is working in ALL conditions, no matter the number of bytes of the original 2's compliment string. / to continue, ... | |
Feb 27, 2020 at 13:04 | comment | added | Amritpal singh sodhi | Ok Thanks @Dmitry Grigoryev,tlfong01 : I am doing simple register voltage divider i got now posItive measured value but how i program the formula V_real = 2*V_meas - 5*K_1Volt, in python. I gave the link of ADS 1256 file could you let me know .its library where i did twos complement .it mark in red.penzu.com/p/f38ec540. | |
Feb 27, 2020 at 8:56 | comment | added | tlfong01 | I think your simple resistor voltage divider works. To overcome the low input impedance problem, we can use an OP Amp as a digital buffer. Or we can use a dual+-5V power supply op amp and shift up input signal by 2.5V. Just brainstorming. | |
Feb 26, 2020 at 14:11 | history | edited | Dmitry Grigoryev | CC BY-SA 4.0 |
added 120 characters in body
|
Feb 26, 2020 at 14:03 | history | answered | Dmitry Grigoryev | CC BY-SA 4.0 |