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

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

$
0
0
I am a great believer in KISS so when I did this I simply used two GPIO to create a H-bridge -

Code:

                __              __/_  GPIO_X >---|_/__|---.              /       |              ____    |  GPIO_Y >---|____|---{                      |     ADC <------------'
One GPIO high, the other low, changes the direction of current in the circuit.

It may be that reversing current changes the ADC reading. You can compensate for that by calibration, or only read when current is in one direction, only calibrating that.

I never tested that for long term corrosion.

Your error or variance seems to be about 0.05% to 0.1% in both cases you cite so it may be that it's as good as you can expect. Perhaps post your schematic for others to look at and assess.

Statistics: Posted by hippy — Sat Apr 27, 2024 2:49 pm



Viewing all articles
Browse latest Browse all 4151

Trending Articles