Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

USB to RS232 convertion


malc-c

Recommended Posts

Guys and Gals,

Been playing about all day experimenting with connecting the EQ6 mount to the PC. The first issue I had was that the SW serial cable I purchased was wired wrong, but after some re-soldering of the three wires that worked fine.

I have a USB to RS232 cable based on a prolific chipset and that comes up as COM16 on the PC and works fine. However I recently purchased a module from Sparkfun based on a CP2103 chip

00199-03-L__55752_zoom.jpg

and having installed the driver this is seen in device manager as a USB-RS232 Bridge with COM18 as its designation. However when I connected the TX / RX and GND wired that were originally soldered to the DB9 socket I had (have) issues with the communications.

The 1st was that COM18 was not listed in the ASCOM driver settings for the scope control, yet in APT which I use for controlling my Canon camera COM18, COM1 were both present. (ASCOM drivers seemed to run through COM1 to COM16 as if hard coded rather than what's actually detected in device manager on the PC).

I therefore tried COM2 as that was shown as "available", but got an initialisation error everytime I launched the ASCOM driver.

Anyone have any ideas ?

Link to comment
Share on other sites

Billy,

I beleive it's 5v - the datasheet can be found from Breakout Board for CP2103 USB to Serial w/ GPIOs - SparkFun - BOB-00199 - Proto-PIC.co.uk - UK Suppliers of Electonics - Robotics - SparkFun - LilyPad - Arduino maybe you could confirm?

The cable from the mount has 3 cables as mentioned above, and there is no jumpers to configure levels or anything, I thought it would be plug and play !

Link to comment
Share on other sites

The way I am reading it and it is late.....is that it's essentially a 3.3V device but its 5V tolerant... which might mean that while the input levels can go as high as 5V the outputs are only running at 3.3.V logic levels...

I find it easier to use the FTTDI RS232-TTL (5V) adaptors they just work...

Billy...

Link to comment
Share on other sites

The way I am reading it and it is late.....is that it's essentially a 3.3V device but its 5V tolerant... which might mean that while the input levels can go as high as 5V the outputs are only running at 3.3.V logic levels...

I find it easier to use the FTTDI RS232-TTL (5V) adaptors they just work...

Billy...

Billy - Looks like you are right. Holding a DVM to the outputs they are all running at 3.3v. Looks like the VIO pin is tied to the 3.3v output from the chip and there is no easy means of changing that to the 5v supply.

I've since ordered one of those cables you suggest and I'll see how I get on :)

Link to comment
Share on other sites

OK here's a question for you fellow electronic enthusiasts :)

The TTL-232R-5V-WE uses a FT232RQ device which is housed inside the USB 'A' connector, and is terminated at the end of a 1.8 m cable with 6 bare, tinned wires which provide access to transmit (Tx), receive (Rx), RTS#, CTS#, Vcc (5V), and GND signals. This allows the customer to customise the TTL-232R-WE with their own connector, according to the requirements of their application. Alternatively the TTL-232R-5V-WE can be hard wired onto a PCB

So when it comes to using one of these with a modded web cam or with APT to control the shutter release of a dslr, I guess it's not possible as they uses DTR line as the control line, which doesn't seem to be supported ;)

Link to comment
Share on other sites

ASCOM drivers seemed to run through COM1 to COM16 as if hard coded rather than what's actually detected in device manager on the PC.

You can blame Microsoft for that one. Many ASCOM drivers were/are written using VB6 and unfortunately the serial port control object used by the VB6 environment (and provided/installed as a part of windows itself) only allows up to COM16. The mscomm32.ocx file can actually be quite easily be patched to provide up to COM255 so you have to wonder why Microsoft never issued an official update for this control.

Chris.

Link to comment
Share on other sites

For simple USB-RS232 connections that only require 0 - 5V signaling, I've been using these parts from eBay p/n 280453611111 or equivalent from any of the suppliers. While they're cheap as chips, the drawback with ordering them from China/HK is that they take 2 months to arrive. You can get them for a little more from british suppliers.

I've used them on several microprocessor projects and they're great as you also get a "free" +5V supply for the electronics. I also used one for my LX webcam mod and was able to omit all the voltage level shifting circuitry for a nice, simple design.

Link to comment
Share on other sites

OK the FTDI TTL-232R-5V - WE cable arrived today. Before I fry my EQ5 synscan box I thought I would do some simple testing. I placed the wire ends into a solderless breadboard and having installed the driver for the cable, placed an LED and 1K series resistor between RTS and GND - the LED lit up and stayed lit.

My serial shutter release is based on this design (only using the correct pin outs for the opto isolator)

Serial%20cable%20cct%20SB.gif

This works fine and the LED is lid during the exposure, which suggests that RTS is normally LOW in the idle state. Anyway I connected the shutter release cable via some jumpers and loaded up APT, and hooked up the camera. The com port is selected in APT and camera connected - but there is no shutter control.

Any comments... I don't really want to terminate the cable with an RJ11 and then fry my Synscan box

Link to comment
Share on other sites

Lee,

The idea is that when RTS is low (normal RS232 levels can be upto -15v) the LED is off in both the indicator and the opto-isolator. When RTS is then made active, it goes high (up to 15v depending on the port), turns on the LED in the opto-isolator and thus closed the circuit for the shutter release.

With the RTS wire on the TTL cable constantly high this would cause the shutter to remain open all the time with no control

Link to comment
Share on other sites

RTS is flow control, so I'm assuming that you will need to send data and possibly emulate the RS232 state machine.

Also if you get a USB sniffer the two bytes returning from the FTDI are the status flags - including the state of the RTS.

If it was on a mac I could knock something up to test it.

Try sending a file to the COM port. It may hang.. but you may get some signal traffic.

It may need the carrier detect connected.

Link to comment
Share on other sites

Nick,

I have a port monitor and it shows the properties of the port, and it can be opened in hyperterminal and I can send bytes.. but the DVM always shows RTS at 5v (well 4.92v to be exact)

I know that the EQ cable may not use RTS, but as all 6 wires will be terminated I don't want to take any chances

Link to comment
Share on other sites

Sorry guys didn't mean to confuse you.

Yes, the idea is to try and use these 5v TTL RS232 USB cables in several different projects. The original project was the dSLR shutter release which uses the RTS line to drive the Opto Isolator. The other possible project was the SPC900 web cam mod, which uses RTS and DTR as the control lines, and then lastly there's the option of using one for an EQDIR cable, which seems well documented already.

These TTL cables could provide a much sought after way of using these devices. My little Asus 900A looks swamped with so many bulky standard USB / serial converters hanging off it.

Reading up on the spec the cable can I beleive source 75ma, so you may be rignt. I'll try connecting the opto direct between RTS and GND and see if that works, but my logic suggests that as it's constantly high (even with just a DVM reading) this will drive the opto constantly !

I appreciate your patience with this one... and again sorry for the confusion.

Link to comment
Share on other sites

OK - couldn't work it out - removed the LED and still didn't work. PC had been up for around two weeks so re-booted, and when it finally came up tried again (jumper wires going to the DB9 connector) and it works :) - I can control the shutter via APT.

Ruddy Computers !!

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.