currrent limiting

Replace that connector - TRS or TRRS is not suitable for power at all.

In fact its not suitable for anything really - an accident of history, made particularly bad
by their common use for audio where the only sensible kind of connector is one that connects ground
before signal - unless you like full-volume mains buzz everytime a connector is plugged and unplugged!

I see. well thanks for all that. Seems like the only solution is to have a fixed cable with the arduino unit, and a TRS on the other unit. It has to be TRS because of the other things that can plug in to it. The fixed cable is not perfect as it limits a users distance. Perhaps it should be short anyway. What distance can I run the arduino's filtered PWM signal over.

Thanks for all the help, as it helped me work through the issue with the short when inserting the plug. I can remove the resistor in series with the 5V line and adequately run the pro mini and opamp circuit now, and run other things being developed that will plug into this expandable system.

Here is an idea:
220px-Phone_jack_symbols.png

Look at the type C socket above.

This three-conductor jack has two isolated SPDT switches. They are activated by a plug going into the jack, which disconnects one throw and connects the other. The white arrowheads indicate a mechanical connection, while the black arrowheads indicate an electrical connection. This would be useful for a device that turns on when a plug is inserted, and off otherwise, with the power routed through the switches.

You could use the switch activated by the tip to isolate the 5V supply until the jack is fully inserted.

220px-Phone_jack_symbols.png

Jalco js5077

s-l400 (20).jpg

5V to terminal 5. Terminal 6 to terminal 3. This would connect 5V to the ring but only once the plug is fully inserted.

Terminal 8 to A/D. Terminal 7 to ground via 10K. Terminal 9 to Terminal 2. This would replicate the switch in your current socket, giving a steady zero reading to the A/D while no plug inserted.

PS. Sorry if I have given some rather confusing explanations earlier in the thread. I had thought for years that "jack" refers to the plug. But I just found out it refers to the socket!

s-l400 (20).jpg

Well that is a great solution. Space is tight, but it might fit.

Any idea on how far the PWM signal from the arduino can be transmitted?

Well, you are not transmitting the PWM signal, you are transmitting the analog voltage output by your low pass filter. Assuming that does not change very rapidly, then it should transmit quite a long way. A long wire will have some resistance and capacitance, of course, and that will affect the signal measured by the A/D, but I suspect it will be fine for quite a few metres.

back on this again. Going around in circles.

How can this be done.

I have 5 volts coming out of an enclosure and entering another enclosure through a patch cable. The voltage needs to be current limited so that a user does not inadvertently short the supply as the patch cable and the various devices that can attach to it are designed to be plug and play and so it is quite possible that a user might plug something unexpected in, or do something to short the supply.

At times the 5v is simply across a potentiometer, with the wiper feeding back to the other enclosure, and for that application the limiting resistor is not a problem. However, the five volts is sometimes used to power an op-amp and uC circuit (about 40mA total) that doesn't like working through the series resistor.
What actually happens is that the output of the op-amp circuit , which is configured with some gain and a 2.5v swing around zero, starts to pulsate. The uC circuit seems to work ok, though I guess it is unstable.

What about a charge pump, would that make any difference, or what else can be done.

tim77777:
back on this again. Going around in circles.

How can this be done.

I have 5 volts coming out of an enclosure and entering another enclosure through a patch cable. The voltage needs to be current limited so that a user does not inadvertently short the supply as the patch cable and the various devices that can attach to it are designed to be plug and play and so it is quite possible that a user might plug something unexpected in, or do something to short the supply.

At times the 5v is simply across a potentiometer, with the wiper feeding back to the other enclosure, and for that application the limiting resistor is not a problem. However, the five volts is sometimes used to power an op-amp and uC circuit (about 40mA total) that doesn't like working through the series resistor.
What actually happens is that the output of the op-amp circuit , which is configured with some gain and a 2.5v swing around zero, starts to pulsate. The uC circuit seems to work ok, though I guess it is unstable.

What about a charge pump, would that make any difference, or what else can be done.

The problem is the connector, not the current, right?

Why not use a different connector, one that cannot be shorted?

Hear hear! ( along with other contributors)..........

Allan

because there is no space for another connector, and it wouldn't make enough difference anyway, because the other end of the cable could still be shorted.

it needs to be current limited.

Some voltage regulators have built-in short-circuit protection. Maybe you could use one of those to supply power to the user's device instead of the arrangement you have now?

thanks. but the hardware is already set. There is a AMS1117 that has short circuit protection, but the system will still shut down if there is a short, as it would even with a better suited regulator.

If you won't consider a more appropriate connector, I fear I/we can't help you any further unless you want to go to the extent of foldback current limiting. Lab power supplies have this, but it involves extra complexity, not just a choice of chip.

It could be done.

Allan

thanks, but its not a matter of consideration. The enclosures are drilled, painted and printed, the hardware is set, PCBs done, components soldered. It's all done and dusted except for the final assembly and, except for this significant add-on feature, if it can be made to work.

The software of course can still be changed, and some minor hardware can be added to the supplying enclosure, provided it doesn't take up too much room and it is physically stable enough when soldered and hanging of a pin on the TRS connector. In that scenario, a small current limiting resistor is OK.

It doesn't sound like there is much else that can be done within the supplying enclosure.

There is plenty of scope for hardware changes in the receiving enclosure.

I know this might not be the usual way, but what if I sized the limiting resistor such that half the voltage was dropped across it and used a 40mA charge pump in the receiving device. I don't think the current for the uC and opamp circuit varies much, so things should remain stable. If the uC and opamp circuit is drawing 40mA, then can I assume the input resistance is 125 ohms?

Do charge pumps only double the voltage or are there fractional options.

If so, then I size the limiting resistor at 125 ohms/ 250mW and use a 40mA charge pump in the receiving device. Unorthodox, but would it work.

That's horrendous.

Can't you modify the supply side to be foldback limiting as I suggested? I'll hack out a circuit if you'll give me your psu specs/design.

Allan

Horrendous or not, would it work?

I don't know what foldback limiting is.

PSU design. It just a AMS1117 with 9 volts in, 5 volts out. Bypass caps on both sides.

tim77777:
I don't know what foldback limiting is.

Its not a state secret... Its covered in a wikipedia article.

Are you using a fixed or adjustable version of the AMS1117 ?

Allan

Every current limiting circuit will cause a voltage drop. You need either some voltage headroom or complicated circuit. But If you can access the 9V voltage directly it should be easy. You can try adding an additional AMS1117. Since it has dropout less than 2V it should have at least 7V at its input to provide 5V. So you can use the 2V for a current limiting circuitry. A 2V/40mA=50 Ohm resistor between 9V and AMS1117 input should work well to not influence output when current is less than 40mA but limit the current to some reasonable value in case of a short circuit. But ofc. it is quite crude (and possibly another regulator with smaller internal current limit would be more suitable). You may Google for "current limiting" and look on images for plenty of circuits - nearly any should provide voltage drop around 1V and current limiting good enough.

allanhurst:
Are you using a fixed or adjustable version of the AMS1117 ?

Allan

fixed