Jump to content

Banner.jpg.b83b14cd4142fe10848741bb2a14c66b.jpg

EQDIRECT (non USB) isolation to prevent ground loop


BUDA

Recommended Posts

I am about to build an EQDIRECT adapter to connect my laptop and HEQ5. I have a notebook docking station with good old serial port (I tought) so I planned not to struggle with usb to serial port finding, porfilic or FTDI, etc... BUT(!) make my own cheapo EQDIRECT.... Unfortunately I am not an electrical genius, but I learnt somewhat. And as I read the schematic a bit closer, I had a bad feeling about connecting the ground of the notebook serial port and the mount ground potential. Then, I aimed this topic in searching, and I found some issues that might be in connection with that. Now I am a bit afraid to buildmy own, based on the given schematic on the EQMOD website. (no offense) So I tried to figure out how to avoid problems with grounding. Here is what I came up with. Maybe it is an ... how to say ... overkill, but I do not want to be the one in the million, who burt his mounts' electronics becuse of a ground loop. I hope that there is somebody around with more electrical skill, who can check it and tell if it is a complete non sense idea or...? Some explanation: As I read, connecting the grounds no problem in case of batteries, or between DC power supply and batteies but two not well chosen DC power supplies are able to make some serious smoking... So I implemented an intermediate battery powered stage, which is in connection with the notebook RS232 line only, and the mount is fully isolated from those by optocouplers.      Ah sorry! I just saw when I uploaded the pic, that possibly the optocoupler output signals must be inverted. While for example logic 1 from the mount would give logic 0 on the MAX232 input. So the other pin of the optocoupler should be used for reading the proper values, and pull down resistor instead of pull up resistor... but the principle of a battry powered "insulation" is the same. Well, some batteries and the circuitry still much cheaper than a new mount/laptop... what do you think? I appreciate all your comments!

EQDIROC.png

Link to comment
Share on other sites

Hello BUDA,

Your diagram does appear over complicated and has several connection errors. The MAX232 data connections are wrong in that the pc RS232 signals must go to the RS232 in/outs on the MAX232. PC TX goes to MAX232 R1IN and PC RX goes to MAX232 T1OUT. Your other TX/RX connections look possibly incorrect too.

MAX232.png.d85884733da8b7008c57d606cecb4ffd.png

Also your opto-isolators are wired back to front. The output signal drives the diode and the transistor side goes to the TTL RX in. There's no need for the second 7805 regulator on the mount side. A potential divider from the mount 12v would suffice.

I don't see any need for opto-isolating the grounds between the pc notebook and the mount and the circuit on the eqdirect webpage should be fine. The notebook power supply will be floating anyway so needs a connection between it and the mount to establish a ground reference and the RS232 signal ground (PC pin 5) provides this nicely. It won't cause any 'smoking' problems. The max232 is mounted in a box by the mount as it uses the mounts 12V to power the MAX232 via the 7805. Your separate battery is therefore not required.

eqdirect_232.png.6d53ed2de28e0241b4b3500066dcd605.png

Using opto-isolated RS232 may be needed when connecting equipment over long distances where they may be powered by different power phases and the grounds may be at different potential. In your case all your grounds will have the same potential so there won't be a problem.

Alan

Link to comment
Share on other sites

Hi Allan,

Thanks for the checking! I found regarding Rx Tx connections, that they are ok finally, just my MAX232 IC is represented as mirrored in the schematic. It is so in the design software. Regarding over-complication... yes, it is. As you pointed out, there is really no need for the second 7805! Thanks!!! And now... the reason why I made this is exactly what you described at the end of your post. I plan sitting in the room on a cold winter night and control the mount outside. Most likely my laptop docking station wall adapter, or PC supply, and the one running outside will not be the same.... So I think I will update the schematic in the afternoon and give it a try... Do you think it might work finally?

Link to comment
Share on other sites

As a further thought, the TTL RX inputs on the mount and MAX232 may well have internal pull-ups to 5V so all you need to do is short them to ground by the opto-isolator. Also the optos will cause a signal inversion so the opto-led anode may need to connect to 5V and you ground the cathode via your TTL TX signals, assuming the TX outputs can sink the led current OK. The MAX232 also inverts the signals but so will the RS232 drivers on your PC so it looks like you will have an odd number of inversions in your current diagram. It should work if you take these considerations into account. You seem determined to use the opto-isolator method so good luck. ?

Edit: The 7805s in your diagram appear to have the in and out connections reversed, though that may just be the nomenclature used.

Alan

Link to comment
Share on other sites

Thanks Alan for the hints again! Nice idea to use the internal pull-ups indeed!! It would do the circuit less complicated again one bit. But as you also pointed the pins source/sink capability... I checked the datasheet and did not found such definition. So ... just to be sure, I made it more complicated again! :D (most likely I am the biggest enemy of myself ) Finally I added two transistor to switch the 15-20mA current of the diodes, and also I inverted the idle state of the optocouplers by getting their output grounded when not driven. Thanks again for the help, and I will post here how is it working/not working in real... 

Kind regards,

Peter

 

EQDIROC_V1.png

Link to comment
Share on other sites

Hi Peter,

Using the transistor drivers could be a good move. It means the TTL TX o/ps don't have to source the full led current and your signal inversions are back on track.

There are however, a couple of errors in your latest diagram. The HEQ5 TTL in and outs are swapped over, the TTL o/p should drive the transistor. Also you have no resistors to limit the base current to the transistors. About 4k7 should do the trick.

The 78xx regulators data sheets always show a 0.33uF on the input and a 0.1uF on the output to improve noise and output stability. It will most likely work fine in your case without them but as you seem to like 'peace of mind' it could be worth including them. ?

As you say, give an update when you have it working.

Alan

Edit: just seen another potential problem Peter. Having the opto transistors connected to 5V you're relying on the 10k and 4k7 pull down resistors to give a logic 0. This would most likely be insufficient particularly if there are pull-up resistors on the TTL inputs. I think the opto transistors will need to be on the ground side. You could possibly use pnp transistors to sort out your signal inversion problem. To see if there are TTL pull-ups just connect a 10k to ground on the mount RX in and the max232 TX in and see what the voltage on the pins drops to. A bit of maths will tell you the pull-up values and whether you need to reconfigure your opto transistors.

Link to comment
Share on other sites

Hi Alan,

I am not sure how do you mean that the TTL in/outs are swapped over... I assume it is just a "point of view" problem. R1OUT pin on the MAX232 IC gives TTL signal and goes to the mount direction. Therefore on the RJ45 connector side I marked as TTL_IN.... Well it is misleading indeed, but finally OUT from something, usualy also means IN to somewhere else. So depends on my "point of view" :) 

Now in the new schematic I finally managed to use the internal pull up in the MAX232. I did not measure yet, just assume the 400kOhm as shown in the Maxim specification usually (however I have a Texas Instruments manufactured one... does it make any difference?)

To get that working, I had to invert the signal coming from the mount. The only drawback is, that this way an almost constant ~20mA current drawn from the battery through R1 by this signal line only. An old style battery last approx 4-5 hrs with 100mA consumption... hope so.

I did not measure wether there is a pull up in the mount yet, but is it sure that it will be a pull up? (if there is any) while the MAX232 has pull down resistors on the RS232 in/out pins. Hm... I am a bit confused now. Anyway I attach my latest attempt. I kept the other direction intact until I find out if there is some pull up/down in the mount.

I doubt that I will have time until the weekend to measure the mount, but at least I will not borther you for a while. (I keep my mount/scope in my parents house, they live in a close village. I live and work in the city with nice bright LED and all kinds of lights, and small flats... :()

Peter

EQDIROC_V3.png

Link to comment
Share on other sites

If you want to electrically isolate your mount from the comtrolling PC / laptop, substitute the MAX232 with an ADM3251E and build yuour interface device with that. Be aware that it is NOT a direct replacement.

Link to comment
Share on other sites

Thanks pete_l! Nice piece you picked! I just did not found it in a DIP package. Does such exist? I do not have the hands for soldering SOIC, and I also planned to simply draw the PCB by hand with permanent marker... But maybe it would worth to move in this professional direction... I'll think about that, thaks 1 more time!

Link to comment
Share on other sites

Hi Peter,

On 18/06/2018 at 21:14, BUDA said:

I am not sure how do you mean that the TTL in/outs are swapped over... I assume it is just a "point of view" problem. R1OUT pin on the MAX232 IC gives TTL signal and goes to the mount direction. Therefore on the RJ45 connector side I marked as TTL_IN.... Well it is misleading indeed, but finally OUT from something, usualy also means IN to somewhere else. So depends on my "point of view" :) 

I agree with your statement but in your diagram R1OUT goes to mount TTL_OUT ?. Here's a sketch of the basic signal connections required

IMG_2210.png.5805fbf7629777b38cc0b2934cd5f912.png

If this is what you have then all's well and I'll say no more on the matter. ? ?

To avoid the continuous 20mA drain using the opto you could use something like this where the only significant current is when the TTL TX o/p goes to 0.

IMG_2212.png.cd9e14adc5356bedecd2e47b07a5f03b.png

Also I'm sure the optos would work fine too with 10mA current instead of the maximum 20mA.

It's logical for RS-232 to have pull downs to zero as 0V when not transmitting, to avoid having a continuous voltage on the line. RS232 lines can be many km long while active TTL lines would be a lot shorter. TTL should effectively have internal pull-up resistors as that is how the logic series is designed though many designs use TTL just to mean it has 0 and +5 logic states. I'm sure the Texas MAX232 chip will have the same spec as the Maxim one.

I'll measure the RJ45 RX input on my AZ-EQ6 to see what the pull-up resistance is and let you know, to save you having to wait until the weekend. It's the same interface as the HEQ5.

The ADM3251E mentioned by Pete_l only isolates the RS232 lines (which it does very well), so you would still need the MAX232 to convert the logic levels. As you found out it's only available in a SOIC package so probably not so practical for you.

Alan

Link to comment
Share on other sites

Hi Peter,

Just measured the RX and TX pins on the AZ-EQ6 RJ45 and with no connection they both read 3.27V. With a 10k to ground they both drop by half to 1.63V so the internal pull up resistors are effectively 10k too. The TTL 'standard' regards 0 - 0.8V as a low and 2.0 - 5.0V as a high. So your HEQ5 RX input just needs the opto transistor between it and 0V.

Alan

Link to comment
Share on other sites

That's right.  Also, the opto-couplers I use only need 2mA through the LED and that can be supplied directly - just put the appropriate resistor in series.

Link to comment
Share on other sites

Thank you very much for the info about the internal pull up!  So it seems the internal logic is 3.3V based, and 5V tolerant? According to that I updated the schematic. I also ran a simulation how it should behave in theory. (At least the part with the internal pull-up of the mount) Finally it makes ~0,09V for LOW and ~3,3V for HIGH. If the simulation does calculate well. It should work I think... Maybe I should try to reduce the LED currents... but even if I have to buy a new 9V battery for every 2nd setup... so be it. Well to buy a rechargeable sounds even better. :) 

Edit:

In the simulation I changed the voltage divider values ( multiplied by 10) but did not change the outcome significantly. As you see. The values I written belong to the 6.8k and 4.7k resistors.

 

EQDIROC_V4.png

SYM_OFF.png

SYM_ON.png

Link to comment
Share on other sites

Hi Peter,

Your TX and RX connections are correct, ? it's just your choice of labelling which confused me.

It seems the HEQ5 interface isn't exactly the same as the AZ-EQ6. The AZ-EQ6 will work off 3.3V as well as 5V while the HEQ5 needs 5V logic. This paragraph from the EQDIRECT USB interface section mentions it.

An EQDIRECT-USB convertor consists of a combined USB serial port that provides TTL outputs. Such a device is avilable from FTDI called the TTL232R, and comes integrated into a USB cble and connector. Please be aware that FTDI produce a similar product, the TTL232R3V3, but due to lower signaling voltages this will not work with the EQ6Pro, HEQ5 type mounts  (the mount expects to see a minimum 4V active high signal).  The AZ-EQ6GT and EQ8 mounts have a 5V tolerant 3.3V signaling interface and so TTL232R3V3 or TTL232R can be used

You don't need the potential divider between the opto and the mount RX input. Just connect the opto transistor between mount RX and 0V.

I don't know if you saw the post before my last one, but I included a sketch showing you how to avoid the continuous current draw on your LED drive section, by using two transistors. It'll only draw current when the mount is actually transmitting or receiving data zeros, so should help your battery. You can use this on both your LED drivers, the MAX232 R1OUT and the mount TX out.

Alan

Link to comment
Share on other sites

Hi Alan,

Of course! I see the divider has no use there. Ehh... I do not know why I can not see these by myself?

The new schematic does need the voltage divider only because the BC547 ransistor (what I have) does not withstand the 12V between its' base and emitter.

I hope this will be the final version, I can't wait to try it out.

EQDIROC_V5.png

Link to comment
Share on other sites

Hi Peter,

Your latest diagram does look like it'll work fine.? There are a few minor changes you can add if you wish.

The potential divider R5 and R7 isn't really necessary as the base of T4 can't get near 12V. The base-emitter junction is effectively a diode. With T1 fully turned on (the normal 'rest' state) the base of T4 will be about 0.2V so T4 will be turned off along with the opto LED. When T1 turns off by a TX low, the base of T4 will rise until the base-emitter junction diode turns on, and so will stabilize at approx 0.6V with R5 limiting the current flowing into the base. R5 will have the remaining 11.4V across it. This means T4 will turn on and light the opto LED.

You could increase the base resistors R2 and R6 to 4k7 or similar as the current required to turn on  T1 and T3 is very low as they have relatively high collector resistors as a load.

C1 and C2 should be ceramic capacitors or similar (they're shown as electrolytics in your diagram). You could have a 100uF electrolytic in parallel with C2 like on your original diagram to help smooth the 5V rail. C1 and C2 need to be mounted close to IC2 on your PCB layout.

I think that's it. Good luck and have fun making your PCB. ?

Alan

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.