I am working on a research project that requires that we build a specific type of controller.
I have a PIC microcontroller that feeds a PWM signal to a transistor that delivers a DC voltage between 0-20V (from a constant 20V source).
All that is working fine.
Now, I need to be able to measure the current through the load and adjust the voltage such that we obtain a specific current that will vary programatically. The load is purely resistive, so I was thinking of using a high-side shunt, and measure the voltage drop, convert that to current and adjust the PWM accordingly.
Now, there are some tricky bits, and that's where I am seeking advice:
1.The resistance is unknown and has to be measured in order to compute current (V=IR). I was thinking of either time-multiplexing the operation of the system so that at certain intervals the source stops and we make a measurement of the load or to have a "sensor"in parallel to the load that we can take continuous resistance measurements from.
2.I don't know how to go about the shunt: how exactly could I measure the voltage drop across the shunt in the load circuit from the control circuit since I cannot set the measurement points of the shunt to ground? (because both the control and the load circuit have the same ground, I would be effectively shorting the circuit at the shunt)
I hope my explanations are sufficiently clear, but let me know if you need to know any other piece of information.
All your ideas and suggestions are welcome
I have a PIC microcontroller that feeds a PWM signal to a transistor that delivers a DC voltage between 0-20V (from a constant 20V source).
All that is working fine.
Now, I need to be able to measure the current through the load and adjust the voltage such that we obtain a specific current that will vary programatically. The load is purely resistive, so I was thinking of using a high-side shunt, and measure the voltage drop, convert that to current and adjust the PWM accordingly.
Now, there are some tricky bits, and that's where I am seeking advice:
1.The resistance is unknown and has to be measured in order to compute current (V=IR). I was thinking of either time-multiplexing the operation of the system so that at certain intervals the source stops and we make a measurement of the load or to have a "sensor"in parallel to the load that we can take continuous resistance measurements from.
2.I don't know how to go about the shunt: how exactly could I measure the voltage drop across the shunt in the load circuit from the control circuit since I cannot set the measurement points of the shunt to ground? (because both the control and the load circuit have the same ground, I would be effectively shorting the circuit at the shunt)
I hope my explanations are sufficiently clear, but let me know if you need to know any other piece of information.
All your ideas and suggestions are welcome
Last edited: