Poll

Using a github repository with submodules

Fine, it gives the possibility to easily upgrade the script to newer dependencies
7 (77.8%)
A bit of a hassle, but I can get it to work
0 (0%)
I don't plan on to use git, so I would like a single download
1 (11.1%)
No need for these scripts, I use other tools
1 (11.1%)
No need for these scripts, automating is not my thing
0 (0%)

Total Members Voted: 9

Author Topic: Automated battery charging using a calibrated SDS1104X and SPD3303X - done  (Read 5081 times)

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I build the attached circuit. I've eventually chosen different values. It now has a input impedance of very close to 50 ohm on each channel.
The coarse voltage division is now 1/2, which is quite standard.
The fine voltage division is now  1/2000. So on my AWG it can swing from -5 to 5 mV.
I've tested this by hand and it seems indeed to work also when the coarse input is at it's extremes. But some automated testing (with averaging) is needed to see how precise it is.

The 47 ohm resistors may dissipate more than 0.5W so its best to take one that can handle that without drifting in resistance a lot.
« Last Edit: January 07, 2020, 12:42:59 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
The actual 47 ohm and 3 ohm resistors (when handpicked) should theoretically be 49.9 ohm, to get the mentioned divisions. See Vo, x (coarse) and y (fine) fractions.
« Last Edit: January 07, 2020, 12:55:59 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I used the new setup and ran into the issue that the coarse setting could not reach the required accuracy (error < 2 mV) before going to fine control (-5mV to 5 mV) at the 1.5V test voltage. This because the AWG is switching ranges on 3V, which comes with some extra error, resulting in a small voltage range that cannot be reached.
I solved this going for a bit coarser fine tuning of  (-10mV to 10mV) so I could decrease the required accuracy (error < 5 mV) before going into fine control. (R5: 100 -> 200 mOhm)

Because of the much better "set voltage -> output voltage" prediction the script can now execute in 1h40, with ADC error measurements.

Those measurements are shown below for the 200 mV/Div range. The errors are at most 1,25% of full range. Also the errors seam to have an offset of +2.5 mV, which could also be attributed to the offset DAC. It could well be that the offset in the 200 mV/div setting behaves different than the 500 uV/div (for which precise offsets can be generated).
Maybe the correction should be scaled?

However the errors are so small that when scaled as if it was measured in the 500uV range they would be small relative to the vertical offset precision of 60 uV that was measured before. Both taken together I think the 0.1 mV precision/accuracy can already be achieved. So the next step will be to write the calibration table to a file, and load it into the battery charging script.
« Last Edit: January 07, 2020, 10:23:31 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automated battery charging using a calibrated SDS1104X and SPD3303X - done
« Reply #28 on: January 09, 2020, 09:47:17 pm »
An updated charging script was run, and the result are well within 0.1 mV precision and accuracy!  :box:

I also found out that the previous measurements had a little voltage drop (1.5 mV) due to the 1 A current draw, which mostly influenced the scope measurements. Those where uncalibrated better than it previously showed. The question how much they would differ can be answered using the calibration graphs..

I also used channel 2 instead of 1, just to see whether the calibration curve would be different. But as can be seen they're very alike.

Because of a more narrow voltage range (-100 mV .. 1.8 V) the used calibration was done in 50 minutes,.

To conclude: for signals that don't change fast this could be a worthy use of a scope. I think it can even get more precise, it really would have helped if the AWG voltage source had a bigger bipolar buffer capacitor added to it. The battery charging voltage is noticabley more stable.
« Last Edit: January 09, 2020, 09:52:24 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 
The following users thanked this post: tv84

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automated battery charging using a calibrated SDS1104X and SPD3303X - done
« Reply #29 on: January 20, 2020, 06:19:24 pm »
I updated the scripts, but some changes where not completely tested.

I also added a scriptfile for viewing purpose which used the calibration and the Keithley DM6500.
https://github.com/HendriXML/XMLScripts-Project-BatteryCharging/blob/master/Script.Project/Battery%20voltage%20measurements%20DSO%20and%20DMM.xml
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf