kanflo / opendps

Give your DPS5005 the upgrade it deserves
MIT License
895 stars 124 forks source link

Force Vin_ADC, Vout_ADC and Vout_DAC through the 0,0 point #161

Closed Xenoamor closed 5 years ago

Xenoamor commented 5 years ago

This is to resolve #158

This is completely untested and unfortunately adds a requirement to have numpy installed. I'd rather not risk getting the maths wrong

Xenoamor commented 5 years ago

Nice to see Travis working by the way

kanflo commented 5 years ago

Thanks, I will give it a try this week.

Xenoamor commented 5 years ago

Looks like it's doing the trick image image image

My V_ADC calibration seems off but I'm not sure if that was my fault or these changes. I'm thinking we should only be using this force through origin for the V_DAC value. I feel like there might be offsets in the V_ADC that we aren't aware of and from my quick test only the V_DAC calibration actually appeared to be more accurate and the rest were worse off

This hasn't resolved the open circuit current issues though

Xenoamor commented 5 years ago

I think us using this only for V_DAC is reinforced by the empirical deductions in dps-model.h. The only C value that is close to 0 on all of the devices is V_DAC_C

kanflo commented 5 years ago

What is the consensus on this PR for those of you who has discussed it in #158?

Xenoamor commented 5 years ago

I'm not sure yet. I'm fairly sure this makes sense for the voltage DAC but the current is more difficult as it doesn't start at 0

kanflo commented 5 years ago

I need to have a look at forcing V_in on an old DPS. Looking at my original measurements on a now very old (as in number ov HW revisions ago) DPS5005. ADC(V_out) and DAC(V_out) passed through (0, 0) but V_in(ADC) did not:

Screenshot 2019-10-02 at 20 06 50

kanflo commented 5 years ago

Oh, forget the above, silly old me :-/

Screenshot 2019-10-02 at 20 08 49

Xenoamor commented 5 years ago

I'm still not sure we want this applied to the ADCs. The only instance where I got better results were with V_DAC. The rest seemed worse

kanflo commented 5 years ago

Oh? I guess I should redo the original investigation on a brand new DPS5005.

JackNewman12 commented 5 years ago

Yea. Applying this to the current calibration makes it worse.

I was thinking rather than choose 0,0 we should measure zero voltage and zero current for a few seconds to find the correct point.

I've been fiddling with this myself but haven't gotten results I am 100% happy with.