Current Limiting with Pot

Thread Starter

mahmut_kelesoglu

Joined Aug 12, 2022
67
I have a circuit like this. At the output, a connect 1 ohm to test the circuit. This is because my load has output resistance of 1 ohm.
I give values to DAC via Arduino. For example, when I enter number 5, DAC gives output of 5 Volt. Simplifying that:
  1. Entering 0 corresponds output current of 0 A
  2. Entering 1 corresponds output current of 1 A
  3. Entering 3.5 corresponds output current of 3.5 A
  4. Entering 5 corresponds output current of 5 A etc.
The limit is 5 because DAC capable of supplying 5 V output.
The op-amp part is used as feedback for current stability. Main current flows through the MOSFET to the load.
I want to limit output current by using pot. This is for preventing my load if more current value entered to Arduino by mistake.
For example, I connect a load that has maximum current of 3 A. I will enter number 3 to DAC, and adjust pot to limit current to 3. If something went wrong and accidentally pressed 5, there will be no current more than 3.
I have connected my pot in a lot of places but my MOSFET is burned out all of them.
Where should I connect pot/s?
 

Attachments

BobTPH

Joined Jun 5, 2013
8,942
Why not limit it in the firmware? If you really must use a pot, read it’s setting in the Arduino and then don’t allow setting a higher current.
 

crutschow

Joined Mar 14, 2008
34,412
I see no ready way to limit the current with a pot without a bunch of extra circuitry.
Better to do as Bob said, and read the pot voltage with the the Arduino ADC input to set the limit.

How will you calibrate the pot for the current limit settings?
 

Thread Starter

mahmut_kelesoglu

Joined Aug 12, 2022
67
Why not limit it in the firmware? If you really must use a pot, read it’s setting in the Arduino and then don’t allow setting a higher current.
actually I am smart enough to think that, but I am already limiting the current by firmware. DAC is used for that purpose. Think that if there is a person who do not know the absolute maximum current limit of the load, then entered 5 let us say. What will happen? The expensive laser diode going to burned out.
 

BobTPH

Joined Jun 5, 2013
8,942
If he enters 5 and the the pot was set to 3, the firmware in the Arduino would indicate an error and reject the setting.
 

Thread Starter

mahmut_kelesoglu

Joined Aug 12, 2022
67
If he enters 5 and the the pot was set to 3, the firmware in the Arduino would indicate an error and reject the setting.
Arduino does not know what the current is. It has no feedback to check "what is my value" and "how much currenr flows".
Acfually I am also smart enough to think that. But, as I have written at the beginning, the problem is "MOSFET is burned out"
If there was a problem with Arduino, as you say, I saw it before the MOSFET burned out. :)
 

Jerry-Hat-Trick

Joined Aug 31, 2022
552
It's probably me, but I'm struggling to understand your schematic. Suppose you are looking for 1A current into your 1R load - so you'd expect to see 1V across it. Since almost all the current is flowing through your 0.1R sense resistor you'd expect to see 1.1V above it. With your potential divider R1 and R4 you'd expect to see 1 x 100/110 = 0.91V into the -ve input, pin 2, of the op amp. For the op amp to be in it's "happy place" it should also have 0.91V into the +ve pin 3. So the current flowing left through R5 would be (1.1 - 0.91)/10 mA which would have to flow left through R3. Sorry if I've got this wrong - I'd welcome being corrected.

Whilst displaying my ignorance, I thought I'd add that I favour a BJT power transistor instead of a MOSFET for this current control application. In actual fact it'd need to be a darlington pair since the LM358 can only source up to 10mA. If using a MOSFET I'd put a resistor between the gate and the op amp to slow down the response - I think this would give stability, which maybe the inductor is trying to achieve?

And one reason you may be blowing up the MOSFET is that with a current of 5A and voltage drop of 7V it's dissipating 35W. I'd use a significantly larger value of sense resistor using high wattage resistors (with corresponding adjustment of the feedback potential divider) so the transistor is no longer having to absorb most of the power.

Is it essential that the load is connected to ground or could it swap places with the sense resistor? You could almost use a one ohm resistor for the sense resistor but since the LM358 is not rail to rail and if you insist on using a MOSFET which has a a 4V gate threshold that's not going to work - another reason to use a darlington pair BJT with a probable base emitter voltage of 1.2V. Allowing for the op amp to have an output with 1V of the rail the sense resistor could see up to 4 volts across it which suggests a resistance of 0.8R at 5A - several lower wattage resistors in parallel gets good airflow and is probabbly less expensive.

With the load and sense resistor swapped position connect the point between the load and sense resistor directly to pin 2 which will be 4V at 5A load current. Take away R3 and R5 and let the Arduino DAC go though a 5k resistor followed by a 20K potentiometer to ground with the wiper connected to pin 3. The potentiomer will then adjust the maximum output current as requested.

Sorry if I've got this all wrong and maybe missed posts with similar suggestions....
 
Top