Page 2 of 6 FirstFirst 123456 LastLast
Results 16 to 30 of 85

Thread: Simply serial input circuit

  1. #16
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    @Frodo: Yes, assuming you hook the pole up to one of your serial input lines.

  2. #17
    MySQL Error MatrixPC's Avatar
    Join Date
    Sep 2003
    Location
    Beach City, Socal
    Posts
    4,053
    Rando, I don't have VB.NET so I can't see what the code is. However I wrote a test one on VB6 to see how it work compare to your exe one. Now I need a serial cable so that I can use the "paper clip" switch to check the port. Maybe base on this I can code some thing like software shutdown controller as well. Now I don't really feel comfortable driving with the screen on and the cops is on the next lane.
    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. #18
    Constant Bitrate
    Join Date
    Jun 2004
    Posts
    131
    Quote Originally Posted by Supermike
    FetLyd, were you thinking more of something that will display the reverse camera without going thru the computer? If so there is a way shown in the following thread, however it requires the purchase of another $70+ gadget to get it working. I am hoping somebody will find a way to switch the Lilliput from VGA to Video1 and back using a relay, so I could just have the backup cam come on whenever I am backing up - even with the computer off.

    Displaying reverse camera on a carputer?
    No, just a simple usb webcam.. But however, i just cannot figure how to wire this damn thing.. And yes, I'm slow with these things..

  4. #19
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Quote Originally Posted by MatrixPC
    Rando, I don't have VB.NET so I can't see what the code is. However I wrote a test one on VB6 to see how it work compare to your exe one. Now I need a serial cable so that I can use the "paper clip" switch to check the port. Maybe base on this I can code some thing like software shutdown controller as well. Now I don't really feel comfortable driving with the screen on and the cops is on the next lane.
    You don't need VB.NET to read the source files. They are ASCII files and can be read with the text editor of your choice. There isn't much relatioship between this source and what you'd do in VB6. In VB6, the easiest thing to do is use the MSCOMM control. Just open the port, set the output lines, and enable events. When an event comes in, just check the status line values. Shouldn't be more than 10-20 lines of code.

    For a shutdown controller, you might just use the built-in UPS service in XP. It can be configured to simply monitor the serial status lines for low/high values. You'll have to figure out which lines it monitors for which things. I believe (but am just guessing) that it's CTS (battery low), CD(UPS on/off), and RI(Line / Battery). I could (and probably am) wrong about that.

  5. #20
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Here is a nicer schematic for those of you who like clean pictures.
    Attached Images Attached Images  

  6. #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!

  7. #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

  8. #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

  9. #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.

  10. #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

  11. #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.

  12. #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!

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

  14. #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

  15. #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, ...).

Page 2 of 6 FirstFirst 123456 LastLast

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
  •