Hello, I have an analog circuit that I want to simplify with a microcontroller instead.
I need a microcontroller to measure current at two points and apply feedback to a transistor until the currents are equal.
This is the basic jist of it
Sorry for the crudity of it, I made this drawing a while ago and I'm too lazy to make it again.
Just pretend there is a ground symbol at the bottom.
Basically I need the MC to measure the voltage at R3 and apply feedback to Q1 until R4 is the same voltage as R3.
No I cannot change the overall analog topology it must remain the same. Minor changes are fine.
I only want it to match DC currents and ignore AC currents.
I suppose adding caps between the drop resistors and then programming a time delay into the MC should be sufficient.
My concern biggest concern is the DC error margin at the MC terminals, the voltage is being dropped across 3 separate resistors.
A small error in the reading can result in a significant error at the output so I may need some sort of calibration and it also means the MC need to be very accurate. Down to a few uV would be preferred.
What little I did know about coding arduino I have forgotten. It shouldn't be too difficult for me to pick it up again but I need some more detailed feedback how to approach this design.
I need a microcontroller to measure current at two points and apply feedback to a transistor until the currents are equal.
This is the basic jist of it
Sorry for the crudity of it, I made this drawing a while ago and I'm too lazy to make it again.
Just pretend there is a ground symbol at the bottom.
Basically I need the MC to measure the voltage at R3 and apply feedback to Q1 until R4 is the same voltage as R3.
No I cannot change the overall analog topology it must remain the same. Minor changes are fine.
I only want it to match DC currents and ignore AC currents.
I suppose adding caps between the drop resistors and then programming a time delay into the MC should be sufficient.
My concern biggest concern is the DC error margin at the MC terminals, the voltage is being dropped across 3 separate resistors.
A small error in the reading can result in a significant error at the output so I may need some sort of calibration and it also means the MC need to be very accurate. Down to a few uV would be preferred.
What little I did know about coding arduino I have forgotten. It shouldn't be too difficult for me to pick it up again but I need some more detailed feedback how to approach this design.
Last edited: