Page 3 of 9 FirstFirst 123456789 LastLast
Results 21 to 30 of 85

Thread: Simply serial input circuit

  1. #21
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Quote Originally Posted by rando
    Here is a nicer schematic for those of you who like clean pictures.
    Thanks. I like clean pictures.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  2. #22
    MySQL Error MatrixPC's Avatar
    Join Date
    Sep 2003
    Location
    Beach City, Socal
    Posts
    4,053
    Ok I think I got the program to shutdown any running application if pin4(DTR) and pin6(DST) are shorted and DTR is high.
    Basically here is what I have so far.
    When the application load, it read the configuration file where you have the name of the application you want to shutdown (like DVD/video applications) one by line and stores it in an array.
    Now if the comport is connect and DTR is set to high, the program will set a timer for how often it will check for restricted application and shut it down.
    so far I was able to shutdown WinDVD, MediaPlayer, web browsers (opera and IE). I can't find a way to just shutdown Winamp Visualizer and Video screen. I need to find a child process of winamp.
    btw it is written in VB6.

    As for the SDC part, well, I already figure out the pin that can be shorted like pin 4 and 6. When pin7 (RTS) and pin 8 are shorted, CTS will be low. But if pin 7 and 8 are shorted and RTS is high, CTS will be high. Now if the pins are disconnect, CTS will be low (RTS is still high). So
    case -- pin7 & 8 ----- RTS ----- CTS
    1 ---- shorted ----- high ----- high
    2 ---- shorted ----- low ------ low
    3 ---- unshorted --- low ------ low
    4 ---- unshorted --- high ----- low.
    Now, when the key is in ACC that will drive a relay which will shorted pin 7 & 8 (case 1) and set RTS to high. If RTS still high, but CTS is low, you know that pin 7 & 8 are disconnected which mean ACC is off (case 4). If the pin status is in case 4, the software can go into it countdown mode to shutdown the computer.

    Now for the wiring, you need 2 relays to control the inverter or dc-dc psu. Basically the 1st relay is driven by ACC line and the 2nd relay is driven by the PSU output. Someone in this forum did wire 2 relay like that I can't remember.

    Any input?
    2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
    89 Supra Turbo P3 600E@750/Abit BE6 II, Alpine M-BUS Car2PC.
    Y2K Accord Dell GX150
    RoadRunner is the best FE PERIOD
    EmoRebellion is a SCAMMER

  3. #23
    Variable Bitrate Supermike's Avatar
    Join Date
    May 2004
    Location
    AZ
    Posts
    294
    MatrixPC, was this the post you were looking for:
    2004 Toyota 4runner

  4. #24
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Yah, I wired it like that, but only used 1 relay and two diodes. Either way would work. @Matrix, I'm not sure you can guarantee that CTS is low when it doesn't have an input. Do you have a link to an RS232 standards description that stating that floating inputs are always low?

    In any case, if you use the original circuit, it should support your application shutdown controller without modification. Just use the same set of outputs with a new input and another relay.

  5. #25
    MySQL Error MatrixPC's Avatar
    Join Date
    Sep 2003
    Location
    Beach City, Socal
    Posts
    4,053
    rando, I am not sure what is the standard. I am just playing with the serial port and that was what happen. Since I am not checking for the voltage of the serial port, instead I am checking for if pin 7 and 8 are shorted or not. It will work fine if the PC shutdown propperly. If the PC hang while shutting down, that method won't work.
    I think I would just keep the hardware shutdown controller I the sproggy has. It works fine for me.
    2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
    89 Supra Turbo P3 600E@750/Abit BE6 II, Alpine M-BUS Car2PC.
    Y2K Accord Dell GX150
    RoadRunner is the best FE PERIOD
    EmoRebellion is a SCAMMER

  6. #26
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Quote Originally Posted by MatrixPC
    Since I am not checking for the voltage of the serial port, instead I am checking for if pin 7 and 8 are shorted or not.
    Well YOU ARE checking the voltages. When pins 7&8 are shorted, CTS always equals RTS. When they are not shorted, CTS could be low or high, unless the RS232 standard guarantees otherwise. Your solution assumes that CTS will always be low. This may be true for your serial port only, or not at all. Just because you did a test and it was low once, doesn't mean it will always be low. Input values between -3V and 3V are undefined in RS232. When 7&8 are disconnected in your circuit, CTS is floating. Thus it is quite possible that it's value might randomly latch between high and low values.

    In any case, the cost of a DT relay is approximately the same as a ST relay. Using the DT, even the possibilitiy of it not working is eliminated.

    With respect to the machine hanging upon receiving the shutdown signal, the only solution to that is to build some sort of external timer that will force the issue. Like you said, the sproggy shutdown controller should take care of that.

  7. #27
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Testing now
    Attached Images Attached Images  
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  8. #28
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Woohoo!

  9. #29
    Constant Bitrate
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    118
    hey guys good idea that thing and really easy to build. but i wont use a switch i would use the car key i know that there are connectors somwher behind or plugged into the radio that can tell you the position of the key(normaly used tu turn radio of when stoping the engine) . i dont know how it works exactly couse im not a mechanic but im a programmer and i know it should be very easy to implement it maybe into frodo player.

    and another idea where to use it... if you are driving backwards you can put a magnetic switch to your back lights that connects two pinns and the software turns on the webcam mountet to the back of the car.

    cya

    sry for bad english

  10. #30
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    @erazor: there isn't really a switch in the circuit. Frodo just used a switch to simulate the behavior of the relay. The idea is that you hook the relay upto whatever signal you want to detect (break lights, key on, reverse lights, ...).

Similar Threads

  1. Battery based tank circuit (tested)
    By Ricky327 in forum Power Supplies
    Replies: 241
    Last Post: 02-13-2008, 04:43 PM
  2. Replies: 97
    Last Post: 09-18-2006, 01:56 PM
  3. Bad Serial Ports on EPIA M9000
    By wi77iam in forum General Hardware Discussion
    Replies: 6
    Last Post: 05-06-2004, 11:49 AM
  4. Girder vs MSComm, different input through serial, why?
    By InFix in forum Software & Software Development
    Replies: 6
    Last Post: 10-22-2002, 08:49 PM
  5. Via Mini-ITX Epia 5000 serial port not working
    By vash in forum General Hardware Discussion
    Replies: 2
    Last Post: 08-13-2002, 08:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •