I am developing a project, I was going to write an introduction post but I will post that later due to me having written the hole introduction but then loosing it in a browser crash and I simply don't have the attention to re write it right now.
But what I am developing is a synchronous buck-converter controlled by a XMEGA128A1U, possibly a smaller XMEGA A series depending on whether or not it is to my advantage or not to have access to two separate ADCs and DACs. It is powered by two series 20700A Li-Ion batteries(they are 1 or 2 millimeters larger than 18650 batteries), however I have not yet determined if I need to measure the voltage over both batteries or if it is sufficient to measure the resulting 8,4V - 6,4V(they are charged with a external charger).
I am trying to determine which pins of the MCU to tie to which part of the PCB so that I can make the prototype in order to start developing the software, and I wonder about the following.
I have the need to measure the:
- battery voltage/buck input-voltage(ether the voltage across both batteries individually or across both combined)
- buck-converter output-voltage
- buck-converter output-current
- the voltage across the load as part of a load-resistance measurement(this might be done with an external more accurate ADC)
- 1 or 2 voltages representing the temperature of the circuits
The buck-converter output-voltage and output-current will be used to regulate the converter so they will be done most often and I wonder if it could be beneficial to measure each with separate ADCs in order to be sampling those two values at the same time?
Would there be any difference at all compared to measure them with two ADC channels on one ADC, in succession?
When I try to make these plans I first considered using ADC A for measuring the values relating to the converter regulation and using ADC B for measuring non-time critical values such as battery voltage and the temperature voltages, but then I thought maybe I should use ADC A for measuring the buck output-current and ADC B for measuring the buck output voltage and the remaining measurements would then be shared amongst ADC A & B...
The converter is switching at 100kHz by the way, there is clearly differences between the requirements of the time in between measurements comparing the output voltage/current and the battery voltage. It would perhaps be convenient to use DMAs for making the time-critical measurement with ADC A and then make the rest of the measurements with ADC B.
Though I have forgotten whether or not I had determined how often I should sample the buck output voltage/current, I'll look that up.
Any thoughts on this would be interesting to read.