USB to RS232 to Fiber converter project

Discussion in 'The Projects Forum' started by Lascaille, Jun 3, 2013.

  1. Lascaille

    Thread Starter New Member

    Jun 3, 2013
    5
    0
    Hi,

    I am trying to make a one-piece bus-powered USB to serial to fiber optic converter.

    For the USB to RS232 aspect, I've chosen the DLP-USB232M-G module which handles all the USB conversion and provides TTL outputs.

    For the FO TX/RX I've chosen an a-create 850nm 1x9 unit which takes TTL inputs and provides a fiber signal which matches the thing on the far end.

    I've followed the a-create reference circuit for what I think is a power filter, and for the DLP unit no external components are recommended in the datasheet.

    My main questions are:

    Can I just route the TTL signals directly from the DLP to the FO unit?
    Are any other external components recommended such as current limiting resistors?

    Also any other comments are welcome! This is really not my area of expertise. I've put together a PCB layout and a schematic using the software from 4pcb which I was recommended.

    I've enclosed the datasheets for the two devices as well as my PCB layout and schematic.

    For components I intend to use:
    10nH inductor - Abracon AIAP-01-100-K-T
    22uF capacitor - TDK FK20X7R1A226M
    100nF capacitor - Panasonic ECQ-V1H104JL

    Please let me know your thoughts!
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,048
    Mine either, but one thing I know is you'll get more feedback by posting the circuit schematic that folks can see easily.

    Here we go:
    [​IMG]
     
  3. Lascaille

    Thread Starter New Member

    Jun 3, 2013
    5
    0
    Okay I have learnt a lot since last night and switched to Eagle redrawn the board and layout. I was also recommended OSH Park as a PCB manufacturer for costs.
     
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    That should be fine, provided they share the same signal ground. The USB signal ground will generally be the PC case ground, which is generally the AC mains ground if the PC runs from AC mains.

    Yes I would use a series resistor, about 220 ohms. It may save your USB serial device in the event of a short circuit.

    The other thing to consider is data inversion. The TTL serial default state is HI (5v) so ideally that state should make the optic LED off. That will give less power consumed and longer LED life, as the LED will be off during breaks in data transmission.

    However if it transmitting wall to wall data 24 hours a day then it does not really matter as the LED will be on/off about half the time anyway.
     
    Lascaille likes this.
  5. Lascaille

    Thread Starter New Member

    Jun 3, 2013
    5
    0
    Hmm your point about the TTL levels is well received, I didn't know that...

    What I am actually doing is replacing a serial-to-fiber interface unit which connects a control laptop to a piece of high voltage test equipment, using the FO cable for operator position electrical isolation.

    The manufacturer is defunct but luckily I have the schematics, which are in Mandarin...

    I've attached the schematic for the old interface unit which uses a MAX232 serial to TTL converter IC. The TTL outputs from the MAX look to be hooked directly to the FO output device (the OCM3351 - which is pin-compatible with the OCM1351 I am using for my new box)

    So the question you have raised - are the TTL outputs from the USB232M the same polarity (i.e. data1=low) the same as from the MAX232... and I will have to try and find that out.
     
    • 9-2.png
      9-2.png
      File size:
      17.9 KB
      Views:
      73
  6. Lascaille

    Thread Starter New Member

    Jun 3, 2013
    5
    0
    I found the schematics for the receiver part - it looks very simple. There's a switch to select between the FO input and a DB9 port on the front of the device itself (interfaced through another MAX232, not shown), and then the TXD/RXD signals go straight to the CPU on a separate board via the header CZ805.

    So it doesn't look like there's any inverting of the signals anywhere in the path - the TTL outputs are connected directly to the FO module.
     
    • 9-1.png
      9-1.png
      File size:
      12.9 KB
      Views:
      33
  7. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    You said;
    "For the USB to RS232 aspect, I've chosen the DLP-USB232M-G module which handles all the USB conversion and provides TTL outputs.

    For the FO TX/RX I've chosen an a-create 850nm 1x9 unit which takes TTL inputs and provides a fiber signal which matches the thing on the far end."


    The fibre optic device takes TTL level 0 to 5v serial, which requires Hi = nodata.

    The USB->RS232 device you chose outputs RS232 +12 to -12v levels where -12v = nodata.

    What we need to know is re the fibre optic driver, does input HI = LED on, or HI = LED off?
     
  8. Lascaille

    Thread Starter New Member

    Jun 3, 2013
    5
    0
    I included the datasheets for both the DLP232M module and the FO module in my first post - I'm not seeing myself that the DLP232M outputs 12V. The suggestion on page 5 of the datasheet is that if you tie pins 10, 11 and 12 together (as I have done) then you get +5V levels on the data pins.

    The question of whether the outputs are inverted is yet to be answered.

    The FO module datasheet again doesn't mention inversion - page 1 "Standard TTL data output with signal detect indication, compatible with CMOS level" so I am guessing that the FO module transmits (i.e. LED on) when the level is high (TTL) and the receiver works in a similar fashion, light received = output TTL level high.

    The datasheet for the IC which is the heart of the DLP232M (the FT232BM, enclosed) indicates that the chip can be connected to a serial port directly by using a SP213 interface IC. The datasheet for _that_ IC (SP213, enclosed) suggests on the oscope diagrams on page 3 that the SP213 handles the inversion (i.e. inputs/outputs on the TTL side are high = data 1 and on the serial side are high = data0.) The internal schematic of that IC is on page 12 of the datasheet.

    This would suggest that the output of the FT232BM is TTL-high = data-1

    If we assume no other inversion takes place along the chain (which should be true because the chain is TTL-from-DLP to FO TX to FO RX to CPU) then the data that reaches the CPU will be TTL-high=data1
     
  9. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Sorry i didn't open the PDFs.

    Ok, if your USB module is a normal FT232 USB-TTL serial module then you can just connect the 0-5v output of that to the 0-5v input of the optic module. (And they need to share the same ground obviously).

    The USB FT232 device will output 5v when there is no data.

    Can you test the optic module to see if LED is on when the input is 5v? If it is IR LED and not visible you could test it's power consumption.

    Like I said this only matters if you are sending data infrequently, and if you care about LED life etc.
     
Loading...