Go Down

Topic: currrent limiting (Read 2623 times) previous topic - next topic

tim77777

what if I put the resistor in series with the A/D input rather than the 5 volt line. Does that cause a problem for reading analog signals?

Smajdalf

Where exactly is the resistor connected in your original design? Before the jack in the mysterious device providing power or on the Arduino side?
From your description I think it is on the Arduino side. In that case I don't understand how the resistor may protect against mechanical short circuit caused by plugging Arduino in/out. My guess is the problem is caused by inrush current when empty filtering caps of Arduino are connected to power. (Test: the problem occurs only during plugging in or during plugging out too?)
If I am right replacing the resistor with a MOSFET that "slowly" turns on (limiting inrush current but providing minimal resistance afterward) will solve your problem.

PaulRB

#17
Jun 30, 2018, 09:13 am Last Edit: Jun 30, 2018, 09:14 am by PaulRB
Quote
when a plug is inserted into the TRS socket, the tip and ring are temporarily shorted out which brings the system down on that other device.
Can you explain this again in more detail please? The socket will have 3 sprung contacts designed to make contact with the tip, ring and shield of the jack. When the short happens, is it caused entirely by the tip of the jack, or are the ring and shield also involved somehow? What is the path of the short circuit current, starting from the 5V socket contact, where does it flow to get to 0V?

tim77777

thanks, but the resistor is before the jack, and the short from tip to ring resets the device, whether the plug is going in or out. So, it is shorting 5Volts to the A/D on the device. Which causes it to reset.

Will having a resistor in series with the A/D cause a problem?

tim77777

Can you explain this again in more detail please? The socket will have 3 sprung contacts designed to make contact with the tip, ring and shield of the jack. When the short happens, is it caused entirely by the tip of the jack, or are the ring and shield also involved somehow? What is the path of the short circuit current, starting from the 5V socket contact, where does it flow to get to 0V?
The short is caused by the tip of the plug as it pushes through the ring connection and touches the tip connection before it exits the ring connection. The short is directly between the regulated 5V line, and the A/D input. I don't see the shield as having a part in it. I can simulate the problem by jumpering from 5V to the A/D input.

Which of course makes no sense now that I write it, as the 5v line should be able to touch the A/D. The short must be between the ring the shield, but i don't see how that can happen. I better get in close and see what is happening. thanks

PaulRB

So the tip of the jack touches the 5V contact in the socket and the ring of the jack touches the 0V contact in the socket?

From the point of view of the Arduino, the PWM output pin gets connected to 5V (via the low pass filter's resistor) and the VCC pin gets connected to 0V. At this moment, the Arduino's GND pin is floating? Or is it also touching the 0V contact the socket?

I can't picture how the short is happening now...

tim77777

ok got it. There is an extra contact, a switching contact, connected to the jack tip, I have it soldered to ground to keep the output at zero when nothing is connected. So, now when the plug tip contacts the jacks ring and tip it creates a short to ground via the switching contact, and then shortly afterwards the switching contact is opened.

tim77777

and so that tells the problem, but doesn't solve it. I could put a resistor of some value between that switching contact to keep the output steady when nothing is plugged in, and that would stop the shorting problem. But then there would still be a live 5V and ground on the cable plugged into to the socket, that a user could accidentally short.

PaulRB

So, instead of a direct ground connection there, put a resistor to ground, 10K or something.

PaulRB

Quote
there would still be a live 5V and ground on the cable plugged into to the socket, that a user could accidentally short.
How would that happen? Unless the user opens the Arduino box and starts tinkering?

tim77777

Because the cable is removable. TRS jack on the Pro mini box, and TRS jack on the other device.
 

PaulRB

I don't get it. How can the short now happen (once you fix the switching connector with a resistor). How can the user cause a short, what touches what exactly?

tim77777

A user can short the ring 5v to the shield. The resistor is between the tip and the switch when in the closed position. Once the plug is inserted the resistor is doing nothing.

PaulRB

If the jack is one third of the way in, the tip is touching the 0V contact and the ring and maybe the shield are also in contact with 0V. No problem there.

If the jack is two thirds of the way in, the tip is touching the 5V contact. The ring and shield might be touching  the 0V contact. I'm not sure if that is a problem or not. In theory, the PWM pin of the Arduino is high impedance, but on the other hand, it is at a higher voltage than the VCC pin, so current could follow back to the VCC pin, which is connected to 0V, or to the GND pin, which is also connected to 0V. But there is also a resistor between the jack tip and the PWM pin, so it won't be a short.

But I think what you are saying is that just before that "two thirds" position, the tip of the jack can sort the 5V and 0V contacts in the socket? If so, there's nothing the Arduino circuit can do to prevent that, it would happen just the same with the potentiometer. Any protection will have to be done behind the socket in the mystery device, I think

Smajdalf

If you are able to modify the device providing power you may add a current limiting to the power lines. You may use a dedicated circuit or a fast dirty way may be using an IC with current limiting built in - such as an op amp "buffering" the 5V or linear regulator with very low dropout.

Go Up