Ok let me give more information.
I am trying to design from scratch a variable lab power supply with variable stabilize voltage and variable current limiting.
Using a prebuilt amperage meter is not an option because the MCU need to know the current draw and act upon it.
I am thinking of using a microcontroller driven non-isolated switching design. I know I am reinventing the wheel but no IC solutions give me the versatility that direct software control can provide. I did a breadboard test with a few BJT and the results were almost jaw dropping. Voltage was within 30mV of what it was set to, loads between 0 and 300 mA caused less then 20mV of change and transient response was acceptable and could be improved with software adjustment. There was some ripple but filtering was crude.
It even worked well at settings below 1v.
I want to scale the design up and I think something very usable could be produced and run variable voltage with ~2-3 amp output.
On the allegro site you will find this part...ACS714ELCTR-05B-T it is a high side current sensor that is bi-lateral, it will sense current in both directions at 185/mV/A. This value can apparently be scaled to 100mV/A easily for simpler scaling to amperage. The output is 1/2 Vcc and for the '714 Vcc is 5V... there are 3V3 parts available but the granularity of the measurement would tend to make them less manageable for an Arduino or at least require a 12 bit A/D.
With 185 mV / A, it seems like it would waste alot of the ADC resolution since there would be no currents over ~5A. .185 * 5 = 0.925. 0.925 is significantly less the 5v full scale of the ADC.
The Max471 is a sensor W/O a sense resistor and the Max472 is the same part with a 3A measuring range W/Sense resistor, both are "Not Recommended For New Designs"
(The caps are from the first page warning about being a discontinued part...) and can be purchased on Ebay for 5 - 10 dollars
I am not too concerned about being discontinued since I only need 1-2.
, maxim also makes several current sensors... I haven't yet looked for them... I did look for the ACS714... No Joy. Now it's your turn... Want to buy a LM338 Steel... 1.2 to 32 V out A 5A? linear and a great space heater... But a real Quick and Dirty 0 to 35V out supply regulator (0 V out requires a -1.2 V reference which is also not any issue to create a neg supply a TIL431 and 2 resistors. Probably better to find a Buck-Boost converter and have to live with ~80% Efficiency... @ 50 W out it would be 10W lost as heat.
The LM338 does not really meet the requirements I need. It would be controlled with an analog potentiometer which means its less stable and not easily controlled in software which is required for this application. Also implementing variable current limiting would be difficult. Furthermore, I need it to be to operate from 0-1.2 i.e. 1.2 is not low enough. I am going to have a switchable voltage divider on the analog input for when the voltage is greater then 5v, otherwise run it straight through for more precision on lower voltages. I will have a zener clamp on the analog inputs to protect it during the time it takes the divider to kick in. I am thinking of using one microcontroller that runs in a tight loop for regulation then using another microcontroller that monitors button presses, the rotary encoder, updates the LCD and watches current draw then sends commands to the regulator MCU. This way it does not drop regulation during handling button events etc... I plan to use first two voltage regulators, one to regulate the +18v input to +15v and another to regulate the +15 down to 5v for the MCU and other logic circuits.
I welcome your opinion.