Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4899

Automation, sensing and robotics • Re: Can't measure resistors

$
0
0
The shunt is 330 and the test resistor is 4690 and I never change them. The load is calculated from the voltage ratio of the shunt.

PIco results

Code:

       .-----.-----.  .-----------.------------.-------------.  .----------.------.      | GP1 |  GP0|  | Vh        |        V   | Vs          |  |  Rh      | Rs   |.-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| FWD |  0  |  1  |  |  3.3      |  0.24981   |  0.03544976 |  | 4695.659 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| REV |  1  |  0  |  |  3.296777 |  3.072749  |  0.03383841 |  | 4476.399 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| FWD |  0  |  1  |  |  3.276635 |  0.247393  |  0.03464408 |  | 4698.731 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| REV |  1  |  0  |  |  3.291137 |  3.063886  |  0.03383841 |  | 4400.049 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| FWD |  0  |  1  |  |  3.291137 |  0.2481987 |  0.03383841 |  | 4684.496 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| REV |  1  |  0  |  |  3.3      |  3.095358  |  0.03383841 |  | 4936.927 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| FWD |  0  |  1  |  |  3.3      |  0.24981   |  0.03383841 |  | 4660.625 |  330 ||-----|-----|-----|  |-----------|------------|-------------|  |----------|------|| REV |  1  |  0  |  |  3.3      |  3.108249  |  0.03383841 |  | 5291.005 |  330 |`-----^-----^-----'  `-----------^------------^-------------'  `----------^------'
Pi 4 results.

Code:

     .-----.-----.  .-----------------------.----------------------.-----------------------.  .-------------------.------.      | P22 | P27 |  | Vh                    |        V             | Vs                    |  |  Rh               |  Rs  |.-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| FWD |  0  |  1  |  |  0.026000793481246377 |  0.24000732444227424 | 3.256099368266854     |  | 4650.841121495328 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| REV |  1  |  0  |  |  3.2680997344889677   |  3.05409320352794    |  0.026000793481246377 |  | 4669.345794392521 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| FWD |  0  |  1  |  |  0.026000793481246377 |  0.24000732444227424 |  3.256099368266854    |  | 4650.841121495328 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| REV |  1  |  0  |  |  3.2700997955259865   |  3.05409320352794    |  0.026000793481246377 |  | 4626.111111111113 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| FWD |  0  |  1  |  |  0.026000793481246377 |  0.24000732444227424 |  3.256099368266854    |  | 4650.841121495328 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| REV |  1  |  0  |  |  3.2700997955259865   |  3.05409320352794    |  0.026000793481246377 |  | 4626.111111111113 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| FWD |  0  |  1  |  |  0.026000793481246377 |  0.24000732444227424 |  3.256099368266854    |  | 4650.841121495328 |  330 ||-----|-----|-----|  |-----------------------|----------------------|-----------------------|  |-------------------|------|| REV |  1  |  0  |  |  3.2680997344889677   |  3.05409320352794    |  0.026000793481246377 |  | 4669.345794392521 |  330 |`-----^-----^-----'  `-----------------------^----------------------^-----------------------'  `-------------------^------'

Statistics: Posted by TTSB — Wed May 08, 2024 9:21 pm



Viewing all articles
Browse latest Browse all 4899

Trending Articles