Need help identifying circuit board

Discussion in 'General Electronics Chat' started by beire, Feb 11, 2016.

  1. beire

    Thread Starter New Member

    Feb 11, 2016
    3
    0
    Hello,

    I'm new here in posting, and would first of all like to make clear that my electronics background is VERY limited.
    So please bear with me in this thread.. :)

    My "problem" is as follows:

    I have a "device" used to interface a machine with a pc to read out all the various data.
    The problem is the manufacturer is asking heaps of money for it. And looking at it, is doesn't seem very much worth it.

    It's converting the machine's interface to rs232 with a d9 connector.
    I use it with an rs232->usb converter on my laptop.
    It also uses a usb connection solely for power supply (i guess)

    Below you can find 2 pictures of the device:
    http://users.telenet.be/bart.e/cable1.jpg
    http://users.telenet.be/bart.e/cable2.jpg

    I was wondering if this circuit is something that can easily be recreated using available parts.
    I see it uses a max232. So i guess it's a TTL to rs232 converter?
    The smaller black ic's are optocouplers? So i should find something that's also isolated.

    I find a lot of ttl to usb converters online, like this:
    http://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232R_CABLES.pdf

    Is this really the same basically? Can i measure if it's 5V or 3.3V?

    Thank you. If there's more info i can supply, just ask..
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    RS232/USB $1.49 w/free shipping on ebay.
    Max.
     
  3. NCSailor

    New Member

    Jun 15, 2013
    27
    6
    You haven't really given enough information for anyone to answer your questions.
    It does appear that you are asking the correct questions, however, only you have the information needed to answer them.
    It does appear to be what you think, although it also appears that the USB data pins are connected to something. That may just be to enable greater power output from USB power source but needs evaluating.

    Since the "machine" is unknown, let me just say that the isolation could be important. Is there any chance that the ground on the "machine" could ever come into contact with the PC case, connector, grounds? Your current USB to RS232 adapter may provide all the protection you need, however, if you replace this with a standard USB-TTL converter you run the risk of losing it.

    Without trying to reverse engineer the interface from the picture of one side of the PCB, I would suggest that there are a few too many components for a simple TTL-RS232 Interface so something else may be going on that is important. Since there appears to be no logic or switching components, it may just be noise filtering and the isolation.

    Assuming you already have access to the "machine" and the appropriate software on the laptop, what I would suggest is to buy, buy/modify or build a USB-TTL interface that completely isolates the Tx, Rx, VCC, and Ground. Also make sure that you match the signal levels (3.3V or 5.OV) to their respective devices: PC and "Machine". Then try it. My guess is that it will work.
    Graham

     
    Last edited: Feb 11, 2016
  4. Sonoran Desert Tortoise

    Member

    Oct 30, 2014
    53
    34
    You are leaving something out of your description. It looks like it plugs into a 4-pin connector on one end, a DB-9 connector on the other and has a USB box in the middle of the cable. What three things is this connected to at the same time? Is the USB simply an alternative to the DB-9 and you use one or the other or do you really have all three connected at the same time?
     
  5. hp1729

    Well-Known Member

    Nov 23, 2015
    1,943
    219
    Yes, "P112A" are TLP112A optoisolators. Unless there is more on the other side of the board, yes, there isn't much worth a high price there.
     
  6. beire

    Thread Starter New Member

    Feb 11, 2016
    3
    0
    There certainly is a chance the machine could come into contact with the pc case. My real purpose is to connect a raspberry pi to it and read the data through that.
    But i'm not looking to hook it up directly to the gpio. I would more like to keep it through the db-9 or usb.

    Can i easily measure the signal levels with a multimeter? I don't have the device at my location at al times. So i can't check immediately.
    I can find a lot of usb-ttl devices but not so much with isolation.
    In one the manufacturers manuals regarding another type of machine i can find reference of this converter:http://www.serialcomm.com/serial_rs...ter/rs232_to_5v_ttl.product_general_info.aspx
    In my thinking, the same manufacturer, chances are communications would be similar.


    The usb cable connects to the PC together with the db-9 (converted to usb). I really should check if the communication still works without the usb...
    No device is recognised when inserting the usb cable though. So i guess it's just there for power needs (or reference voltage??)

    The newer usb version is 450€ without vat.
    There are no other components on the backside of the board. So yeah, i'm thinking it's way overpriced.

    If i could source this devices from 3rd party it would mean a lot to many people.
    I can't really tell what device it is right now, but no information on the protocol is to be found anywhere on the internet.
    I started reverse engineering the data transferred by the proprietary software and have found a lot of data already.
    A lot of people would be interested in this i think.

    Right now i'm busy trying to find a spare main circuitboard to experiment on without the risk of harming my working installation.
    I have one i dismantled in working state a year ago but it seems dead now...
     
  7. NCSailor

    New Member

    Jun 15, 2013
    27
    6
    I've looked a little more at that PCB and I believe the isolation is critical. The left side of the picture (split at the optocouplers) is standard TTL to RS-232. You can replace that part with an off the shelf USB-TTL adapter. I would recommend not using your USB to serial converter as it is just another device and you then need two USB ports.
    The USB on that PC does look as if it is providing 5V power for the Max232 and TTL-RS232 conversion. This was probably designed before most (all) PC's lost their serial ports and there is no reason for you to emulate a serial port.

    Now to the isolation. The signal lines and VCC1 from the "machine" are almost definitely NOT TTL signals.
    For a moment look at the VCC1 red wire and the green T1in wire.
    VCC1 goes to the anode of the led in the optocoupler. The cathode is connected through R5 to the Green T1in but note R2 between VCC1 and the LED cathode. Assuming that T1in goes to ground when low, R2/R5 form a voltage divider to reduce the voltage across the LED. THe specs of that LED suggest a voltage of 1.42V and a current of 16ma to operate the LED.
    Unless I am totally off in space (it would not be the first time -- It's been a long day), this means that VCC1 is in the neighborhood of 50V.
    Assuming my math is correct (see attached), it is, of course, possible that T1In is not zero. BUT, either way, you will have to isolate these signals in a similar fashion to the board picture you provided. The power for one optocoupler will come from the "machine" and the other will be powered by your USB. There would be no connections between their ground(T1in???) and your ground and you would need to make sure that any grounded parts of either device did not contact each other unless you know that one is floating (i.e. not connected to Mains ground in anyway.)

    Graham
     
  8. beire

    Thread Starter New Member

    Feb 11, 2016
    3
    0
    Thx for your detailed description. Seems it won't be THAT easy.
    Am i correct in thinking it would be easier to retrace the circuit board and clone the schematic?
     
  9. NCSailor

    New Member

    Jun 15, 2013
    27
    6
    I think it can be fairly simple, but it would be worth taking the time to understand the right side of that pcb.
    Basically it is a "machine" Tx and Rx interface to a TTL RX and TX.
    If you start with a USB to TTL complete interface (can be less than $3.00) you would simply need to add the isolation interface.

    The only "difficult" part here is choosing optocouplers and resistor combinations to match the respective voltage requirements.

    The machine T1in connection would be connected to the diode side of the optocoupler with appropriate resistor divider to match the machine voltage to the LED requirements. The transistor side of this opto would get its power from VBus and connect to the TTL input.

    The "machine" receive connection would go to the transistor side of the second opto which would be powered by 'Machine" VCC with appropriate resistors to match the voltage requirements and the "machine" ground. The TTL output from your USB-TTL interface would connect to the LED anode and the cathode would go to your circuit ground.

    The capacitors on the right side of the board are for filtering and you should also include the equivalent.
    You do need to be mindful of voltage specifications for the optocouplers and capacitors connected to the "machine" power. You can make sure you stay within the limits using resistor dividers as was done on the board.in the photo.

    I think the first thing I would do is measure the VCC1 voltage with respect to the common ground on that 4 wire cable, and then try to determine the voltage of the high and low signals that the machine sends and expects on the Tx and Rx lines. These can probably be inferred by studying the resistor network on O2 which is not visible in the photograph. They are probably VCC1 and 0. These would need to be reduced to match the transistor side specifications for the opto that you use.There must be some reduction on the photo pcb as the Toshiba opto has a maximum supply and collector spec of 15V.
    Graham

     
Loading...