Many thanks. The good news is that my Rh calculated from Vh, V, Vs using Rs matches with yours, so the maths side of thing appears to be correct.
The question is then, why the calculated Rh differs from what would be expected. If we look at the V we should be getting with a 4690:330 resistor divider ...
For the Pi 4 it appears to be pretty close to what would be expected in the REV direction, not quite so good for FWD -
All tables are: expected (got) error
So REV = ~0.05%, FWD = 0.7%
For the Pico that's similar, except the larger errors here are for REV rather than FWD. I am guessing that's simply down to the GPIO pair being reversed. I don't know why the last two readings are considerably worse than the others -
So FWD = ~0.1%, REV = ~0.4%
If we look at how the calculated Rh differs from the 4690 it should be ...
For the Pi 4 it's a mixed bag -For the Pico it's better for the FWD direction, massively worse in the REV direction -If we average FWD and REV we get -For the Pico that's worse than if we had just used the FWD readings.
My guess would be that the discrepancies come down to accuracy of voltage readings. I am not sure how one would resolve those. Perhaps capacitors and multiple readings ?
I would say the next step is checking what the actual voltages are on input pins and what those voltages appear to be when the program reads them.
The question is then, why the calculated Rh differs from what would be expected. If we look at the V we should be getting with a 4690:330 resistor divider ...
For the Pi 4 it appears to be pretty close to what would be expected in the REV direction, not quite so good for FWD -
All tables are: expected (got) error
Code:
Pi4FWD V = 0.238337950788 ( 0.240007324442 ) +0.7004%REV V = 3.05497370849 ( 3.05409320353 ) -0.0288%FWD V = 0.238337950788 ( 0.240007324442 ) +0.7004%REV V = 3.05684229141 ( 3.05409320353 ) -0.0899%FWD V = 0.238337950788 ( 0.240007324442 ) +0.7004%REV V = 3.05684229141 ( 3.05409320353 ) -0.0899%FWD V = 0.238337950788 ( 0.240007324442 ) +0.7004%REV V = 3.05497370849 ( 3.05409320353 ) -0.0288%
For the Pico that's similar, except the larger errors here are for REV rather than FWD. I am guessing that's simply down to the GPIO pair being reversed. I don't know why the last two readings are considerably worse than the others -
Code:
PicoFWD V = 0.250051668207 ( 0.24981 ) -0.0966%REV V = 3.08228103691 ( 3.072749 ) -0.3093%FWD V = 0.24776300502 ( 0.247393 ) -0.1493%REV V = 3.07701179388 ( 3.063886 ) -0.4266%FWD V = 0.247963616116 ( 0.2481987 ) +0.0948%REV V = 3.08529216639 ( 3.095358 ) +0.3263%FWD V = 0.248546243606 ( 0.24981 ) +0.5085%REV V = 3.08529216639 ( 3.108249 ) +0.7441%
If we look at how the calculated Rh differs from the 4690 it should be ...
For the Pi 4 it's a mixed bag -
Code:
Pi4FWD Rh = 4690 ( 4650.8411215 ) -0.8349%REV Rh = 4690 ( 4669.34579439 ) -0.4404%FWD Rh = 4690 ( 4650.8411215 ) -0.8349%REV Rh = 4690 ( 4626.11111111 ) -1.3622%FWD Rh = 4690 ( 4650.8411215 ) -0.8349%REV Rh = 4690 ( 4626.11111111 ) -1.3622%FWD Rh = 4690 ( 4650.8411215 ) -0.8349%REV Rh = 4690 ( 4669.34579439 ) -0.4404%
Code:
PicoFWD Rh = 4690 ( 4695.659 ) +0.1207%REV Rh = 4690 ( 4476.399 ) -4.5544%FWD Rh = 4690 ( 4698.731 ) +0.1862%REV Rh = 4690 ( 4400.049 ) -6.1823%FWD Rh = 4690 ( 4684.496 ) -0.1174%REV Rh = 4690 ( 4936.927 ) +5.2650%FWD Rh = 4690 ( 4660.625 ) -0.6263%REV Rh = 4690 ( 5291.005 ) +12.8146%
Code:
Pi4AVG Rh = 4690 ( 4660.09345794 ) -0.6377%AVG Rh = 4690 ( 4638.4761163 ) -1.0986%AVG Rh = 4690 ( 4638.4761163 ) -1.0986%AVG Rh = 4690 ( 4660.09345794 ) -0.6377%
Code:
PicoAVG Rh = 4690 ( 4586.029 ) -2.2169%AVG Rh = 4690 ( 4549.39 ) -2.9981%AVG Rh = 4690 ( 4810.7115 ) +2.5738%AVG Rh = 4690 ( 4975.815 ) +6.0941%
My guess would be that the discrepancies come down to accuracy of voltage readings. I am not sure how one would resolve those. Perhaps capacitors and multiple readings ?
I would say the next step is checking what the actual voltages are on input pins and what those voltages appear to be when the program reads them.
Statistics: Posted by hippy — Thu May 09, 2024 1:08 pm