arachnidlabs / reload-pro

Schematics and code for the Re:load Pro
http://www.arachnidlabs.com/reload-pro/
Apache License 2.0
98 stars 32 forks source link

Setpoints below ~1A seem out? #74

Closed projectgus closed 9 years ago

projectgus commented 9 years ago

Hi Nick,

I'm just playing with my Reload:Pro now for the first time, and something seems unusual. I've upgraded to firmware v1.9, and I also downgraded to v1.8 and saw the same symptoms.

When setting a current setpoint below about 1A, the displayed (and actual) current draw lags behind the setpoint consistently.

Below about 450mA there is no current drawn at all, then between 450mA and approx 1A the current draw is much lower than the setpoint. Above 1A things seem to fall back into step.

Here's one set of values I recorded. The configuration here was my bench supply in constant voltage (10V) mode. Negative terminal wired directly to RL:P. Positive terminal wired via inline multimeter (UT61E) in DC current mode. Second multimeter measuring voltage across R:LP terminals (which didn't deviate more than 10mV from 10V).

All changes made via the front panel, no USB interface involved.

RL:P Setpoint RL:P Readback Multimeter Readback
<400 0 0
440 0 0
450 55 50
500 158 153
600 284 279
700 462 460
800 634 631
900 743 740
1000 900 898
1100 1050 1050
1200 1140 1150
1300 1300 1300
1400 1400 1400
>1400 Matches Matches

Rerunning calibration seemed to move the "start" and "finish" setpoints around a bit but didn't change the overall pattern. For example one time I saw output starting at 350mA setpoint, and "catching up" at around 800mA.

For calibration I used the same power supply at the same 10V setting. I wouldn't have thought calibration is the problem though, as the readbacks on the RL:P itself are accurate.

Can you think anything I'm doing wrong here? Is there anything I should try?

Cheers,

Angus

projectgus commented 9 years ago

Hmm, so I tried calibrating using a different power supply - specifically the 5V rail on an ATX supply, just as I wasn't sure how well ol' benchy was dealing with the rapid current transitions that occur during the calibration process.

With this calibration the readback comes alive at 80mA setpoint, and the two values had equated (readback "caught up" to setpoint) by about 400mA.

To confirm power supply variations being to blame, I reran calibration on my bench supply set at 5V instead of 10V. The results were very similar to what I saw the first time, ie nothing at all until ~400mA setpoint, and readback "catches up" at about 1A.

So I think the calibration is sensitive to power supply response. I have one more (better quality) ATA supply I can try on its 12V rail, and I can also try and grab some oscilloscope traces. However what I might try before either of those is just increasing the delay times inside the calibrate_dacs() and calibrate_opamp_offset_trim() functions in the firmware, see if that makes things more accurate.

electrokean commented 9 years ago

Angus, see this info re calibrating the offset which can be wildly different between devices. https://github.com/arachnidlabs/reload-pro/issues/28#issuecomment-58252206 Tweaking the offset value worked well for me on both my units.

projectgus commented 9 years ago

That sounds exactly like it, thanks Kean. Will give it a try ASAP.

Arachnid commented 9 years ago

Have you been performing a factory reset before calibrating? The next version will fix this, but presently, existing settings are used for some parts of the calibration process.

projectgus commented 9 years ago

I hadn't been. I just did one then and the offset is less but still present.

The "cal O " trick that Kean linked to worked pretty well, I was able to squash the offset but picked up some instability (~2mA oscillation about the setpoint, something that wasn't happening with the other settings).

Looking at PR #71 and comparing its timing to the timing (and PSU recovery times) I was seeing during the offset calibration phase of v1.9, I'm almost certain that change will fix the calibration entirely. I just need to bring PSoC Creator up in a VM and compile a firmware to test it out...

projectgus commented 9 years ago

Sorry for the slow delay, got busy with some other stuff (and the R:LP was now calibrated well enough that I've used it a few times since!)

The current git HEAD (e4be70426) with PR #71 now calibrates perfectly and automatically, no problems whatsoever.

I also started a Calibration wiki page with some of the tips from this & other threads, for future reference: https://github.com/arachnidlabs/reload-pro/wiki/Calibration