Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

sgl_imaging_challenge_banner_comet_46p.thumb.jpg.9baae12eeb853c863abc6d2cf3df5968.jpg

BUDA

EQDIRECT (non USB) isolation to prevent ground loop

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

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by symmetal

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by symmetal

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by BUDA

Share this post


Link to post
Share on other sites
Posted (edited)

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.

Edited by symmetal
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by BUDA

Share this post


Link to post
Share on other sites
Posted (edited)

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.

Edited by pete_l

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by symmetal

Share this post


Link to post
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

  • Like 1

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by BUDA

Share this post


Link to post
Share on other sites
Posted (edited)

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

Edited by symmetal

Share this post


Link to post
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

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Bigwings
      https://stargazerslounge.com/forum/14-member-equipment-reviews/?do=add#https://stargazerslounge.com/forum/14-member-equipment-reviews/?do=add#https://stargazerslounge.com/forum/14-member-equipment-reviews/?do=add#My 12V power supply died when my beloved left it flat....
      I looked around at possibly a new Powertank and found this.

      Yes it really is not much bigger than my mobile phone if a fair bit thicker.
       

      It has a good LED torch built in to annoy folks at star parties  but no red light.... mind I always found the powertank difficult to balance on my head when observing so use a head torch.
      Is it man enough to do the job???

      well correct me if I am wrong but the charge is bigger than the large powertank I had. AND its designed to jump start your car....... WHOOOOOHHH
      It comes with car Jump leads, a 12V out socket (.... yes only one but it will take a double adapter) , two USB leads to fit its 2 USB charging ports and a very sexy case.
      It was also a lot cheaper.....
      What do you guys think, anyone used one yet. I will let you know when darkness returns.
      Clear DARK skies.
      Bigwings
       

    • By MnB Deano
      Hello Everyone!

      This is my first post to SGL, but it's certainly not my first visit. I've been a reguar leech to the wealth of information on here and have amassed a plethora of equipment for exploring the night sky that evolved from an 8" 200P Dobsonian, and finally up to its current "Mark IV" as the 8" Newtonian Equitorial you can see in the photo. I'm aware of the ettuiqette here, and this isn't a "hello" post, no.

      This is me sharing my write-up for the 12v Power Supply that I made myself in the eventual journey to my fully remote observatory (hopefully opening 2018) at the end of my garden. Hoping to maybe give something back to the community that i've taken so much knowledge and tips/tricks from over the last 18months; because 19months ago, I'd never even put my eye to a telescope eyepiece and now I'm flocked, guided, and powered. So thank you everyone for that.

      I've written half of the write up for it last night, pt 2 to follow soon  I hope it's ok to share an external link to my personal Blog: http://milkandbourbons.tech/telescope-power
      Finally, its not in the Blog just yet, but here's the picture of the final, finished powersupply. It's a little rough looking 'cos I didn't order as much wire as I should have, but it does the job amazingly!

       
      Thanks for reading!
       
      Deano
       
       
    • By bottletopburly
      Well the lynx cable came yesterday for my EQ6 PRO  from FLO,well packaged in a bubble wrap bag  and comparing with my previous eqdirect cable, build wise much better, more professional looking , thicker round cable,  metal  D-sub with long thumb screws, moulded usb plug, £34 ok not cheap but about the norm for an EQdirect cable , quick check eqmod found straight off ,uses the fdti chip set so didn`t matter what usb port i used, still said com11, 
      would recommend .
    • By morayskies
      Hi All
      I have recently acquired an EQ5 Pro mount and wish to control it using EQMOD, however, I cannot control the mount with a cable linking directly to the SynScan EQ5 switch box.
      This does work;
      USB to Serial converter plugged into Windows 8.1 laptop Cable from Serial converter to SynScan hand controller Hand controller set to 'PC Direct' With the above configuration everything works fine.  I have read somewhere that it is advisable to take the hand controller out of circuit all together so, to this end, I have purchased a Serial to RJ45 connector lead. So I have configured the setup like this;
      USB to serial converter plugged into Windows 8.1 laptop (as 1. above) New cable goes from Serial converter directly to 'Hand Controller' socket on the SynScan EQ5 switch box (SynScan Hand Controller now completely out of circuit) This does not work!
      With power at the mount turned on when I select 'ASCOM Connect' via the EQASCOM Toolbox,  the EQMOD HEQ5/6 window opens with a 'Connect Error: Timeout'.  I understand that this error message would indicate that the Port has been found OK but there is no response from the mount.  I have double checked the COM port number but it is fine.  I have tried a second USB to Serial adaptor I have and it gives me the same result - a 'timeout' error.  The only thing I can see that is at fault is the Serial to RJ45 cable between the Serial adaptor and the SynScan unit.  This cable is brand new so not likely (although not impossible) to be the cause.
      Has anybody else had this issue with the EQ5 Pro mount or am I missing something fundamental ?
      Thanks for looking.
    • By Danny83uk
      I recently purchased a EQ5 mount with synscan. But rather then use the car adaptor running though a 3 pin convertor i bought a 12v 500mA DC power supply. The back of the manual states it requires 100mA (see image). So here i am thinking great this will do. Wrong. Its enough to start the hand controller and go through all the set up but it doesnt seem to move any motors. This being my first attempt i wasnt sure if i was doing something wrong. Did the brakes need releasing? - No. are the cables going to the right sockets? - Yes. After much head scratching i went back to to start and used the supplied 12v car style plus in a convertor i had. Sure enough it all worked perfectly. okay went back to my 500mA and nope nothing worked. After searching the house for a 12v 1A DC supply with the correct plug and trying that, Sure enough it all works fine. Have they simply missed a '0' off the manual or am i missing something else here? Tomorrow i'll probably go an exchange it for this 12V 1000mA Power supply. I'll let you know how i fair. And for anyone checking for power supplies (Like i did) your looking for a 5.5mm x 2.1mm power tip to for the unit.

×

Important Information

By using this site, you agree to our Terms of Use.