Actually, if he wants one for Vset and one for Iset, which I think is a very good idea, he either needs to setup some way to multiplex one or both of the rotary encoders to also operate the menus, change settings, etc. Having three encoders would allow instant change of voltage or current limit, even while navigating the menus and all the extra functions. Or you can use a single one with switch and LEDs to indicate voltage, current, or menu mode and use the push button to cycle through them. So three encoders reduces confusion, allows instant access to voltage and current controls, and reduce cases of changing the wrong one, especially when you are in a hurry.
Some how this has completely slipped past me. So I looked and found one that is rather like the micro pins, each of the 8 channels can be individually set to analog voltage out, analog in, digital out, digital in with I2C for about $7. That would be a possibility for this project.
Well, even I felt a little uncomfortable with the slow response time. In this case, at least 2 DAC channels for Vset and Iset, use the rest of the feedback as is except possibly use digital control to switch from voltage regulation to current regulation or back. That could simplify the control mixing without slowing the normal load current response time.
This is one for the digital guy. I left out the serial communication time for the second conversion because it is small compared to the conversion time (roughly 1/5th) and included the DAC output settling time just as information. Since the DAC is an output not an input, it can be set and then return from interrupt whereas the ADC conversions must complete before they can be read. The results of the first are read during the second conversion, the second adding the com time you mentioned but having little effect on the interrupt service time
At normal I2C speed of 400Khz the communication time would be around 1/5 the sample time, and I think you can start the second sampling while reading the first. This particular ADC chip has a high speed version of the I2C bus as an option. It is 3.4Mhz, about 9 times faster than the 400Khz.
2.5 amps. Some how I was always vague about the intended current range but I was thinking it was much larger. I was also trying to use figure 1 to derive the linearity, which has no reading below a gate voltage 5.5. Looking at figure 2 it is a log-linear with the response curving downward. Always hard to judge linearity on a log-linear so I eyeballed the numbers and replotted on linear-linear. There it curves upward more strongly. With only 2 points below 2.5 amps and none below 1 amp it still looks like it is not terribly linear. But the feedback system will take care of all of that so I raised a mote point earlier
i
So true! At least in software you KNOW that it will not work the very first time, but you can keep iterating until you get it to mostly work and you have slowed down on adding bells and whistles!
And it would seem that I still need to work on my remedial note reading for schematics, as well as basic circuitry.design.