There are several power supplies, electronic loads and similar devices which can be controlled through a RS232 DB-9 connector but which can handle only 5V TTL levels instead of +/-15V.
E.g. the electronic loads from Maynuo (M9711, M97112, M9811, M9812) or Array (3710A, 3711A).
So you can't connect them to a normal RS232 interface on a PC. Besides PCs nowadays usually don't come with RS232 connectors anymore, so a USB to serial conversion is necessary.
Now actually, you can find these kind of converter on eBay for a few Euros, but apart from the problem that most of them use fake (FTDI) converter chips, they're not isolated.
As power supplies, electronic loads and the like usually should be isolated from ground for practical and safety reasons, an additional isolation is needed.
Of course the according converters are available for these devices, but they usually quite expensive - like close to 100€.
Besides, they are pretty appropriate since usually they can't supply the output side of the isolator so this has to be done by the device or by an external power supply.
So I decided to built my own isolated RS232/TTL to USB converter which doesn't need an external power supply, fits in an off-the-self case and doesn't cost the world.
Regarding isolation, there are several approaches available using either optocouplers or digital isolators. I decided to use an ADUM1201 which is a digital isolator by Analog Devices.
It provides two channels, can withstand 2500V for 1 minute and supports bitrates up to 25MBit/s. As USB to serial converter I decided to use the FTDI FT232RL which is still somewhat the industry standard.
The FT232 circuit is more or less the recommended default setting. There are two LEDs connected to CBUS0 and CBUS1 to show receive/transmit and another one to show the FT232 is enabled.
As the PWREN/CBUS3 output is low active (high in suspend mode), a PNP transistor is used to invert the signal and drive the LED.
For transient voltage protection, TVS diode arrays are added at the input and the output in addition to the typical serial resistors.
To also use this with 3.3V circuits, I added a TLV1117 linear voltage regulator which can handle up to 800mA. Selecting either 5V or 3.3V is done via a jumper (J5).
Another jumper (J3) can be used to either supply the secondary site from the RS232 connector (pin1) or to supply the device through this pin in case the DC/DC is placed.
There is also a placement option (R6) for a pullup resistor on the serial input (for devices which use an open drain output at their transmit pin).
To be able to supply the circuit behind the isolation barrier, an isolated 5V to 5V DC/DC converter is added. Depending on the type you choose, it can deliver up to 400mA at 5V.
Recom RKZ 0505S 2W 3kV
Murata NMK0505SAC 2W 3kV
Murata CMR0505SA3C 0.75W 3kV
Now this would be straight-forward if these DC/DC converter modules would be regulated, but they usually aren't.
Typically an isolated DC/DC only keeps its specified output voltage with a minimum of 10% load. I.e. for a 2W device and a 400mA maximum continuous load current.
Without load or at very low load current, the specified 5V output might be exceeded by up to 100% - depending on the specific device.
One idea would be to permanently sink 10% on the DC/DC output but firstly this would be a waste of energy and secondly this would also reduce the maximum current the slave could use.
So the idea is to sink the current only when the output voltage exceeds 5.25V (maximum USB VBUS voltage).
Since Zener diodes are not very precise, temperature dependent and you can't get them for any voltage, a shunt regulator TS431CX is used. It has an internal 2.5V reference and the can be configured with two resistors.
With a 22k and 20k resistor, it can be set to 5.25V
2.5V*(1+22k/20k) = 5.25V
To limit the current through the shunt regulator, a serial resistor is needed. As a rule of thumb, the voltage drop on this resistor should be the desired voltage minus 2V at the expected maximum current.
So with a current of 40mA and a voltage drop of 3.25V, this results in
3.25V/40mA = 81.25Ohm
A fitting E24 value is 75Ohm.
It's important to note that the higher the load current, the closer the output voltage of the DC/DC gets to 5V. So this is not a typical linear regulator approach.
Actually the current drained by the shunt regulator in an open load condition pretty much depends on the behavior of the DC/DC at low currents.
For a worst case assumption, let's assume a 10% scenario. So without any load (apart from the 5mA though the LED), the current drained could be as high as 40mA for a 2W type.
The TS431 can handle this easily and the 75Ohm resistor is a 0.125W type, so 40mA are still ok (P=I2R so 40mA*40mA*75 = 0.12W).
However taking into the efficiency of the DC/DC at low currents, the current into the USB isolator will be even higher (43% higher assuming 70% efficiency).
Actually, I did some measurements with a Murata CMR0505SA3C (0.75W type). The data sheet lacks any information about an idle current, but I measured 23mA at 5V.
Without any load (or external regulation), the output voltage is as high as 7.3V. The ADUM1201 needs a around 1mA in idle mode. The FT232R needs only 100µA in suspend mode and 15mA in normal operation.
The LED takes around ~5mA which however results in ~7mA on the input side due to the bad efficiency of the DC/DC at low currents. The same value can us used as quiescent current of the TLV1117.
In sum, we can expect an idle current of at least 38mA for the whole circuit without the regulation in place.
For the full circuit, I measured an input current of 80mA in idle (with 5V supply). Subtracting the expected 38mA that are not related to regulation, that results in 42mA flowing into the circuit due to regulation.
However, the efficiency of the DC/DC has to be taken into account to estimate the current drained by the shunt regulator. With an assumed 70% efficiency at low loads, an estimation would be around 29mA.
Then again, the voltage drop on the 75Ohm resistor can be measured directly to determine the current. With a 5V USB voltage I measured a 2.9V drop which means 38.7mA or 112mW at the 75Ohm resistor.
Which is quiet a bit worse than the estimated value. While still within the limits, the current drained in open load is quite a bit higher than expected.
A quick look with a thermal image camera shows that the TS431 and the 75Ohm resistor reach around 45°C.
Nothing to worry about yet, but quite a bit warmer than what I observed for the very same circuit in my USB isolator using a Recom RKZ 0505S 2W DC/DC.
For the slightly lower USB voltage on my PC (~4.93v) I measured a voltage drop of 2.56V which means a current of ~34mA or 87mW.
So honestly I would advice against the Murata CMR0505SA3C and suggest to use a Recom RKZ 0505S instead which seems to need less load to reach 5.25V even though it has a higher current rating.
Then again, there are probably cheaper 1W or 0.75W types with similar or better behavior, but as the datasheets are somewhat lacking regarding these details, this has to be tested obviously.
For the time being I exchanged the Murata CMR0505SA3C with a Recom RKZ 0505S and measured again with a 5V supply. The voltage drop measured on the 75Ohm resistor was 1.9V now which means ~25mA or ~47mW.
That's much better. Also the thermal image shows that the resistor got quite a bit cooler. Note though that the DC/DC is a bit warmer now as it has a higher standby current consumption.
Still the overall current consumption went down by nearly 10mA and more importantly, the safety margin to the power specification of the 75Ohm resistor increased substantially.
Note that a drawback of the DC/DC approach is that it violates the minimum current requirements in USB suspend where the current must not exceed 2.5mA which is not possible if the DC/DC alone needs much more than that.
While it's common for USB devices to exceed this idle current or not support suspend modes at all, this could cause issues with low power modes on Notebooks, especially for Win8 and Win10.
Schematic and Design were done with DipTrace.
I decided to use an USB-B connector on the host side - mainly because 90% of my USB cables are just like this but also because it better fits the selected case.
I tried to keep the two sides as far apart as possible to not degrade the isolation.
Just a preview of the final isolator.
Ordered them at Elecrow, no problem as usual. Some crinkles in the solder resist but otherwise pretty good quality.
The case I selected is a PACTEC CNS-0407. It's actually meant for RS232 and RJ11/RJ45, but works quite well for an USB-B connector.
It's e.g. available from Mouser.
No drilling and no screws needed. Fits perfectly well.
All files related to this project can be found in the BitBucket repository
This is a spare time project I did without any commercial interest.
Everything is released under the Creative Commons CC-BY license.
In a nutshell this means that you can do share, modify and use everything released under this license even for commercial projects.
You just need to give me appropriate credit, indicate what changes you made and agree not to try to force a more restrictive license on my work.
See the CC BY license for details.