+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Junior Member level 3
    Points: 264, Level: 3

    Join Date
    Nov 2016
    Posts
    29
    Helped
    0 / 0
    Points
    264
    Level
    3

    Usb to rs232 converter to drive transistors

    Hello,
    im making a simple mini project to turn on the lights by using barcode scanner,computer, usb to rs232 convert, transistors, relays, and bulb
    im scanning a barcodes and im processing it through software in computer and generating a logic '1' or '0' depending on the barcode, and taking a output from computer as logic '0', or logic '1' and the corresponding transistor is turned on and the relay is driven and lights the bulb but whether this logic works with transistors i dont want to use uc if it works with transistors how do i need to connect please suggest something. Sorry if any thing wents wrong up there

    logic '1' = turn on green bulb

    logic '0' = turn on red bulb

    here is the connection
    Click image for larger version. 

Name:	PC TO TRANSISTOR INTERFACE.png 
Views:	16 
Size:	90.9 KB 
ID:	138076

    thanks and regards

    •   Alt21st April 2017, 08:45

      advertising

        
       

  2. #2
    Super Moderator
    Points: 44,692, Level: 51
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    9,151
    Helped
    2201 / 2201
    Points
    44,692
    Level
    51

    Re: Usb to rs232 converter to drive transistors

    Hi,

    Please give useful informations.
    We donīt know what signals are available at your "USB-to-RS232" converter. So how can we say what where to connect.

    Please clarify: Are there true "RS232" or "TTL" levels?

    ***
    The circuit neither work for RS232 levels nor for TTL levels.

    ***
    Your circuit tries to activates either the one relay or the other relay. Then on each relay only the "NO" (not "NC") contact is used.
    --> why donīt you use a signle relay but use both NO and NC contact?

    Klaus


    1 members found this post helpful.

    •   Alt21st April 2017, 09:13

      advertising

        
       

  3. #3
    Junior Member level 3
    Points: 264, Level: 3

    Join Date
    Nov 2016
    Posts
    29
    Helped
    0 / 0
    Points
    264
    Level
    3

    Re: Usb to rs232 converter to drive transistors

    thank you sir
    usb to rs232 converters output is TTL based which is 3.3V



    •   Alt21st April 2017, 14:24

      advertising

        
       

  4. #4
    Super Moderator
    Points: 44,692, Level: 51
    Awards:
    Most Frequent Poster

    Join Date
    Apr 2014
    Posts
    9,151
    Helped
    2201 / 2201
    Points
    44,692
    Level
    51

    Re: Usb to rs232 converter to drive transistors

    Hi,

    --> then please avoide the phrase "RS232".

    Still we donīt have any information about your used module and itīs signals.

    ***
    The lower relay driving circuit willīt work. Disconnect it.
    When you connect USB_GND to RELAY_SUPPLY_GND, then the upper relay driver circuit may work with 0V/3.3V input levels.
    But I recommend to lower the base resistor to about 470R.

    Klaus



  5. #5
    Advanced Member level 4
    Points: 7,306, Level: 20
    Achievements:
    7 years registered
    paulfjujo's Avatar
    Join Date
    Jun 2008
    Location
    France 01120
    Posts
    1,218
    Helped
    250 / 250
    Points
    7,306
    Level
    20

    Re: Usb to rs232 converter to drive transistors

    hello,

    We suppose that your USB/TTL inerface has extra pin DTR ,CTS
    if true, you can use DTR or CTS Satus from "RS232" PC software , to get a stable commande "1" or "0"

    impossible via TX line ,
    except if you add a RC filter to get an average DC value when sending somme data :
    minima is 1 byte (10 bits) with data=0xFF



  6. #6
    Super Moderator
    Points: 231,355, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    39,939
    Helped
    12200 / 12200
    Points
    231,355
    Level
    100

    Re: Usb to rs232 converter to drive transistors

    Even Tx line can be used to drive static level, by set/clear break function in communication library.



    •   Alt22nd April 2017, 11:42

      advertising

        
       

  7. #7
    Junior Member level 3
    Points: 264, Level: 3

    Join Date
    Nov 2016
    Posts
    29
    Helped
    0 / 0
    Points
    264
    Level
    3

    Re: Usb to rs232 converter to drive transistors

    thank you guys this heplfull for me



--[[ ]]--